[open-ils-commits] [GIT] Evergreen ILS branch master updated. b77e56f5ee450eacaec9b9ff51ec6ce6098faea8

Evergreen Git git at git.evergreen-ils.org
Tue Sep 13 13:09:39 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  b77e56f5ee450eacaec9b9ff51ec6ce6098faea8 (commit)
       via  32b1bc4b6407d09836227caa7aa957cb058ff312 (commit)
       via  f3da4ed4c596734d4a3f69f8886d0e688a7a69b1 (commit)
       via  f248bb4ee44451f5e6c390030c28daa0b031ee95 (commit)
       via  5c49a67dc363d7ba11a0174f9268601ac37ae5bb (commit)
       via  24a78a9a3e21a526813a48b79939e69276caab6f (commit)
       via  3556ce0756e19352c13e427fa0f34e4df69ea864 (commit)
       via  ebbdf0d928606a12017d4e0c61662add2ebde923 (commit)
       via  5cf42881b2c9419bcb3341877e72386327b94773 (commit)
       via  77c01470c2b9075bc8873c6caa3ec8e72cfa9c6d (commit)
       via  5718324ede7eb1b7ab7a9c353ae6b8e79788f0a8 (commit)
       via  07fb02a4a2a0e49ec29854532efc90d75a01e7b0 (commit)
       via  9287fe8b68d71212eaed662ea30f365e67a328bf (commit)
       via  5f75e36872392462528da9827d6f1b3acedf6f7d (commit)
       via  3c6c8d2a58b28b6dc0cbc7aba7e4285a95bfd47c (commit)
       via  e9d5a28707bf7dca0ba7b365d6d117233f07a50c (commit)
       via  576f0db862b08f8f73c8b2b7e5ba4f7ec9a9e16d (commit)
       via  e9ff7108bc5b61c7db42cc1f5b6a4c794b86b71f (commit)
       via  50e9fb19eff2e3ea8b1f21b5d127bc3bc5bed012 (commit)
       via  66c45b647d76138c6290b56fba1110d2e3fabf62 (commit)
       via  653a15ed049f7a46734cab5f631fb5ce171e6034 (commit)
       via  6e0fe3cf1b370b7e7b4aa31920142783d726c7bd (commit)
       via  5366725511ca29ddeef81f92be9a92b9638ad8a2 (commit)
       via  9f3c3d09cf1b2dc98ad2fea983aa91de39c03888 (commit)
       via  09b52f79bf3e693e2a2be78b47a2a9c54c286552 (commit)
       via  9c04d5d814cf767faa59b105d7b88b28f58b8069 (commit)
       via  93182fe142d544b7d969b561bdfa9ad38d9c8138 (commit)
       via  7735c34215e733bbe7e66a2c504d3baaf5694436 (commit)
       via  46e233722f9d1ccec1bd97816bb055caa12f8096 (commit)
       via  1e67a95b6cecaa524d67721367f7cb003245be7e (commit)
       via  5684176224d3a6ae8d8d618c13b031a04a16328e (commit)
       via  a05888910b5c3d360de24399f332881d32a4cab9 (commit)
       via  447cc4abd73074c85cf03bd156020f7f42a73eb4 (commit)
       via  15c70c70e474fa234534adc1b0cf75a7812a65df (commit)
       via  b29b7fcf42ee7f72c48070e2eb565d41cc5271f1 (commit)
       via  6a11ed573f837bd28f8adf106e6a54ba1c2f9669 (commit)
       via  46d797f76c8ba3c433ec070d98886a4facfd726c (commit)
       via  64961f464187503fa4d282a47f1e54af9f0c9ac7 (commit)
       via  7e9faaa523a3f93f6d1479b29efffc8970e7c0d2 (commit)
       via  bbf38994659d89d1e61a0c8c8e4232821f15c4c4 (commit)
       via  68acaf4a6ba6471a56a201337fe6594fa4a1df62 (commit)
       via  88c85fc8ef68db2477a0afd70650f225cc3cddc5 (commit)
       via  7f1e214e51edc9ba0cd2beb5a6693325bdebb820 (commit)
       via  6a244e866430fe67c5ceea408c163dc2236de929 (commit)
       via  e5ff20ac80dffbc7fd6f07d27bd6a1024dfa1c72 (commit)
       via  7ad01367e36c6b8dd0a07590c8708271641ec567 (commit)
       via  2f2613ef6835749f7e85069c3668b465da6d2889 (commit)
       via  de2ca6f5dd4841397462921f8a74b2546389ef1f (commit)
       via  9320c6451c38908fbe19d2565bc1c3374164a613 (commit)
       via  a50662d93bac54c92e3e4672cde8f0fefc680602 (commit)
       via  793f2829c4aeaa99de5c18693b61ffb543e22c1d (commit)
       via  5e4a6150df52d23195637a14501f28da5fe2f81e (commit)
       via  2daaac232315c858aa13166885e8b2ab252c103f (commit)
       via  88fd947e16d750f6d48f8f2618f09f78cfe19a40 (commit)
       via  5c86e9989a8d6076ddb206faaf29815dbe4ec828 (commit)
       via  e7b515aa363e3990fdbe7f5b6104999911e568a8 (commit)
       via  514d6e5878d46971b012a08b4582c1880d98daca (commit)
       via  e3fb1e9f5e1629f4742a70a6ebee839339ddb3c7 (commit)
       via  38991ac4191498188652ecdc7ab898b28fa9da20 (commit)
       via  c212d670eae1603942c56342ab13dfa8ef3777a3 (commit)
       via  54a37f381503b47b042efcfe37e784123eeb5773 (commit)
       via  8cf890a519236156202d0f4505aee63f3934a70b (commit)
       via  bf452cc06e40b4fc3cae63965c37882efc6075c5 (commit)
       via  cfe78d6cc6da1a631817b673cc3841458fbf6ccf (commit)
       via  bcdf0d18670f80d57f6cdb7b50259ce74c4faf25 (commit)
       via  87f00eefa05b039019464aac9d0679998f36f6d4 (commit)
       via  e97ae45e48e3df2fb697886d8cdef61f9e24228e (commit)
       via  d1b79a261ce05c385cfe334d829470fd63966f37 (commit)
       via  5978a4f9f74ccaef678a7bc664231cda4e1592b7 (commit)
       via  ca2d65ded730e1ee83b6dccf6e702f0665acdd28 (commit)
       via  5c43defce39395e1e254be914241ef9a39ef1b5a (commit)
       via  a5ea78eb3092b5367204bb90afadce63ff100294 (commit)
       via  c601157a51cf90a71b291958e33278400c402089 (commit)
       via  d35910fa12d279687b96665f1e1dd60b2ee58f10 (commit)
       via  f7550e1a26ec9eae0927b03516e5ce214204885b (commit)
       via  e7537865c2486e643d47d3974eb6e7d519c2c201 (commit)
       via  3c4c4ef5f65c0ad961b47063e6ab1dde2ff35fa3 (commit)
       via  2a725966f0a8ba80ecaa5f1b7533e8b5c1df650b (commit)
       via  2e39c96db9d271e35072a10c9b4b55c3c8840677 (commit)
       via  2af9bebeeb2dd6ceab91d44010cf214701140143 (commit)
       via  d842599e0df6cb7cd70080eb85556780af078224 (commit)
       via  43cab367d7b6bea7481f252c2e270f1d915fd783 (commit)
       via  7b7f8360915b1fa2ee2406a4e695519dd5c3d70b (commit)
       via  21b7467c71a649b6e07558314c506e3f44945dd5 (commit)
       via  415f78c9862d853d8412f339a29354c58ab56517 (commit)
       via  60cb2b9d3eca7b2d1807bad96b06ef7befe469dd (commit)
       via  23f951a15724538e67cef3529cc81f233077e66f (commit)
       via  060e9c47484116a1fcbdccb47ba4e349138f4466 (commit)
       via  f67c71f4452d184693b59bfea43215fa100124b3 (commit)
       via  eb25c85bcf277e341a94bb7d8bf5b70c045ee0e9 (commit)
       via  b38535de56dfd8a909811bf9822c90e6d679fdf6 (commit)
       via  9a3c9bd5b4fdc0e40078c8bd726623e762c8cc13 (commit)
       via  16b9e665371dae76fde0db3e0b63387e89a895df (commit)
       via  deadf59b3d98b52ee1175843c7fe91836cfb16ae (commit)
       via  f95c4db643391cbb63f35ff321dc5cbbac75b6c3 (commit)
       via  861fcbdede629fa6f48def88925aaf9f73627cc9 (commit)
       via  623b057c2f582d03109560b69ad74d08d266e7aa (commit)
       via  246b9c0574f05e3e7a3cf167d07682f87a418612 (commit)
       via  6db2f588280e5181b274cb914050f26f5f265348 (commit)
       via  75aeccc2be082e5fc35578a10f4c554369e2697f (commit)
       via  72a2d5b8855d5d22ca6865a539a4552404cd32a6 (commit)
       via  f040584c589d77486c39fbd1c77438c48a282200 (commit)
       via  f77c3d014fdda5890d7f7ff1d9d14095dc2377ce (commit)
       via  ef4e3ea51a57cc8d112b809711023bbb9999f53c (commit)
       via  06d945794fca67c693c1691e1d38e39643fbe500 (commit)
       via  0d0cc97fa8b58e0044ecc44633e5c109d551be72 (commit)
       via  90eb2afa05b549c11e7ae6cd8c5b805e1749a485 (commit)
       via  87671d4fc36d64de375e4d4024f817d3c5b09606 (commit)
       via  5a6ee27c30cff2e26916623a7bc9a12053840d33 (commit)
       via  abef2d3dd1b3fecc02dd2eaa99da8def00fec1b5 (commit)
       via  110a7fb2222833875b50da601539bce210439191 (commit)
       via  4fa33a9e8b20655709bb636c3c1cd22bb6478e41 (commit)
       via  b795757787c3cd1aa8710eaeccd1c7fde991ac17 (commit)
       via  bf6ebc61b5573667d6e8c42d5362c710732bc66d (commit)
       via  f78e76ca664df88b29d01acc6c4b509c361ad327 (commit)
       via  60af82af2ce56af6210c5daa9acd116b87395a80 (commit)
       via  d9d36ec6b8ab9f5bfffaad4babc6025f93508aca (commit)
       via  67e383b7e3572631230f818cbbcd91fdb2542f08 (commit)
       via  9570a35ac858c91de910f6e18d59ac7e58f4af7d (commit)
       via  335f3c70a675898a0a4a3b0531a1222786ad0993 (commit)
       via  7627afcb01179a956e7bfd785cd9e79fb46fabcc (commit)
       via  78ef0457cf7c21a148b590291484fb16340bb408 (commit)
       via  72db8825b3ca72fe29f6fa0b9df838484013fe54 (commit)
       via  a94d9d750e3c75ba642fdfd6da67722f36cf8b92 (commit)
       via  2bfb4891c6908e0e3ec34f69e0393c7fc50762b2 (commit)
       via  50b4a93d3e02d48491bb5b5c95f0a869f01f86d1 (commit)
       via  f1ed6fa6b514a8e730251b93487bffb9505bd185 (commit)
       via  d9fac3e6133c13a9992bc0af3ef951fdd0cb9ea3 (commit)
       via  5ffd3a587e31c33a9fe83c91a6f7640cc8cf04b1 (commit)
       via  2612ec8f20d86e3a3241425a63ab9da6267ec533 (commit)
       via  802ae56d4115b36704d18e0d7f6b196dda1ecd3b (commit)
       via  9c85acf6a5fc8e9339c8fc7a608cfce00ef3538f (commit)
       via  11bb8b7f0c4a9baffbe99c60063d875e6ea9dc29 (commit)
       via  9cfa1e71d1463c595e522c0de02d0e8116c78834 (commit)
       via  7b6053867f06ea4b38890e20b181006503a37c87 (commit)
       via  315f5188ed208aa14559aec27980eddf4b49e823 (commit)
       via  b4e782d525ad07ab36635bb7e94090ac6ff8373b (commit)
       via  e1a67be8ef050daebe01c62da5d3f0b81cee2178 (commit)
       via  c186e123539192b23fddc6cd7683fe4a1c80c34c (commit)
       via  25934ee7b5d7934ea1d6cfbc3e9365f7bd9dacd3 (commit)
       via  05cc0b107cf5887a8d5537e0c040eb858f7b5a25 (commit)
       via  73d555806f2597feee62707fcf886a42d8d17c58 (commit)
       via  f32d6e3a54eb87cba907e614a5c74b338532e34e (commit)
       via  8119e5df48807336b4ffe0fe6520973dda5e1301 (commit)
       via  39632c0346c1807eddee54c28675741668d1c264 (commit)
       via  d42e656a9f0745e1bb77298fd6598faaa6d4bb69 (commit)
       via  38a258ee235af3ecd5bd1529263d1533acc08e76 (commit)
       via  694f31615e4463e6191fb62bdbbc28750320f785 (commit)
       via  e6d8b8c5d5a2d7c56239d80bf04e3362823ce068 (commit)
       via  e0f52e9d9fe6bbe0c127e70572027b026c30607f (commit)
       via  f5775686ac2023ff8502becf86a7b2317599e7b1 (commit)
       via  86e74c400a76655d90f1625a174851fec690036d (commit)
       via  f8f9b7932135b53931bc040afc8303b11827864e (commit)
       via  14ae716ceff99375347ead1ea7f4d4aadaf2cd8a (commit)
       via  15531609b8bd0b96423dbb78fd6d52b301cb18c5 (commit)
       via  fc8e74f9e2664739566cc051fc82d0bb7ce84146 (commit)
       via  024c72c037287e34550cddeb5d9131cc782e910f (commit)
       via  00a8204a3d5ce25dc1c68766f885a9eface9cf06 (commit)
       via  7c0f0dfa79b91d0e632acd958a04ef83cb4e9f06 (commit)
       via  2b3ff4a63c20d4ab4f47af9c3165b359828c0b27 (commit)
       via  5873e902d6ea484406d2b522b2b7593cd7cf0c36 (commit)
       via  2e8e2f0032bf338253c1e27e2fa4a72054f4f204 (commit)
       via  efce5923f0817b85848d73a92a5a9495c1bcabf1 (commit)
       via  ca413e996425d831fb35ece615e1c869d5831b96 (commit)
       via  bf7f53b78da2430f786ad3695382b805e1272e49 (commit)
       via  d17123022c9847cb51e6f3492ebf5151bc152016 (commit)
       via  0a798ae498e6ef48c2603dce2a91b0f0d024a0b4 (commit)
       via  9a25bc82329cc3b97f60251c17190d5bd0b57c03 (commit)
       via  5693659e2d03becf354c0ebe43d691cfd0c560fa (commit)
       via  933964c5c02332692f8725fb23764ed7e6df6852 (commit)
       via  7be480d13953efbd9b7ee4b91c4e0cf704b6663b (commit)
       via  b8a2dde209effe413057e05cb4c616dacb78bd74 (commit)
       via  c5fe526c238637ef767d881c2ca7b93a90dfb9dd (commit)
       via  a21deb11cc2c79ff70eab917d283dcf9dcab1e86 (commit)
       via  eed404686d824ca66949833e11e38c84db100ba3 (commit)
       via  de5dfd465ccb50d4e3d54b837231e7aba463aef6 (commit)
       via  1b044475a898838b57bbf92235303e8f2e5c1516 (commit)
       via  49be9ddaaf25b1c8490fdfad1eebd16aca68aa9b (commit)
       via  d919f613d89962f1b1ac457b16d3e1cc40e40c63 (commit)
       via  8e66305213488f6d9c9522304231f9a10af951e9 (commit)
       via  f1354ab6e51eb65b63b4852c6b700897e0da7f8e (commit)
       via  a05001a49f341e7440672d7d15b8ff0a9590c42a (commit)
       via  4f6a71d14f7a88fa0b52e141b165508dce891ee2 (commit)
       via  553527a256d00c7914e21291634b214add46941d (commit)
       via  def24badbf3c3074a621efa054bb8b334cd866d7 (commit)
       via  184d671809b79efc6c8a00e8fcf805c29c676816 (commit)
       via  51ff52adfad0edd97a51a0fc1cc8ae4f4e1ba315 (commit)
       via  9bf1f90902ea31306462f3b4ed36fbaf87f8e29e (commit)
       via  161a58e33efb65920782e4be78616e8a8b3a8f33 (commit)
       via  12949f170b42966cb6d40ef1f41948150334c145 (commit)
       via  b6f3bc253e5b3e88dc8ab140f84ae34ff6841263 (commit)
       via  c15551d3faed8487ebebc955b45135eb44b82fe5 (commit)
       via  efe72c845ece9ba7d0f32383a0c9d0894f5d0eaa (commit)
       via  52103ef04e091cd05a6049b6657256238889370a (commit)
       via  c7104b9147325b77d7966c4160a83a2eb74259c3 (commit)
       via  29646f2ba7cb02e100fb0c7c3ed420079a330d90 (commit)
       via  b175867cbba18c6c37528499f911ab72a949654c (commit)
       via  d3d615f252f5353201919e3607638ac9c083abb2 (commit)
       via  c907f04e8c0af7700c681b673242cb88b0938393 (commit)
       via  052b2eea78c8e579e2bb1c94dc94111f9504b966 (commit)
       via  aa08a44a3f70715e4788f2382b38cdef236a2d57 (commit)
       via  fb2a495c47c1ae3bebce846488d9c43ae16bd4be (commit)
       via  c7f887df3702eb2f8177da4b5f582c42ef8bddf8 (commit)
       via  f864b8b0fbb8033de67c4d402303c927a57745e0 (commit)
       via  3a577a48975fd39b64baaff6a78e49fb24652df7 (commit)
       via  9bd8972e5ac8fa0d56345170723ee270565a98e2 (commit)
       via  c0b13ededa3340f6f2085abf76a87e4f162a1c60 (commit)
       via  e0dbfda521e537748dc532f471fb9adf85d8dcf4 (commit)
       via  4cc810719fa755510a5de12b3b354a4101c7042c (commit)
       via  5503d5b731868c77160d74b1b48b9246fb1c48d5 (commit)
       via  b3094c0a915a690ae1e590bad318e699d767206e (commit)
       via  c88264fda8405914a735c7ca7b77e3397b53e5c9 (commit)
       via  4885d3ae21cda410e61a6841eea4614819acb116 (commit)
       via  90d3fe9923dfa0a477893cf3ec91b6f7092abf49 (commit)
       via  b77da9ed21b7602c5758472bce76755674135d6a (commit)
       via  00f61c6a03b0cf1ad67713cb0705f3d5e2adf961 (commit)
       via  777679e17299dcdcc135d493a2a9987c9357d9ff (commit)
       via  d2f3229ab5d031b125d9f6dc5320806bbb4db914 (commit)
       via  80719637f3bb1e61c24ddc0f2f6001dd9fa4392e (commit)
       via  56005d6684b42d6b15ec982c48e9d77a96d1858d (commit)
       via  d08b459f20e5774bda060f3d49e67e6ce334a579 (commit)
       via  936ab552ec7f46ed491fe1761532358d5a0d9512 (commit)
       via  cc95a8f360af2a2f03f4fe48e253fce0ff77e2cb (commit)
       via  a473e68540e532916eda31d35635bbba2dc54137 (commit)
       via  b621481cd10a5a2d177976f97565d3b143035299 (commit)
       via  01eca7f7ef95d687064270f1cab88bbd8fbb139e (commit)
       via  bded11d22c5f1f094189746dde97adaa945eab25 (commit)
       via  bc6e33e0c0f6e6edf9cb62a3463c634bd54cc50f (commit)
       via  12ca45468d394133e70555b18ca3e10029602389 (commit)
       via  e56472f0c88aed78f23c5abf6f3e460d0dc63774 (commit)
       via  d698321e9f96c2d75dab4cfe9a68a91e061cda68 (commit)
       via  28e75a88450a736f5ad4fc62b5e4e546b159e423 (commit)
       via  3f35fdbcc872c9733ace9dc07343bab7985f674b (commit)
       via  d9f76a4005169639a6e2d0f39b36ca2c0bba4a15 (commit)
       via  df8b487d183c3955c960640035a60358d843f63d (commit)
       via  5c02c79bba48a5e876b088eadf9bc4201a353b81 (commit)
       via  a6ccd35604c9c90b873d78b5ce83cb727f90bab2 (commit)
       via  b51985771dfb34c06cb889d2fa954103789d4ea3 (commit)
       via  874a4f15e83418774623109e520b712c405ae373 (commit)
       via  720cf416cf0f30f4bf8e42ff5ec08ee356fe47c8 (commit)
       via  4fc8fa24f1b6eb67a8aa8adec46d5570f8589d80 (commit)
       via  539456282b5cc2dfe363305f481aaa815c2913cc (commit)
       via  1feb47d85f731af3bf591268aabda0b2f807872e (commit)
       via  a1dcc6e518d43a920ece602dc5623941d0a82cd0 (commit)
       via  9049c7dd8cdf3e4ef9562bfaff30bce88b71b78d (commit)
       via  4a1488b028da074dc8c88a2cfa1a089e23891dd1 (commit)
       via  92ba8fa026d782c7eb2c6419f84876dca7c0b0b9 (commit)
       via  b6b49024f57a19a84e62d6b1730ba5d467340a4f (commit)
       via  2477dcc961563239cab2fa9e4d15bd57b371002e (commit)
       via  f98f6d72d0ad2d8bfcb30492df55bff738f9cac1 (commit)
       via  c9801ec327d28c4c2a6c0d3d811019538fdaeacb (commit)
       via  8b98ff9732ce921a68a28a25efe65096c2be788b (commit)
       via  be32ff5da0fbcb5e84a357e7cdd93e8eb699f2a2 (commit)
       via  317a5c8b46c299f12431370630c72dc2ab721ed0 (commit)
       via  b13ca3e8e572d893e954d308a9181a32a78e7eba (commit)
       via  80797f724a5d2c6c84fbd18fd23c1d7b84836a35 (commit)
       via  2474b08473f4e53e263103f327c17ae3eadd5f8f (commit)
       via  39d85afae9ec34d45eeeece8252e2b7daa65d747 (commit)
       via  574149d2e12daf67893d607f417ec6102cbd7ece (commit)
       via  956da091dc8cafd2b4fac0a65ffaf0b91a786170 (commit)
       via  e51477e408b1c5f818b967f809f1fc328201d2cb (commit)
       via  b05b2f2649a14f6fba24281e354b8ad7614dd572 (commit)
       via  4f23db651c2cf5aab73de5fbcb7f556d2a13101b (commit)
       via  2f5ddb2e6a90b627551a80209d2123f47e70f75b (commit)
       via  52adf7fd7a556451e3637c0849f8da4cca2875fc (commit)
       via  bb3e2a24c7cbbd633484527e0a7e886e152acf6d (commit)
       via  328c8b2cf041b5619346b888a6f6da124cedf1b8 (commit)
       via  2dd0564af5513865e1dd8da2ce03173acac7a924 (commit)
       via  38c0795a42c17d41657deccc8df93b562044ed17 (commit)
       via  0ecc6ce9f936c0153b0ef714e464ad8a0ac62c65 (commit)
       via  2cc3997a195b2e73cb98254f0528730c30a06115 (commit)
       via  4da568ab439edbfd3b230d79997b9b97821f31a2 (commit)
       via  89c08972bf83c0f06dc37c568cba6d7bcc2bf8c8 (commit)
       via  ec897aefe0b16bf5340d2788e5e23a6dd1481aca (commit)
       via  ec2621a2e0cd9f20d6389de8eb806bffec9600ef (commit)
       via  92515141688f96c0a8848f239e7bb117a6e99a42 (commit)
       via  5e4ebfb4c89552edc30c5813dfbffd871797b71a (commit)
       via  1847c54562c0e6c57cbdce2d19aaf90c12e959b7 (commit)
       via  57502460e776f40315c4126f93402c5b99b98f18 (commit)
       via  a9c6b612b29a8d30d3f66bc1736685af386822bc (commit)
       via  703fd891db1bcb409474fda7a0d4d510b05ee8f1 (commit)
       via  7ca0a42853740d4d531b87fb274089c1ecf163b1 (commit)
       via  96da048a6c8518006618eae44800cf3302be2728 (commit)
       via  73533f980e2133e0afa41cb293acd2bd728b9350 (commit)
       via  eeb7eb0b221206355213c7a958683642fb4f39b5 (commit)
       via  4f1eeb2d0e97980931a2d2e7529282b8483d3b58 (commit)
       via  69b98663d7a3497ac97794004a54575a75a315e2 (commit)
       via  e52c687f79902042793bf3e4d0b30abe7ee7fd74 (commit)
       via  00d0a00744d3ede693572acec2ef342cc299295a (commit)
       via  b1ee9ad4ef91240de7110d1748a5a3c57043da39 (commit)
       via  fbbb94c521533ef61970082aa81757feddadff52 (commit)
       via  b29048c055d68892414ece81623cc8302a36c0a1 (commit)
       via  263d4bedb965eba4b3935c3246d15db00494f94b (commit)
       via  d7228aa2bb7c782735f6f64d30b68cec5cadb523 (commit)
       via  83116b2ac0277e6b11a86a281a227203d733f9fa (commit)
       via  c59af6db9fa9397c57f8a5b5d0750c9b80c78a48 (commit)
       via  1e79f43d9eb473bf51ca2d57f50b27d8e22dc31b (commit)
       via  cd9b2cd8b9d53ba0929791e9ffe8fae5950b3a72 (commit)
       via  1f49fd9b7e2e9a69bcb1985c5c12d965313fe265 (commit)
       via  9c760edbb7e04916097cd70e223709f5ff099c0d (commit)
       via  65e493c9bc74426131438323b47d1b111d3fa005 (commit)
       via  c873055829a359bda3505e887e53ba5cd368a0f9 (commit)
       via  471e5be5386c5a548a01bb21da7a4e2b4311d890 (commit)
       via  85ca1e2f2a8568fe11cb48847539ab9ee1331e9d (commit)
       via  7317039da6611ad49edd84273f7d7457749f742d (commit)
       via  69d5e693cdbd599f566d2ca9de92266a6f855d42 (commit)
       via  bbdba9334c497e06cc1e829098913bef7e596633 (commit)
       via  d4c52cd68ca0cd5562a99fd83f8a89c0e39fc19f (commit)
       via  fa1ef0cf51f37367c01a2f86b2e29a9651ef59b6 (commit)
       via  910f63e6213ab0dbd9b9c23ab6ad5bf5e74322fa (commit)
       via  b2d7b3a89814c3acb1fd23e98f1ce566bc450a2c (commit)
       via  8b8e12c7bf4dff7e9cb740804d9315aac8d67b5d (commit)
       via  a4ff813d312d4c0032c1f946752c4ad90eb8ada3 (commit)
       via  f335a598496a253cd38eb76d210750b849d6b09e (commit)
       via  a4909125e618daa4b2dc7038f3eaf354fd712067 (commit)
       via  530b5a3f229f363a446349141f0c677a61c0bd75 (commit)
       via  8a2e62c49367f3ab9ff7efb2b6698fa0993675d6 (commit)
       via  4c765e3b4cee657819e43d16bcf46e38dc581da1 (commit)
       via  6d39c780ba9b0bf8bde075138379f773a43431c7 (commit)
       via  2daa25ba645f57e29b97a892e6933b29cd05ff19 (commit)
       via  c471501f126dabf9852ede75b17b233cd6766ed6 (commit)
       via  840e327dc445531ecee4357846e9b2197b9a8ed9 (commit)
       via  eb52a2e4637d3aa656dcfa168b47df088ed8e169 (commit)
       via  b1368bb7e259e3f95990c041d43b9b366a5bc364 (commit)
       via  a8cb26c25bed205f0a189af1ebf8fe25f43979af (commit)
       via  604f94f79ce5e238e917b02d36cb52f5e4880485 (commit)
       via  1de637fc6e3ee0c5c79ed3825eaf460e97498f47 (commit)
       via  60c2398c1f654732abda6e10ffca8e1d19be5a9a (commit)
       via  608aa3241afeff95c613df8ec306a0637155d9c9 (commit)
       via  8dd3ccefd1b6ff4fccfb1957bf7f9619de9b4191 (commit)
       via  16aa970437079882e01a0454116d90e8c715885d (commit)
       via  2e80ff099e72c6de985b1ae1000299add43964b1 (commit)
       via  e22e11aeb8e9e3afe8a6bda72d68544c4475997a (commit)
       via  b1b2d917207c83a5a714d6cb8906cef0eadb34e5 (commit)
       via  6b47f0a3204ed395be9a2e93105741430d4d6835 (commit)
       via  2f27f0b4af301597dfcb0b5ca3ac92488121dbb6 (commit)
       via  b6e7ed5d89ba5abf3898bc157e4d28cb7f0c1952 (commit)
       via  016986736eef82c29d3fb9579600848caccd20df (commit)
       via  81b398c0b2168967e89c4dbacae4c1c890acb37a (commit)
       via  1a87cbccd53269559004a367fe212a77ba5f21eb (commit)
       via  5d672af3ab051bfa47aea7b0638d99079d6bd379 (commit)
       via  d616e2e9c2282840586ce8a3fd71f9fd1fefd759 (commit)
       via  444dc606406b5ba4b38a27d7e9334ccc906240c6 (commit)
       via  8dd8381122c06bb36d7ed8804f91d0b704f289b8 (commit)
       via  5e35339e8dec5603ff5a8b69141b7e894c81f2fa (commit)
       via  f4cd158b5df5cd4ae39a8c5fb9634b961d9a3aa9 (commit)
       via  e8bb8477c41585afced154483f8a1ffa2d2b8111 (commit)
       via  4cce9694a6d72dfebf90b1bb8c5fca6d452c5389 (commit)
       via  b4f97644fba8388500816b21efdee861ef32b81f (commit)
       via  b4c66270581e2875399dc15e4a3a897427ca72e2 (commit)
       via  f494ca35a90ae7bcfac0d2097fb60ad7d8bbccc3 (commit)
       via  c300b4a91a3c259eb4ad0e69bc35f206aa903e3b (commit)
       via  383db748b9353cb0eecce0bc67bffcebbfabcb62 (commit)
       via  9106a4abea7bd4f6a7bea2410ca6976862986bb8 (commit)
       via  23e5f30bdc3b011de9072459c7d6ad81d51542f5 (commit)
       via  36858e868ac02653f2992ed437c0083fc91cad87 (commit)
       via  5e3fd6d9822b96368e20b0d6e682c59d6b7b760e (commit)
       via  7deb3ef94b0fa94c218f7ec2e14818ecba2f9a37 (commit)
       via  8ff2f5db229edd644d711add2c574d25282429b2 (commit)
       via  b109023db4f4bce464bad03b683dc0e55c8ecbfd (commit)
       via  69668c4a198fb266056b68ef3a2824c4bc3bdfad (commit)
       via  ab4a93c35dafb410162df844e1473c99e440a8a2 (commit)
       via  8f14e53142af5dd19ccb535633642c871d33c059 (commit)
       via  e99e1baddf113c3605ea58f127dadf711caf36e3 (commit)
       via  0fc734340081a5f52a20306553219afefc50b067 (commit)
       via  51b2791b38329465159b1b8df45d3963235549a0 (commit)
       via  22da181312106f8a20be7377ac9f1f6080e86864 (commit)
       via  d5d6a0a7c3dc751ff625cff8ca406236e4f2e33a (commit)
       via  35db902ccd97696d360772c43c37d4add035aff6 (commit)
       via  8859e73ad82d9080f28e64d3a7429a05ee542da1 (commit)
       via  122e7beb7228a41c77e9c9730a8c0fc17effacc5 (commit)
       via  8670942afbff4f920bd41d365c9b632da22d76cc (commit)
       via  84eaa081df57da4bb12b6b35439885914804184c (commit)
       via  710d871aac9afaa95fe0908ae77f0c9359993236 (commit)
       via  10083d85c06addf8f3fb4deda6fbb8641677d9e0 (commit)
       via  c10da0aa07811eee10318069ba800cf110a36ec2 (commit)
       via  61fde21a9a371a25f02c570a93b17883c5ab39a5 (commit)
       via  3640be40f163784c3f6f77c2bc5ac04b22ae49c5 (commit)
       via  f656e372e6b76c243e152dd2bc79c07f89be225a (commit)
       via  6ddaccc67fe997a7fbbf796107c8b77a6e3a0006 (commit)
       via  5d41928d098a2eb4e9ae96c5e822856b1e1e4515 (commit)
       via  6e0d1765c2ddce581342e2864d2b7305b03a2df2 (commit)
       via  6b09dfbc8b23d534cbd48e72325f073fbbb28987 (commit)
       via  f821b88394a33914598f1cce53ba11f042a50f98 (commit)
       via  ccbb9eef0e2d10aa46cf09a077bae904de8a39db (commit)
       via  c88c0ac5f43a408bca0fe337991517edc3aef2c1 (commit)
       via  ba77484053cd77f665c834aaa7a0f07f71709d80 (commit)
       via  a949303c5a3ec991e9e6e70af937794dd6d9c7ae (commit)
       via  32a899ff1a0f6e9fed8b17fdd6c5a459b965afea (commit)
       via  dc527f11740ee2428f83174449483a4d4b4c6a23 (commit)
       via  f083cb988c5fc99c0986f55c92aec9773a2129dd (commit)
       via  f3b42de8be849241c779035533068b730622331a (commit)
       via  50b8a947a14882e4693c006e9d1cbe5dd5aca81a (commit)
       via  a34bd6c164a40cff6c2a85397713fdbe38c0399e (commit)
       via  c4da3fe71817a2a8d02dfbd9b8f192d5fab2aa14 (commit)
       via  c8a24da4bcf1fc18312b347b6640876c04443e17 (commit)
       via  1184851a7cd793a242a6f94851735117d6153c29 (commit)
       via  37c1a6bb8147b47df5a82c37a174cb6fdf80fb79 (commit)
       via  b6d2dab531f807f4a5d503eaeb37ba39e109677b (commit)
       via  e368f3acde6c968d31e9b166f5c8193371a2f4f4 (commit)
       via  c0005a6846811da742d822a41e7d519658903f93 (commit)
       via  6f5c16aa5e1b42fd70766f326d00dd644a5d6837 (commit)
       via  3aa47438872f3e7cf43b40d9a20e3497342839ae (commit)
       via  4d36c86bca3e89703d3e2cc08f91948a8ab960fa (commit)
       via  beee382e450c90e845d7fc7a03d98404a7f4d5f8 (commit)
       via  8cd02588b36c50043cf134f1d656b3be3e79bfa5 (commit)
       via  6b9a7ac33738b3f5c1d590ed3b0db8afdf4e48e3 (commit)
       via  f1eb75992d902209707829bca24e7cbd93e0669c (commit)
       via  0ce38362afd19101a528ad9eae7487eab22b87a4 (commit)
       via  49b4999822d70d875b392903ad88d01068d2486e (commit)
       via  baf1d055df9dbcac40fe69a1bcc5de33d208a5ef (commit)
       via  f195bfa0c05aa1c23116868802f948c87137579c (commit)
       via  bcf9efbf6cdafd4daa571212ae6eafddcbadd65e (commit)
       via  04c0829feff9c9317f95606a0cdcc2a03c7839b5 (commit)
       via  02282d1558ac2b90647ec911d35bae24d50910c7 (commit)
       via  290a9b17a888302a26e95dce43d260b386b0758e (commit)
       via  81bd5b6754407ebfa3156c70f877432863cfd309 (commit)
       via  33104ab77c5467e46e4332e9f44f7a535a369808 (commit)
       via  7b6ddfa084f2a35045b7b09f49cbcd4b83fdf403 (commit)
       via  7219d04526bd19f0597bc6d96d5ec3b81ef4c38e (commit)
       via  e2c3268ab218f5f6a0428090a5de3a1056458bb9 (commit)
       via  e8e30bb6ada22c019dde28d3e9f1ed980898e64e (commit)
       via  9665615fff2e2c565db12ae559da165ed8a05c9a (commit)
       via  677b916ba8cdfcaab2ad96d9e94b93d7648cf53b (commit)
       via  83fdd35df046b1e16b2a5bdfa53e59be6ecb6661 (commit)
       via  3a112a05995104c1c0714a1ba05cc44b8b444d78 (commit)
       via  6c67b45f9e6c78ccf3872017d93d119d12d75464 (commit)
       via  189661577821bfb8b1a7e264da65f59eefd8fbad (commit)
       via  ca56f8be2d4c949a50c4b62b8f9ac38aa607c637 (commit)
       via  56537cd1aabf35e472d303b3856224a38b70f923 (commit)
       via  889edcb5d42e63384373f95e6595659cda9e01eb (commit)
       via  31a58d7ba09d9b4c2692ad92d73c8294a9a8662c (commit)
       via  9ae796818d8ed8db2ca479854adc8951796b0cf9 (commit)
       via  6de7b782d69b1cb68d558960b88f92aa06eecc22 (commit)
       via  5e2751074bf814f7508aad406b65e2ed4c26060b (commit)
       via  4b46eb6ef8c760a7557c3ce8a076ba2596d62944 (commit)
       via  bc33154ed4b47c6aa53e5d6428e056f05b283852 (commit)
       via  a4fa188d77b2317255f264264048cd4d16167b29 (commit)
       via  2ee25ad13cfb5a299b85b149881de868ecbe1de1 (commit)
       via  22b0569858c4bd9b622d9f311c42f57f544cda14 (commit)
       via  c362984c5d829ca737549f9a274db61717673492 (commit)
       via  c4424da85ae1f84c7dd6492d383281b23d0a2cc4 (commit)
       via  d43668a690345f109bd448dfec4d3c17a5522ba0 (commit)
       via  d8627efd4136a265b2cd7bc18a17082ecd9e829d (commit)
       via  c43136a300648ee8d75c8c9a427cac7061384e02 (commit)
       via  77e581204ed2dfa22e731cd658fbb21f1bbbdd40 (commit)
       via  4f59a8edfd8c2cf6169916e2cf478d6075f06170 (commit)
       via  4b13bdbd2b831260d86eca2eb2c1fadcd063ca2c (commit)
       via  34f5bcde3cfbbe6bbd66fe19cad6eb49a459a4ae (commit)
       via  a64a412ba609cd4c0058791863a61e4bf0c3ee78 (commit)
       via  dcbe6d9f3f58c0619c2c9a1717e464d5fcd781c5 (commit)
       via  5f176d5ad2eaf6c04392f96eac95b81ae14ee8f4 (commit)
       via  1d8df6cd7bc7e7d35258845bd3a2378796b45f49 (commit)
       via  84be617a0be96593cf4e24a3af32a411965556ae (commit)
       via  12ec58a976c75ba0b3894bcac1e88b7218d267be (commit)
       via  7a2b1eaff8108032cf42699f2c79c4de85de7f93 (commit)
       via  b72c5e8957c5058ff4c2c27b094030886d16d5a0 (commit)
       via  f81a2885e362e2cccfad38477e80a41e7b1df165 (commit)
       via  cb41edb32f40ebc1dc3413cb265b02403353e334 (commit)
       via  94e952161af378dd33add9a1359a8db63a847ced (commit)
       via  cd6711edc2ff5dfee5d8898d9aceacb17d9f6ec3 (commit)
       via  d079cf19efd9316c915379c6dc50f866ce3c89f2 (commit)
       via  57130f944500b02f3b3da7e5ae0305ae51b68686 (commit)
       via  adca6a073d80ad3daada46ba75d6173f4ba9aac4 (commit)
       via  fb3577b307f12d68e5ee7b94b927be77b0818ca5 (commit)
       via  2259386e0e54226a19b046d3549f28d3af00364e (commit)
       via  1489e830de16ffb5c9b7a683a5c1762e019af300 (commit)
       via  75d0e682e78e4a4255308512e2fa319bfce440e4 (commit)
       via  53e086ea91f862ce6c35c2b7ec6830a974032c6a (commit)
       via  11c746b0aa9b9ad404535e88ae534169b10f93ea (commit)
       via  e2fee3428ccaeb39080e2fdbb99e6dd18118c6b7 (commit)
       via  60d9e8074969daa0486e198b2c1083cefaff6c9c (commit)
       via  348356b966de6c1a24f13414a8b351305cd41d50 (commit)
       via  cd366e184dca610249503f0383a1c2616588dd40 (commit)
       via  d45d2a903090953951879a7154e08c584dbcdafd (commit)
       via  c4795b5a93e32be134a9c1c2c67cbb5199361547 (commit)
       via  a94577a5814edcc1980edddaa0fca6f3e3514f98 (commit)
       via  22f159aba7223e54242b58ef3684093134951359 (commit)
       via  7884a2de8073ee50b72121be3a40cd750f468523 (commit)
       via  434b259f44f8fd44e3b44f06493473199df293ef (commit)
       via  28d56b3fd700c2d0a1d22d4c31b5951841bd3e32 (commit)
       via  4161606758dc918354b4e9f84f08395c59568a96 (commit)
       via  ea533eeed1bff9d2a2226564f8d4e6e1549a17e8 (commit)
       via  ecb1ab8ec6c0709cc30f0af3b23f9b3e65fa6855 (commit)
       via  7345d59117d7db7351537606bd02b2cfcd9e0726 (commit)
       via  d131cb1e0bc4d42612854195a9e77cee607d50f5 (commit)
       via  0b93bf6e29e4161f2e28e6f55bd3678fba73b00d (commit)
       via  9c62bc217dd13fc8b65c8bff04964f7c4fceb8d9 (commit)
       via  658d9932693c82f7dd6996758ce87368c61044bb (commit)
       via  e48cdc644763b2ffa001d6aa1c79971a400d89c2 (commit)
       via  2ff0d7d9dd635707b29874a5b215317339774260 (commit)
       via  7a715144023cf2818e6b0ba153613cbddbd5061c (commit)
       via  48dd9ca1f74f18b743a28c11e303580424315339 (commit)
       via  28551579d8422b9347fbe60fed67e5a5970d40d6 (commit)
       via  5fcfd7769aa745b3bb2adcbe7944b70eb602311e (commit)
       via  34e3fa819eb813515ca5f405bb712855b854a20a (commit)
       via  212d6aad09b7a2fc35d7e908910de59f3f25e38c (commit)
       via  ab820d400f0a42aa2d72719f2df2add3140bcfa6 (commit)
       via  1d3264b48059800017e015a6aa88891978adf071 (commit)
       via  4bff85c5da3484abd509bb14508397194d18a7bd (commit)
       via  1be8e55ed89bba55d02ae37fdbd60ca3261093bb (commit)
       via  facb1136a49e424d6cd4034044119680073f88f1 (commit)
       via  a9c6a44a2f132afce4ebd3122217be35b4a5c908 (commit)
       via  e9b90c69c7c984a224685fc162391781181f2b54 (commit)
       via  fe30b6b729535b1f9c899845963fec69d14d25b4 (commit)
       via  fde9a0dad06a47a41061997dd50e5a3fd1d85edf (commit)
       via  5349a858315df2c16c0516dea647ce68735391cb (commit)
       via  77fb7ae17d8ca8e92d46d32b2973952146421c95 (commit)
       via  0c22c34e68861e60b1141b6cb3e8ce57e7e74f04 (commit)
       via  56f5b70aff671a1ae4043ee1365d609366062eb0 (commit)
       via  4745b9dd4419f9df650b0ff4c3690834f876c1c0 (commit)
       via  52bf4e3902bda36217f2cf72a4d542585f96b41d (commit)
       via  3f73ce6c242156b57c46bfa6822d0975a8b57445 (commit)
       via  a84278cd457a3a94dca106045a2cbc25bbc090d8 (commit)
       via  39312ebb7ba41f97c80dc306c0bace3162d27087 (commit)
       via  fa0c3e2472429be9e1d7434bdb0123cd6512a991 (commit)
       via  9ff0f1663bccec2017b4e53c80bfcb54db560085 (commit)
       via  ca04ff63962a2f07bf464a37bed0cf108fffaee4 (commit)
       via  04e64995d7cef5c175d22bf69c776e1e9236cb50 (commit)
       via  cecfad2e2d66f7de4f9d75a3c88fd03c6ce06b49 (commit)
       via  5c1cd414a367d25174db7a4c33ab5b8ba8ec5db2 (commit)
       via  a130393bf4c33a0e5277f710567ffe0abe2dfc56 (commit)
       via  12f19f14d958ea53f4272368e3ec763e11ad0464 (commit)
       via  4bfc1ba66b70e7a15eab4b27830f6c304e9ce805 (commit)
       via  b4b8a2fc9e9f52f23f5549e2ae7322e4899a8c34 (commit)
       via  7b9b0a50c4ce7dd03c475a221c8d642673c1ad2e (commit)
       via  8f8c17ef8cd701dc6251acb2653123ba60be213d (commit)
       via  715508c7e1c5daa1c20ad3995834924810b2dc55 (commit)
       via  4acc27155bcb2f4a4fce70d4ff58ccb01aee3bac (commit)
       via  aa0c363b49277f5fb8b64138ae11edeb93220992 (commit)
       via  cc723ab0f686fe561f9637d5ce81b0008e8b0ffd (commit)
       via  631561e04ee18e8546ba336781e3f3e854bc9537 (commit)
       via  919dcc6f99322256139341a1bd5402c1060852a8 (commit)
       via  929089a2f1e64729729167ab929d358dfafe7db3 (commit)
       via  9515bb77c2b704dae3749f9b78cf9387a9d141ad (commit)
       via  38e76948586600c578af5a274ac8f70f2dbbb4e0 (commit)
       via  8d73eaf773bd8d5bc6f4ca6044a7b5e9d5975e05 (commit)
       via  953fd15e9f2a0bfb01a26d2501646c410c21aaca (commit)
       via  6a4851db9702efaba71deabaa43fd7f6fe99b6c0 (commit)
       via  1e21bfcf685055bb4b2368c2bd29bb2ab7d079ec (commit)
       via  ccf193c0666c30ac3b0716e1b68430322d3d1d6f (commit)
       via  4ac152cf8a4f4292e1ceafc7dfd09a732239e50e (commit)
       via  47d61fb265265b852c0a8af7951dd8a4ff5eca4a (commit)
       via  9454a2da7ea7e74217a7e61c26891db4c996a2ba (commit)
       via  ec7ff3e4f273bd202e08e60de99fd3be6378f85d (commit)
       via  5405d36625ac5358821900e0cab9a42871249e6f (commit)
       via  cae2a462d6e1591b2ba2cb34f92b863739cca41b (commit)
       via  270ac10170d6919981e16180ccfa26b004c19ce0 (commit)
       via  447b966c244c51f29c18e1ba222034cac4fa69b2 (commit)
       via  b134448c9c5747f1e55629ed760ebe9f6a836e0e (commit)
       via  1422488dd8ba28c2d0ae7b7273f28d4dcd88f02d (commit)
       via  f2e40eb1df75dc0215965033f44473898f04dd9c (commit)
       via  0ca8eba0ea24cc7189562ddc12e6bb94d8b2ddd2 (commit)
       via  171f3cabec25b6fe2473dede7fbda64f2092cbcb (commit)
       via  4ea25cce411e9df166bbef255fed6086994b7f69 (commit)
       via  6919cad45f384eaa6936082635c52a3fb796f5cb (commit)
       via  48805c1e437c9f8cc2198e2d4dac60fdd8ccc2b8 (commit)
       via  58c7e684448c0c0f6e85b8f8ff546f21931098e6 (commit)
       via  f9c5ccdc2d5c2c60d9cd0f632eb34de0671bf601 (commit)
       via  5266e8e22f5d8da51d8b00bccb35a559fa971267 (commit)
       via  8271d64b043b72c963d1aa009689abac7cf0151d (commit)
       via  2e8e4b1691cbb7f1373f6800f35aac5ac7a08962 (commit)
       via  974f17f7b1f6075f7d68c00c0e09b72c084ec8e3 (commit)
       via  a0537b400481d99866172108221e0d64b8ae448d (commit)
       via  893e821b784327fd8bb1d0dd2a7422b9dc45e4c6 (commit)
       via  57dbda297636895f2b9d715ba868c25a05c5fe9e (commit)
       via  091c8f47fd12b16a8edeca0148d503fd682b6404 (commit)
       via  b6e0083d4f6bee54c65af34d25fe6c5a20f96cfa (commit)
       via  d733893311a7e6551404c87dc95460d7273742e4 (commit)
       via  2e26706f639964f7c9471b90c79f05b1f941867b (commit)
       via  22691a46b80494eb459003da63b37f7fd2677dee (commit)
       via  7613709693666000135290861d04c0c0c8d4ecac (commit)
       via  0e098c97a3edf4cb077f23f1c8d00831069195e0 (commit)
       via  4d2aac0b70aeae76f38833601991e27822a2e682 (commit)
       via  5cf869492d4a0d651314873bb6cfcd0726d40519 (commit)
       via  096f54787a69c1460861a8803a579616d844b401 (commit)
       via  050ad318805e2ef1db0bca8e7401e9e867e4aaa5 (commit)
       via  f4c865e90b88ad5d2d24212e7d41b60ff1a16a88 (commit)
       via  d60a6f262a786676ec9bff38dad3cb247b104222 (commit)
       via  0c881d042d6ec48f09a3da13ca1593267367ce2e (commit)
       via  f5d39122dcdb2692b97763861065429202a9494c (commit)
       via  e46f316f3cbdd055a02b0935578a2092617a55ae (commit)
       via  e742256f65eba3caa1479000ab2f1370b0860fda (commit)
       via  5abbce2bb9efd84f4a5e189c204d7abf24fcbbc1 (commit)
       via  6abbb515957102518457e0d07784b3219f20c15b (commit)
       via  ec6e65c27441e45e5e1fa8d1a6e0a2ff435cf55d (commit)
       via  7c873d78ed31db2a6cb7bd3b7e992407076561a5 (commit)
       via  f866ef090fa39ab5b1e5f3a29a78dd284399a59c (commit)
       via  669c9f34aeceb0e012cf907cfa4aa489524e6f45 (commit)
       via  e576b2e34fb9f0dbeeb72b1ee93ea2955bd7cf9e (commit)
       via  284468da04d903467c3be92230d5195f65c03bd5 (commit)
       via  4213b223849b7b4144d6658863b87adec77af135 (commit)
       via  6b82af4f8ab8b8c1eaa6e31a699d7e9ab7b896f8 (commit)
       via  7391bf1940803d95c54b40d9695ec6a9739e0e0a (commit)
       via  40b369f6efa3e8939077027d20ccdfd9744a5801 (commit)
       via  f8579d2e3b6011f735790298b3f4afca07543785 (commit)
       via  f66701e3582e319624867071bcba4fa31472d2b2 (commit)
       via  aa265893a28722d353cf4e4c8748100146f77cbf (commit)
       via  c1d429c3f8683489661249a2d60d3e83ec2e4324 (commit)
       via  e881edfe507a8f88c9fc8514c90171ab65e94501 (commit)
       via  979148da85e844eb10a7015251db6c1aa92d0a01 (commit)
       via  f6fd04d24c5892ce98bc251c927c9cf9233ce945 (commit)
       via  7db8e2d2d37ba7486c63cb48e3c0ea87554659bf (commit)
       via  bdaa1d0947075c9073419cf984c82d7f57391929 (commit)
       via  24c9658b5403d44e2c5ae90ae842bf735d4635ed (commit)
       via  65ae458330c095ad2d5dc48a78fa88a8d78a691d (commit)
       via  8c854fcda17e22a6f20efdf040bcab4b3eb2d5c4 (commit)
       via  fd5cde927c048ad4496f9dc5ca12b14abd384508 (commit)
       via  97fc9f4806179c4eef42a1d5febc317dcb611a7d (commit)
       via  92a1b454d84ad7ff5958b2311aa1391140d14746 (commit)
       via  cb52780d8bea4eb27bc40c9d8494a0f42aaaff51 (commit)
       via  395f0a5bd397c75f06ed5609db77a21d93f07f9e (commit)
       via  0b1ce40d1122accbf6d605c87de36eb7defee7b2 (commit)
       via  0c9a046359728ce966229220873a0b182686c77e (commit)
       via  e5129fae32cd3c4af54ce180dbbc39139ffe8b40 (commit)
       via  f30619e68d8b4bb8a0afc93adfe901779bd36669 (commit)
       via  b9432b7b0413b2fb23d77bdb7da152dc12c9eab9 (commit)
       via  4b4c52bfa839d29ea77ee52596a854a637d19c3e (commit)
       via  43dc7d8f0372de5094602a97888a7cd5f638f70b (commit)
       via  4f4cfd6d0f0a9a3eaf44eded2279374d6839bc2a (commit)
       via  9e3341696fb944ea80adb0ebac23727ec5521919 (commit)
       via  b9c176910c14c1448893cf5f1d6953ca4cbc283e (commit)
       via  93ada490ebc69b899a8f7f09eb316a228194bf61 (commit)
       via  684a218db75389d169abf50cc882fb7cb4ab9370 (commit)
       via  e7fb8dc64f8bc0878527ba31b5d1a86dd324dd0c (commit)
       via  2a3337aa9387eaf34cbabbc10d38b88569b618f3 (commit)
       via  e4d6c6740fdc3c21c07708ff591166e7ca6ea204 (commit)
       via  dd5a239a440f73478bb75c19007b7f620ff2f5dd (commit)
       via  1e269b5081f1d20bb6960d8f4aba89685b2a83f8 (commit)
       via  78ec405763620db7e9d47361b415019f1ddfbd67 (commit)
       via  74355312a6df553cc1b83ad3095821cf39b28910 (commit)
       via  7fbfc7b5d4207b9d1893b5f0ee2ea96d775ae343 (commit)
       via  4ca371e43c69526987af37ccd712f9e92a79106a (commit)
       via  1cdd6f7661aea6e7e35736308b17dd11f34d517c (commit)
       via  a323f4b45557059519b0ccfbfa6e55446587539a (commit)
       via  c99f3ca2fd1a4fc09a096df9ab93a92709c8f6bd (commit)
       via  f71a1d5b6ee30a92741ef3ec3ee721a47f3e74f7 (commit)
       via  49e886765c83a1b22e016bfb94a2771999ef7f8f (commit)
       via  71330c861fd025f81e7150b770e28f16114493a7 (commit)
       via  5d7f65775f4a0f569264893fcacd4e61b5eaf256 (commit)
       via  9526d790213c4e2b39c179c4fcc1682259b13975 (commit)
       via  5631bec8ea3a6e9df5dd1a9a611b3c3cdfd930cd (commit)
       via  d9e58961b229a4ddc13254c928094c9544fbbd91 (commit)
       via  8dce58d88c1ed21efd4c973cab80d899942f39d7 (commit)
       via  0b3c7853e27034cce475212f99915c4b878ee8b1 (commit)
       via  8878585f40c0195865e181004beba1ecbbd6bae2 (commit)
       via  35c5b0c72062d68c83908bc2a4ec36b2d9de504a (commit)
       via  c3a81e2b700da69cd551752b70369cd3b5083a20 (commit)
       via  26daadb3818db87ea64539cecb2987b2d7a75d89 (commit)
       via  51b9bd01c435babf0eda0e6ee351da80df7d73b7 (commit)
       via  b74e977a41ad388463ba1baf44002dcf2f63f133 (commit)
       via  ae46044797776bc60df4108b78e221cf7cc18e0a (commit)
       via  eb20ff7ec05a543cf5821de11c1ef39e77da3657 (commit)
       via  86a1a02f776b523794c6965caac454ffd3e61bc1 (commit)
       via  3851705d26fac76049683f918cf2fd7a175d63b3 (commit)
       via  65f8cf4d290fc8ced8761ebb9999886d2c413ef7 (commit)
       via  be54de18eaf9f3035f2a6f12fae20c407febef16 (commit)
       via  8d12ceb700e21f31a38264519544a113fcbaaa13 (commit)
       via  f63c3ced78739bb1318f89819959d75d7386669b (commit)
       via  b36ac359587491cb166cd02ca0c22afaa404598a (commit)
       via  337c1d7b3f8a847245160df7e742e6a32769200d (commit)
       via  1c4cd8ed23a02d787467a902f3ad8dd4e3e50f0c (commit)
       via  df495eff86056f135bf9babff809f3e2180e35f7 (commit)
       via  367463e4ea4eee8d5a8dd9edd6fcba8d8f6fc553 (commit)
       via  4fa8c92e0db026b98104933bdecff8331d23b5cd (commit)
       via  5f7b04b9a2860f3832651c7fb2dcf344cc043a2d (commit)
       via  e1e3421f212da4307afdc777214191a53014008b (commit)
       via  93f2ebdb011d7b2c69df367ad29a6ba4ca6acda3 (commit)
       via  1310d85e6b2b3c0c204659d7790a4dacc1bee9b9 (commit)
       via  b74e0c6c8598cc3ccfb12db90bb4ddd987c3b32b (commit)
       via  a545b236c1d4d764268a8290bbd4f6d88c2913ca (commit)
       via  0d9685eb39d25cb1816841db9b0c73041fa59fd0 (commit)
       via  6910ec144d135b92700a9a91a2eb4e12d503e094 (commit)
       via  978935141ae5d4a9c791c4d03adf7b7d4f1b7803 (commit)
       via  a2d3a7865ba45ee6d430ba9de4fbd67c3c176bd8 (commit)
       via  141fb8994fde8af1a1904bfc5219f7291d81c079 (commit)
       via  1754a52a505eaf6d486fc1b0f4c781cb280949f1 (commit)
       via  aa420ea5d2ca5294c4401157510ace2dd63dfc5a (commit)
       via  b04e091da415a1bb1d00ffd10a913a13c4175d1b (commit)
       via  844423e94df26f0ef560d884a35ce828e1ef4d32 (commit)
       via  28af7cb3b7445131c014a0cfef7e33f08d29c822 (commit)
       via  8cf25f2f91244cfe99c6067d7af8bac8109c0b87 (commit)
       via  84896be5ecb23d87ce2c3732d288d010bca0d337 (commit)
       via  1ae3e98292227416543a44f10c74b4d8433ccfb9 (commit)
       via  9f49869b4c1823394a66317bb802972ce618cc2f (commit)
       via  7c046a3f8cfb6e312890c1dcaf5ac082fca09a72 (commit)
       via  2b9beb11b25603682e134af840af23fe24233005 (commit)
       via  3e8f8e7b9e6e024864870e008bfc1b4fea5c73a0 (commit)
       via  0dda01ca37bd982cca74f035fd03d97d2486a2cb (commit)
       via  ac357a7cf4b4a787c25b62afd43eb10410fa1459 (commit)
       via  49718967bc10697f6fe9bf076e9fba5ad6bf44e3 (commit)
       via  ee2cc4798e691c45022322e2173f2cc2241daf7e (commit)
       via  1df9d37914ff46e404197ea38f4f8949754ad6db (commit)
       via  04267c89d2ba7884884881610724763ed38d1de3 (commit)
       via  2883a774560b8ec6929708cdcf80408306e413cd (commit)
       via  aca56e2f6e44b4158fe5184a82f00054fac25e51 (commit)
       via  5c66beff78796041272215a0ac183374074727ae (commit)
       via  1289e7ff7822adf27c08728f0e86fd8badb3a075 (commit)
       via  1b9f22f9f62ad68cd2ca89935d85cfd1759d6165 (commit)
       via  7aefacf2bfac861fc33359dd0b53b27635637466 (commit)
       via  2519f02ee60cebd34bd9c2df52aaff906bb8d6d5 (commit)
       via  2fcf69269eed8d0e9d3f5e4a05a22223bf91d7cb (commit)
       via  d20c608f2e74d20a95cc5da5b6106638a303e47b (commit)
       via  b6112dcf5cc22e7b4025f238dd7a9a7c1a65c016 (commit)
       via  7e4e304b2cd1a828638a42094e508ce52970447f (commit)
       via  dda8303133691d6be46b9306599c98f7fe243bca (commit)
       via  e4bc4ea0003672b093fd6f6033cd16706daa8816 (commit)
       via  520bbb6cda9f0a2e4392ed7458139006ca277f33 (commit)
       via  01be9897792e12161bd110c32bc24548f6706904 (commit)
       via  7c519328f3908758ba20bef6b797ce87e863b2dc (commit)
       via  bd3893bb25f370f20b432a8c7c2518652c2c3a9c (commit)
       via  5be99cee1c099b5c6ee613d1b68426fd0db17e43 (commit)
       via  01873f5a3cc67bf585e8d04724dd6001b9c6dc1a (commit)
       via  977c8d2978e962ea1a010818d251ca37cb818d8d (commit)
       via  edb5bd0add110008226699acba01653a2c83b4b7 (commit)
       via  b3d54338e9dfe25ded139d60d2943b188f14d060 (commit)
       via  57681c53f503616a9f24343fb26de681daa86d25 (commit)
       via  ff20d1b1ac53fc7fecc743750adb04d7c9140567 (commit)
       via  5e5410e9ad0d1bc513c94351c3c804be9e21cb4b (commit)
       via  e89b1af56ad83ecd3a032cbf6ec249cdb89abdf5 (commit)
       via  c2f7bbe2286292f9c021022febcf5572021dae62 (commit)
       via  b12d2456b2346678d2aa8fd38c6511e90ba9eade (commit)
       via  0e2bd3ee4d17b3d448d00aab65b292296185483e (commit)
       via  f32a110922f639e4304d9cdb63bf26e50eb0af97 (commit)
       via  0497eb87cd428cda3b763e110f28196824f581ec (commit)
       via  2a86b6166a88bb7ad9cfda535b400d8543d5348d (commit)
       via  1ccded9dd7cd2c9d871e843441572700dc33128a (commit)
       via  a2669c96eb28230bf2ff6b3238a8c920e167efb0 (commit)
       via  89d7d65d311e026b0db46d0fc7526cef5e2afb21 (commit)
       via  fc9a040ce994f41d4383667018d923e8bc8b27db (commit)
       via  cc5e1ae70eceb8210f3c9de9be09f8be8570205a (commit)
       via  7b20d3052155ce1769c131ff26b5ef099f1eacfb (commit)
       via  3abda51204acf8109ef3aac8c39704b9c78b926f (commit)
       via  1204fe7210646df75dbce5ce64672bc053bbce3c (commit)
       via  037db9a72a8a678927805ae963ea4183f12622a8 (commit)
       via  803486a30904a1d5b665cfdf1924a7a88c52fd29 (commit)
       via  3bf44391d56efec11fe159b882317109a956698f (commit)
       via  90371655ca2c29bab7a8880e8a2e1b1287e3cb69 (commit)
       via  fa51c7805f50f4bb37b36545bd45daaf67c28e07 (commit)
       via  d531c7e0b123386b158e54994bb08d6c5615b68b (commit)
       via  252f1967042f1523bbbeb8e1a07e608c9603151e (commit)
       via  a86bbd44497b985fea2b156a1b5972d23fbc13be (commit)
       via  cd2b89bfa7a381a94d8a451f207b7d0867b34414 (commit)
       via  47d3efe6fae7fba3fbd13f24bb28167b4ffd40ce (commit)
       via  9ae8e71055eef778f8ffe644bd8890e1b789f0fe (commit)
       via  4ae10ddb44191e726917447f54e7fbf5c5e4b6fd (commit)
       via  dbd5c57bb0e3ea3a33022c55e0bbb661ea9a9743 (commit)
       via  54fad5d3dce2a39ab2eb6708ccb3dd63688195e5 (commit)
       via  040b9d0028ed34ccbbc42af262b6342045d478d6 (commit)
       via  9b52ee88894701dac9144a0b84ec854b2735c513 (commit)
       via  09ad4943aab4234913370986cb7642b4546bee8d (commit)
       via  47deb2525c631f5f4c558ce1482c3cff176650f4 (commit)
       via  8caecf36024cbfb21cbceae11d3329c24b50ce3c (commit)
       via  aca8ee212ea10bbea48fc67a15ccb4e5558c192d (commit)
       via  7af224f0d8f88f7277cf3dccbd96a86038b2c036 (commit)
       via  06f8d4b63be3bc8fa6a5bf2edb1d4ca35ea4ccee (commit)
       via  0418e38ef5a703a54709081fa7c964f9225d62d7 (commit)
       via  e6d067f4f04c36006ba729cd278235e3ebeb7805 (commit)
       via  c85e7cf6884639c9278bc084236fe4d04bc06928 (commit)
       via  e851be21c630ddf3a25283b6ed8e7f2258fa82b1 (commit)
       via  996ae74ab723791e5c45c0c43c9129100ffe7aa1 (commit)
       via  b875dead389ce6794ac2f9c7d776b1b30b479b6b (commit)
       via  3f19fda33a92fc608b2a516ea02dd35ec856cec6 (commit)
       via  aba35b4f9830fb6cb891283ef3bf520a1504a474 (commit)
       via  7239df2447038528c723f7194e797336797a4f84 (commit)
       via  a259cba9d14f6492c3485752360b3726d70598d6 (commit)
       via  c200206169d0dcdf53463953b38c523f55d03204 (commit)
       via  1d1c91127fc612b075b7f41f01209e33b584a983 (commit)
       via  28ef2f017d13a0de11036585a97887e333228ca4 (commit)
       via  1d0a2eabeb628e5b9fda75c28316ee269193175a (commit)
       via  bb2adf1516637f47180784403b7651de0602bf80 (commit)
       via  880ac99a32751a044e3204eaac6a6a9540e3ce1f (commit)
       via  9f1534789a5ffa4941afbbb268196b611649690d (commit)
       via  07d571a6a6623a7be1a11821dd47cae4b88ba601 (commit)
       via  66ee020758c991ee741c16b275db25ec003b9b55 (commit)
       via  3daf8eb0c18cc375d96555630f9214e93502217a (commit)
       via  d93d488fcccbf329c241a950adca62c5f24e4e35 (commit)
       via  eef76bcd595c0e4a2f5ec8f2318545a22c25a0e9 (commit)
       via  02d28e8491ac3546afd008e180f305a46bbec6ba (commit)
       via  fd90917cca68c056c1e63eb3c3509f579f1fad08 (commit)
       via  ed0c64332e953ec40c024a0e6889ee47bee9058b (commit)
       via  1fd8fa5f2e4d6b2d370eb2766c7d3735cef53b01 (commit)
       via  a1a23b07ef139ec133aeb8304ca22627ac44bbf0 (commit)
       via  6f273f01ba8fa51d2a3614587546345afd894d51 (commit)
       via  e7527d597af4881c62e3cc309dd6a2ef83646915 (commit)
       via  5bfdad25a814271b848dfe0fe85007868d7bd304 (commit)
       via  b13145be873c9280a204004afe86b5c43e8950d5 (commit)
       via  f75bddeb036090feb9f592500f96f15976de3b50 (commit)
       via  a673560fb58d9727a3d962ccd40511c2210c0ef8 (commit)
       via  d1ffafa79626bc731b2765ff0a5deb2464a511cc (commit)
       via  92b79385fb5eb1c6be1270345f731f250880f138 (commit)
       via  ac718f28fbcecefc71707cfd0ae6e505d0315af6 (commit)
       via  303ac85c01907b11dbd441b0982a79109b78f5f8 (commit)
       via  8f40776e98e4520dbe7ce5c582c78fce6b675fe8 (commit)
       via  776a03e0bd48eaa72b308793e44f87b9273eaf4b (commit)
       via  a6f2181892b72685dbaf4beb0d35a7dad5e1acbe (commit)
       via  fa76342c2b1269b27b1da8e9e04eb992f4aaba5b (commit)
       via  f57f775e402df6d1a205ce387971703641642ad5 (commit)
       via  8741018cfdc0000d2964b5bea9ae33800a32daa8 (commit)
       via  fa94b05ce67bffad80308d77044dc98794a15fd5 (commit)
       via  7feabe770b9fa55d251f65053d4351b2b3574926 (commit)
       via  06c277edbeb641c89ac431fe927992499df3bf7d (commit)
       via  02c27ea404e5efc7235b62cb7c858fb6b025ccc7 (commit)
       via  d859f2e863b047fcd85f40dd7d9fc6ec2023e5b8 (commit)
       via  42dc7c5d0841d7809d35e4d7e4db214f1af6a58e (commit)
       via  6c76986dc79f368b971a0bb49263c3ee62c8c7e4 (commit)
       via  998da3e93682fa8346e08e0bdfde12c330c81b72 (commit)
       via  ee400b45d9ae07a962172a24e61c417a8e0abf18 (commit)
       via  c848fca56a43671ececa2ff427adc626636a99ba (commit)
       via  a922f30b30e6b53ab7733b288f206743ce9f1d13 (commit)
       via  8122820700da795ea26b120c0aa082d9d369a59e (commit)
       via  2cc654a0e798b985a56f2cebc39187fc3cad12bc (commit)
       via  587346bc826a0855c17ca10b426e0ec7fd5a7867 (commit)
       via  baae15cec012420847b7120c16141280773760c9 (commit)
       via  7ce86b649904dfb4b1d7b20c4bfbb049afc69f9f (commit)
       via  4c91024f33197ec6f343d2b8a475148fafa72752 (commit)
       via  a826a07ffea7032caac67d9fff9d4a6712df31ec (commit)
       via  7af1d3762dd42cb75e891d6dfc96ec0f12f4d1ba (commit)
       via  e86d0dcfa3552f469fdbb3b7d5af742e2a092b1b (commit)
       via  cd7d9592cc7aab99968defbfe3b5fc8b9106e1ac (commit)
       via  93cc378ec835e778dbc90fa04f150368e38e5afd (commit)
      from  83e53887bd8eeddc1056497f9fee67547c3edbb6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b77e56f5ee450eacaec9b9ff51ec6ce6098faea8
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Sep 13 13:00:53 2011 -0400

    Stamped upgrade for opac_payment_history_age_limit
    
    ...which is a new org setting defining how far back to reach for
    payments to display in the payments history page in tpac.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 13427af..c29ae27 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0620', :eg_version); -- tsbere/miker
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0621', :eg_version); -- berick
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.opac_payment_history_age_limit.sql b/Open-ILS/src/sql/Pg/upgrade/0621.data.opac_payment_history_age_limit.sql
similarity index 89%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.opac_payment_history_age_limit.sql
rename to Open-ILS/src/sql/Pg/upgrade/0621.data.opac_payment_history_age_limit.sql
index f8790ef..2268dfb 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.opac_payment_history_age_limit.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0621.data.opac_payment_history_age_limit.sql
@@ -2,7 +2,7 @@
 
 BEGIN;
 
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0621', :eg_version);
 
 INSERT into config.org_unit_setting_type (name, label, description, datatype)
 VALUES (

commit 32b1bc4b6407d09836227caa7aa957cb058ff312
Merge: 83e5388 f3da4ed
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Sep 13 12:49:17 2011 -0400

    Template Toolkit OPAC
    
    See Template Toolkit OPAC release notes at
    http://evergreen-ils.org/dokuwiki/doku.php?id=dev:opac:template-toolkit:release_notes
    
    Additional non-tpac-specific changes include moving web templates
    from the web dir into Open-ILS/src/templates/, removing /default/
    from the template paths, and porting vandelay strings from the DTD
    into the template (for better/consistent translation support).
    
    Merge remote branch 'working/collab/berick/template-toolkit-opac-master-merge'
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>


commit f3da4ed4c596734d4a3f69f8886d0e688a7a69b1
Merge: f248bb4 83e5388
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Sep 13 12:45:39 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge


commit f248bb4ee44451f5e6c390030c28daa0b031ee95
Merge: e9ff710 5c49a67
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Sep 13 09:57:54 2011 -0400

    Merge remote branch 'working/user/dbs/tpac-css-buttons' into template-toolkit-opac-master-merge


commit 5c49a67dc363d7ba11a0174f9268601ac37ae5bb
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 23:42:56 2011 -0400

    Delete a set of images that are no longer used
    
    Given the switch to CSS-styling instead of images, many of the images in
    the repository are no longer used and can be deleted.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/images/KCLS_logo_horiz.gif b/Open-ILS/web/images/KCLS_logo_horiz.gif
deleted file mode 100644
index 8e1d56e..0000000
Binary files a/Open-ILS/web/images/KCLS_logo_horiz.gif and /dev/null differ
diff --git a/Open-ILS/web/images/acct-btn-hover.png b/Open-ILS/web/images/acct-btn-hover.png
deleted file mode 100644
index 1e6e20a..0000000
Binary files a/Open-ILS/web/images/acct-btn-hover.png and /dev/null differ
diff --git a/Open-ILS/web/images/acct-btn.png b/Open-ILS/web/images/acct-btn.png
deleted file mode 100644
index c9b92cd..0000000
Binary files a/Open-ILS/web/images/acct-btn.png and /dev/null differ
diff --git a/Open-ILS/web/images/acct_checked_out_off.gif b/Open-ILS/web/images/acct_checked_out_off.gif
deleted file mode 100644
index dcfcfcb..0000000
Binary files a/Open-ILS/web/images/acct_checked_out_off.gif and /dev/null differ
diff --git a/Open-ILS/web/images/acct_checked_out_on.gif b/Open-ILS/web/images/acct_checked_out_on.gif
deleted file mode 100644
index f364d38..0000000
Binary files a/Open-ILS/web/images/acct_checked_out_on.gif and /dev/null differ
diff --git a/Open-ILS/web/images/acct_favs_off.gif b/Open-ILS/web/images/acct_favs_off.gif
deleted file mode 100644
index 5ffc024..0000000
Binary files a/Open-ILS/web/images/acct_favs_off.gif and /dev/null differ
diff --git a/Open-ILS/web/images/acct_favs_on.gif b/Open-ILS/web/images/acct_favs_on.gif
deleted file mode 100644
index f96342a..0000000
Binary files a/Open-ILS/web/images/acct_favs_on.gif and /dev/null differ
diff --git a/Open-ILS/web/images/acct_fines_off.jpg b/Open-ILS/web/images/acct_fines_off.jpg
deleted file mode 100644
index b73b61d..0000000
Binary files a/Open-ILS/web/images/acct_fines_off.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/acct_fines_on.jpg b/Open-ILS/web/images/acct_fines_on.jpg
deleted file mode 100644
index 4ea7e89..0000000
Binary files a/Open-ILS/web/images/acct_fines_on.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/acct_holds_off.gif b/Open-ILS/web/images/acct_holds_off.gif
deleted file mode 100644
index 6179396..0000000
Binary files a/Open-ILS/web/images/acct_holds_off.gif and /dev/null differ
diff --git a/Open-ILS/web/images/acct_holds_on.gif b/Open-ILS/web/images/acct_holds_on.gif
deleted file mode 100644
index d1c75bb..0000000
Binary files a/Open-ILS/web/images/acct_holds_on.gif and /dev/null differ
diff --git a/Open-ILS/web/images/acct_lists_off.gif b/Open-ILS/web/images/acct_lists_off.gif
deleted file mode 100644
index 9a5b2a2..0000000
Binary files a/Open-ILS/web/images/acct_lists_off.gif and /dev/null differ
diff --git a/Open-ILS/web/images/acct_lists_on.gif b/Open-ILS/web/images/acct_lists_on.gif
deleted file mode 100644
index 668b0c9..0000000
Binary files a/Open-ILS/web/images/acct_lists_on.gif and /dev/null differ
diff --git a/Open-ILS/web/images/acct_payments_off.jpg b/Open-ILS/web/images/acct_payments_off.jpg
deleted file mode 100644
index c8a50f5..0000000
Binary files a/Open-ILS/web/images/acct_payments_off.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/acct_payments_on.jpg b/Open-ILS/web/images/acct_payments_on.jpg
deleted file mode 100644
index c571398..0000000
Binary files a/Open-ILS/web/images/acct_payments_on.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/acct_prefs_off.gif b/Open-ILS/web/images/acct_prefs_off.gif
deleted file mode 100644
index c357add..0000000
Binary files a/Open-ILS/web/images/acct_prefs_off.gif and /dev/null differ
diff --git a/Open-ILS/web/images/acct_prefs_on.gif b/Open-ILS/web/images/acct_prefs_on.gif
deleted file mode 100644
index 67d1f47..0000000
Binary files a/Open-ILS/web/images/acct_prefs_on.gif and /dev/null differ
diff --git a/Open-ILS/web/images/acct_summary_off.gif b/Open-ILS/web/images/acct_summary_off.gif
deleted file mode 100644
index 63456c1..0000000
Binary files a/Open-ILS/web/images/acct_summary_off.gif and /dev/null differ
diff --git a/Open-ILS/web/images/acct_summary_on.gif b/Open-ILS/web/images/acct_summary_on.gif
deleted file mode 100644
index 99d4990..0000000
Binary files a/Open-ILS/web/images/acct_summary_on.gif and /dev/null differ
diff --git a/Open-ILS/web/images/add_search_row_btn.gif b/Open-ILS/web/images/add_search_row_btn.gif
deleted file mode 100644
index a48e68c..0000000
Binary files a/Open-ILS/web/images/add_search_row_btn.gif and /dev/null differ
diff --git a/Open-ILS/web/images/adv_search.png b/Open-ILS/web/images/adv_search.png
deleted file mode 100644
index 79fb08a..0000000
Binary files a/Open-ILS/web/images/adv_search.png and /dev/null differ
diff --git a/Open-ILS/web/images/adv_search_hover.png b/Open-ILS/web/images/adv_search_hover.png
deleted file mode 100644
index 0cb3fe1..0000000
Binary files a/Open-ILS/web/images/adv_search_hover.png and /dev/null differ
diff --git a/Open-ILS/web/images/adv_search_off.gif b/Open-ILS/web/images/adv_search_off.gif
deleted file mode 100644
index a129b93..0000000
Binary files a/Open-ILS/web/images/adv_search_off.gif and /dev/null differ
diff --git a/Open-ILS/web/images/adv_search_on.gif b/Open-ILS/web/images/adv_search_on.gif
deleted file mode 100644
index d0faa4f..0000000
Binary files a/Open-ILS/web/images/adv_search_on.gif and /dev/null differ
diff --git a/Open-ILS/web/images/another_search.png b/Open-ILS/web/images/another_search.png
deleted file mode 100644
index 4bcd214..0000000
Binary files a/Open-ILS/web/images/another_search.png and /dev/null differ
diff --git a/Open-ILS/web/images/another_search_hover.png b/Open-ILS/web/images/another_search_hover.png
deleted file mode 100644
index 08efaf5..0000000
Binary files a/Open-ILS/web/images/another_search_hover.png and /dev/null differ
diff --git a/Open-ILS/web/images/asknow_available.gif b/Open-ILS/web/images/asknow_available.gif
deleted file mode 100644
index 326c8d1..0000000
Binary files a/Open-ILS/web/images/asknow_available.gif and /dev/null differ
diff --git a/Open-ILS/web/images/btnCancel.png b/Open-ILS/web/images/btnCancel.png
deleted file mode 100644
index 4cfacaf..0000000
Binary files a/Open-ILS/web/images/btnCancel.png and /dev/null differ
diff --git a/Open-ILS/web/images/btnSubmit.png b/Open-ILS/web/images/btnSubmit.png
deleted file mode 100644
index 7a67408..0000000
Binary files a/Open-ILS/web/images/btnSubmit.png and /dev/null differ
diff --git a/Open-ILS/web/images/expert_search_off.gif b/Open-ILS/web/images/expert_search_off.gif
deleted file mode 100644
index 96b4f51..0000000
Binary files a/Open-ILS/web/images/expert_search_off.gif and /dev/null differ
diff --git a/Open-ILS/web/images/expert_search_on.gif b/Open-ILS/web/images/expert_search_on.gif
deleted file mode 100644
index 6a41861..0000000
Binary files a/Open-ILS/web/images/expert_search_on.gif and /dev/null differ
diff --git a/Open-ILS/web/images/go-btn-hover.png b/Open-ILS/web/images/go-btn-hover.png
deleted file mode 100644
index 9b878b2..0000000
Binary files a/Open-ILS/web/images/go-btn-hover.png and /dev/null differ
diff --git a/Open-ILS/web/images/go-btn.png b/Open-ILS/web/images/go-btn.png
deleted file mode 100644
index 24091c9..0000000
Binary files a/Open-ILS/web/images/go-btn.png and /dev/null differ
diff --git a/Open-ILS/web/images/golive.jpg b/Open-ILS/web/images/golive.jpg
deleted file mode 100644
index 8b34912..0000000
Binary files a/Open-ILS/web/images/golive.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/login-btn-hover.png b/Open-ILS/web/images/login-btn-hover.png
deleted file mode 100644
index 442f33f..0000000
Binary files a/Open-ILS/web/images/login-btn-hover.png and /dev/null differ
diff --git a/Open-ILS/web/images/login-btn.gif b/Open-ILS/web/images/login-btn.gif
deleted file mode 100644
index 69d6a56..0000000
Binary files a/Open-ILS/web/images/login-btn.gif and /dev/null differ
diff --git a/Open-ILS/web/images/login-btn.png b/Open-ILS/web/images/login-btn.png
deleted file mode 100644
index 5548b99..0000000
Binary files a/Open-ILS/web/images/login-btn.png and /dev/null differ
diff --git a/Open-ILS/web/images/login-btn2.png b/Open-ILS/web/images/login-btn2.png
deleted file mode 100644
index ff4af14..0000000
Binary files a/Open-ILS/web/images/login-btn2.png and /dev/null differ
diff --git a/Open-ILS/web/images/logout-btn-hover.png b/Open-ILS/web/images/logout-btn-hover.png
deleted file mode 100644
index 411fc01..0000000
Binary files a/Open-ILS/web/images/logout-btn-hover.png and /dev/null differ
diff --git a/Open-ILS/web/images/logout-btn.png b/Open-ILS/web/images/logout-btn.png
deleted file mode 100644
index bd31a47..0000000
Binary files a/Open-ILS/web/images/logout-btn.png and /dev/null differ
diff --git a/Open-ILS/web/images/num_search_off.gif b/Open-ILS/web/images/num_search_off.gif
deleted file mode 100644
index 1062802..0000000
Binary files a/Open-ILS/web/images/num_search_off.gif and /dev/null differ
diff --git a/Open-ILS/web/images/num_search_on.gif b/Open-ILS/web/images/num_search_on.gif
deleted file mode 100644
index f7d7829..0000000
Binary files a/Open-ILS/web/images/num_search_on.gif and /dev/null differ
diff --git a/Open-ILS/web/images/pay-fines-btn-hover.png b/Open-ILS/web/images/pay-fines-btn-hover.png
deleted file mode 100644
index b7708da..0000000
Binary files a/Open-ILS/web/images/pay-fines-btn-hover.png and /dev/null differ
diff --git a/Open-ILS/web/images/pay-fines-btn.png b/Open-ILS/web/images/pay-fines-btn.png
deleted file mode 100644
index 356433b..0000000
Binary files a/Open-ILS/web/images/pay-fines-btn.png and /dev/null differ
diff --git a/Open-ILS/web/images/pay_fines_btn.gif b/Open-ILS/web/images/pay_fines_btn.gif
deleted file mode 100644
index eb4816f..0000000
Binary files a/Open-ILS/web/images/pay_fines_btn.gif and /dev/null differ
diff --git a/Open-ILS/web/images/search_btn.gif b/Open-ILS/web/images/search_btn.gif
deleted file mode 100644
index f2fdc9b..0000000
Binary files a/Open-ILS/web/images/search_btn.gif and /dev/null differ
diff --git a/Open-ILS/web/images/sub_checked_hist_off.jpg b/Open-ILS/web/images/sub_checked_hist_off.jpg
deleted file mode 100644
index 7fda1c3..0000000
Binary files a/Open-ILS/web/images/sub_checked_hist_off.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/sub_checked_hist_on.jpg b/Open-ILS/web/images/sub_checked_hist_on.jpg
deleted file mode 100644
index 703aac1..0000000
Binary files a/Open-ILS/web/images/sub_checked_hist_on.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/sub_checked_out_off.jpg b/Open-ILS/web/images/sub_checked_out_off.jpg
deleted file mode 100644
index 0573fbd..0000000
Binary files a/Open-ILS/web/images/sub_checked_out_off.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/sub_checked_out_on.jpg b/Open-ILS/web/images/sub_checked_out_on.jpg
deleted file mode 100644
index 97bb178..0000000
Binary files a/Open-ILS/web/images/sub_checked_out_on.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/sub_holds_hist_off.jpg b/Open-ILS/web/images/sub_holds_hist_off.jpg
deleted file mode 100644
index 020abe9..0000000
Binary files a/Open-ILS/web/images/sub_holds_hist_off.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/sub_holds_hist_on.jpg b/Open-ILS/web/images/sub_holds_hist_on.jpg
deleted file mode 100644
index 020abe9..0000000
Binary files a/Open-ILS/web/images/sub_holds_hist_on.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/sub_holds_off.jpg b/Open-ILS/web/images/sub_holds_off.jpg
deleted file mode 100644
index b888359..0000000
Binary files a/Open-ILS/web/images/sub_holds_off.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/sub_holds_on.jpg b/Open-ILS/web/images/sub_holds_on.jpg
deleted file mode 100644
index 9505638..0000000
Binary files a/Open-ILS/web/images/sub_holds_on.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/sub_prefs_info_off.jpg b/Open-ILS/web/images/sub_prefs_info_off.jpg
deleted file mode 100644
index 896e227..0000000
Binary files a/Open-ILS/web/images/sub_prefs_info_off.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/sub_prefs_info_on.jpg b/Open-ILS/web/images/sub_prefs_info_on.jpg
deleted file mode 100644
index 0895969..0000000
Binary files a/Open-ILS/web/images/sub_prefs_info_on.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/sub_prefs_notify_off.jpg b/Open-ILS/web/images/sub_prefs_notify_off.jpg
deleted file mode 100644
index 55df9da..0000000
Binary files a/Open-ILS/web/images/sub_prefs_notify_off.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/sub_prefs_notify_on.jpg b/Open-ILS/web/images/sub_prefs_notify_on.jpg
deleted file mode 100644
index fd536a8..0000000
Binary files a/Open-ILS/web/images/sub_prefs_notify_on.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/sub_prefs_search_off.jpg b/Open-ILS/web/images/sub_prefs_search_off.jpg
deleted file mode 100644
index 89115f6..0000000
Binary files a/Open-ILS/web/images/sub_prefs_search_off.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/sub_prefs_search_on.jpg b/Open-ILS/web/images/sub_prefs_search_on.jpg
deleted file mode 100644
index 3eab9fa..0000000
Binary files a/Open-ILS/web/images/sub_prefs_search_on.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/view_my_list.png b/Open-ILS/web/images/view_my_list.png
deleted file mode 100644
index d5f1b83..0000000
Binary files a/Open-ILS/web/images/view_my_list.png and /dev/null differ
diff --git a/Open-ILS/web/images/view_my_list_hover.png b/Open-ILS/web/images/view_my_list_hover.png
deleted file mode 100644
index 369cb1a..0000000
Binary files a/Open-ILS/web/images/view_my_list_hover.png and /dev/null differ

commit 24a78a9a3e21a526813a48b79939e69276caab6f
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 23:03:33 2011 -0400

    CSS-ize account preference sub-tabs
    
    Same old, same old.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2 b/Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2
index 0bd3eac..aeec099 100644
--- a/Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2
+++ b/Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2
@@ -2,38 +2,38 @@
     WRAPPER "opac/parts/myopac/base.tt2"; %]
 
 <div id='myopac_prefs_div'>
-    <div id="acct_prefs_tabs" style="padding-bottom: 12px;color:#666;">
+    <div id="acct_prefs_tabs">
         <div style="float:left;">
 
         [% IF prefs_page == 'personal' %]
-            <div class="align">
-                <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_on.jpg" /></a>
+            <div class="align selected">
+                <a href='#'>[% l("Personal Information") %]</a>
             </div>
             <div class="align">
-                <a href='prefs_notify'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_off.jpg" /></a>
+                <a href='prefs_notify'>[% l("Notification Preferences") %]</a>
             </div>
             <div class="align">
-                <a href='prefs_settings'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_off.jpg" /></a>
+                <a href='prefs_settings'>[% l("Search Preferences") %]</a>
             </div>
         [% ELSIF prefs_page == 'notify' %]
             <div class="align">
-                <a href='prefs'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_off.jpg" /></a>
+                <a href='prefs'>[% l("Personal Information") %]</a>
             </div>
-            <div class="align">
-                <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_on.jpg" /></a>
+            <div class="align selected">
+                <a href='#'>[% l("Notification Preferences") %]</a>
             </div>
             <div class="align" >
-                <a href='prefs_settings'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_off.jpg" /></a>
+                <a href='prefs_settings'>[% l("Search Preferences") %]</a>
             </div>
         [% ELSE %]
             <div class="align">
-                <a href='prefs'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_off.jpg" /></a>
+                <a href='prefs'>[% l("Personal Information") %]</a>
             </div>
             <div class="align">
-                <a href='prefs_notify'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_off.jpg" /></a>
+                <a href='prefs_notify'>[% l("Notification Preferences") %]</a>
             </div>
-            <div class="align" >
-                <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_on.jpg" /></a>
+            <div class="align selected" >
+                <a href='#'>[% l("Search Preferences") %]</a>
             </div>
         [% END %]
         </div>
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 80087c5..3664dff 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -274,13 +274,13 @@ div.select-wrapper:hover {
 	font-size: 10px;
 }
 
-#adv_search_tabs, #acct_tabs, #acct_fines_tabs, #acct_checked_tabs, #acct_holds_tabs, #results_header_inner{
+#adv_search_tabs, #acct_tabs, #acct_fines_tabs, #acct_checked_tabs, #acct_holds_tabs, #acct_prefs_tabs, #results_header_inner{
 	height: 40px;
 	width:974px;
 	margin:auto;
 }
 
-#adv_search_tabs a, #acct_tabs a, #acct_fines_tabs a, #acct_checked_tabs a, #acct_holds_tabs a {
+#adv_search_tabs a, #acct_tabs a, #acct_fines_tabs a, #acct_checked_tabs a, #acct_holds_tabs a, #acct_prefs_tabs a {
     float: left;
     text-align: center;
     vertical-align: middle;
@@ -313,19 +313,19 @@ div.select-wrapper:hover {
     background: #9ad0f1;
 }
 
-#acct_checked_tabs a, #acct_holds_tabs a {
+#acct_checked_tabs a, #acct_holds_tabs a, #acct_prefs_tabs a {
     margin-top: 0px;
     font-size: 10px;
     color: #333333;
     padding: 10px 10px 10px 10px;
 }
 
-#acct_checked_tabs div.selected a, #acct_holds_tabs div.selected a {
+#acct_checked_tabs div.selected a, #acct_holds_tabs div.selected a, #acct_prefs_tabs div.selected a {
     background: #e1e1e1;
     color: #333333;
 }
 
-#acct_checked_tabs, #acct_holds_tabs {
+#acct_checked_tabs, #acct_holds_tabs, #acct_prefs_tabs {
     padding-bottom: 12px;
     color: #666;
 }

commit 3556ce0756e19352c13e427fa0f34e4df69ea864
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 22:51:23 2011 -0400

    Fix mislabelling of Cancel button as Submit
    
    As funny as it was to give people two options: Submit, or Submit, one
    could imagine that it would be confusing. Also, remove the alt / title
    attributes now that we're using meaningful markup that stands on its
    own.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/myopac/holds/edit.tt2 b/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
index 97525bb..256b385 100644
--- a/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
+++ b/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
@@ -93,13 +93,9 @@
                         <td colspan="2" class="hold-editor-controls">
                             <input type="submit"
                                 value="[% l('Submit') %]"
-                                alt="[% l('Submit') %]"
-                                title="[% l('Submit') %]"
                                 class="opac-button" />
                             <input type="reset"
-                                value="[% l('Submit') %]"
-                                alt="[% l('Cancel') %]"
-                                title="[% l('Cancel') %]"
+                                value="[% l('Cancel') %]"
                                 class="opac-button" />
                         </td>
                     </tr>

commit ebbdf0d928606a12017d4e0c61662add2ebde923
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 22:47:29 2011 -0400

    CSS-ize holds and holds history tabs
    
    From images to CSS-styled links.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/myopac/circ_history.tt2 b/Open-ILS/src/templates/opac/myopac/circ_history.tt2
index 4bb348c..f983ad5 100644
--- a/Open-ILS/src/templates/opac/myopac/circ_history.tt2
+++ b/Open-ILS/src/templates/opac/myopac/circ_history.tt2
@@ -8,7 +8,7 @@
 
 <div style="padding:0px;">
     
-    <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;">
+    <div id="acct_checked_tabs">
         <div class="align">
             <a href='circs'>[% l("Current Items Checked Out") %]</a>
         </div>
diff --git a/Open-ILS/src/templates/opac/myopac/hold_history.tt2 b/Open-ILS/src/templates/opac/myopac/hold_history.tt2
index 9fdfd8b..e48c2f8 100644
--- a/Open-ILS/src/templates/opac/myopac/hold_history.tt2
+++ b/Open-ILS/src/templates/opac/myopac/hold_history.tt2
@@ -8,14 +8,13 @@
 
 <div id='myopac_holds_div'>
 
-    <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;">
-        <div class="align selected">
-            <a href='holds'><img src="[% ctx.media_prefix %]/images/sub_holds_off.jpg"/></a>
-        </div>
+    <div id="acct_holds_tabs">
         <div class="align">
-            <img src="[% ctx.media_prefix %]/images/sub_holds_hist_on.jpg"/>
+            <a href='holds'>[% l("Items on Hold") %]</a>
+        </div>
+        <div class="align selected">
+            <a href="#">[% l("Holds History") %]</a>
         </div>
-        <div class="clear-both"></div>
     </div>
 
     <div class="header_middle">
diff --git a/Open-ILS/src/templates/opac/myopac/holds.tt2 b/Open-ILS/src/templates/opac/myopac/holds.tt2
index 94c8394..f008fb7 100644
--- a/Open-ILS/src/templates/opac/myopac/holds.tt2
+++ b/Open-ILS/src/templates/opac/myopac/holds.tt2
@@ -5,14 +5,13 @@
     myopac_page = "holds"  %]
 <div id='myopac_holds_div'>
 
-    <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;">
+    <div id="acct_holds_tabs">
         <div class="align selected">
-            <img src="[% ctx.media_prefix %]/images/sub_holds_on.jpg"/>
+            <a href='#'>[% l("Items on Hold") %]</a>
         </div>
         <div class="align">
-            <a href='hold_history'><img src="[% ctx.media_prefix %]/images/sub_holds_hist_off.jpg"/></a>
+            <a href='hold_history'>[% l("Holds History") %]</a>
         </div>
-        <div class="clear-both"></div>
     </div>
 
     <div class="header_middle">
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 2706a2c..80087c5 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -274,13 +274,13 @@ div.select-wrapper:hover {
 	font-size: 10px;
 }
 
-#adv_search_tabs, #acct_tabs, #acct_fines_tabs, #acct_checked_tabs, #results_header_inner{
+#adv_search_tabs, #acct_tabs, #acct_fines_tabs, #acct_checked_tabs, #acct_holds_tabs, #results_header_inner{
 	height: 40px;
 	width:974px;
 	margin:auto;
 }
 
-#adv_search_tabs a, #acct_tabs a, #acct_fines_tabs a, #acct_checked_tabs a {
+#adv_search_tabs a, #acct_tabs a, #acct_fines_tabs a, #acct_checked_tabs a, #acct_holds_tabs a {
     float: left;
     text-align: center;
     vertical-align: middle;
@@ -290,12 +290,15 @@ div.select-wrapper:hover {
     -moz-border-radius: 5%; 
     border-radius: 5%;
     font-weight: bold;
-    width:156px;
-    color: 45709b;
+    color: #45709b;
     background: #9ad0f1;
     font-weight: bold;
 }
 
+#adv_search_tabs a, #acct_tabs a, #acct_fines_tabs a {
+    width:156px;
+}
+
 #adv_search.on, #num_search.on, #expert_search.on {
     color: #333333;
     background: white;
@@ -310,18 +313,19 @@ div.select-wrapper:hover {
     background: #9ad0f1;
 }
 
-#acct_checked_tabs a {
+#acct_checked_tabs a, #acct_holds_tabs a {
     margin-top: 0px;
     font-size: 10px;
     color: #333333;
+    padding: 10px 10px 10px 10px;
 }
 
-#acct_checked_tabs div.selected a {
+#acct_checked_tabs div.selected a, #acct_holds_tabs div.selected a {
     background: #e1e1e1;
     color: #333333;
 }
 
-#acct_checked_tabs {
+#acct_checked_tabs, #acct_holds_tabs {
     padding-bottom: 12px;
     color: #666;
 }

commit 5cf42881b2c9419bcb3341877e72386327b94773
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 22:17:39 2011 -0400

    CSS-ize the search results control bar
    
    Along with the standard "swap images with fancy CSS links", we also
    bring some style to the rather drab "Detailed View" link in the search
    results control bar.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2
index 35eb883..f664d15 100644
--- a/Open-ILS/src/templates/opac/results.tt2
+++ b/Open-ILS/src/templates/opac/results.tt2
@@ -24,24 +24,14 @@
         <div id="results_header_bar">
             <div id="results_header_inner">
                 <div class="results_header_btns">
-                    <a href="[% ctx.opac_root %]/home"><img alt="[% l('Another Search') %]"
-                        src="[% ctx.media_prefix %]/images/another_search.png"
-                        onmouseover="this.src='[% ctx.media_prefix %]/images/another_search_hover.png';"
-                        onmouseout="this.src='[% ctx.media_prefix %]/images/another_search.png';" /></a>
+                    <a href="[% ctx.opac_root %]/home">[% l('Another Search') %]</a>
                 </div>
                 <div class="results_header_btns">
-                    <a href="[% ctx.opac_root %]/advanced"><img alt="[% l('Advanced Search') %]"
-                        src="[% ctx.media_prefix %]/images/adv_search.png"
-                        onmouseover="this.src='[% ctx.media_prefix %]/images/adv_search_hover.png';"
-                        onmouseout="this.src='[% ctx.media_prefix %]/images/adv_search.png';" /></a>
+                    <a href="[% ctx.opac_root %]/advanced">[% l('Advanced Search') %]</a>
                 </div>
                 [% IF ctx.mylist.size %]
                 <div class="results_header_btns cached_list_div">
-                    <a href="[% ctx.opac_root; ctx.user ? '/myopac/lists' : '/mylist' %]"><img
-                        alt="[% l('View My List') %]"
-                        src="[% ctx.media_prefix %]/images/view_my_list.png"
-                        onmouseover="this.src='[% ctx.media_prefix %]/images/view_my_list_hover.png';"
-                        onmouseout="this.src='[% ctx.media_prefix %]/images/view_my_list.png';" /></a>
+                    <a href="[% ctx.opac_root; ctx.user ? '/myopac/lists' : '/mylist' %]">[% l('View My List') %]</a>
                 </div>
                 [% END %]
                 <div class="results_header_div"></div>
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index adf9ecd..2706a2c 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -274,7 +274,7 @@ div.select-wrapper:hover {
 	font-size: 10px;
 }
 
-#adv_search_tabs, #acct_tabs, #acct_fines_tabs, #acct_checked_tabs {
+#adv_search_tabs, #acct_tabs, #acct_fines_tabs, #acct_checked_tabs, #results_header_inner{
 	height: 40px;
 	width:974px;
 	margin:auto;
@@ -596,24 +596,14 @@ div.select-wrapper:hover {
 	margin:0;
 }
 
-
-
-
 #results_header_bar {
 	background: #929292;
 	border-top:1px solid #8b8b8b;
 }
 
 #results_header_inner {
-	height:32px;
-	width:974px;
-	margin:auto;
-	padding-top:6px;
-}
-
-.results_header_btns {
-	float:left;
-	margin-right: 6px;
+    height: 32px;
+    padding-top:6px;
 }
 
 .cached_list_div { width: 111px; height: 25px; }
@@ -640,8 +630,6 @@ div.select-wrapper:hover {
 .results_header_sel {
     /* width: 88px; */
 	float:left;
-	position: relative;
-	top: 2px;
 	margin:0;
 }
 
@@ -995,15 +983,33 @@ a.dash-link:hover { text-decoration: underline !important; }
 
 .big-strong {font-weight: bold; font-size: 120%; }
 
+.results_header_btns, .results_header_sel {
+    float:left;
+    margin-right: 6px;
+    height: 26px;
+}
+
 /* TODO: gradients */
-.opac-button { 
+.opac-button, .results_header_btns, #simple-detail-view-links { 
     color: white; 
     font-weight: bold; 
     -moz-border-radius: 5%;
     border-radius: 5%;
     background: #1784c7; 
 }
-.opac-button:hover { background: #359ee0; }
+
+.results_header_btns a, #simple-detail-view-links a {
+    margin: 10px;
+    padding: 5px 10px 5px 10px;
+    color: white;
+    vertical-align: middle;
+    display: table-cell;
+}
+
+a.opac-button:hover, .results_header_btns a:hover, #simple-detail-view-links a:hover {
+    background: #359ee0;
+    text-decoration: none;
+}
 
 a.opac-button {
     margin: 10px;

commit 77c01470c2b9075bc8873c6caa3ec8e72cfa9c6d
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 16:41:27 2011 -0400

    CSS-ize current circ and circulation history tabs
    
    More accessible. More win.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/myopac/circ_history.tt2 b/Open-ILS/src/templates/opac/myopac/circ_history.tt2
index feb5bfa..4bb348c 100644
--- a/Open-ILS/src/templates/opac/myopac/circ_history.tt2
+++ b/Open-ILS/src/templates/opac/myopac/circ_history.tt2
@@ -9,13 +9,12 @@
 <div style="padding:0px;">
     
     <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;">
-        <div class="align selected">
-            <a href='circs'><img src="[% ctx.media_prefix %]/images/sub_checked_out_off.jpg"/></a>
-        </div>
         <div class="align">
-            <img src="[% ctx.media_prefix %]/images/sub_checked_hist_on.jpg"/>
+            <a href='circs'>[% l("Current Items Checked Out") %]</a>
+        </div>
+        <div class="align selected">
+            <a href="#">[% l("Check Out History") %]</a>
         </div>
-        <div class="clear-both"></div>
     </div>
 
     <div class="header_middle">
diff --git a/Open-ILS/src/templates/opac/myopac/circs.tt2 b/Open-ILS/src/templates/opac/myopac/circs.tt2
index 4898116..c6312e3 100644
--- a/Open-ILS/src/templates/opac/myopac/circs.tt2
+++ b/Open-ILS/src/templates/opac/myopac/circs.tt2
@@ -2,17 +2,15 @@
     PROCESS "opac/parts/misc_util.tt2";
     WRAPPER "opac/parts/myopac/base.tt2";
     myopac_page = "circs"  %]
-<div id='myopac_checked_div' style="padding:0px;">
+<div id='myopac_checked_div'>
 
-    <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;">
+    <div id="acct_checked_tabs">
         <div class="align selected">
-            <img src="[% ctx.media_prefix %]/images/sub_checked_out_on.jpg" />
+            <a href="#">[% l("Current Items Checked Out") %]</a>
         </div>
         <div class="align">
-            <a href="circ_history"><img
-                src="[% ctx.media_prefix %]/images/sub_checked_hist_off.jpg" /></a>
+            <a href="circ_history">[% l("Check Out History") %]</a>
         </div>
-        <div class="clear-both"></div>
     </div>
 
     <div class="header_middle">
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index b6d6180..adf9ecd 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -273,23 +273,24 @@ div.select-wrapper:hover {
 	color: white;
 	font-size: 10px;
 }
-#adv_search_tabs, #acct_tabs, #acct_fines_tabs {
+
+#adv_search_tabs, #acct_tabs, #acct_fines_tabs, #acct_checked_tabs {
 	height: 40px;
 	width:974px;
 	margin:auto;
 }
 
-#adv_search_tabs a, #acct_tabs a, #acct_fines_tabs a {
+#adv_search_tabs a, #acct_tabs a, #acct_fines_tabs a, #acct_checked_tabs a {
     float: left;
-	text-align: center;
+    text-align: center;
     vertical-align: middle;
-	display: block;
-	margin: 10px 7px 10px 0px;
+    display: block;
+    margin: 10px 7px 10px 0px;
     padding: 10px 0px 10px 0px;
     -moz-border-radius: 5%; 
     border-radius: 5%;
     font-weight: bold;
-	width:156px;
+    width:156px;
     color: 45709b;
     background: #9ad0f1;
     font-weight: bold;
@@ -309,6 +310,22 @@ div.select-wrapper:hover {
     background: #9ad0f1;
 }
 
+#acct_checked_tabs a {
+    margin-top: 0px;
+    font-size: 10px;
+    color: #333333;
+}
+
+#acct_checked_tabs div.selected a {
+    background: #e1e1e1;
+    color: #333333;
+}
+
+#acct_checked_tabs {
+    padding-bottom: 12px;
+    color: #666;
+}
+
 #rdetail_header {
 	font-size:14px;
 	font-weight:bold;
@@ -997,3 +1014,9 @@ a.opac-button {
     position: relative;
     top: 10px;
 }
+
+#myopac_checked_div {
+    padding: 0px;
+}
+
+

commit 5718324ede7eb1b7ab7a9c353ae6b8e79788f0a8
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 16:02:45 2011 -0400

    CSSize fine/payment tabs on My Account page
    
    More consolidation of CSS is a win for making changes in one place.
    More accessibility as well.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/parts/myopac/base.tt2 b/Open-ILS/src/templates/opac/parts/myopac/base.tt2
index d0d79dd..62291cf 100644
--- a/Open-ILS/src/templates/opac/parts/myopac/base.tt2
+++ b/Open-ILS/src/templates/opac/parts/myopac/base.tt2
@@ -25,7 +25,7 @@
                         cls_which = "acct-tab-off";
                     END -%]
                 <a href="[% ctx.opac_root _ '/myopac/' _ page.url %]"
-                    class="[% cls_which %] acct-tab">[% page.name; %]</a>
+                    class="[% cls_which %]">[% page.name; %]</a>
                 [% END %]
             </div>
         </div>
diff --git a/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2 b/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
index 62e3174..850673a 100644
--- a/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
+++ b/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
@@ -86,11 +86,11 @@
     <div id='fines_payments_wrapper'>
         <div id='acct_fines_tabs'>
             [% IF myopac_main_page == 'main' %]
-            <a href='#'><img src='[% ctx.media_prefix %]/images/acct_fines_on.jpg'/></a>
-            <a href='main_payments'><img src='[% ctx.media_prefix %]/images/acct_payments_off.jpg'/></a>
+            <a href='#' class="acct-tab-on">[% l("Fines") %]</a>
+            <a href='main_payments' class="acct-tab-off">[% l("Payments") %]</a>
             [% ELSE %]
-            <a href='main'><img src='[% ctx.media_prefix %]/images/acct_fines_off.jpg'/></a>
-            <a href='#'><img src='[% ctx.media_prefix %]/images/acct_payments_on.jpg'/></a>
+            <a href='main' class="acct-tab-off">[% l("Fines") %]</a>
+            <a href='#' class="acct-tab-on">[% l("Payments") %]</a>
             [% END %]
         </div>
     </div>
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 29227be..b6d6180 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -273,13 +273,13 @@ div.select-wrapper:hover {
 	color: white;
 	font-size: 10px;
 }
-#adv_search_tabs {
+#adv_search_tabs, #acct_tabs, #acct_fines_tabs {
 	height: 40px;
 	width:974px;
 	margin:auto;
 }
 
-#adv_search_tabs a, #acct_tabs a {
+#adv_search_tabs a, #acct_tabs a, #acct_fines_tabs a {
     float: left;
 	text-align: center;
     vertical-align: middle;
@@ -288,41 +288,25 @@ div.select-wrapper:hover {
     padding: 10px 0px 10px 0px;
     -moz-border-radius: 5%; 
     border-radius: 5%;
-}
-
-#adv_search, #num_search, #expert_search {
+    font-weight: bold;
 	width:156px;
     color: 45709b;
     background: #9ad0f1;
     font-weight: bold;
 }
+
 #adv_search.on, #num_search.on, #expert_search.on {
     color: #333333;
     background: white;
 }
 
-#acct_tabs, #acct_fines_tabs {
-	height:33px;
-	width:974px;
-	margin:auto;
-}
-
-#acct_fines_tabs a {
-	float: left;
-	display: block;
-	height:33px;
-	margin-right:7px;
+#adv_search_tabs a.acct-tab-on, #acct_tabs a.acct-tab-on, #acct_fines_tabs a.acct-tab-on {
+    color: #333333;
+    background: white;
 }
 
-.acct-tab {
-    width:156px;
+.acct-tab-off {
     background: #9ad0f1;
-    font-weight: bold;
-}
-
-.acct-tab-on {
-    color: #333333;
-    background: white;
 }
 
 #rdetail_header {

commit 07fb02a4a2a0e49ec29854532efc90d75a01e7b0
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 15:35:17 2011 -0400

    CSS versions of the main MyOPAC tabs
    
    We can reuse much of the advanced search tab CSS (imagine that!), so not
    only are we getting accessibility and HTTP request wins, we're cutting
    down on the size of the CSS to deal with to skin this cat(alogue).
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/parts/myopac/base.tt2 b/Open-ILS/src/templates/opac/parts/myopac/base.tt2
index 6a4e839..d0d79dd 100644
--- a/Open-ILS/src/templates/opac/parts/myopac/base.tt2
+++ b/Open-ILS/src/templates/opac/parts/myopac/base.tt2
@@ -1,11 +1,11 @@
 [%  WRAPPER "opac/parts/base.tt2" %]
 
 [% myopac_pages = [
-        {url => "main", name => "Account Summary"},
-        {url => "circs", name => "Items Checked Out"},
-        {url => "holds", name => "Holds"},
-        {url => "prefs", name => "Account Preferences"},
-        {url => "lists", name => "My Lists"}
+        {url => "main", name => l("Account Summary")},
+        {url => "circs", name => l("Items Checked Out")},
+        {url => "holds", name => l("Holds")},
+        {url => "prefs", name => l("Account Preferences")},
+        {url => "lists", name => l("My Lists")}
     ];
     skin_root = "../"
 %]
@@ -19,13 +19,13 @@
             <div id="acct_tabs">
                 [%- FOREACH page IN myopac_pages;
                     IF page.url == myopac_page;
-                        cls_which = "on";
+                        cls_which = "acct-tab-on";
                         ctx.page_title = "Your Account - " _ page.name;
                     ELSE;
-                        cls_which = "off";
+                        cls_which = "acct-tab-off";
                     END -%]
                 <a href="[% ctx.opac_root _ '/myopac/' _ page.url %]"
-                    class="acct-[% page.url; '-'; cls_which %] acct-tab"></a>
+                    class="[% cls_which %] acct-tab">[% page.name; %]</a>
                 [% END %]
             </div>
         </div>
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 12850b0..29227be 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -279,7 +279,7 @@ div.select-wrapper:hover {
 	margin:auto;
 }
 
-#adv_search_tabs a {
+#adv_search_tabs a, #acct_tabs a {
     float: left;
 	text-align: center;
     vertical-align: middle;
@@ -307,7 +307,7 @@ div.select-wrapper:hover {
 	margin:auto;
 }
 
-#acct_tabs a, #acct_fines_tabs a {
+#acct_fines_tabs a {
 	float: left;
 	display: block;
 	height:33px;
@@ -315,44 +315,14 @@ div.select-wrapper:hover {
 }
 
 .acct-tab {
-    background-repeat: no-repeat;
-    background-position: bottom;
     width:156px;
+    background: #9ad0f1;
+    font-weight: bold;
 }
 
-.acct-main-off {
-	background-image:url('/images/acct_summary_off.gif');
-}
-.acct-main-on {
-	background-image:url('/images/acct_summary_on.gif');
-}
-
-.acct-circs-off {
-	background-image:url('/images/acct_checked_out_off.gif');
-}
-.acct-circs-on {
-	background-image:url('/images/acct_checked_out_on.gif');
-}
-
-.acct-holds-off {
-	background-image:url('/images/acct_holds_off.gif');
-}
-.acct-holds-on {
-	background-image:url('/images/acct_holds_on.gif');
-}
-
-.acct-prefs-off {
-	background-image:url('/images/acct_prefs_off.gif');
-}
-.acct-prefs-on {
-	background-image:url('/images/acct_prefs_on.gif');
-}
-
-.acct-lists-off {
-	background-image:url('/images/acct_lists_off.gif');
-}
-.acct-lists-on {
-	background-image:url('/images/acct_lists_on.gif');
+.acct-tab-on {
+    color: #333333;
+    background: white;
 }
 
 #rdetail_header {

commit 9287fe8b68d71212eaed662ea30f365e67a328bf
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 15:17:33 2011 -0400

    CSSize the My OPAC login / logout buttons
    
    Use the same relative positioning as the surrounding blocks and things
    look relatively (hah) clean.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/parts/topnav.tt2 b/Open-ILS/src/templates/opac/parts/topnav.tt2
index 2a27e1a..92ee814 100644
--- a/Open-ILS/src/templates/opac/parts/topnav.tt2
+++ b/Open-ILS/src/templates/opac/parts/topnav.tt2
@@ -29,18 +29,11 @@
                         </td>
                         <td id="dash_corner_mid1c">
 
-                            <a href="[% ctx.opac_root %]/myopac/main" class="pos-rel-top4"><img
-                                alt="[% l('My Account') %]"
-                                src="[% ctx.media_prefix %]/images/acct-btn.png"
-                                onmouseover="this.src='[% ctx.media_prefix %]/images/acct-btn-hover.png';"
-                                onmouseout="this.src='[% ctx.media_prefix %]/images/acct-btn.png';" /></a>
+                            <a href="[% ctx.opac_root %]/myopac/main" 
+                                class="opac-button">[% l('My Account') %]</a>
 
-                            <a href="[% ctx.opac_root %]/logout" class="pos-rel-top4"
-                                id="logout_link"><img
-                                alt="[% l('Logout') %]"
-                                src="[% ctx.media_prefix %]/images/logout-btn.png"
-                                onmouseover="this.src='[% ctx.media_prefix %]/images/logout-btn-hover.png';"
-                                onmouseout="this.src='[% ctx.media_prefix %]/images/logout-btn.png';" /></a>
+                            <a href="[% ctx.opac_root %]/logout" class="opac-button"
+                                id="logout_link">[% l('Logout') %]</a>
                         </td>
                         <td>
                             <img src="[% ctx.media_prefix %]/images/dash-corner-right1.png" />
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index cbf2543..12850b0 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1039,4 +1039,7 @@ a.opac-button {
     padding: 5px 10px 5px 10px;
 }
 
-
+#dash_wrapper .opac-button {
+    position: relative;
+    top: 10px;
+}

commit 5f75e36872392462528da9827d6f1b3acedf6f7d
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 15:16:50 2011 -0400

    5% radius for subtly rounded corners
    
    15% was too much, especially on long thin blocks; it looked like
    space-time was being warped.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 7cbfa3e..cbf2543 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1028,8 +1028,8 @@ a.dash-link:hover { text-decoration: underline !important; }
 .opac-button { 
     color: white; 
     font-weight: bold; 
-    -moz-border-radius: 15%; 
-    border-radius: 15%;
+    -moz-border-radius: 5%;
+    border-radius: 5%;
     background: #1784c7; 
 }
 .opac-button:hover { background: #359ee0; }

commit 3c6c8d2a58b28b6dc0cbc7aba7e4285a95bfd47c
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 15:03:18 2011 -0400

    Add some Web 1.5-ishness with rounder corners for tabs
    
    5% radius is a lot more subtle.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 1bc4f53..7cbfa3e 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -286,6 +286,8 @@ div.select-wrapper:hover {
 	display: block;
 	margin: 10px 7px 10px 0px;
     padding: 10px 0px 10px 0px;
+    -moz-border-radius: 5%; 
+    border-radius: 5%;
 }
 
 #adv_search, #num_search, #expert_search {

commit e9d5a28707bf7dca0ba7b365d6d117233f07a50c
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 14:47:04 2011 -0400

    Style the advanced search tabs with CSS
    
    We could go further and disable the link on the active advanced search
    tab, but for now we're just replacing what was there with a reasonable
    visual approximation.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/advanced.tt2 b/Open-ILS/src/templates/opac/advanced.tt2
index 23066bf..04e2041 100644
--- a/Open-ILS/src/templates/opac/advanced.tt2
+++ b/Open-ILS/src/templates/opac/advanced.tt2
@@ -7,9 +7,9 @@
         [% INCLUDE "opac/parts/printnav.tt2" %]
         <div id="adv_search_parent">
             <div id="adv_search_tabs">
-                <a href="?pane=advanced" alt="[% l('Advanced Search') %]" [% IF pane == 'advanced' %]class="on" [% END %]id="adv_search"></a>
-                <a href="?pane=numeric" alt="[% l('Numeric Search') %]" [% IF pane == 'numeric' %]class="on" [% END %]id="num_search"></a>
-                <a href="?pane=expert" alt="[% l('Expert Search') %]" [% IF pane == 'expert' %]class="on" [% END %]id="expert_search"></a>
+                <a href="?pane=advanced" [% IF pane == 'advanced' %]class="on" [% END %]id="adv_search">[% l('Advanced Search') %]</a>
+                <a href="?pane=numeric" [% IF pane == 'numeric' %]class="on" [% END %]id="num_search">[% l('Numeric Search') %]</a>
+                <a href="?pane=expert" [% IF pane == 'expert' %]class="on" [% END %]id="expert_search">[% l('Expert Search') %]</a>
             </div>
         </div>
     </div>
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 2e88f84..1bc4f53 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -274,40 +274,29 @@ div.select-wrapper:hover {
 	font-size: 10px;
 }
 #adv_search_tabs {
-	height:33px;
+	height: 40px;
 	width:974px;
 	margin:auto;
 }
 
 #adv_search_tabs a {
-	float: left;
+    float: left;
+	text-align: center;
+    vertical-align: middle;
 	display: block;
-	height:33px;
-	margin-right:7px;
-}
-
-#adv_search {
-	width:156px;
-	background:url('/images/adv_search_off.gif') no-repeat bottom;
-}
-#adv_search.on {
-	background: url('/images/adv_search_on.gif') no-repeat bottom !important;
+	margin: 10px 7px 10px 0px;
+    padding: 10px 0px 10px 0px;
 }
 
-#num_search {
+#adv_search, #num_search, #expert_search {
 	width:156px;
-	background:url('/images/num_search_off.gif') no-repeat bottom;
-}
-#num_search.on {
-	background: url('/images/num_search_on.gif') no-repeat bottom !important;
-}
-
-#expert_search {
-	width:156px;
-	background:url('/images/expert_search_off.gif') no-repeat bottom;
+    color: 45709b;
+    background: #9ad0f1;
+    font-weight: bold;
 }
-#expert_search.on {
-	background: url('/images/expert_search_on.gif') no-repeat bottom !important;
+#adv_search.on, #num_search.on, #expert_search.on {
+    color: #333333;
+    background: white;
 }
 
 #acct_tabs, #acct_fines_tabs {
@@ -1042,3 +1031,10 @@ a.dash-link:hover { text-decoration: underline !important; }
     background: #1784c7; 
 }
 .opac-button:hover { background: #359ee0; }
+
+a.opac-button {
+    margin: 10px;
+    padding: 5px 10px 5px 10px;
+}
+
+

commit 576f0db862b08f8f73c8b2b7e5ba4f7ec9a9e16d
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 14:46:13 2011 -0400

    Turn the login button into a CSS "button"
    
    It's just a fancy link; treat it as such with some fancy CSS.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/parts/topnav.tt2 b/Open-ILS/src/templates/opac/parts/topnav.tt2
index 19690fe..2a27e1a 100644
--- a/Open-ILS/src/templates/opac/parts/topnav.tt2
+++ b/Open-ILS/src/templates/opac/parts/topnav.tt2
@@ -6,11 +6,10 @@
     <div class="float-right">
         [% IF !ctx.user %]
         <div id="your-acct-login">
-            <a href="[% ctx.opac_root %]/myopac/main" id="home_myopac_link"><img
-                alt="[% l('Your Account Log in') %]"
-                src="[% ctx.media_prefix %]/images/login-btn.png"
-                onmouseover="this.src='[% ctx.media_prefix %]/images/login-btn-hover.png';"
-                onmouseout="this.src='[% ctx.media_prefix %]/images/login-btn.png';" /></a>
+            <a href="[% ctx.opac_root %]/myopac/main" 
+                class="opac-button" id="home_myopac_link">
+                [% l('Your Account Log in') %]
+            </a>
         </div>
         [% ELSE %]
         <div id="dash_wrapper">

commit e9ff7108bc5b61c7db42cc1f5b6a4c794b86b71f
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Sep 12 14:13:42 2011 -0400

    TPac: Default to en_us if no locales are configured
    
    Code will create an en_us handler that falls through to the strings in
    the templates.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index b5812e6..20a2e4d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -229,6 +229,9 @@ sub load_locale_handlers {
 
     my @locale_tags = sort { length($a) <=> length($b) } keys %locales;
 
+    # If no locales are defined, fall back to en_us so that at least 1 handler exists
+    push(@locale_tags, 'en_us') unless @registered_locales or @locale_tags;
+
     for my $idx (0..$#locale_tags) {
 
         my $tag = $locale_tags[$idx];
@@ -247,8 +250,7 @@ sub load_locale_handlers {
             }
         }
 
-        my $messages = $locales{$tag};
-        $messages = '' if ref $messages; # empty {}
+        my $messages = $locales{$tag} || '';
 
         # TODO Can we do this without eval?
         my $eval = <<"        EVAL";

commit 50e9fb19eff2e3ea8b1f21b5d127bc3bc5bed012
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 14:06:47 2011 -0400

    opac-button is more general than submit-button
    
    Didn't make sense to use a class of submit-button for reset buttons.
    So...
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/myopac/circs.tt2 b/Open-ILS/src/templates/opac/myopac/circs.tt2
index eff7f00..4898116 100644
--- a/Open-ILS/src/templates/opac/myopac/circs.tt2
+++ b/Open-ILS/src/templates/opac/myopac/circs.tt2
@@ -51,7 +51,7 @@
                     <input type="submit"
                         value="[% l('Go') %]"
                         alt="[% l('Go') %]" title="[% l('Go') %]"
-                        class="submit-button" />
+                        class="opac-button" />
                 </td>
                 <td style="padding-left:5px;">
                     <a href="#"><img alt="Renewing Help"
diff --git a/Open-ILS/src/templates/opac/myopac/holds.tt2 b/Open-ILS/src/templates/opac/myopac/holds.tt2
index 2424467..94c8394 100644
--- a/Open-ILS/src/templates/opac/myopac/holds.tt2
+++ b/Open-ILS/src/templates/opac/myopac/holds.tt2
@@ -55,7 +55,7 @@
                 <td width="1" style="padding-left:9px;">
                     <input type="submit" value="[% l('Go') %]"
                         alt="[% l('Go') %]" title="[% l('Go') %]"
-                        class="submit-button" />
+                        class="opac-button" />
                 </td>
                 <td width="1" style="padding-left:5px;">
                     <a href="#"><img
diff --git a/Open-ILS/src/templates/opac/myopac/holds/edit.tt2 b/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
index 1b15750..97525bb 100644
--- a/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
+++ b/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
@@ -95,12 +95,12 @@
                                 value="[% l('Submit') %]"
                                 alt="[% l('Submit') %]"
                                 title="[% l('Submit') %]"
-                                class="submit-button" />
+                                class="opac-button" />
                             <input type="reset"
                                 value="[% l('Submit') %]"
                                 alt="[% l('Cancel') %]"
                                 title="[% l('Cancel') %]"
-                                class="submit-button" />
+                                class="opac-button" />
                         </td>
                     </tr>
                 </table>
diff --git a/Open-ILS/src/templates/opac/myopac/lists.tt2 b/Open-ILS/src/templates/opac/myopac/lists.tt2
index e738be1..0c22f6d 100644
--- a/Open-ILS/src/templates/opac/myopac/lists.tt2
+++ b/Open-ILS/src/templates/opac/myopac/lists.tt2
@@ -43,12 +43,12 @@
                     <input type="submit"
                         value="[% l('Submit') %]"
                         alt="[% l('Submit') %]"
-                        class="submit-button"/>
+                        class="opac-button"/>
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     <input type="reset"
                         value="[% l('Cancel') %]"
                         alt="[% l('Cancel') %]"
-                        class="submit-button" />
+                        class="opac-button" />
                 </td>
             </tr>
         </table>
diff --git a/Open-ILS/src/templates/opac/myopac/main.tt2 b/Open-ILS/src/templates/opac/myopac/main.tt2
index 1b78ca3..d32f0a5 100644
--- a/Open-ILS/src/templates/opac/myopac/main.tt2
+++ b/Open-ILS/src/templates/opac/myopac/main.tt2
@@ -162,7 +162,7 @@
             value="[% l('Pay selected fines') %]"
             alt="[% l('Pay selected fines') %]"
             title="[% l('Pay selected fines') %]"
-            class="submit-button" />
+            class="opac-button" />
     </div>
     [% END %]
 </form>
diff --git a/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2 b/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
index 5d46763..17d0b67 100644
--- a/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
+++ b/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
@@ -9,7 +9,7 @@
         <input type='submit' 
             value="[% l('Save') %]"
             alt="[% l('Save') %]"
-            class="submit-button" />
+            class="opac-button" />
     </div>
 
     <table>
diff --git a/Open-ILS/src/templates/opac/myopac/prefs_settings.tt2 b/Open-ILS/src/templates/opac/myopac/prefs_settings.tt2
index 984bc3f..0a117bb 100644
--- a/Open-ILS/src/templates/opac/myopac/prefs_settings.tt2
+++ b/Open-ILS/src/templates/opac/myopac/prefs_settings.tt2
@@ -9,7 +9,7 @@
         <div style="float:right;width:65px;">
             <div style="position:absolute">
                 <div style="position:relative;top:75px;">
-                    <input type="submit" value="[% l('Save') %]" alt="[% l('Save') %]" class="submit-button"/>
+                    <input type="submit" value="[% l('Save') %]" alt="[% l('Save') %]" class="opac-button"/>
                 </div>
             </div>
         </div>
diff --git a/Open-ILS/src/templates/opac/parts/advanced/expert.tt2 b/Open-ILS/src/templates/opac/parts/advanced/expert.tt2
index 64ce09b..a3f8f01 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/expert.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/expert.tt2
@@ -23,7 +23,7 @@
                 <td colspan="4">
                     <input type="submit" value="[% l('Search') %]"
                         alt="[% l('Search') %]" title="[% l('Search') %]"
-                        class="submit-button" />
+                        class="opac-button" />
                 </td>
             </tr>
         </tfoot>
diff --git a/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2 b/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2
index 2e389f3..3bcf4c8 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2
@@ -23,7 +23,7 @@
         <tr>
             <td colspan="2" align="right">
                 <input type="submit" alt="[% l('Search') %]"
-                    value="[% l('Search') %]" class="submit-button" />
+                    value="[% l('Search') %]" class="opac-button" />
             </td>
     </table>
 </form>
diff --git a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
index 08761b3..6b97540 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/search.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
@@ -117,11 +117,11 @@
         <td align="left" colspan='2'>
             <input type="submit"
                 value="[% l('Search') %]"
-                class='pointer submit-button' />
+                class='pointer opac-button' />
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             <input type="reset"
                 value="[% l('Reset form') %]"
-                class="submit-button" />
+                class="opac-button" />
         </td>
     </tr>
 </table>
diff --git a/Open-ILS/src/templates/opac/parts/login/form.tt2 b/Open-ILS/src/templates/opac/parts/login/form.tt2
index 6dae4b6..b38906c 100644
--- a/Open-ILS/src/templates/opac/parts/login/form.tt2
+++ b/Open-ILS/src/templates/opac/parts/login/form.tt2
@@ -136,7 +136,7 @@
                                     <input type="checkbox" name="persist" id="login_persist" /><label for="login_persist"> [% l('Stay logged in?') %]</label>
                                 </div>
                                 <div style="padding-top:14px;">
-                                    <input type="submit" value="[% l('Log in') %]" alt="[% l('Log in') %]" class="submit-button" />
+                                    <input type="submit" value="[% l('Log in') %]" alt="[% l('Log in') %]" class="opac-button" />
                                     <!-- TODO
                                     <a href="reset_password"
                                         style="position:relative;top:-13px;left:2px;font-size:10px;">Forgot your PIN?</a>
diff --git a/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2 b/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
index e47e3ab..62e3174 100644
--- a/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
+++ b/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
@@ -43,7 +43,7 @@
 
         <form action="[% ctx.opac_root %]/myopac/main_payment_form" method="GET"><input
             type="submit" title="[% l('Pay Fines') %]" alt="[% l('Pay Fines') %]"
-            value=[% l('Pay Fines') %] class="pos-rel-top-5 submit-button" /></form>
+            value=[% l('Pay Fines') %] class="pos-rel-top-5 opac-button" /></form>
     </div>
     [% END %]
 
diff --git a/Open-ILS/src/templates/opac/parts/place_hold.tt2 b/Open-ILS/src/templates/opac/parts/place_hold.tt2
index 9bb2c29..6da63da 100644
--- a/Open-ILS/src/templates/opac/parts/place_hold.tt2
+++ b/Open-ILS/src/templates/opac/parts/place_hold.tt2
@@ -62,10 +62,10 @@
             during your scheduled visit.[% END %]
         </p>
         <input type="submit" name="submit" value="[% l('Submit') %]" title="[% l('Submit') %]"
-            alt="[% l('Submit') %]" class="submit-button" />
+            alt="[% l('Submit') %]" class="opac-button" />
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <input type="reset" name="cancel" onclick="javascript:history.go(-1);"
-            value="[% l('Cancel') %]" id="holds_cancel" class="submit-button" />
+            value="[% l('Cancel') %]" id="holds_cancel" class="opac-button" />
     </form>
     <br /><br />
     <p>
diff --git a/Open-ILS/src/templates/opac/parts/place_hold_result.tt2 b/Open-ILS/src/templates/opac/parts/place_hold_result.tt2
index 62ff498..b83a811 100644
--- a/Open-ILS/src/templates/opac/parts/place_hold_result.tt2
+++ b/Open-ILS/src/templates/opac/parts/place_hold_result.tt2
@@ -86,12 +86,12 @@
             <span style='padding-right: 10px;'>
                 <input type="submit" name="submit" value="[% l('Submit') %]"
                     title="[% l('Submit') %]" alt="[% l('Submit') %]"
-                    class="submit-button" />
+                    class="opac-button" />
             </span>
         [% END %]
         <span>
         <input type="reset" onclick="javascript:history.go(-1);"
-            id="holds_cancel" value="[% l('Cancel') %]" class="submit-button" />
+            id="holds_cancel" value="[% l('Cancel') %]" class="opac-button" />
         </span>
     </form>
 </div>
diff --git a/Open-ILS/src/templates/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2
index ee69315..3dbd70a 100644
--- a/Open-ILS/src/templates/opac/parts/searchbar.tt2
+++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2
@@ -36,7 +36,7 @@
             <td valign="top">
                 <div class="pos-abs">
                     <div class="opac-auto-143">
-                        <input id='search-submit-go' type="submit" value="[% l('Search') %]" alt="[% l('Search') %]" class="submit-button"
+                        <input id='search-submit-go' type="submit" value="[% l('Search') %]" alt="[% l('Search') %]" class="opac-button"
                             onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
                         <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden' alt=''/>
                     </div>
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 8eef1d0..2e88f84 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1034,11 +1034,11 @@ a.dash-link:hover { text-decoration: underline !important; }
 .big-strong {font-weight: bold; font-size: 120%; }
 
 /* TODO: gradients */
-.submit-button { 
+.opac-button { 
     color: white; 
     font-weight: bold; 
     -moz-border-radius: 15%; 
     border-radius: 15%;
     background: #1784c7; 
 }
-.submit-button:hover { background: #359ee0; }
+.opac-button:hover { background: #359ee0; }

commit 66c45b647d76138c6290b56fba1110d2e3fabf62
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Sep 12 13:55:59 2011 -0400

    Added TPac perl dependencies for deb distros
    
    Template::Plugin::POSIX
    Locale::Maketext::Lexicon (via liblocale-maketext-lexicon-perl)
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/extras/Makefile.install b/Open-ILS/src/extras/Makefile.install
index 0812736..0241bbf 100644
--- a/Open-ILS/src/extras/Makefile.install
+++ b/Open-ILS/src/extras/Makefile.install
@@ -102,6 +102,7 @@ DEBS =  \
 	libtext-csv-perl\
 	libuniversal-require-perl\
 	libnet-ip-perl\
+	liblocale-maketext-lexicon-perl\
 	libunix-syslog-perl
 
 # Debian Lenny and Ubuntu Intrepid bundle recent versions of yaz
@@ -229,6 +230,7 @@ CPAN_MODULES = \
     Business::EDI \
     Library::CallNumber::LC \
     Net::Z3950::Simple2ZOOM \
+	Template::Plugin::POSIX \
     SRU
 
 # More chronically unpackaged CPAN modules (available in Squeeze though)

commit 653a15ed049f7a46734cab5f631fb5ce171e6034
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 13:40:19 2011 -0400

    Use SUBMIT buttons instead of IMAGE buttons
    
    With a bit of CSS, we can replace <input type="image"> buttons with
    <input type="submit"> buttons. The payoff is directly translatable
    values and better semantics for screen readers, etc, rather than having
    to set up a process of generating buttons in your colour & languages of
    choice - as well as fewer HTTP requests for images over the network.
    
    Note that we also replace some of the JavaScript-dependent reset /
    cancel links with <input type="reset"> buttons.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/myopac/circs.tt2 b/Open-ILS/src/templates/opac/myopac/circs.tt2
index c13b963..eff7f00 100644
--- a/Open-ILS/src/templates/opac/myopac/circs.tt2
+++ b/Open-ILS/src/templates/opac/myopac/circs.tt2
@@ -48,9 +48,10 @@
                     </select>
                 </td>
                 <td style="padding-left:9px;">
-                    <input type="image"
+                    <input type="submit"
+                        value="[% l('Go') %]"
                         alt="[% l('Go') %]" title="[% l('Go') %]"
-                        src="[% ctx.media_prefix %]/images/go-btn.png" /></a>
+                        class="submit-button" />
                 </td>
                 <td style="padding-left:5px;">
                     <a href="#"><img alt="Renewing Help"
diff --git a/Open-ILS/src/templates/opac/myopac/holds.tt2 b/Open-ILS/src/templates/opac/myopac/holds.tt2
index b6bb84c..2424467 100644
--- a/Open-ILS/src/templates/opac/myopac/holds.tt2
+++ b/Open-ILS/src/templates/opac/myopac/holds.tt2
@@ -53,9 +53,9 @@
                     </select>
                 </td>
                 <td width="1" style="padding-left:9px;">
-                    <input type="image"
+                    <input type="submit" value="[% l('Go') %]"
                         alt="[% l('Go') %]" title="[% l('Go') %]"
-                        src="[% ctx.media_prefix %]/images/go-btn.png" />
+                        class="submit-button" />
                 </td>
                 <td width="1" style="padding-left:5px;">
                     <a href="#"><img
diff --git a/Open-ILS/src/templates/opac/myopac/holds/edit.tt2 b/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
index 1f825ef..1b15750 100644
--- a/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
+++ b/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
@@ -91,14 +91,16 @@
                     </tr>
                     <tr>
                         <td colspan="2" class="hold-editor-controls">
-                            <input type="image"
-                                src="[% ctx.media_prefix %]/images/btnSubmit.png"
+                            <input type="submit"
+                                value="[% l('Submit') %]"
                                 alt="[% l('Submit') %]"
-                                title="[% l('Submit') %]" />
-                            <a href="[% ctx.opac_root %]/myopac/holds"><img
-                                src="[% ctx.media_prefix %]/images/btnCancel.png"
+                                title="[% l('Submit') %]"
+                                class="submit-button" />
+                            <input type="reset"
+                                value="[% l('Submit') %]"
                                 alt="[% l('Cancel') %]"
-                                title="[% l('Cancel') %]" /></a>
+                                title="[% l('Cancel') %]"
+                                class="submit-button" />
                         </td>
                     </tr>
                 </table>
diff --git a/Open-ILS/src/templates/opac/myopac/lists.tt2 b/Open-ILS/src/templates/opac/myopac/lists.tt2
index 403c10a..e738be1 100644
--- a/Open-ILS/src/templates/opac/myopac/lists.tt2
+++ b/Open-ILS/src/templates/opac/myopac/lists.tt2
@@ -40,12 +40,15 @@
                         src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
                 </td>
                 <td class="list-create-table-buttons">
-                    <input type="image" alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png"/>
+                    <input type="submit"
+                        value="[% l('Submit') %]"
+                        alt="[% l('Submit') %]"
+                        class="submit-button"/>
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                    <a href="javascript:void(0);"
-                        onclick="document.getElementById('create_form').reset(); return false"><img
+                    <input type="reset"
+                        value="[% l('Cancel') %]"
                         alt="[% l('Cancel') %]"
-                        src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+                        class="submit-button" />
                 </td>
             </tr>
         </table>
diff --git a/Open-ILS/src/templates/opac/myopac/main.tt2 b/Open-ILS/src/templates/opac/myopac/main.tt2
index 9dbbabc..1b78ca3 100644
--- a/Open-ILS/src/templates/opac/myopac/main.tt2
+++ b/Open-ILS/src/templates/opac/myopac/main.tt2
@@ -158,12 +158,11 @@
     <div>[% l('You have no current fines.') %]</div>
     [% ELSE %]
     <div class="text-right pad-top-ten">
-        <input type="image"
+        <input type="submit"
+            value="[% l('Pay selected fines') %]"
             alt="[% l('Pay selected fines') %]"
             title="[% l('Pay selected fines') %]"
-            onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
-            onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
-            src="[% ctx.media_prefix %]/images/pay-fines-btn.png" />
+            class="submit-button" />
     </div>
     [% END %]
 </form>
diff --git a/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2 b/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
index 3729d37..5d46763 100644
--- a/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
+++ b/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
@@ -6,7 +6,10 @@
 <form method='POST'>
 
     <div style="float:right;width:65px;">
-        <input type='image' alt="[% l('Save') %]" src="[% ctx.media_prefix %]/images/save-btn.png" />
+        <input type='submit' 
+            value="[% l('Save') %]"
+            alt="[% l('Save') %]"
+            class="submit-button" />
     </div>
 
     <table>
diff --git a/Open-ILS/src/templates/opac/myopac/prefs_settings.tt2 b/Open-ILS/src/templates/opac/myopac/prefs_settings.tt2
index fc5f846..984bc3f 100644
--- a/Open-ILS/src/templates/opac/myopac/prefs_settings.tt2
+++ b/Open-ILS/src/templates/opac/myopac/prefs_settings.tt2
@@ -9,7 +9,7 @@
         <div style="float:right;width:65px;">
             <div style="position:absolute">
                 <div style="position:relative;top:75px;">
-                    <input type="image" alt="[% l('Save') %]" src="[% ctx.media_prefix %]/images/save-btn.png"/>
+                    <input type="submit" value="[% l('Save') %]" alt="[% l('Save') %]" class="submit-button"/>
                 </div>
             </div>
         </div>
diff --git a/Open-ILS/src/templates/opac/parts/advanced/expert.tt2 b/Open-ILS/src/templates/opac/parts/advanced/expert.tt2
index 4dc76b3..64ce09b 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/expert.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/expert.tt2
@@ -21,7 +21,9 @@
             <tr>
                 <td colspan="2"><a href="javascript:addExpertRow();">[ [% l("Add row") %] ]</a></td>
                 <td colspan="4">
-                    <input type="image" src="[% ctx.media_prefix %]/images/search_btn.gif" alt="[% l('Search') %]" title="[% l('Search') %]" />
+                    <input type="submit" value="[% l('Search') %]"
+                        alt="[% l('Search') %]" title="[% l('Search') %]"
+                        class="submit-button" />
                 </td>
             </tr>
         </tfoot>
diff --git a/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2 b/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2
index de54947..2e389f3 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2
@@ -22,8 +22,8 @@
         </tr>
         <tr>
             <td colspan="2" align="right">
-                <input type="image" alt="[% l('Search') %]"
-                    src="[% ctx.media_prefix %]/images/search_btn.gif" />
+                <input type="submit" alt="[% l('Search') %]"
+                    value="[% l('Search') %]" class="submit-button" />
             </td>
     </table>
 </form>
diff --git a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
index bf990e9..08761b3 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/search.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
@@ -115,10 +115,13 @@
     </tr>
     <tr class='border_4_2'>
         <td align="left" colspan='2'>
-            <input type="image" src="[% ctx.media_prefix %]/images/search_btn.gif"
-            alt="[% l('Search') %]" class='pointer' />
+            <input type="submit"
+                value="[% l('Search') %]"
+                class='pointer submit-button' />
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            <a href="[% mkurl('', {}, 1) %]">[% l('Reset Form') %]</a>
+            <input type="reset"
+                value="[% l('Reset form') %]"
+                class="submit-button" />
         </td>
     </tr>
 </table>
diff --git a/Open-ILS/src/templates/opac/parts/login/form.tt2 b/Open-ILS/src/templates/opac/parts/login/form.tt2
index b22c616..6dae4b6 100644
--- a/Open-ILS/src/templates/opac/parts/login/form.tt2
+++ b/Open-ILS/src/templates/opac/parts/login/form.tt2
@@ -136,7 +136,7 @@
                                     <input type="checkbox" name="persist" id="login_persist" /><label for="login_persist"> [% l('Stay logged in?') %]</label>
                                 </div>
                                 <div style="padding-top:14px;">
-                                    <input type='image' alt="[% l('Log in') %]" src="[% ctx.media_prefix %]/images/login-btn2.png" />
+                                    <input type="submit" value="[% l('Log in') %]" alt="[% l('Log in') %]" class="submit-button" />
                                     <!-- TODO
                                     <a href="reset_password"
                                         style="position:relative;top:-13px;left:2px;font-size:10px;">Forgot your PIN?</a>
diff --git a/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2 b/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
index 7eb9c71..e47e3ab 100644
--- a/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
+++ b/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
@@ -42,11 +42,8 @@
         </span><br />
 
         <form action="[% ctx.opac_root %]/myopac/main_payment_form" method="GET"><input
-            type="image" title="[% l('Pay Fines') %]" alt="[% l('Pay Fines') %]"
-            onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
-            onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
-            src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
-            class="pos-rel-top-5" /></form>
+            type="submit" title="[% l('Pay Fines') %]" alt="[% l('Pay Fines') %]"
+            value=[% l('Pay Fines') %] class="pos-rel-top-5 submit-button" /></form>
     </div>
     [% END %]
 
diff --git a/Open-ILS/src/templates/opac/parts/place_hold.tt2 b/Open-ILS/src/templates/opac/parts/place_hold.tt2
index e7b67cd..9bb2c29 100644
--- a/Open-ILS/src/templates/opac/parts/place_hold.tt2
+++ b/Open-ILS/src/templates/opac/parts/place_hold.tt2
@@ -61,11 +61,11 @@
             services, please select "Outreach" to have the item delivered
             during your scheduled visit.[% END %]
         </p>
-        <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
-            alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
+        <input type="submit" name="submit" value="[% l('Submit') %]" title="[% l('Submit') %]"
+            alt="[% l('Submit') %]" class="submit-button" />
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-        <a href="javascript:history.go(-1);" id="holds_cancel"><img
-            alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+        <input type="reset" name="cancel" onclick="javascript:history.go(-1);"
+            value="[% l('Cancel') %]" id="holds_cancel" class="submit-button" />
     </form>
     <br /><br />
     <p>
diff --git a/Open-ILS/src/templates/opac/parts/place_hold_result.tt2 b/Open-ILS/src/templates/opac/parts/place_hold_result.tt2
index 794ecfa..62ff498 100644
--- a/Open-ILS/src/templates/opac/parts/place_hold_result.tt2
+++ b/Open-ILS/src/templates/opac/parts/place_hold_result.tt2
@@ -84,13 +84,14 @@
                 [% |l %]You have permission to override some of the failed holds.<br/>  Click Submit to override and place your hold on the selected items.[% END %]
             </div>
             <span style='padding-right: 10px;'>
-                <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
-                    alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
+                <input type="submit" name="submit" value="[% l('Submit') %]"
+                    title="[% l('Submit') %]" alt="[% l('Submit') %]"
+                    class="submit-button" />
             </span>
         [% END %]
         <span>
-        <a href="[% CGI.param('redirect_to') || CGI.referer | html %]" id="holds_cancel"><img
-            alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+        <input type="reset" onclick="javascript:history.go(-1);"
+            id="holds_cancel" value="[% l('Cancel') %]" class="submit-button" />
         </span>
     </form>
 </div>
diff --git a/Open-ILS/src/templates/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2
index 0215c74..ee69315 100644
--- a/Open-ILS/src/templates/opac/parts/searchbar.tt2
+++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2
@@ -36,9 +36,7 @@
             <td valign="top">
                 <div class="pos-abs">
                     <div class="opac-auto-143">
-                        <input id='search-submit-go' type="image" alt="[% l('Search') %]" src="[% ctx.media_prefix %]/images/go-btn.png"
-                            onmouseover="this.src='[% ctx.media_prefix %]/images/go-btn-hover.png';"
-                            onmouseout="this.src='[% ctx.media_prefix %]/images/go-btn.png';" 
+                        <input id='search-submit-go' type="submit" value="[% l('Search') %]" alt="[% l('Search') %]" class="submit-button"
                             onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
                         <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden' alt=''/>
                     </div>
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index f1707af..8eef1d0 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1032,3 +1032,13 @@ a.dash-link:hover { text-decoration: underline !important; }
 .hold-items-list-problem { color: red; }
 
 .big-strong {font-weight: bold; font-size: 120%; }
+
+/* TODO: gradients */
+.submit-button { 
+    color: white; 
+    font-weight: bold; 
+    -moz-border-radius: 15%; 
+    border-radius: 15%;
+    background: #1784c7; 
+}
+.submit-button:hover { background: #359ee0; }

commit 6e0fe3cf1b370b7e7b4aa31920142783d726c7bd
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Sep 12 13:23:17 2011 -0400

    TPac: repaired hold status display bug
    
    Pipe dynamic text through |html inside the hold_status block instead of
    piping the output, since the block returns HTML.
    
    Repaired faulty </div>
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/myopac/holds/edit.tt2 b/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
index 711a6c3..1f825ef 100644
--- a/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
+++ b/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
@@ -30,7 +30,7 @@
                 <img src="[% ctx.media_prefix %]/images/[% attrs.format_icon %]" alt="[% attrs.format %]" title="[% attrs.title | html %]" />
             </p>[% END %]
             <p>
-                <strong>[% l('Status') %]</strong>: [% hold.human_status | html %]
+                <strong>[% l('Status') %]</strong>: [% hold.human_status %]
             </p>
             <form method="POST">
                 <table id="hold_editor_table">
diff --git a/Open-ILS/src/templates/opac/parts/hold_status.tt2 b/Open-ILS/src/templates/opac/parts/hold_status.tt2
index a15ec5f..1480665 100644
--- a/Open-ILS/src/templates/opac/parts/hold_status.tt2
+++ b/Open-ILS/src/templates/opac/parts/hold_status.tt2
@@ -2,27 +2,28 @@
     <div>
     [% 
         IF hold.hold.status == 4;
-            l("Available");
+            l("Available") | html;
             IF ahr.shelf_expire_time;
-                l('<br/>Expires [_1]', 
-                    date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT));
+                '<br/>';
+                l('Expires [_1]', 
+                    date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT)) | html;
             END;
 
         ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
             # estimated wait is delivered as seconds.
             SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);
-            l("Estimated wait: [quant,_1,day,days]", hwait);
+            l("Estimated wait: [quant,_1,day,days]", hwait) | html;
 
         ELSIF hold.hold.status == 3;
-            l("In Transit");
+            l("In Transit") | html;
 
         ELSIF hold.hold.status < 3;
-            l("Waiting for copy");
+            l("Waiting for copy") | html;
         END 
     %]
-    <div>
+    </div>
     <div>
         [% l('[_1] hold on [quant,_2,circulating copy,circulating copies]', 
-            hold.hold.queue_position, hold.hold.potential_copies) %]
+            hold.hold.queue_position, hold.hold.potential_copies) | html %]
     </div>
 [% END %]

commit 5366725511ca29ddeef81f92be9a92b9638ad8a2
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Sep 12 12:17:52 2011 -0400

    TPac: Do not URI-escape index class/names in search dropdown
    
    id|bibcn, for example, through the |uri filter turns into "id%7Cbibcn"
    in the option value.  Pipe through |html instead, just to be safe.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/qtype_selector.tt2 b/Open-ILS/src/templates/opac/parts/qtype_selector.tt2
index 4b91a47..5089606 100644
--- a/Open-ILS/src/templates/opac/parts/qtype_selector.tt2
+++ b/Open-ILS/src/templates/opac/parts/qtype_selector.tt2
@@ -9,7 +9,7 @@
 <select name="qtype">
     [%  query_type = query_type || CGI.param('qtype');
         FOR qt IN query_types -%]
-    <option value='[% qt.value | uri %]'[%
+    <option value='[% qt.value | html %]'[%
         query_type == qt.value ? ' selected="selected"' : ''
     %]>[% qt.label | html %]</option>
     [% END -%]

commit 9f3c3d09cf1b2dc98ad2fea983aa91de39c03888
Merge: 09b52f7 9c04d5d
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Sep 12 12:15:34 2011 -0400

    Merge remote branch 'working/collab/berick/tpac-misc-cleanup' into template-toolkit-opac-master-merge


commit 09b52f79bf3e693e2a2be78b47a2a9c54c286552
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Sep 12 12:07:43 2011 -0400

    TPac: repaired undefiend 'loc' var in author 'extras' link
    
    Ported the bare href to mkurl() while I was in there
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/record/authors.tt2 b/Open-ILS/src/templates/opac/parts/record/authors.tt2
index 3a03c3e..0fabf46 100644
--- a/Open-ILS/src/templates/opac/parts/record/authors.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/authors.tt2
@@ -31,7 +31,8 @@ BLOCK build_author_links;
             code = subfield.getAttribute('code');
             NEXT UNLESS code.match('[a-z]');
             term = subfield.textContent | html;
-            '<br/><a href="' _ ctx.opac_root _ '/results?qtype=author&amp;query=' _ term _ '&amp;loc=' _ loc _ '">' _ term _ '</a>';
+            url = mkurl(ctx.opac_root _ '/results', {query => subfield.textContent, qtype => 'author'}, ['page', 'expand']);
+            '<br/><a href="' _ url _ '">' _ term _ '</a>';
         END;
     END;
 END;

commit 9c04d5d814cf767faa59b105d7b88b28f58b8069
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 12 11:10:50 2011 -0400

    Can't install oils_web.xml.example if it does not exist
    
    Just remove the entry from Makefile.am and we're happy.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/Makefile.am b/Open-ILS/src/Makefile.am
index 3370dc8..9eeb330 100644
--- a/Open-ILS/src/Makefile.am
+++ b/Open-ILS/src/Makefile.am
@@ -44,7 +44,6 @@ sysconf_DATA = $(examples)/action_trigger_filters.json.example \
 	       $(examples)/opensrf_core.xml.example \
 	       $(examples)/fm_IDL.xml \
 	       $(examples)/oils_sip.xml.example \
-	       $(examples)/oils_web.xml.example \
 	       $(examples)/lib_ips.txt.example \
 	       $(examples)/oils_yaz.xml.example \
 	       $(examples)/oils_z3950.xml.example 

commit 93182fe142d544b7d969b561bdfa9ad38d9c8138
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Sep 12 10:26:40 2011 -0400

    Removed sample oils_web.xml; removed from README
    
    Thanks for the suggestion, Dan.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/examples/oils_web.xml.example b/Open-ILS/examples/oils_web.xml.example
deleted file mode 100644
index 958228e..0000000
--- a/Open-ILS/examples/oils_web.xml.example
+++ /dev/null
@@ -1,70 +0,0 @@
-<oils_web>
-
-    <!-- This should match the Apache Directory/Location[Match] configuration path -->
-    <base_path>/eg</base_path>
-
-    <web_dir>/openils/var/web</web_dir>
-
-    <!-- when locating files that don't have explicit handlers defined, assume the
-        files have the following filename extension -->
-    <default_template_extension>tt2</default_template_extension>
-
-    <!-- Media Prefix.  Allows static files to be served from an alternate domain/server
-
-            Examples:
-
-                # local URL path
-                <media_prefix>/media</media_prefix> 
-
-                # server w/ path.  
-                <media_prefix>static.example.com/media</media_prefix> 
-
-                ===
-                In the first 2 examples, the request protocol (http vs https) will
-                match the protocol of the current page
-                ===
-
-                # full-qualified with static protocol
-                <media_prefix>http://static.example.com/media</media_prefix> 
-     -->
-    <media_prefix/>
-
-    <!-- If set to true, all output will be parsed as XML before delivery to the client.  
-        If XML parsing fails, the error message, with HTML included, will be output as text/plain.
-        XML parsing adds overhead, so this should only be used for debugging -->
-    <force_valid_xml>false</force_valid_xml>
-
-    <!-- Turn on template-toolkit debugging, which reports on undefined blocks, macros, etc. -->
-    <debug_template>false</debug_template>
-
-    <!-- 
-        Supported locales.  Locales with no message catalog will use the native template strings.
-        All locales will fall back to native strings when a given string is not in the catalog
-    -->
-    <locales>
-        <en_us/>
-        <en_ca>/openils/var/data/locale/messages.en_ca.po</en_ca>
-        <fr_ca>/openils/var/data/locale/messages.fr_ca.po</fr_ca>
-    </locales>
-
-    <!-- Where templates can be found.  Paths will be checked in the order entered here.
-         It's possible to override individual or sets of templates by putting them into
-         a path in front of the default template path -->
-    <template_paths>
-        <path>/openils/var/templates</path>
-    </template_paths>
-
-    <handlers>
-        <!-- add custom handlers here.  These are for templates that live in non-obvious locations.  
-            In other words, if the path + default extension does not map directly to a template file -->
-        <handler path='acq/fund/list' template='acq/financial/list_funds.tt2'/>
-        <handler path='acq/fund/view' template='acq/financial/view_fund.tt2'/>
-        <handler path='acq/funding_source/list' template='acq/financial/list_funding_sources.tt2'/>
-        <handler path='acq/funding_source/view' template='acq/financial/view_funding_source.tt2'/>
-        <handler path='acq/currency_type/list' template='acq/financial/list_currency_types.tt2'/>
-        <handler path='acq/currency_type/view' template='acq/financial/view_currency_type.tt2'/>
-        <handler path='acq/provider/list' template='acq/financial/list_providers.tt2'/>
-        <handler path='acq/provider/view' template='acq/financial/view_provider.tt2'/>
-        <handler path='vandelay/vandelay' template='vandelay/vandelay.tt2' as_xml='true'/>
-    </handlers>
-</oils_web>
diff --git a/README b/README
index 16a83af..41025eb 100644
--- a/README
+++ b/README
@@ -105,17 +105,6 @@ cd /openils/var/web/xul
 ln -sf rel_name/server server
 ------------------------------------------------------------------------------
 
-Create the oils_web.xml configuration file:
--------------------------------------------
-Many administration interfaces, such as acquisitions, bookings, and various
-configuration screens, depend on the correct configuration of HTML templates.
-Copying the sample configuration file into place should work in most cases:
-
-[source, bash]
-------------------------------------------------------------------------------
-cp /openils/conf/oils_web.xml.example /openils/conf/oils_web.xml
-------------------------------------------------------------------------------
-
 Change ownership of the Evergreen files:
 ----------------------------------------
 

commit 7735c34215e733bbe7e66a2c504d3baaf5694436
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Sep 12 09:10:23 2011 -0400

    Remove no-longer-necessary DTD override in vandelay
    
    Also, since vandelay was the only code using this hacked-in override
    option, remove the option from the base template.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/base.tt2 b/Open-ILS/src/templates/base.tt2
index 8a7d682..b26a952 100644
--- a/Open-ILS/src/templates/base.tt2
+++ b/Open-ILS/src/templates/base.tt2
@@ -1,8 +1,4 @@
-[%- ctx.final_dtd = 
-'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' -%]
-[%- IF !ctx.dtd; ctx.dtd = ctx.final_dtd; END -%]
-[% ctx.dtd %]
-<!-- note: after vandelay strings are ported to l('...'), we can remove the DTD conditional -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.locale %]' xml:lang='[% ctx.locale %]'>
     <head>
         <title>[% ctx.page_title %]</title>
diff --git a/Open-ILS/src/templates/vandelay/vandelay.tt2 b/Open-ILS/src/templates/vandelay/vandelay.tt2
index 1775028..6e7c849 100644
--- a/Open-ILS/src/templates/vandelay/vandelay.tt2
+++ b/Open-ILS/src/templates/vandelay/vandelay.tt2
@@ -1,6 +1,5 @@
 [% WRAPPER 'base.tt2' %]
 [% ctx.page_title = 'MARC Import/Export' %]
-[% ctx.dtd = '<!DOCTYPE html SYSTEM "'_ ctx.web_dir _'/opac/locale/' _ ctx.locale _ '/vandelay.dtd">' %]
 
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/vandelay/vandelay.js'> </script>
 <link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/skin/[% ctx.skin %]/vandelay.css'/>

commit 46e233722f9d1ccec1bd97816bb055caa12f8096
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Sep 12 08:43:32 2011 -0400

    Vandelay: import strings from DTD
    
    Using the new template-style embedded string localizer:  [% l('...') %]
    Removed vandelay.dtd.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/vandelay/inc/attrs.tt2 b/Open-ILS/src/templates/vandelay/inc/attrs.tt2
index 1a09b0b..8368548 100644
--- a/Open-ILS/src/templates/vandelay/inc/attrs.tt2
+++ b/Open-ILS/src/templates/vandelay/inc/attrs.tt2
@@ -1,72 +1,72 @@
 <div style='float: left; margin-top: 8px;'>
     <input dojoType="dijit.form.RadioButton" name="attrEditorGroup" value="bib" 
         id="aegB" onclick="setAttrEditorGroup('bib');" checked="checked"/>
-    <label for="aegB" style="margin-right: 1em;">&vandelay.bib.attrs;</label>
+    <label for="aegB" style="margin-right: 1em;">[% l('Bibliographic attributes') %]</label>
     <input dojoType="dijit.form.RadioButton" name="attrEditorGroup" value="auth" 
         id="aegA" onclick="setAttrEditorGroup('auth');"/>
-    <label for="aegA" style="margin-right: 1em;">&vandelay.auth.attrs;</label>
+    <label for="aegA" style="margin-right: 1em;">[% l('Authority attributes') %]</label>
 </div>
 <div dojoType="dijit.form.DropDownButton" id="vl-create-attr-editor-button">
-    <span name="create">&vandelay.create.attr.def;</span>
+    <span name="create">[% l('Create Attribute Definition') %]</span>
     <div dojoType="dijit.TooltipDialog" execute="vlSaveAttrDefinition(arguments[0]);" id="attr-editor-dialog">
         <script type='dojo/connect' event='onOpen'>onAttrEditorOpen();</script>
         <script type='dojo/connect' event='onClose'>onAttrEditorClose();</script>
         <table class='dijitTooltipTable'>
             <tr>
-                <td><label for="code">&vandelay.code;:</label></td>
+                <td><label for="code">[% l('Code') %]:</label></td>
                 <td><input id='attr-editor-code' name="code" dojoType="dijit.form.TextBox"/></td>
             </tr>
             <tr>
-                <td><label for="description">&vandelay.descrip;:</label></td>
+                <td><label for="description">[% l('Description') %]:</label></td>
                 <td><input id='attr-editor-description' dojoType="dijit.form.TextBox" name="description"> </input></td>
             </tr>
             <tr>
-                <td><label for="amount">&vandelay.tags;:</label></td>
+                <td><label for="amount">[% l('Tag(s)') %]:</label></td>
                 <td><input id="attr-editor-tags" dojoType="dijit.form.TextBox" name="tag"></input>
                 <div class="hidden" id="attr-editor-tags-tip">
-                <p>&vandelay.tooltip.tags;</p>
-                <p>&vandelay.for.example;:<code>120, 220, 300</code> or <code>120 220 330</code></p></div>
+                <p>[% l('You can enter multiple tags, separated by spaces and/or commas') %]</p>
+                <p>[% l('Example') %]:<code>120, 220, 300</code> or <code>120 220 330</code></p></div>
                 </td>
             </tr>
 
             <tr>
-                <td><label for="amount">&vandelay.subfields;:</label></td>
+                <td><label for="amount">[% l('Subfield(s)') %]:</label></td>
                 <td><input dojoType="dijit.form.TextBox" name="subfield" id="attr-editor-subfields"></input>
                     <div class="hidden" id="attr-editor-subfields-tip">
-                    <p>&vandelay.tooltip.subfields;</p>
-                    <p>&vandelay.for.example;: <code>a, b, j, x</code> or <code>a b j x</code></p></div>
+                    <p>[% l('You can enter multiple subfields, separated by spaces and/or commas') %]</p>
+                    <p>[% l('Example') %]: <code>a, b, j, x</code> or <code>a b j x</code></p></div>
                 </td>
             </tr>
             <tr>
-                <td><label for="attr-editor-xpath">&vandelay.xpath.advanced;: </label></td>
+                <td><label for="attr-editor-xpath">[% l('XPath (advanced)') %]: </label></td>
 
                 <td><input dojoType="dijit.form.TextBox" id="attr-editor-xpath" name="xpath"></input></td>
             </tr>
             <tr>
-                <td><label for="attr-editor-remove">&vandelay.remove.advanced;: </label></td>
+                <td><label for="attr-editor-remove">[% l('Remove (advanced)') %]: </label></td>
 
                 <td><input dojoType="dijit.form.TextBox" id="attr-editor-remove" name="remove"></input></td>
             </tr>
             <tr id="attr-editor-create-bar">
                 <td colspan='2' align='center'>
                     <button dojoType="dijit.form.Button" type="submit" 
-                        id="attr-editor-create-button">&vandelay.create;</button>
+                        id="attr-editor-create-button">[% l('Create') %]</button>
                     <button type="button" dojoType="dijit.form.Button"
-                        onclick="dijit.byId('attr-editor-dialog').onCancel();">&vandelay.cancel;</button>
+                        onclick="dijit.byId('attr-editor-dialog').onCancel();">[% l('Cancel') %]</button>
                 </td>
             </tr>
             <tr id="attr-editor-update-bar">
                 <td colspan='2' align='center'>
                     <button dojoType="dijit.form.Button" type="submit" 
-                        id="attr-editor-update-button">&vandelay.update;</button>
+                        id="attr-editor-update-button">[% l('Update') %]</button>
                     <button type="button" dojoType="dijit.form.Button"
-                        onclick="dijit.byId('attr-editor-dialog').onCancel();">&vandelay.cancel;</button>
+                        onclick="dijit.byId('attr-editor-dialog').onCancel();">[% l('Cancel') %]</button>
                     <button dojoType="dijit.form.Button" 
                         type="button" 
                         id="attr-editor-delete-button"
                         style="padding-left: 2em;"
-                        onclick="if(confirm('&vandelay.sure.to.delete;')) { vlAttrDelete(); }">
-                            &vandelay.delete.record;</button>
+                        onclick="if(confirm('[% l('Are you sure you want to delete this record?') %]')) { vlAttrDelete(); }">
+                            [% l('Delete record') %]</button>
                 </td>
             </tr>
         </table>
@@ -76,13 +76,13 @@
     <table dojoType='dojox.grid.DataGrid' jsId='attrEditorGrid' query="{id: '*'}" autoHeight='true'> 
         <thead>
             <tr>
-                <th field='id'>&vandelay.id;</th>
-                <th field='code' width='auto'>&vandelay.code;</th>
-                <th field='description' width='auto'>&vandelay.descrip;</th>
-                <th field='tag' get='attrGridGetTag'>&vandelay.tag;</th>
-                <th field='subfield' get='attrGridGetSubfield'>&vandelay.subfield;</th>
-                <th field='xpath' width='auto'>&vandelay.xpath;</th>
-                <th field='remove' width='auto'>&vandelay.remove;</th>
+                <th field='id'>[% l('ID') %]</th>
+                <th field='code' width='auto'>[% l('Code') %]</th>
+                <th field='description' width='auto'>[% l('Description') %]</th>
+                <th field='tag' get='attrGridGetTag'>[% l('Tag') %]</th>
+                <th field='subfield' get='attrGridGetSubfield'>[% l('Subfield') %]</th>
+                <th field='xpath' width='auto'>[% l('XPath') %]</th>
+                <th field='remove' width='auto'>[% l('Remove') %]</th>
             </tr>
         </thead>
     </table>
diff --git a/Open-ILS/src/templates/vandelay/inc/export.tt2 b/Open-ILS/src/templates/vandelay/inc/export.tt2
index 1f7a9e3..5565a81 100644
--- a/Open-ILS/src/templates/vandelay/inc/export.tt2
+++ b/Open-ILS/src/templates/vandelay/inc/export.tt2
@@ -1,63 +1,63 @@
-<h1>&vandelay.export.records;</h1><br/>
+<h1>[% l('Export Records') %]</h1><br/>
 <form method="POST" enctype="multipart/form-data" action='https://[% ctx.hostname %]/exporter'>
     <table class='form_table'>
         <tr class='export_tr_border'>
-            <td>&vandelay.export.use_field_no;</td>
+            <td>[% l('Use Field Number') %]</td>
             <td>
                 <input dojoType='dijit.form.TextBox' type="text" size="2" maxlength="2" name="idcolumn" value="0"/>
-                &vandelay.export.field_no_hint;
+                [% l('(starting from 0)') %]
             </td>
         </tr>
         <tr>
-            <td>&vandelay.export.from_csv;</td>
+            <td>[% l('From CSV File') %]</td>
             <td><input type="file" name="idfile"/></td>
         </tr>
-        <tr><td colspan='2'><b>&vandelay.export.or;</b></td></tr>
+        <tr><td colspan='2'><b>[% l('Or') %]</b></td></tr>
         <tr class='export_tr_border'>
-            <td>&vandelay.export.record_id;</td>
+            <td>[% l('Record ID') %]</td>
             <td><input dojoType='dijit.form.TextBox' type="text" size="12" maxlength="12" name="id"/></td>
         </tr>
-        <tr><td colspan='2'><b>&vandelay.export.or;</b></td></tr>
+        <tr><td colspan='2'><b>[% l('Or') %]</b></td></tr>
         <tr class='export_tr_border'>
-            <td>&vandelay.export.bucket;</td>
+            <td>[% l('Record Bucket ID') %]</td>
             <td><input dojoType='dijit.form.TextBox' type='text' name='containerid'/></td>
         </tr>
         <tr class='export_tr_border'>
-            <td>&vandelay.record.type;</td>
+            <td>[% l('Record Type') %]</td>
             <td>
                 <select name="rectype" dojoType='dijit.form.FilteringSelect'>
-                    <option value="biblio">&vandelay.bib.records;</option>
-                    <option value="authority">&vandelay.auth.records;</option>
+                    <option value="biblio">[% l('Bibliographic Records') %]</option>
+                    <option value="authority">[% l('Authority Records') %]</option>
                 </select>
             </td>
         </tr>
         <tr>
-            <td>&vandelay.export.format;</td>
+            <td>[% l('Record Format') %]</td>
             <td>
                 <select name="format" dojoType='dijit.form.FilteringSelect'>
-                    <option value="USMARC">&vandelay.export.format.marc21;</option>
-                    <option value="UNIMARC">&vandelay.export.format.unimarc;</option>
-                    <option value="XML">&vandelay.export.format.xml;</option>
-                    <option value="BRE">&vandelay.export.format.bre;</option>
+                    <option value="USMARC">[% l('MARC21') %]</option>
+                    <option value="UNIMARC">[% l('UNIMARC') %]</option>
+                    <option value="XML">[% l('MARC XML') %]</option>
+                    <option value="BRE">[% l('Evergreen Record Entry') %]</option>
                 </select>
             </td>
         </tr>
         <tr>
-            <td>&vandelay.export.encoding;</td>
+            <td>[% l('Record Encoding') %]</td>
             <td>
                 <select name="encoding" dojoType='dijit.form.FilteringSelect'>
-                    <option value="UTF-8">&vandelay.export.utf8;</option>
-                    <option value="MARC8">&vandelay.export.marc8;</option>
+                    <option value="UTF-8">[% l('UTF-8') %]</option>
+                    <option value="MARC8">[% l('MARC8') %]</option>
                 </select>
             </td>
         </tr>
         <tr>
-            <td>&vandelay.export.holdings;</td>
+            <td>[% l('Include holdings in Bibliographic Records') %]</td>
             <td><input dojoType='dijit.form.CheckBox' type="checkbox" name="holdings" value="1"/></td>
         </tr>
         <tr>
             <td colspan='2'>
-                <button dojoType='dijit.form.Button' type="submit" value="Retrieve Records">&vandelay.export.retrieve;</button>
+                <button dojoType='dijit.form.Button' type="submit" value="Retrieve Records">[% l('Retrieve Records') %]</button>
             </td>
         </tr>
     </table>
diff --git a/Open-ILS/src/templates/vandelay/inc/import_errors.tt2 b/Open-ILS/src/templates/vandelay/inc/import_errors.tt2
index 588260e..821363c 100644
--- a/Open-ILS/src/templates/vandelay/inc/import_errors.tt2
+++ b/Open-ILS/src/templates/vandelay/inc/import_errors.tt2
@@ -1,7 +1,7 @@
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
     <button dojoType='dijit.form.Button' 
-        onclick="displayGlobalDiv('vl-queue-div');">&#x2196; &vandelay.back.to.import.queue;</button>
+        onclick="displayGlobalDiv('vl-queue-div');">&#x2196; [% l('Back To Import Queue') %]</button>
 </div>
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
diff --git a/Open-ILS/src/templates/vandelay/inc/marchtml.tt2 b/Open-ILS/src/templates/vandelay/inc/marchtml.tt2
index ad54452..1a82220 100644
--- a/Open-ILS/src/templates/vandelay/inc/marchtml.tt2
+++ b/Open-ILS/src/templates/vandelay/inc/marchtml.tt2
@@ -1,10 +1,10 @@
 <!-- MARC as HTML -->
-<h1>&vandelay.marc.record;</h1><br/>
-<span class='hidden' id='vl-marc-edit-save-label'>&vandelay.save;</span>
-<span class='hidden' id='vl-marc-edit-complete-label'>&vandelay.record_saved;</span>
+<h1>[% l('MARC Record') %]</h1><br/>
+<span class='hidden' id='vl-marc-edit-save-label'>[% l('Save Changes') %]</span>
+<span class='hidden' id='vl-marc-edit-complete-label'>[% l('Record Saved') %]</span>
 <div>
-    <button id='vl-marc-html-done-button' dojoType='dijit.form.Button'>&#x2196; &vandelay.return;</button>
-    <button id='vl-marc-html-edit-button' dojoType='dijit.form.Button'>&vandelay.edit;</button>
+    <button id='vl-marc-html-done-button' dojoType='dijit.form.Button'>&#x2196; [% l('Return') %]</button>
+    <button id='vl-marc-html-edit-button' dojoType='dijit.form.Button'>[% l('Edit') %]</button>
 </div>
 <div>
     <style type="text/css">#vl-marc-record-html td {padding:0px;}</style>
diff --git a/Open-ILS/src/templates/vandelay/inc/matches.tt2 b/Open-ILS/src/templates/vandelay/inc/matches.tt2
index 2376dbc..4e5d95b 100644
--- a/Open-ILS/src/templates/vandelay/inc/matches.tt2
+++ b/Open-ILS/src/templates/vandelay/inc/matches.tt2
@@ -5,33 +5,33 @@
             defaultCell: {styles: 'text-align: center;'},
             cells : [[
                 {
-                    name: '&vandelay.overlay.target;', 
+                    name: '[% l('Merge Target') %]', 
                     get: vlGetOverlayTargetSelector,
                     formatter : vlFormatOverlayTargetSelector,
                 },
-                {name: '&vandelay.id;', field:'id'},
-                {   name: '&vandelay.view.marc;', 
+                {name: '[% l('ID') %]', field:'id'},
+                {   name: '[% l('View MARC') %]', 
                     get: vlGetViewMARC, 
                     formatter : vlFormatViewMatchMARC
                 },
                 {name: 'Match Score', field:'match_score'},
                 {name: 'Queued Record Quality', field:'rec_quality'},
                 {name: 'Matched Record Quality', field:'match_quality'},
-                {name: '&vandelay.creator;', get: vlGetCreator},
-                {name: '&vandelay.create.date;', field:'create_date', get: vlGetDateTimeField},
-                {name: '&vandelay.last.edit.date;', field:'edit_date', get: vlGetDateTimeField},
-                {name: '&vandelay.source;', field:'source'},
-                {name: '&vandelay.tcn.source;', field:'tcn_source'},
-                {name: '&vandelay.tcn.value;', field:'tcn_value'}
+                {name: '[% l('Creator') %]', get: vlGetCreator},
+                {name: '[% l('Create Date') %]', field:'create_date', get: vlGetDateTimeField},
+                {name: '[% l('Last Edit Date') %]', field:'edit_date', get: vlGetDateTimeField},
+                {name: '[% l('Source') %]', field:'source'},
+                {name: '[% l('TCN Source') %]', field:'tcn_source'},
+                {name: '[% l('TCN Value') %]', field:'tcn_value'}
             ]]
         }];
     }
 </script>
-<h1>&vandelay.import.matches;</h1><br/>
+<h1>[% l('Import Matches') %]</h1><br/>
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
     <button dojoType='dijit.form.Button' 
-        onclick="displayGlobalDiv('vl-queue-div');">&#x2196; &vandelay.back.to.import.queue;</button>
+        onclick="displayGlobalDiv('vl-queue-div');">&#x2196; [% l('Back To Import Queue') %]</button>
 </div>
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
diff --git a/Open-ILS/src/templates/vandelay/inc/progress.tt2 b/Open-ILS/src/templates/vandelay/inc/progress.tt2
index e5e1833..b92455f 100644
--- a/Open-ILS/src/templates/vandelay/inc/progress.tt2
+++ b/Open-ILS/src/templates/vandelay/inc/progress.tt2
@@ -5,12 +5,12 @@
     <div dojoType="dijit.ProgressBar" jsId='vlControlledProgressBar' style="width:300px"></div>
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-marc-upload-status-div' class='hidden'>
-    <h1>&vandelay.upload.status;</h1><br/>
+    <h1>[% l('Upload Status') %]</h1><br/>
     <div id='vl-upload-status-uploading'>
-        <h3>&vandelay.uploading;</h3>
+        <h3>[% l('Uploading...') %]</h3>
     </div>
     <div id='vl-upload-status-processing' class='hidden'>
-        <h3>&vandelay.processing;<span id='vl-upload-status-count'/></h3>
+        <h3>[% l('Processing... ') %]<span id='vl-upload-status-count'/></h3>
     </div>
 </div>
 
diff --git a/Open-ILS/src/templates/vandelay/inc/queue.tt2 b/Open-ILS/src/templates/vandelay/inc/queue.tt2
index 749434f..0f24b8c 100644
--- a/Open-ILS/src/templates/vandelay/inc/queue.tt2
+++ b/Open-ILS/src/templates/vandelay/inc/queue.tt2
@@ -9,13 +9,13 @@
                         <table class='queue-nav-table'>
                             <thead><tr><th colspan='2' class='queue-nav-table-label'>Queue Actions</th></tr></thead>
                             <tbody>
-                                <tr><td><a href='javascript:;' onclick='vlHandleQueueItemsAction("import")'>&vandelay.import.selected;</a></td></tr>
-                                <tr><td><a href='javascript:;' onclick='vlHandleQueueItemsAction("import_all")'>&vandelay.import.all;</a></td></tr>
+                                <tr><td><a href='javascript:;' onclick='vlHandleQueueItemsAction("import")'>[% l('Import Selected Records') %]</a></td></tr>
+                                <tr><td><a href='javascript:;' onclick='vlHandleQueueItemsAction("import_all")'>[% l('Import All  Records') %]</a></td></tr>
                                 <tr><td><a href='javascript:;' onclick='vlLoadErrorUIAll();'>View Import Items</a></td></tr>
                                 <tr><td><a href='javascript:;' onclick='
-                                    if(confirm("&vandelay.sure.to.delete.queue;")) {
+                                    if(confirm("[% l('Are you sure you want to delete this queue?') %]")) {
                                         vlDeleteQueue(currentType, currentQueueId, 
-                                            function() { displayGlobalDiv("vl-marc-upload-div"); });}'>&vandelay.delete.queue;</a></td></tr>
+                                            function() { displayGlobalDiv("vl-marc-upload-div"); });}'>[% l('Delete Queue') %]</a></td></tr>
                             </tbody>
                         </table>
                     </td>
@@ -24,8 +24,8 @@
                         <table  id='vl-queue-summary-table' class='queue-nav-table'>
                             <thead><tr><th colspan='2' class='queue-nav-table-label'>Queue Summary</th></tr></thead>
                             <tbody>
-                                <tr><td>&vandelay.queue.total;</td><td> <span style='font-weight:bold;' id='vl-queue-summary-total-count'/></td></tr>
-                                <tr><td>&vandelay.queue.imported;</td><td> <span style='font-weight:bold;' id='vl-queue-summary-import-count'/></td></tr>
+                                <tr><td>[% l('Records in Queue:') %]</td><td> <span style='font-weight:bold;' id='vl-queue-summary-total-count'/></td></tr>
+                                <tr><td>[% l('Records Imported:') %]</td><td> <span style='font-weight:bold;' id='vl-queue-summary-import-count'/></td></tr>
                                 <tr><td>Record Import Failures</td><td> <span style='font-weight:bold;' id='vl-queue-summary-rec-error-count'/></td></tr>
                                 <tr><td>Items in Queue</td><td> <span style='font-weight:bold;' id='vl-queue-summary-import-item-count'/></td></tr>
                                 <tr><td>Items Imported</td><td> <span style='font-weight:bold;' id='vl-queue-summary-import-item-imported-count'/></td></tr>
@@ -39,21 +39,21 @@
                             <thead><tr><th colspan='2' class='queue-nav-table-label'>Queue Filters</th></tr></thead>
                             <tbody>
                                 <tr>
-                                    <td>&vandelay.limit.to.collision.matches;</td>
+                                    <td>[% l('Limit to Records with Matches') %]</td>
                                     <td>
                                         <input dojoType='dijit.form.CheckBox' 
                                             jsId='vlQueueGridShowMatches' onchange='retrieveQueuedRecords();'/>
                                     </td>
                                 </tr>
                                 <tr>
-                                    <td>&vandelay.limit.to.non.imported;</td>
+                                    <td>[% l('Limit to Non-Imported Records') %]</td>
                                     <td>
                                         <input dojoType='dijit.form.CheckBox' 
                                             jsId='vlQueueGridShowNonImport' onchange='retrieveQueuedRecords();'/>
                                     </td>
                                 </tr>
                                 <tr>
-                                    <td>&vandelay.limit.to.import_error;</td>
+                                    <td>[% l('Limit to Records with Import Errors') %]</td>
                                     <td>
                                         <input dojoType='dijit.form.CheckBox' 
                                             jsId='vlQueueGridShowImportErrors' onchange='retrieveQueuedRecords();'/>
@@ -77,7 +77,7 @@
                             <option value='csv'>CSV</option>
                             <option value='email'>Email</option>
                         </select>
-                        <span style='padding-right:5px;'>&vandelay.results.per.page;</span>
+                        <span style='padding-right:5px;'>[% l('Records Per Page') %]</span>
                         <span class='queue-pager-span'>
                             <select jsId='vlQueueDisplayLimit' id='vl-queue-display-limit-selector'
                                 value='10' onchange='retrieveQueuedRecords();'>
@@ -89,15 +89,15 @@
                         </span>
 
                         <span class='queue-pager-span'>
-                            <span style='padding-left:5px;'>&vandelay.page;</span>
+                            <span style='padding-left:5px;'>[% l('Page') %]</span>
                             <input style='width:36px;' dojoType='dijit.form.TextBox' jsId='vlQueueDisplayPage' value='1'/>
                         </span>
 
                         <span style='padding-right:8px;'>
-                            <a href='javascript:void(0);' onclick='vlQueueGridPrevPage();'>&vandelay.prev.page;</a>
+                            <a href='javascript:void(0);' onclick='vlQueueGridPrevPage();'>[% l('&#171; Previous') %]</a>
                         </span>
                         <span style='padding-right:10px;'>
-                            <a href='javascript:void(0);' onclick='vlQueueGridNextPage();'>&vandelay.next.page;</a>
+                            <a href='javascript:void(0);' onclick='vlQueueGridNextPage();'>[% l('Next &#187;') %]</a>
                         </span>
                     </td></tr>
                 </tbody>
@@ -126,13 +126,13 @@
                     get='vlGetViewMARC'
                     formatter='vlFormatViewMARC' 
                     styles='text-align: center;'
-                    nonSelectable='true'>&vandelay.view.marc;</th>
+                    nonSelectable='true'>[% l('View MARC') %]</th>
                 <th
                     field='+get_matches'
                     get='vlGetViewMatches'
                     formatter='vlFormatViewMatches'
                     styles='text-align: center;'
-                    nonSelectable='true'>&vandelay.matches;</th>
+                    nonSelectable='true'>[% l('Matches') %]</th>
                 <th
                     field='+get_errors'
                     get='vlGetViewErrors'
@@ -142,7 +142,7 @@
                 <th
                     field='import_time'
                     styles='text-align: center;'
-                    get='vlGetDateTimeField'>&vandelay.import.time;</th>
+                    get='vlGetDateTimeField'>[% l('Import Time') %]</th>
             </tr>
         </thead>
     </table>
@@ -167,13 +167,13 @@
                     get='vlGetViewMARC'
                     formatter='vlFormatViewMARC' 
                     styles='text-align: center;'
-                    nonSelectable='true'>&vandelay.view.marc;</th>
+                    nonSelectable='true'>[% l('View MARC') %]</th>
                 <th
                     field='+get_matches'
                     get='vlGetViewMatches'
                     formatter='vlFormatViewMatches'
                     styles='text-align: center;'
-                    nonSelectable='true'>&vandelay.matches;</th>
+                    nonSelectable='true'>[% l('Matches') %]</th>
                 <th
                     field='+get_errors'
                     get='vlGetViewErrors'
@@ -183,7 +183,7 @@
                 <th
                     field='import_time'
                     styles='text-align: center;'
-                    get='vlGetDateTimeField'>&vandelay.import.time;</th>
+                    get='vlGetDateTimeField'>[% l('Import Time') %]</th>
             </tr>
         </thead>
     </table>
@@ -195,43 +195,43 @@
         <table class='form_table'>
             <tbody>
                 <tr>
-                    <td>&vandelay.auto.import.merge_profile;</td>
+                    <td>[% l('Merge Profile') %]</td>
                     <td colspan='4'>
                         <div jsId='vlUploadMergeProfile2' 
                             dojoType='dijit.form.FilteringSelect' required='false' labelAttr='name' searchAttr='name'/>
                     </td>
                 </tr>
                 <tr>
-                    <td>&vandelay.auto.import.noncolliding;</td>
+                    <td>[% l('Import Non-Matching Records') %]</td>
                     <td colspan='4'>
                         <input jsId='vlUploadQueueImportNoMatch2' dojoType='dijit.form.CheckBox'/>
                     </td>
                 </tr>
                 <tr>
-                    <td>&vandelay.auto.import.auto_overlay_exact;</td>
+                    <td>[% l('Merge On Exact Match (901c)') %]</td>
                     <td colspan='4'>
                         <input jsId='vlUploadQueueAutoOverlayExact2' dojoType='dijit.form.CheckBox'/>
                     </td>
                 </tr>
                 <tr>
-                    <td>&vandelay.auto.import.auto_overlay_1match;</td>
+                    <td>[% l('Merge On Single Match') %]</td>
                     <td colspan='4'>
                         <input jsId='vlUploadQueueAutoOverlay1Match2' dojoType='dijit.form.CheckBox'/>
                     </td>
                 </tr>
                 <tr>
-                    <td>&vandelay.auto.import.auto_overlay_best;</td>
+                    <td>[% l('Merge On Best Match') %]</td>
                     <td colspan='4'><input jsId='vlUploadQueueAutoOverlayBestMatch2' dojoType='dijit.form.CheckBox'/></td>
                 </tr>
                 <tr>
-                    <td>&vandelay.auto.import.auto_overlay_best_ratio;</td>
+                    <td>[% l('Best/Single Match Minimum Quality Ratio') %]</td>
                     <td colspan='4'>
                         <input style='width:3em' value='0.0' jsId='vlUploadQueueAutoOverlayBestMatchRatio2' dojoType='dijit.form.TextBox'/>
-                        <span style='padding-left: 10px; font-size:90%'>(&vandelay.auto.import.auto_overlay_best_ratio.desc;)</span>
+                        <span style='padding-left: 10px; font-size:90%'>[% l('New Record Quality / Quality of Best Match') %]</span>
                     </td>
                 </tr>
                 <tr>
-                    <td>&vandelay.auto.import.ft_merge_profile;</td>
+                    <td>[% l('Insufficient Quality Fall-Through Profile') %]</td>
                     <td colspan='4'>
                         <div jsId='vlUploadFtMergeProfile2' dojoType='dijit.form.FilteringSelect' required='false' labelAttr='name' searchAttr='name'/>
                     </td>
diff --git a/Open-ILS/src/templates/vandelay/inc/queueselect.tt2 b/Open-ILS/src/templates/vandelay/inc/queueselect.tt2
index 2149dfa..e72633b 100644
--- a/Open-ILS/src/templates/vandelay/inc/queueselect.tt2
+++ b/Open-ILS/src/templates/vandelay/inc/queueselect.tt2
@@ -1,17 +1,17 @@
 <!-- Form for choosing which queue to view -->
-<h1>&vandelay.select.queue;</h1><br/>
+<h1>[% l('Select a Queue to Inspect') %]</h1><br/>
 <table class='form_table'>
     <tr>
-        <td>&vandelay.queue.type;</td>
+        <td>[% l('Queue Type') %]</td>
         <td>
             <select jsId='vlQueueSelectType' dojoType='dijit.form.FilteringSelect' onchange='vlShowQueueSelect();'>
-                <option value='bib' selected='selected'>&vandelay.bib.records;</option>
-                <option value='auth'>&vandelay.auth.records;</option>
+                <option value='bib' selected='selected'>[% l('Bibliographic Records') %]</option>
+                <option value='auth'>[% l('Authority Records') %]</option>
             </select>
         </td>
     </tr>
     <tr>
-        <td>&vandelay.queue;</td>
+        <td>[% l('Queue') %]</td>
         <td>
             <select jsId='vlQueueSelectQueueList' dojoType='dijit.form.FilteringSelect'>
             </select>
@@ -19,7 +19,7 @@
     </tr>
     <tr>
         <td colspan='2'>
-            <button dojoType='dijit.form.Button' onclick='vlFetchQueueFromForm();'>&vandelay.retrieve.queue;</button>
+            <button dojoType='dijit.form.Button' onclick='vlFetchQueueFromForm();'>[% l('Retrieve Queue') %]</button>
         </td>
     </tr>
 </table>
diff --git a/Open-ILS/src/templates/vandelay/inc/toolbar.tt2 b/Open-ILS/src/templates/vandelay/inc/toolbar.tt2
index 144cd45..cdfc6d6 100644
--- a/Open-ILS/src/templates/vandelay/inc/toolbar.tt2
+++ b/Open-ILS/src/templates/vandelay/inc/toolbar.tt2
@@ -1,16 +1,16 @@
 <div dojoType="dijit.Toolbar" id='toolbar'>
     <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy" id='vl-menu-marc-export'
-        onclick="displayGlobalDiv('vl-marc-export-div');" showLabel="true">&vandelay.export.records;</div>
+        onclick="displayGlobalDiv('vl-marc-export-div');" showLabel="true">[% l('Export Records') %]</div>
     <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"  id='vl-menu-marc-upload'
-        onclick="displayGlobalDiv('vl-marc-upload-div');" showLabel="true">&vandelay.import.records;</div>
+        onclick="displayGlobalDiv('vl-marc-upload-div');" showLabel="true">[% l('Import Records') %]</div>
     <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"  id='vl-menu-queue-select'
-        onclick="vlShowQueueSelect();" showLabel="true">&vandelay.inspect.queue;</div>
+        onclick="vlShowQueueSelect();" showLabel="true">[% l('Inspect Queue') %]</div>
     <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"  id='vl-menu-attr-editor'
-        onclick="vlShowAttrEditor();" showLabel="true">&vandelay.edit.attributes;</div>
+        onclick="vlShowAttrEditor();" showLabel="true">[% l('Record Display Attributes') %]</div>
     <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"  id='vl-menu-profile-editor'
-        onclick="vlShowProfileEditor();" showLabel="true">&vandelay.edit.profiles;</div>
+        onclick="vlShowProfileEditor();" showLabel="true">[% l('Merge / Overlay Profiles') %]</div>
     <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"  id='vl-menu-match-set-editor'
-        onclick="vlShowMatchSetEditor();" showLabel="true">&vandelay.edit.match_set;</div>
+        onclick="vlShowMatchSetEditor();" showLabel="true">[% l('Record Match Sets') %]</div>
     <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"  id='vl-menu-import-item-attr-editor'
-        onclick="vlShowImportItemAttrEditor();" showLabel="true">&vandelay.edit.import_item_attrs;</div>
+        onclick="vlShowImportItemAttrEditor();" showLabel="true">[% l('Import Item Attributes') %]</div>
 </div>
diff --git a/Open-ILS/src/templates/vandelay/inc/upload.tt2 b/Open-ILS/src/templates/vandelay/inc/upload.tt2
index 0c1bbd5..cd5b3b1 100644
--- a/Open-ILS/src/templates/vandelay/inc/upload.tt2
+++ b/Open-ILS/src/templates/vandelay/inc/upload.tt2
@@ -1,23 +1,23 @@
-<h1>&vandelay.marc.file.upload;</h1><br/>
+<h1>[% l('Evergreen MARC File Upload') %]</h1><br/>
 <form id="vl-marc-upload-form" enctype="multipart/form-data">
     <input type='hidden' name='ses' id='vl-ses-input'/>
     <table class='form_table'>
         <tr>
-            <td>&vandelay.record.type;</td>
+            <td>[% l('Record Type') %]</td>
             <td colspan='4'>
                 <select id='vl-record-type' dojoType='dijit.form.FilteringSelect' 
                         jsId='vlUploadRecordType' onchange='vlShowUploadForm();'>
-                    <option value='bib' selected='selected'>&vandelay.bib.records;</option>
-                    <option value='auth'>&vandelay.auth.records;</option>
+                    <option value='bib' selected='selected'>[% l('Bibliographic Records') %]</option>
+                    <option value='auth'>[% l('Authority Records') %]</option>
                 </select>
             </td>
         </tr>
         <tr>
-            <td>&vandelay.create.upload.queue;</td>
+            <td>[% l('Create a New Upload Queue') %]</td>
             <td>
                 <input type='text' dojoType='dijit.form.TextBox' id='vl-queue-name' size='32'></input>
             </td>
-            <td>&vandelay.add.existing.queue;</td>
+            <td>[% l('or Add to an Existing Queue') %]</td>
             <td>
                 <select jsId='vlUploadQueueSelector' dojoType='dijit.form.FilteringSelect' required='false'>
                 </select>
@@ -38,52 +38,52 @@
             </td>
         </tr>
         <tr>
-            <td>&vandelay.import.bib_sources;</td>
+            <td>[% l('Select a Record Source') %]</td>
             <td>
                 <select name='bib_source' jsId='vlUploadSourceSelector' 
                     dojoType='dijit.form.FilteringSelect' labelAttr='source' searchAttr='source'/>
             </td>
         </tr>
         <tr><td colspan='2' style='margin-top:10px;border-bottom:1px solid #888;border-top:2px solid #888'>
-            <b>&vandelay.import.actions;</b>
+            <b>[% l('Record Import Actions') %]</b>
         </td></tr>
         <tr>
-            <td>&vandelay.auto.import.merge_profile;</td>
+            <td>[% l('Merge Profile') %]</td>
             <td colspan='4'>
                 <div jsId='vlUploadMergeProfile' dojoType='dijit.form.FilteringSelect' required='false' labelAttr='name' searchAttr='name'/>
             </td>
         </tr>
         <tr>
-            <td>&vandelay.auto.import.noncolliding;</td>
+            <td>[% l('Import Non-Matching Records') %]</td>
             <td colspan='4'>
                 <input jsId='vlUploadQueueImportNoMatch' dojoType='dijit.form.CheckBox'/>
             </td>
         </tr>
         <tr>
-            <td>&vandelay.auto.import.auto_overlay_exact;</td>
+            <td>[% l('Merge On Exact Match (901c)') %]</td>
             <td colspan='4'>
                 <input jsId='vlUploadQueueAutoOverlayExact' dojoType='dijit.form.CheckBox'/>
             </td>
         </tr>
         <tr>
-            <td>&vandelay.auto.import.auto_overlay_1match;</td>
+            <td>[% l('Merge On Single Match') %]</td>
             <td colspan='4'>
                 <input jsId='vlUploadQueueAutoOverlay1Match' dojoType='dijit.form.CheckBox'/>
             </td>
         </tr>
         <tr>
-            <td>&vandelay.auto.import.auto_overlay_best;</td>
+            <td>[% l('Merge On Best Match') %]</td>
             <td colspan='4'><input jsId='vlUploadQueueAutoOverlayBestMatch' dojoType='dijit.form.CheckBox'/></td>
         </tr>
         <tr>
-            <td>&vandelay.auto.import.auto_overlay_best_ratio;</td>
+            <td>[% l('Best/Single Match Minimum Quality Ratio') %]</td>
             <td colspan='4'>
                 <input style='width:3em' value='0.0' jsId='vlUploadQueueAutoOverlayBestMatchRatio' dojoType='dijit.form.TextBox'/>
-                <span style='padding-left: 10px; font-size:90%'>(&vandelay.auto.import.auto_overlay_best_ratio.desc;)</span>
+                <span style='padding-left: 10px; font-size:90%'>[% l('New Record Quality / Quality of Best Match') %]</span>
             </td>
         </tr>
         <tr>
-            <td>&vandelay.auto.import.ft_merge_profile;</td>
+            <td>[% l('Insufficient Quality Fall-Through Profile') %]</td>
             <td colspan='4'>
                 <div jsId='vlUploadFtMergeProfile' dojoType='dijit.form.FilteringSelect' required='false' labelAttr='name' searchAttr='name'/>
             </td>
@@ -93,9 +93,9 @@
         <tr><td colspan='2' style='padding-bottom: 10px;'></td></tr>
         <tr>
             <td colspan='5'>
-                <span id="vl-file-label">&vandelay.file.to.upload;</span>
+                <span id="vl-file-label">[% l('File to Upload:') %]</span>
                 <input size='48' style='border:1px solid #888;' type="file" name="marc_upload"/>
-                <span style='margin-left:10px;'><button dojoType="dijit.form.Button" onclick="batchUpload()">&vandelay.upload;</button></span>
+                <span style='margin-left:10px;'><button dojoType="dijit.form.Button" onclick="batchUpload()">[% l('Upload') %]</button></span>
             </td>
         </tr>
     </table>
diff --git a/Open-ILS/src/templates/vandelay/vandelay.tt2 b/Open-ILS/src/templates/vandelay/vandelay.tt2
index 7aaac3f..1775028 100644
--- a/Open-ILS/src/templates/vandelay/vandelay.tt2
+++ b/Open-ILS/src/templates/vandelay/vandelay.tt2
@@ -31,7 +31,7 @@
     [% INCLUDE 'vandelay/inc/queueselect.tt2' %]
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client"  id="vl-attr-editor-div" 
-        class='hidden attr-editor-detail-content-pane content' title='&vandelay.edit.attrs;'>
+        class='hidden attr-editor-detail-content-pane content' title='[% l('Record Display Attributes') %]'>
     [% INCLUDE 'vandelay/inc/attrs.tt2' %]
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-profile-editor-div' class='hidden content'>
diff --git a/Open-ILS/web/opac/locale/en-US/vandelay.dtd b/Open-ILS/web/opac/locale/en-US/vandelay.dtd
deleted file mode 100644
index 99dac5c..0000000
--- a/Open-ILS/web/opac/locale/en-US/vandelay.dtd
+++ /dev/null
@@ -1,119 +0,0 @@
-<!ENTITY vandelay.add.existing.queue "or Add to an Existing Queue">
-<!ENTITY vandelay.auth.attrs "Authority attributes">
-<!ENTITY vandelay.auth.records "Authority Records">
-<!ENTITY vandelay.import.actions "Record Import Actions">
-<!ENTITY vandelay.auto.import.noncolliding "Import Non-Matching Records">
-<!ENTITY vandelay.auto.import.auto_overlay_exact "Merge On Exact Match (901c)">
-<!ENTITY vandelay.auto.import.auto_overlay_1match "Merge On Single Match">
-<!ENTITY vandelay.auto.import.auto_overlay_best "Merge On Best Match">
-<!ENTITY vandelay.auto.import.auto_overlay_best_ratio "Best/Single Match Minimum Quality Ratio">
-<!ENTITY vandelay.auto.import.auto_overlay_best_ratio.desc "New Record Quality / Quality of Best Match">
-<!ENTITY vandelay.auto.import.merge_profile "Merge Profile">
-<!ENTITY vandelay.auto.import.ft_merge_profile "Insufficient Quality Fall-Through Profile">
-<!ENTITY vandelay.auto.width "Auto Width">
-<!ENTITY vandelay.back.to.import.queue "Back To Import Queue">
-<!ENTITY vandelay.bib.attrs "Bibliographic attributes">
-<!ENTITY vandelay.bib.records "Bibliographic Records">
-<!ENTITY vandelay.cancel "Cancel">
-<!ENTITY vandelay.edit "Edit">
-<!ENTITY vandelay.code "Code">
-<!ENTITY vandelay.column "Column">
-<!ENTITY vandelay.create.attr.def "Create Attribute Definition">
-<!ENTITY vandelay.create "Create">
-<!ENTITY vandelay.create.date "Create Date">
-<!ENTITY vandelay.create.upload.queue "Create a New Upload Queue">
-<!ENTITY vandelay.creator "Creator">
-<!ENTITY vandelay.delete.queue "Delete Queue">
-<!ENTITY vandelay.delete.record "Delete record">
-<!ENTITY vandelay.descrip "Description">
-<!ENTITY vandelay.dest.match.point "Destination Match Point">
-<!ENTITY vandelay.display "Display">
-<!ENTITY vandelay.done "Done">
-<!ENTITY vandelay.edit.attributes "Record Display Attributes">
-<!ENTITY vandelay.edit.attrs "Record Display Attributes">
-<!ENTITY vandelay.edit.profiles "Merge / Overlay Profiles">
-<!ENTITY vandelay.edit.match_set "Record Match Sets">
-<!ENTITY vandelay.edit.import_item_attrs "Import Item Attributes">
-<!ENTITY vandelay.false "False">
-<!ENTITY vandelay.file.to.upload "File to Upload:">
-<!ENTITY vandelay.for.example "Example">
-<!ENTITY vandelay.identifier "Identifier">
-<!ENTITY vandelay.id.field "Identifier Field?">
-<!ENTITY vandelay.id "ID">
-<!ENTITY vandelay.import.matches "Import Matches">
-<!ENTITY vandelay.import.records "Import Records">
-<!ENTITY vandelay.import.selected "Import Selected Records">
-<!ENTITY vandelay.import.all "Import All  Records">
-<!ENTITY vandelay.import.time "Import Time">
-<!ENTITY vandelay.inspect.queue "Inspect Queue">
-<!ENTITY vandelay.last.edit.date "Last Edit Date">
-<!ENTITY vandelay.limit.to.collision.matches "Limit to Records with Matches">
-<!ENTITY vandelay.limit.to.non.imported "Limit to Non-Imported Records">
-<!ENTITY vandelay.limit.to.import_error "Limit to Records with Import Errors">
-<!ENTITY vandelay.marc.file.upload "Evergreen MARC File Upload">
-<!ENTITY vandelay.marc.record "MARC Record">
-<!ENTITY vandelay.matches "Matches">
-<!ENTITY vandelay.next.page "Next &#187;">
-<!ENTITY vandelay.overlay.selected.record "Merge selected record with imported record">
-<!ENTITY vandelay.overlay.target "Merge Target">
-<!ENTITY vandelay.page "Page">
-<!ENTITY vandelay.powered.by.evergreen "Powered by Evergreen!">
-<!ENTITY vandelay.prev.page "&#171; Previous">
-<!ENTITY vandelay.processing "Processing... ">
-<!ENTITY vandelay.queue "Queue">
-<!ENTITY vandelay.queue.type "Queue Type">
-<!ENTITY vandelay.record.queue "Record Queue">
-<!ENTITY vandelay.record.type "Record Type">
-<!ENTITY vandelay.refresh "Refresh">
-<!ENTITY vandelay.remove.advanced "Remove (advanced)">
-<!ENTITY vandelay.remove "Remove">
-<!ENTITY vandelay.results.per.page "Records Per Page">
-<!ENTITY vandelay.retrieve.queue "Retrieve Queue">
-<!ENTITY vandelay.return "Return">
-<!ENTITY vandelay.select.cols "Select Columns">
-<!ENTITY vandelay.select.queue "Select a Queue to Inspect">
-<!ENTITY vandelay.source.match.point "Source Match Point">
-<!ENTITY vandelay.source "Source">
-<!ENTITY vandelay.subfields "Subfield(s)">
-<!ENTITY vandelay.subfield "Subfield">
-<!ENTITY vandelay.sure.to.delete "Are you sure you want to delete this record?">
-<!ENTITY vandelay.sure.to.delete.queue "Are you sure you want to delete this queue?">
-<!ENTITY vandelay.tags "Tag(s)">
-<!ENTITY vandelay.tag "Tag">
-<!ENTITY vandelay.tcn.source "TCN Source">
-<!ENTITY vandelay.tcn.value "TCN Value">
-<!ENTITY vandelay.tooltip.subfields "You can enter multiple subfields, separated by spaces and/or commas.">
-<!ENTITY vandelay.tooltip.tags "You can enter multiple tags, separated by spaces and/or commas.">
-<!ENTITY vandelay.true "True">
-<!ENTITY vandelay.update "Update">
-<!ENTITY vandelay.uploading "Uploading...">
-<!ENTITY vandelay.upload.status "Upload Status">
-<!ENTITY vandelay.upload "Upload">
-<!ENTITY vandelay.vandelay "Vandelay">
-<!ENTITY vandelay.view.marc "View MARC">
-<!ENTITY vandelay.xpath.advanced "XPath (advanced)">
-<!ENTITY vandelay.xpath "XPath">
-<!ENTITY vandelay.save "Save Changes">
-<!ENTITY vandelay.record_saved "Record Saved">
-<!ENTITY vandelay.export.records "Export Records">
-<!ENTITY vandelay.export.use_field_no "Use Field Number">
-<!ENTITY vandelay.export.from_csv "From CSV File">
-<!ENTITY vandelay.export.record_id "Record ID">
-<!ENTITY vandelay.export.or "Or">
-<!ENTITY vandelay.export.format "Record Format">
-<!ENTITY vandelay.export.format.marc21 "MARC21">
-<!ENTITY vandelay.export.format.unimarc "UNIMARC">
-<!ENTITY vandelay.export.format.xml "MARC XML">
-<!ENTITY vandelay.export.format.bre "Evergreen Record Entry">
-<!ENTITY vandelay.export.encoding "Record Encoding">
-<!ENTITY vandelay.export.utf8 "UTF-8">
-<!ENTITY vandelay.export.marc8 "MARC8">
-<!ENTITY vandelay.export.holdings "Include holdings in Bibliographic Records">
-<!ENTITY vandelay.export.retrieve "Retrieve Records">
-<!ENTITY vandelay.export.field_no_hint "(starting from 0)">
-<!ENTITY vandelay.export.bucket "Record Bucket ID">
-<!ENTITY vandelay.select_actions "-- Actions --">
-<!ENTITY vandelay.queue.total "Records in Queue:">
-<!ENTITY vandelay.queue.imported "Records Imported:">
-<!ENTITY vandelay.queue.column_picker.title "Column Picker">
-<!ENTITY vandelay.import.bib_sources "Select a Record Source">

commit 1e67a95b6cecaa524d67721367f7cb003245be7e
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Sep 12 08:43:25 2011 -0400

    Vandelay: repaired URL path to embedded match set editor
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/js/ui/default/vandelay/vandelay.js b/Open-ILS/web/js/ui/default/vandelay/vandelay.js
index e166db7..ff4eba7 100644
--- a/Open-ILS/web/js/ui/default/vandelay/vandelay.js
+++ b/Open-ILS/web/js/ui/default/vandelay/vandelay.js
@@ -1396,7 +1396,7 @@ function vlShowMatchSetEditor() {
     dojo.byId('vl-match-set-editor-div').appendChild(
         dojo.create('iframe', {
             id : 'vl-match-set-iframe',
-            src : oilsBasePath + '/eg/conify/global/vandelay/match_set',
+            src : oilsBasePath + '/conify/global/vandelay/match_set',
             style : 'width:100%; height:500px; border:none; margin:0px;'
         })
     );

commit 5684176224d3a6ae8d8d618c13b031a04a16328e
Author: Bill Erickson <berick at esilibrary.com>
Date:   Sun Sep 11 20:07:57 2011 -0400

    TPac: template path cleanup
    
    Rearrange the few templates that relied on the now-defunct oils_web.xml
    handler path/template mapping.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/acq/financial/list_currency_types.tt2 b/Open-ILS/src/templates/acq/currency_type/list.tt2
similarity index 100%
rename from Open-ILS/src/templates/acq/financial/list_currency_types.tt2
rename to Open-ILS/src/templates/acq/currency_type/list.tt2
diff --git a/Open-ILS/src/templates/acq/financial/view_provider.tt2 b/Open-ILS/src/templates/acq/financial/view_provider.tt2
deleted file mode 100644
index 6fdc425..0000000
--- a/Open-ILS/src/templates/acq/financial/view_provider.tt2
+++ /dev/null
@@ -1,118 +0,0 @@
-[% WRAPPER base.tt2 %]
-<script type="text/javascript">var providerId = [% ctx.page_args.0 %]</script>
-
-<div dojoType="dijit.layout.ContentPane" layoutAlign="top">
-    <div dojoType="dijit.layout.TabContainer">
-
-        <div dojoType="dijit.layout.ContentPane" 
-                class='oils-acq-detail-content-pane' title="Summary" selected='true' style='height:400px;'>
-            <div dojoType="dijit.layout.ContentPane" layoutAlign="top"> 
-                <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'> 
-                    <table jsId="providerGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'> 
-                        <thead> 
-                            <tr> 
-                                <th field="id">ID</th> 
-                                <th field="name" width='auto'>Name</th> 
-                                <th field="code">Code</th> 
-                                <th field="owner" get='getOrgInfo'>Owner</th> 
-                                <th field="currency_type">Currency Type</th> 
-                            </tr> 
-                        </thead> 
-                    </table>     
-                </div> 
-            </div>             
-        </div>
-
-        <div dojoType="dijit.layout.ContentPane" 
-                class='oils-acq-detail-content-pane' title="Order Record Format" style='height:400px;'>
-
-            <div class='oils-acq-actions-div' style='margin:8px;'>
-
-                <!-- 
-                    Dropdown menu for creating a new order record data type
-                -->
-                <div dojoType="dijit.form.DropDownButton">
-                    <span>Create Order Record Field</span>
-                    <div dojoType="dijit.TooltipDialog" execute="createOrderRecordField(arguments[0]);">
-                        <script type='dojo/connect' event='onOpen'>setORDesc();</script>
-                        <table class='dijitTooltipTable'>
-                            <tr>
-                                <td><label for="code">Code: </label></td>
-                                <td>
-                                    <select id='oils-acq-provider-or-code' name="code" dojoType="dijit.form.ComboBox">
-                                        <script type='dojo/connect' event='onChange'>setORDesc();</script>
-                                        <option value='fund_code'>Fund Code</option>
-                                        <option value='shelving_location'>Shelving Location</option>
-                                        <option value='quantity'>Quantity</option>
-                                        <option value='order_date'>Order Date</option>
-                                        <option value='volume_count'>Volume Count </option>
-                                        <option value='currency_type'>Currency Type</option>
-                                        <option value='internal_notes'>Internal Notes </option>
-                                        <option value='vendor_notes'>Vendor Notes</option>
-                                        <option value='estimated_price'>Estimated Price</option>
-                                    </select>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td><label for="description">Description: </label></td>
-                                <td><input id='oils-acq-provider-or-desc' dojoType="dijit.form.TextBox" name="description"> </input></td>
-                            </tr>
-                            <tr>
-                                <td><label for="amount">Tag: </label></td>
-                                <td><input dojoType="dijit.form.TextBox" name="tag"></input></td>
-                            </tr>
-                            <tr>
-                                <td><label for="amount">Subfield: </label></td>
-                                <td><input dojoType="dijit.form.TextBox" name="subfield"></input></td>
-                            </tr>
-                            <tr>
-                                <td><label for="ident">Identifer Field?: </label></td>
-                                <td>
-                                    <select dojoType="dijit.form.FilteringSelect" name="ident">
-                                        <option value='f' selected='selected'>False</option>
-                                        <option value='t'>True</option>
-                                    </select>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td><label for="amount">XPath (advanced): </label></td>
-                                <td><input dojoType="dijit.form.TextBox" name="xpath"></input></td>
-                            </tr>
-                            <tr>
-                                <td colspan='2' align='center'>
-                                    <button dojoType='dijit.form.Button' type="submit">Apply</button>
-                                </td>
-                            </tr>
-                        </table>
-                    </div>
-                </div> 
-
-                <!--
-                    Delete order record data types button
-                -->
-                <button dojoType="dijit.form.Button" onclick='deleteORDataFields();'>
-                    Delete Selected
-                </button>
-            </div>
-
-            <script type='dojo/connect' event='onShow'>loadPADGrid();</script>
-            <div dojoType="dijit.layout.ContentPane" layoutAlign="top"> 
-                <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'> 
-                    <table jsId="padGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'> 
-                        <thead> 
-                            <tr> 
-                                <th field="id">ID</th> 
-                                <th field="code" width='auto'>Code</th> 
-                                <th field="description" width='auto'>Description</th>                                 
-                                <th field="tag" get='getTag'>Tag</th> 
-                                <th field="subfield" get='getSubfield'>Subfield</th> 
-                                <th field="xpath" width='auto'>XPath</th> 
-                            </tr> 
-                        </thead> 
-                    </table>     
-                </div> 
-            </div>             
-        </div>
-<script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/view_provider.js'></script>
-[% END %]
-
diff --git a/Open-ILS/src/templates/acq/financial/list_funds.tt2 b/Open-ILS/src/templates/acq/fund/list.tt2
similarity index 100%
rename from Open-ILS/src/templates/acq/financial/list_funds.tt2
rename to Open-ILS/src/templates/acq/fund/list.tt2
diff --git a/Open-ILS/src/templates/acq/financial/view_fund.tt2 b/Open-ILS/src/templates/acq/fund/view.tt2
similarity index 100%
rename from Open-ILS/src/templates/acq/financial/view_fund.tt2
rename to Open-ILS/src/templates/acq/fund/view.tt2
diff --git a/Open-ILS/src/templates/acq/financial/list_funding_sources.tt2 b/Open-ILS/src/templates/acq/funding_source/list.tt2
similarity index 100%
rename from Open-ILS/src/templates/acq/financial/list_funding_sources.tt2
rename to Open-ILS/src/templates/acq/funding_source/list.tt2
diff --git a/Open-ILS/src/templates/acq/financial/view_funding_source.tt2 b/Open-ILS/src/templates/acq/funding_source/view.tt2
similarity index 100%
rename from Open-ILS/src/templates/acq/financial/view_funding_source.tt2
rename to Open-ILS/src/templates/acq/funding_source/view.tt2

commit a05888910b5c3d360de24399f332881d32a4cab9
Author: Bill Erickson <berick at esilibrary.com>
Date:   Sun Sep 11 19:49:37 2011 -0400

    TPac: deprecate oils_web.xml
    
    Configuration values are now loaded from Apache configuration.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf
index f018c73..a932df3 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf
+++ b/Open-ILS/examples/apache/eg_vhost.conf
@@ -537,11 +537,28 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
     PerlSendHeader On
     allow from all
 
-    # Example of overriding template paths.  Template paths will be
-    # checked in order of their appearance here.  The server will then
-    # go on to check template paths configured in oils_web.xml.
-    # PerlAddVar OILSTemplatePath "/openils/var/templates_BranchABC"
-    # PerlAddVar OILSTemplatePath "/openils/var/templates_SystemABC"
+    PerlSetVar OILSWebBasePath "/eg"
+    PerlSetVar OILSWebWebDir "/openils/var/web"
+    PerlSetVar OILSWebDefaultTemplateExtension "tt2"
+    PerlSetVar OILSWebDebugTemplate "true"
+
+    # -------------------------------------------------------
+    # Media Prefix.  In the 3rd example, the protocol (http) is enforced
+    #PerlSetVar OILSWebMediaPrefix "/media"
+    #PerlSetVar OILSWebMediaPrefix "static.example.com/media"
+    #PerlSetVar OILSWebMediaPrefix "http://static.example.com/media"
+
+    # Locale messages files
+    PerlAddVar OILSWebLocale "en"
+    PerlAddVar OILSWebLocale "/openils/var/data/locale/messages.en.po"
+    PerlAddVar OILSWebLocale "en_ca"
+    PerlAddVar OILSWebLocale "/openils/var/data/locale/messages.en_ca.po"
+    PerlAddVar OILSWebLocale "fr_ca"
+    PerlAddVar OILSWebLocale "/openils/var/data/locale/messages.fr_ca.po"
+
+    # Templates will be loaded from the following paths in reverse order.
+    PerlAddVar OILSWebTemplatePath "/openils/var/templates"
+    PerlAddVar OILSWebTemplatePath "/openils/var/templates_localskin"
 
     <IfModule mod_deflate.c>
         SetOutputFilter DEFLATE
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index de367f4..b5812e6 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -14,24 +14,11 @@ use constant OILS_HTTP_COOKIE_SKIN => 'eg_skin';
 use constant OILS_HTTP_COOKIE_THEME => 'eg_theme';
 use constant OILS_HTTP_COOKIE_LOCALE => 'eg_locale';
 
-my $web_config;
-my $web_config_file;
-my $web_config_edit_time;
-
-sub import {
-    my $self = shift;
-    $web_config_file = shift || '';
-    unless(-r $web_config_file) {
-        warn "Invalid web config $web_config_file\n";
-        return;
-    }
-    check_web_config();
-}
-
+# cache string bundles
+my @registered_locales;
 
 sub handler {
     my $r = shift;
-    check_web_config($r); # option to disable this
     my $ctx = load_context($r);
     my $base = $ctx->{base_path};
 
@@ -66,6 +53,11 @@ sub handler {
         }
     });
 
+    if (!$tt) {
+        $r->log->error("Error creating template processor: $@");
+        return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+    }   
+
     $ctx->{encode_utf8} = sub {return encode_utf8(shift())};
 
     unless($tt->process($template, {ctx => $ctx, ENV => \%ENV, l => $text_handler})) {
@@ -138,23 +130,26 @@ sub parse_as_xml {
     $r->print($data) if ($success);
 }
 
-
 sub load_context {
     my $r = shift;
     my $cgi = CGI->new;
     my $ctx = {}; # new context for each page load
-    $ctx->{$_} = $web_config->{base_ctx}->{$_} for keys %{$web_config->{base_ctx}};
+
+    $ctx->{base_path} = $r->dir_config('OILSWebBasePath');
+    $ctx->{web_dir} = $r->dir_config('OILSWebWebDir');
+    $ctx->{debug_template} = ($r->dir_config('OILSWebDebugTemplate') =~ /true/io);
+    $ctx->{media_prefix} = $r->dir_config('OILSWebMediaPrefix');
     $ctx->{hostname} = $r->hostname;
     $ctx->{base_url} = $cgi->url(-base => 1);
     $ctx->{skin} = $cgi->cookie(OILS_HTTP_COOKIE_SKIN) || 'default';
     $ctx->{theme} = $cgi->cookie(OILS_HTTP_COOKIE_THEME) || 'default';
     $ctx->{proto} = $cgi->https ? 'https' : 'http';
 
-    # Any paths configured in Apache will be placed in front of
-    # any paths configured in the global oils_web.xml config.
-    my @template_paths = $r->dir_config->get('OILSTemplatePath');
-    unshift(@{$ctx->{template_paths}}, $_) for reverse @template_paths;
-    $r->log->debug("template paths => @{$ctx->{template_paths}}");
+    my @template_paths = $r->dir_config->get('OILSWebTemplatePath');
+    $ctx->{template_paths} = [ reverse @template_paths ];
+
+    my %locales = $r->dir_config->get('OILSWebLocale');
+    load_locale_handlers($ctx, %locales);
 
     $ctx->{locale} = 
         $cgi->cookie(OILS_HTTP_COOKIE_LOCALE) || 
@@ -191,85 +186,54 @@ sub find_template {
     my $ctx = shift;
     my $path = $r->uri;
     $path =~ s/$base\/?//og;
-    my @parts = split('/', $path);
     my $template = '';
     my $page_args = [];
-    my $as_xml = $ctx->{force_valid_xml};
-    my $handler = $web_config->{handlers};
+    my $as_xml = $r->dir_config('OILSWebForceValidXML');
+    my $ext = $r->dir_config('OILSWebDefaultTemplateExtension');
 
+    my @parts = split('/', $path);
+    my $localpath = $path;
+    my @args;
     while(@parts) {
-        my $part = shift @parts;
-        next unless $part;
-        my $t = $handler->{$part};
-        if(ref($t) eq 'PathConfig') {
-            $template = $t->{template};
-            $as_xml = ($t->{as_xml} and $t->{as_xml} =~ /true/io) || $as_xml;
-            $page_args = [@parts];
-            last;
-        } else {
-            $handler = $t;
-        }
-    }
-
-    unless($template) { # no template configured
-
-        # see if we can magically find the template based on the path and default extension
-        my $ext = $ctx->{default_template_extension};
-
-        my @parts = split('/', $path);
-        my $localpath = $path;
-        my @args;
-        while(@parts) {
-            last unless $localpath;
-            for my $tpath (@{$ctx->{template_paths}}) {
-                my $fpath = "$tpath/$localpath.$ext";
-                $r->log->debug("egweb: looking at possible template $fpath");
-                if(-r $fpath) {
-                    $template = "$localpath.$ext";
-                    last;
-                }
+        last unless $localpath;
+        for my $tpath (@{$ctx->{template_paths}}) {
+            my $fpath = "$tpath/$localpath.$ext";
+            $r->log->debug("egweb: looking at possible template $fpath");
+            if(-r $fpath) {
+                $template = "$localpath.$ext";
+                last;
             }
-            last if $template;
-            push(@args, pop @parts);
-            $localpath = join('/', @parts);
-        } 
+        }
+        last if $template;
+        push(@args, pop @parts);
+        $localpath = join('/', @parts);
+    } 
 
-        $page_args = [@args];
+    $page_args = [@args];
 
-        # no template configured or found
-        unless($template) {
-            $r->log->debug("egweb: No template configured for path $path");
-            return ();
-        }
+    # no template configured or found
+    unless($template) {
+        $r->log->debug("egweb: No template configured for path $path");
+        return ();
     }
 
     $r->log->debug("egweb: template = $template : page args = @$page_args");
     return ($template, $page_args, $as_xml);
 }
 
-# if the web configuration file has never been loaded or has
-# changed since the last load, reload it
-sub check_web_config {
-    my $r = shift;
-    my $epoch = stat($web_config_file)->mtime;
-    unless($web_config_edit_time and $web_config_edit_time == $epoch) {
-        $r->log->debug("egweb: Reloading web config after edit...") if $r;
-        $web_config_edit_time = $epoch;
-        $web_config = parse_config($web_config_file);
-    }
-}
-
 # Create an I18N sub-module for each supported locale
 # Each module creates its own MakeText lexicon by parsing .po/.mo files
 sub load_locale_handlers {
     my $ctx = shift;
-    my $locales = $ctx->{locales};
+    my %locales = @_;
 
-    my @locale_tags = sort { length($a) <=> length($b) } keys %$locales;
+    my @locale_tags = sort { length($a) <=> length($b) } keys %locales;
 
     for my $idx (0..$#locale_tags) {
 
         my $tag = $locale_tags[$idx];
+        next if grep { $_ eq $tag } @registered_locales;
+
         my $parent_tag = '';
         my $sub_idx = $idx;
 
@@ -283,7 +247,7 @@ sub load_locale_handlers {
             }
         }
 
-        my $messages = $locales->{$tag};
+        my $messages = $locales{$tag};
         $messages = '' if ref $messages; # empty {}
 
         # TODO Can we do this without eval?
@@ -301,58 +265,15 @@ sub load_locale_handlers {
             }
         EVAL
         eval $eval;
-        warn "$@\n" if $@; # TODO better logging
-    }
-}
 
-
-
-sub parse_config {
-    my $cfg_file = shift;
-    my $data = XML::Simple->new->XMLin($cfg_file);
-    my $ctx = {};
-    my $handlers = {};
-
-    $ctx->{media_prefix} = (ref $data->{media_prefix}) ? '' : $data->{media_prefix};
-    $ctx->{base_path} = (ref $data->{base_path}) ? '' : $data->{base_path};
-    $ctx->{template_paths} = [];
-    $ctx->{force_valid_xml} = ( ($data->{force_valid_xml}||'') =~ /true/io) ? 1 : 0;
-    $ctx->{debug_template} = ( ($data->{debug_template}||'')  =~ /true/io) ? 1 : 0;
-    $ctx->{default_template_extension} = $data->{default_template_extension} || 'tt2';
-    $ctx->{web_dir} = $data->{web_dir};
-    $ctx->{locales} = $data->{locales};
-    load_locale_handlers($ctx);
-
-    my $tpaths = $data->{template_paths}->{path};
-    $tpaths = [$tpaths] unless ref $tpaths;
-    push(@{$ctx->{template_paths}}, $_) for @$tpaths;
-
-    for my $handler (@{$data->{handlers}->{handler}}) {
-        my @parts = split('/', $handler->{path});
-        my $h = $handlers;
-        my $pcount = scalar(@parts);
-        for(my $i = 0; $i < $pcount; $i++) {
-            my $p = $parts[$i];
-            unless(defined $h->{$p}) {
-                if($i == $pcount - 1) {
-                    $h->{$p} = PathConfig->new(%$handler);
-                    last;
-                } else {
-                    $h->{$p} = {};
-                }
-            }
-            $h = $h->{$p};
+        if ($@) {
+            warn "$@\n" if $@;
+        } else {
+            push(@registered_locales, $tag);
         }
     }
-
-    return {base_ctx => $ctx, handlers => $handlers};
 }
 
-package PathConfig;
-sub new {
-    my($class, %args) = @_;
-    return bless(\%args, $class);
-}
 
 # base class for all supported locales
 package OpenILS::WWW::EGWeb::I18N;

commit 447cc4abd73074c85cf03bd156020f7f42a73eb4
Author: Bill Erickson <berick at esilibrary.com>
Date:   Sun Sep 11 11:20:39 2011 -0400

    TPac: locale handling improvements
    
    Allow Locale::Maketext to fall through to parent locales
    (superordinate) when the a translation for a string in the given locale
    is not present.  Locale::Maketext suppports arbitrary-length locale
    tags, so it's possible to create locale hierarchies.
    
    For example, you could create branch-specific translations that fall
    through to system, then full locale, then base locale, then the default
    template strings.
    
    en_us_systemA_branchX => en_us_systemA => en_us => en => <template strings>
    
    Each template string that needs translating will be tried against each
    locale in order until it finds a translation.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/examples/oils_web.xml.example b/Open-ILS/examples/oils_web.xml.example
index 9961490..958228e 100644
--- a/Open-ILS/examples/oils_web.xml.example
+++ b/Open-ILS/examples/oils_web.xml.example
@@ -42,9 +42,9 @@
         All locales will fall back to native strings when a given string is not in the catalog
     -->
     <locales>
-        <en_US/>
-        <en_CA>/openils/var/data/locale/messages.en_CA.po</en_CA>
-        <fr_CA>/openils/var/data/locale/messages.fr_CA.po</fr_CA>
+        <en_us/>
+        <en_ca>/openils/var/data/locale/messages.en_ca.po</en_ca>
+        <fr_ca>/openils/var/data/locale/messages.fr_ca.po</fr_ca>
     </locales>
 
     <!-- Where templates can be found.  Paths will be checked in the order entered here.
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index 0db9912..de367f4 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -17,7 +17,6 @@ use constant OILS_HTTP_COOKIE_LOCALE => 'eg_locale';
 my $web_config;
 my $web_config_file;
 my $web_config_edit_time;
-my %lh_cache; # locale handlers
 
 sub import {
     my $self = shift;
@@ -82,16 +81,13 @@ sub set_text_handler {
     my $r = shift;
 
     my $locale = $ctx->{locale};
-    $locale =~ s/-/_/g;
 
     $r->log->debug("egweb: messages locale = $locale");
 
-    unless($lh_cache{$locale}) {
-        $r->log->info("egweb: Unsupported locale: $locale");
-        $lh_cache{$locale} = $lh_cache{'en_US'};
-    }
-
-    return sub { return $lh_cache{$locale}->maketext(@_); };
+    return sub {
+        my $lh = OpenILS::WWW::EGWeb::I18N->get_handle($locale);
+        return $lh->maketext(@_);
+    };
 }
 
 
@@ -162,7 +158,7 @@ sub load_context {
 
     $ctx->{locale} = 
         $cgi->cookie(OILS_HTTP_COOKIE_LOCALE) || 
-        parse_accept_lang($r->headers_in->get('Accept-Language')) || 'en-US';
+        parse_accept_lang($r->headers_in->get('Accept-Language')) || 'en_us';
 
     my $mprefix = $ctx->{media_prefix};
     if($mprefix and $mprefix !~ /^http/ and $mprefix !~ /^\//) {
@@ -174,13 +170,14 @@ sub load_context {
 }
 
 # turn Accept-Language into sometihng EG can understand
+# TODO: try all langs, not just the first
 sub parse_accept_lang {
     my $al = shift;
     return undef unless $al;
     my ($locale) = split(/,/, $al);
     ($locale) = split(/;/, $locale);
     return undef unless $locale;
-    $locale =~ s/-(.*)/eval '-'.uc("$1")/e;
+    $locale =~ s/-/_/og;
     return $locale;
 }
 
@@ -268,16 +265,31 @@ sub load_locale_handlers {
     my $ctx = shift;
     my $locales = $ctx->{locales};
 
-    $locales->{en_US} = {} unless exists $locales->{en_US};
+    my @locale_tags = sort { length($a) <=> length($b) } keys %$locales;
+
+    for my $idx (0..$#locale_tags) {
+
+        my $tag = $locale_tags[$idx];
+        my $parent_tag = '';
+        my $sub_idx = $idx;
+
+        # find the parent locale if possible.  It will be 
+        # longest left-anchored substring of the current tag
+        while( --$sub_idx >= 0 ) {
+            my $ptag = $locale_tags[$sub_idx];
+            if( substr($tag, 0, length($ptag)) eq $ptag ) {
+                $parent_tag = "::$ptag";
+                last;
+            }
+        }
 
-    for my $lang (keys %$locales) {
-        my $messages = $locales->{$lang};
+        my $messages = $locales->{$tag};
         $messages = '' if ref $messages; # empty {}
 
         # TODO Can we do this without eval?
-        my $eval = <<EVAL;
-            package OpenILS::WWW::EGWeb::I18N::$lang;
-            use base 'OpenILS::WWW::EGWeb::I18N';
+        my $eval = <<"        EVAL";
+            package OpenILS::WWW::EGWeb::I18N::$tag;
+            use base 'OpenILS::WWW::EGWeb::I18N$parent_tag';
             if(\$messages) {
                 use Locale::Maketext::Lexicon::Gettext;
                 if(open F, '$messages') {
@@ -287,10 +299,9 @@ sub load_locale_handlers {
                     warn "EGWeb: unable to open messages file: $messages"; 
                 }
             }
-EVAL
+        EVAL
         eval $eval;
         warn "$@\n" if $@; # TODO better logging
-        $lh_cache{$lang} = "OpenILS::WWW::EGWeb::I18N::$lang"->new;
     }
 }
 

commit 15c70c70e474fa234534adc1b0cf75a7812a65df
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Sep 9 16:41:45 2011 -0400

    TPac: Review & More content cafe option on results page
    
    Links to a new top-level page.  Also cleaned up some bare &'s in the
    content cafe url.  added a ctx->proto = http / https var.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index 92dc3c5..0db9912 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -152,6 +152,7 @@ sub load_context {
     $ctx->{base_url} = $cgi->url(-base => 1);
     $ctx->{skin} = $cgi->cookie(OILS_HTTP_COOKIE_SKIN) || 'default';
     $ctx->{theme} = $cgi->cookie(OILS_HTTP_COOKIE_THEME) || 'default';
+    $ctx->{proto} = $cgi->https ? 'https' : 'http';
 
     # Any paths configured in Apache will be placed in front of
     # any paths configured in the global oils_web.xml config.
diff --git a/Open-ILS/src/templates/opac/parts/record/summaryplus.tt2 b/Open-ILS/src/templates/opac/parts/record/summaryplus.tt2
index d397b48..7796213 100644
--- a/Open-ILS/src/templates/opac/parts/record/summaryplus.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/summaryplus.tt2
@@ -12,8 +12,8 @@
     <!-- Embedded content cafe iframe -->
     [% ident = attrs.isbn_clean || attrs.upc %]
     <iframe width="100%" height="400" frameborder="0" 
-        src="http[% CGI.https ? 's' : '' %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
-            ENV.OILS_CONTENT_CAFE_USER %]&Password=[% ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident | uri %]&Options=Y" >
+        src="[% ctx.proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
+            ENV.OILS_CONTENT_CAFE_USER %]&amp;Password=[% ENV.OILS_CONTENT_CAFE_PASS %]&amp;ItemKey=[% ident | uri %]&amp;Options=Y" >
     </iframe>
 </div>
 
diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index 3948515..0706ef6 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -224,6 +224,17 @@
                                                                 [% label %]
                                                             </a>
                                                         </div>
+                                                        [% IF ENV.OILS_CONTENT_CAFE_USER %]
+                                                        <div class="results_aux_utils opac-auto-011">
+                                                            <a title="[% l('Reviews and More') %]" target='_blank' 
+                                                                href="[% ctx.proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
+                                                                    ENV.OILS_CONTENT_CAFE_USER %]&amp;Password=[%-
+                                                                    ENV.OILS_CONTENT_CAFE_PASS %]&amp;ItemKey=[% ident | uri %]&Options=Y">
+                                                                <img src='[% ctx.media_prefix %]/images/starz.png'/> 
+                                                                <span style='position:relative;top:-5px;'>[% l('Reviews &amp; More') %]</span>
+                                                            </a>
+                                                        </div>
+                                                        [% END %]
                                                     </div>
                                                 </div>
                                             </td>

commit b29b7fcf42ee7f72c48070e2eb565d41cc5271f1
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Sep 9 16:00:51 2011 -0400

    TPac: move hold status chunk to separate template
    
    ...for easier local overrideing of text that dislays for hold status
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/myopac/holds.tt2 b/Open-ILS/src/templates/opac/myopac/holds.tt2
index 4690f67..b6bb84c 100644
--- a/Open-ILS/src/templates/opac/myopac/holds.tt2
+++ b/Open-ILS/src/templates/opac/myopac/holds.tt2
@@ -1,5 +1,6 @@
 [%  PROCESS "opac/parts/header.tt2";
     PROCESS "opac/parts/misc_util.tt2";
+    PROCESS "opac/parts/hold_status.tt2";
     WRAPPER "opac/parts/myopac/base.tt2";
     myopac_page = "holds"  %]
 <div id='myopac_holds_div'>
diff --git a/Open-ILS/src/templates/opac/myopac/holds/edit.tt2 b/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
index f0b1e52..711a6c3 100644
--- a/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
+++ b/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
@@ -1,5 +1,6 @@
 [%  PROCESS "opac/parts/header.tt2";
     PROCESS "opac/parts/misc_util.tt2";
+    PROCESS "opac/parts/hold_status.tt2";
     PROCESS "opac/parts/org_selector.tt2";
     WRAPPER "opac/parts/base.tt2" + "opac/parts/myopac/base.tt2";
     myopac_page = "holds"; # in this case, just for tab coloring.
diff --git a/Open-ILS/src/templates/opac/parts/hold_status.tt2 b/Open-ILS/src/templates/opac/parts/hold_status.tt2
new file mode 100644
index 0000000..a15ec5f
--- /dev/null
+++ b/Open-ILS/src/templates/opac/parts/hold_status.tt2
@@ -0,0 +1,28 @@
+[% BLOCK get_hold_status %]
+    <div>
+    [% 
+        IF hold.hold.status == 4;
+            l("Available");
+            IF ahr.shelf_expire_time;
+                l('<br/>Expires [_1]', 
+                    date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT));
+            END;
+
+        ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
+            # estimated wait is delivered as seconds.
+            SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);
+            l("Estimated wait: [quant,_1,day,days]", hwait);
+
+        ELSIF hold.hold.status == 3;
+            l("In Transit");
+
+        ELSIF hold.hold.status < 3;
+            l("Waiting for copy");
+        END 
+    %]
+    <div>
+    <div>
+        [% l('[_1] hold on [quant,_2,circulating copy,circulating copies]', 
+            hold.hold.queue_position, hold.hold.potential_copies) %]
+    </div>
+[% END %]
diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2
index f1ded0e..713a0be 100644
--- a/Open-ILS/src/templates/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2
@@ -139,26 +139,4 @@
             END;
         END;
     END;
-
-    BLOCK get_hold_status;
-        IF hold.hold.status == 4;
-            l("Available");
-            IF ahr.shelf_expire_time;
-                l('<br/>Expires [_1]', 
-                    date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT));
-            END;
-        ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
-            # estimated wait is delivered as seconds.
-            SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);
-            l("Estimated wait: [quant,_1,day,days]", hwait);
-        ELSIF hold.hold.status == 3;
-            l("In Transit");
-        ELSIF hold.hold.status < 3;
-            l("Waiting for copy");
-        END %]
-        <div>
-            [% l('[_1] hold on [quant,_2,circulating copy,circulating copies]',
-                    hold.hold.queue_position, hold.hold.potential_copies) %]
-        </div>
-    [% END
 %]

commit 6a11ed573f837bd28f8adf106e6a54ba1c2f9669
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Sep 9 15:13:48 2011 -0400

    TPac: Push subject extras tab to top of extras
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/record/extras.tt2 b/Open-ILS/src/templates/opac/parts/record/extras.tt2
index 1d46a7a..a61fbee 100644
--- a/Open-ILS/src/templates/opac/parts/record/extras.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/extras.tt2
@@ -15,11 +15,11 @@
         END;
 
         extras = [
+            {name => 'subjects', label => l('Subject')}, 
             {name => 'summaryplus',  label => l('Summaries &amp; More'), hide => hide_summary}, 
             {name => 'content',  label => l('Contents'), hide => 1}, # ToC
             {name => 'authors',  label => l('Authors')}, 
             {name => 'series',   label => l('Series')},
-            {name => 'subjects', label => l('Subject')}, 
             {name => 'annotation', label => l('Annotation'), hide => 1}, 
             {name => 'awards',  label => l('Awards, Reviews, & Suggested Reads')}, 
             {name => 'excerpt',  label => l('Excerpt'), hide => 1},

commit 46d797f76c8ba3c433ec070d98886a4facfd726c
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Sep 9 15:13:05 2011 -0400

    TPac: toggle expandy arrow image to down-arrow on expanded record extras tabs
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/record/extras.tt2 b/Open-ILS/src/templates/opac/parts/record/extras.tt2
index 22751d2..1d46a7a 100644
--- a/Open-ILS/src/templates/opac/parts/record/extras.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/extras.tt2
@@ -29,6 +29,11 @@
             {name => 'marchtml', label => l('MARC Record')}
         ];
 
+        MACRO tab_is_active(tab) BLOCK;
+            exp_name = 'expand_' _ tab;
+            IF ctx.$exp_name OR ctx.expand_all; 1; END;
+        END;
+
         FOREACH extra IN extras;
             IF extra.hide; NEXT; END; 
             name = extra.name;
@@ -36,15 +41,15 @@
         <div class="rdetail_extras">
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
-                [%  href = mkurl('', {expand => name}) _ '#' _ name; %]
-                <a name='[% name %]' href='[% href %]'><img
-                    alt='[% extra.label %]' src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
+                [%  href = mkurl('', {expand => name}) _ '#' _ name; 
+                    img_url = ctx.media_prefix _ '/images/rdetail_arrow' _ (tab_is_active(name) ? '_down' : '') _ '.png' 
+                %]
+                <a name='[% name %]' href='[% href %]'><img alt='[% extra.label %]' src='[% img_url %]'/></a>
                 <a href='[% href %]' class="rdetail_extras_lbl">[% extra.label %]</a>
             </div>
         </div>
         <div class='rdetail_extras_div'>
-            [%  exp_name = 'expand_' _ name;
-                IF ctx.$exp_name OR ctx.expand_all;
+            [%  IF tab_is_active(name);
                     IF name == 'marchtml';
                         ctx.marchtml;
                     ELSE;
diff --git a/Open-ILS/web/images/rdetail_arrow_down.png b/Open-ILS/web/images/rdetail_arrow_down.png
new file mode 100644
index 0000000..3dd6bfd
Binary files /dev/null and b/Open-ILS/web/images/rdetail_arrow_down.png differ

commit 64961f464187503fa4d282a47f1e54af9f0c9ac7
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Sep 9 14:08:31 2011 -0400

    TPac: on-fly-list management improvements
    
    * implemented remove-from-list function
    * After add or remove from list on results page, direct user back to the
    context record via page anchor
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index a9d0565..651ac48 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -97,6 +97,7 @@ sub load {
     return $self->load_cnbrowse if $path =~ m|opac/cnbrowse|;
 
     return $self->load_mylist_add if $path =~ m|opac/mylist/add|;
+    return $self->load_mylist_delete if $path =~ m|opac/mylist/delete|;
     return $self->load_mylist_move if $path =~ m|opac/mylist/move|;
     return $self->load_mylist if $path =~ m|opac/mylist|;
     return $self->load_cache_clear if $path =~ m|opac/cache/clear|;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
index be45ffc..a51ddc5 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
@@ -56,7 +56,21 @@ sub load_mylist_add {
     return $self->mylist_action_redirect($cache_key);
 }
 
-# Removes a record ID from My List, or moves to an actual bookbag
+sub load_mylist_delete {
+    my $self = shift;
+    my $rec_id = $self->cgi->param('record');
+
+    my ($cache_key, $list) = $self->fetch_mylist;
+    $list = [ grep { $_ ne $rec_id } @$list ];
+
+    $cache_key = $U->simplereq(
+        'open-ils.actor',
+        'open-ils.actor.anon_cache.set_value', 
+        $cache_key, ANON_CACHE_MYLIST, $list);
+
+    return $self->mylist_action_redirect($cache_key);
+}
+
 sub load_mylist_move {
     my $self = shift;
     my @rec_ids = $self->cgi->param('record');
@@ -112,8 +126,16 @@ sub mylist_action_redirect {
     my $self = shift;
     my $cache_key = shift;
 
+    my $url;
+    if( my $anchor = $self->cgi->param('anchor') ) {
+        # on the results page, we want to redirect 
+        # back to record that was affected
+        $url = $self->ctx->{referer};
+        $url =~ s/#.*|$/#$anchor/g;
+    } 
+
     return $self->generic_redirect(
-        undef, 
+        $url,
         $self->cgi->cookie(
             -name => COOKIE_ANON_CACHE,
             -path => '/',
diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index 905307e..3948515 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -53,7 +53,7 @@
                                                 name='result_table_title_cell'
                                                 valign="top">
                                                 <div class="bold">
-                                                    <a title="[% attrs.title | uri %]" name='item_title'
+                                                    <a name='record_[% rec.id %]' title="[% attrs.title | uri %]" name='item_title'
                                                         href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"
                                                         class='search_link'>[% attrs.title | html %]</a>
                                                 </div>
@@ -216,8 +216,10 @@
                                                             [%  
                                                                 operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
                                                                 label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
+                                                                href = mkurl(ctx.opac_root _ '/mylist/' _ operation, 
+                                                                        {record => rec.id, anchor => 'record_' _ rec.id}, 1);
                                                             %]      
-                                                            <a href="[% mkurl(ctx.opac_root _ '/mylist/' _ operation, {record => rec.id}, 1) %]" class="no-dec">
+                                                            <a href="[% href %]" class="no-dec">
                                                                 <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
                                                                 [% label %]
                                                             </a>

commit 7e9faaa523a3f93f6d1479b29efffc8970e7c0d2
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Sep 9 11:50:55 2011 -0400

    TPac: avoid 1995-esque "Submit Query" for form submission
    
    On the update username, email, and password pages, use "Submit" instead
    of relying on the browser "Submit Query" label
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/myopac/update_email.tt2 b/Open-ILS/src/templates/opac/myopac/update_email.tt2
index 3b9b762..8279959 100644
--- a/Open-ILS/src/templates/opac/myopac/update_email.tt2
+++ b/Open-ILS/src/templates/opac/myopac/update_email.tt2
@@ -17,7 +17,7 @@
     <table> 
         <tr><td>[% l('Current Email') %]</td><td>[% ctx.user.email | html %]</td></tr>
         <tr><td>[% l('New Email') %]</td><td><input type='text' name='email' value='[% ctx.invalid_email | html %]'/></td></tr>
-        <tr><td colspan='2' align='center'><input type='submit'/></td></tr>
+        <tr><td colspan='2' align='center'><input value="[% l('Submit') %]" type='submit'/></td></tr>
     </table>
 </form>
 
diff --git a/Open-ILS/src/templates/opac/myopac/update_password.tt2 b/Open-ILS/src/templates/opac/myopac/update_password.tt2
index c4ad3de..c87fc5d 100644
--- a/Open-ILS/src/templates/opac/myopac/update_password.tt2
+++ b/Open-ILS/src/templates/opac/myopac/update_password.tt2
@@ -26,7 +26,7 @@
         <tr><td>[% l('Current Password') %]</td><td><input type='password' name='current_pw'/></td></tr>
         <tr><td>[% l('New Password') %]</td><td><input type='password' name='new_pw'/></td></tr>
         <tr><td>[% l('New Password Again') %]</td><td><input type='password' name='new_pw2'/></td></tr>
-        <tr><td colspan='2' align='center'><input type='submit'/></td></tr>
+        <tr><td colspan='2' align='center'><input value="[% l('Submit') %]" type='submit'/></td></tr>
     </table>
 </form>
 
diff --git a/Open-ILS/src/templates/opac/myopac/update_username.tt2 b/Open-ILS/src/templates/opac/myopac/update_username.tt2
index 7455cc9..8ff329e 100644
--- a/Open-ILS/src/templates/opac/myopac/update_username.tt2
+++ b/Open-ILS/src/templates/opac/myopac/update_username.tt2
@@ -22,7 +22,7 @@
     <table> 
         <tr><td>[% l('Current Username') %]</td><td>[% ctx.user.usrname | html %]</td></tr>
         <tr><td>[% l('New Username') %]</td><td><input type='text' name='username' value='[% ctx.invalid_username | html %]'/></td></tr>
-        <tr><td colspan='2' align='center'><input type='submit'/></td></tr>
+        <tr><td colspan='2' align='center'><input value="[% l('Submit') %]" type='submit'/></td></tr>
     </table>
 </form>
 

commit bbf38994659d89d1e61a0c8c8e4232821f15c4c4
Merge: 68acaf4 0d51d18
Author: Bill Erickson <berick at esilibrary.com>
Date:   Sun Sep 11 18:15:28 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge


commit 68acaf4a6ba6471a56a201337fe6594fa4a1df62
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Sep 8 18:51:06 2011 -0400

    TPac: minor i18n string repairs
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/myopac/circs.tt2 b/Open-ILS/src/templates/opac/myopac/circs.tt2
index 4b474c1..c13b963 100644
--- a/Open-ILS/src/templates/opac/myopac/circs.tt2
+++ b/Open-ILS/src/templates/opac/myopac/circs.tt2
@@ -100,7 +100,7 @@
                     <tr>
                         <td width="1%" style="padding-left:10px;" valign="top">
                             <input type="checkbox" name="circ"
-                                [% IF circ.circ.renewal_remaining < 1; l('disabled="disabled"'); END %]
+                                [% IF circ.circ.renewal_remaining < 1 %] disabled="disabled" [% END %]
                                 value="[% circ.circ.id %]" />
                         </td>
                         <td width="40%"
diff --git a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
index 7e300ed..bf990e9 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/search.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
@@ -88,11 +88,9 @@
                                             {"code" => "is", "label" => l("Is")},
                                             {"code" => "before", "label" => l("Before")},
                                             {"code" => "after", "label" => l("After")},
-                                            {"code" => "between", "label" => l("Between")}
-                                        ];
-                                            |l(opt.code, opt.label) %]
-                                        <option value="[_1]"[% CGI.param('pubdate') == opt.code ? ' selected="selected"' : '' %]>[_2]</option>
-                                    [%  END; END %]
+                                            {"code" => "between", "label" => l("Between")} ] %]
+                                        <option value="[% opt.code %]"[% CGI.param('pubdate') == opt.code ? ' selected="selected"' : '' %]>[% opt.label | html %]</option>
+                                    [%  END %]
                             </select>    
                             <div style='margin-top:5px;'>
                                 <input name='date1' type='text' size='4' maxlength='4' value="[% CGI.param('date1') | html %]" />

commit 88c85fc8ef68db2477a0afd70650f225cc3cddc5
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Sep 8 18:32:49 2011 -0400

    Repair makefile.am: install template dirs that were previously under /default/
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/Makefile.am b/Open-ILS/src/Makefile.am
index a70bbcc..3370dc8 100644
--- a/Open-ILS/src/Makefile.am
+++ b/Open-ILS/src/Makefile.am
@@ -162,15 +162,9 @@ uninstall-hook:
 ilscore-install:
 	@echo $@
 	$(MKDIR_P) $(DESTDIR)$(TEMPLATEDIR)
-	cp -r @srcdir@/templates/base.tt2 $(DESTDIR)$(TEMPLATEDIR)
-	cp -r @srcdir@/templates/login.tt2 $(DESTDIR)$(TEMPLATEDIR)
-	cp -r @srcdir@/templates/default $(DESTDIR)$(TEMPLATEDIR)
-	cp -r @srcdir@/templates/marc $(DESTDIR)$(TEMPLATEDIR)
-	cp -r @srcdir@/templates/password-reset $(DESTDIR)$(TEMPLATEDIR)
-	@echo "Installing string templates to $(DESTDIR)$(TEMPLATEDIR)"
-	$(MKDIR_P) $(DESTDIR)$(TEMPLATEDIR)
+	@echo "Installing templates to $(DESTDIR)$(TEMPLATEDIR)"
+	cp -r @srcdir@/templates/* $(DESTDIR)$(TEMPLATEDIR)
 	$(MKDIR_P) $(DESTDIR)$(datadir)/overdue/
-	cp -r @srcdir@/templates/strings $(DESTDIR)$(TEMPLATEDIR)
 	sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example'
 	sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example'
 	sed -i 's|LIBDIR|@libdir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example'

commit 7f1e214e51edc9ba0cd2beb5a6693325bdebb820
Merge: 6a244e8 6d21b94
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Sep 8 17:52:01 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge


commit 6a244e866430fe67c5ceea408c163dc2236de929
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Sep 8 15:54:47 2011 -0400

    Make bookbag title/author links
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/myopac/lists.tt2 b/Open-ILS/src/templates/opac/myopac/lists.tt2
index 9e1ba61..403c10a 100644
--- a/Open-ILS/src/templates/opac/myopac/lists.tt2
+++ b/Open-ILS/src/templates/opac/myopac/lists.tt2
@@ -131,9 +131,18 @@
                         attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
                         PROCESS get_marc_attrs args=attrs %]
                     <tr>
-                        <td class="item_list_padding" style="padding-left: 10px;"><input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
-                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.title | html %]</td>
-                        <td class="item_list_padding">[% attrs.author | html %]</td>
+                        <td class="item_list_padding" style="padding-left: 10px;">
+                            <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
+                        </td>
+                        <td class="item_list_padding" style="padding-left: 5px;">
+                            <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id) %]">[% attrs.title | html %]</a>
+                        </td>
+                        <td class="item_list_padding">
+                            <a href="[%- 
+                                authorquery = attrs.author | replace('[,\.:;]', '');
+                                mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
+                                -%]">[% attrs.author | html %]</a>
+                        </td>
                     </tr>
                     [% END %]
                 </tbody>

commit e5ff20ac80dffbc7fd6f07d27bd6a1024dfa1c72
Merge: 7ad0136 642dae8
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Sep 8 15:55:36 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge

diff --cc Open-ILS/src/templates/booking/reservation.tt2
index 5888049,0000000..ece7c58
mode 100644,000000..100644
--- a/Open-ILS/src/templates/booking/reservation.tt2
+++ b/Open-ILS/src/templates/booking/reservation.tt2
@@@ -1,118 -1,0 +1,122 @@@
 +[% WRAPPER "base.tt2" %]
 +<link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/[% ctx.skin %]/booking.css" />
 +<div id="auto_l10n_start_here">
 +    <div id="brt_search_block" class="container">
 +        <h1 class="booking AUTO_choose_a_brt"></h1>
 +        <form onsubmit="return false;">
 +            <div id="select_noncat_brt_block">
 +                <div id="brt_selector_here" class="nice_vertical_padding"></div>
 +                <div class="nice_vertical_padding">
 +                    <input type="button" class="AUTO_ATTR_VALUE_next"
 +                        onclick="init_resv_iface_sel(); return false"
 +                        />
 +                </div>
 +                <hr />
 +                <div class="nice_vertical_padding AUTO_or" id="or"></div>
 +            </div>
 +            <div id="arbitrary_resource_block">
 +                <label for="arbitrary_resource" class="AUTO_arbitrary_resource">
 +                </label>
 +                <input id="arbitrary_resource" name="arbitrary_resource" />
 +                <input type="button"
 +                    onclick="init_resv_iface_arb(); return false;"
 +                    class="AUTO_ATTR_VALUE_next" />
 +                <p class="AUTO_explain_bookable"></p>
 +            </div>
 +        </form>
 +    </div>
 +
 +    <div id="brt_reserve_block" class="container">
 +        <form onsubmit="return false;">
 +            <div id="brsrc_available_outer">
 +                <h1 class="booking" id="brsrc_list_header"></h1>
 +                <!-- I'm reluctantly hardcoding the size attribute below to 12
 +                    since you can't get the behavior of the size attribute with
 +                    anything in CSS. -->
 +                <select id="brsrc_list" name="brsrc_list" multiple="multiple"
 +                    size="12"></select>
 +                <div id="contain_patron_barcode" class="nice_vertical_padding">
 +                    <label class="AUTO_patron_barcode"
 +                        for="patron_barcode" /></label>
 +                    <input name="patron_barcode" id="patron_barcode"
 +                        onchange="update_bresv_grid();" />
 +                </div>
 +                <div id="pickup_lib_selector_row" class="nice_vertical_padding">
 +                    <label for="pickup_lib_selector"
 +                        class="AUTO_pickup_lib_selector"></label>
 +                    <select dojoType="openils.widget.OrgUnitFilteringSelect"
 +                        id="pickup_lib_selector" jsId="pickup_lib_selector"
 +                        searchAttr="shortname" labelAttr="shortname"></select>
 +                </div>
++                <div id="contain_email_notify" class="nice_vertical_padding">
++                    <input type="checkbox" name="email_notify" id="email_notify" />
++                    <label class="AUTO_email_notify" for="email_notify"></label>
++                </div>
 +                <div class="nice_vertical_padding">
 +                    <span class="two_buttons">
 +                        <input type="button"
 +                            class="AUTO_ATTR_VALUE_reserve_brsrc"
 +                            onclick="create_bresv_on_brsrc();" />
 +                        &nbsp;
 +                        <input type="button"
 +                            class="AUTO_ATTR_VALUE_reserve_brt"
 +                            onclick="create_bresv_on_brt();" />
 +                    </span>
 +                </div>
 +            </div>
 +            <div id="reserve_right_side">
 +                <h2 class="booking AUTO_i_need_this_resource"></h2>
 +                <div id="reserve_datetime_start">
 +                    <label class="reserve_datetime AUTO_starting_at"
 +                        for="reserve_date_start"></label><br />
 +                    <input id="reserve_date_start" />
 +                    <input id="reserve_time_start" />
 +                </div>
 +                <div id="reserve_datetime_end">
 +                    <label class="reserve_datetime AUTO_ending_at"
 +                        for="reserve_date_end"></label><br />
 +                    <input id="reserve_date_end" />
 +                    <input id="reserve_time_end" />
 +                </div>
 +                <h2 id="bra_and_brav_header"
 +                    class="booking AUTO_with_these_attr"></h2>
 +                <div id="bra_and_brav"></div>
 +            </div>
 +        </form>
 +    </div>
 +
 +    <div id="reserve_under">
 +        <hr />
 +        <h2 class="booking" id="existing_reservation_patron_line"></h2>
 +        <div id="bresv_grid_alt_explanation"></div>
 +        <table id="bresv_grid" jsId="bresvGrid"
 +            dojoType="dojox.grid.DataGrid" query="{id: '*'}"
 +            rowSelector="20px" autoHeight="true" width="auto">
 +            <thead>
 +                <tr><!-- FIXME: i18n problem: init_auto_l10n() runs
 +                        too late to take care of the below elements. -->
 +                    <th width="35%" field="type">Type</th>
 +                    <th width="25%" field="resource">Resource</th>
 +                    <th width="20%" field="start_time">Start time</th>
 +                    <th width="20%" field="end_time">End time</th>
 +                </tr>
 +            </thead>
 +        </table>
 +        <div class="nice_vertical_padding"
 +            id="existing_bresv_under_buttons">
 +            <!-- <input type="button" id="button_edit_existing"
 +                class="AUTO_ATTR_VALUE_button_edit_existing" /> -->
 +            <input type="button" id="button_cancel_existing"
 +                class="AUTO_ATTR_VALUE_button_cancel_existing"
 +                onclick="cancel_selected_bresv(bresvGrid.selection.getSelected());" />
 +        </div>
 +    </div>
 +</div>
 +
 +<script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/booking/common.js"></script>
 +<script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/booking/reservation.js"></script>
 +<script type="text/javascript">
 +    dojo.require("dojox.grid.DataGrid");
 +    openils.Util.addOnLoad(my_init);
 +</script>
 +[% END %]
diff --cc Open-ILS/src/templates/conify/global/acq/provider.tt2
index 117f8e2,0000000..655d838
mode 100644,000000..100644
--- a/Open-ILS/src/templates/conify/global/acq/provider.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/provider.tt2
@@@ -1,211 -1,0 +1,219 @@@
 +[% WRAPPER base.tt2 %]
 +[% ctx.page_title = 'Providers' %]
 +
 +<div class="hidden">
 +    <select dojoType="dijit.form.FilteringSelect" jsId="nameSelect">
 +        <option value='owning_lib'>Owning Library</option>
 +        <option value='quantity'>Quantity</option>
 +        <option value='call_number'>Call Number</option>
 +        <option value='fund_code'>Fund Code</option>
 +        <option value='local_note'>Local Note</option>
 +        <option value='price'>Price</option>
 +        <option value='circ_modifier'>Circulation Modifier</option>
 +        <option value='copy_location'>Copy Location</option>
 +        <option value='collection_code'>Collection Code</option>
 +    </select>
 +</div> 
 +
 +<div id='provider-list-div'>
 +    <div dojoType="dijit.layout.ContentPane" layoutAlign='top'>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
 +            <div>Provider</div>
 +            <div>
 +                <button dojoType='dijit.form.Button' onClick='pListGrid.showCreatePane()'>New Provider</button>
 +                <button dojoType='dijit.form.Button' onClick='pListGrid.deleteSelected()'>Delete Selected</button> 
 +            </div>
 +        </div>
 +    </div>
 +    <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
++        <span>Context Org Unit</span>
++        <select dojoType="openils.widget.OrgUnitFilteringSelect"
++            jsId='contextOrgSelector'
++            searchAttr='shortname'
++            labelAttr='shortname'>
++        </select>
++    </div>
++    <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
 +        <table  jsId="pListGrid"
 +                dojoType="openils.widget.AutoGrid"
 +                fieldOrder="['id', 'name', 'code', 'owner', 'currency_type']"
 +                query="{id: '*'}"
 +                defaultCellWidth='"auto"'
 +                fmClass='acqpro'
 +                showPaginator='true'
 +                editOnEnter='true'>
 +            <thead>
 +                <tr><th field='name' get='getProviderName' formatter='formatName'/></tr>
 +            </thead>
 +        </table>
 +    </div>
 +</div>
 +
 +<div id='provider-summary-pane'></div>     
 +<div id='provider-details-div' style='height:600px'>
 +<div dojoType="dijit.layout.TabContainer" style='height:100%' jsId='providerTabs'>
 +
 +    <div dojoType="dijit.layout.ContentPane" title='Provider Address' select='true' id='provider-address'>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
 +            <div>Provider Address</div>
 +            <div>
 +            <button dojoType='dijit.form.Button' onClick='paListGrid.showCreateDialog()'>New Provider Address</button>
 +            <button dojoType='dijit.form.Button' onClick='paListGrid.deleteSelected()'>Delete Selected</button>
 +            </div>
 +        </div>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:100px'>
 +            <table  jsId="paListGrid"
 +                    dojoType="openils.widget.AutoGrid"
 +                    fieldOrder="['id', 'address_type', 'provider', 'street1', 'street2', 'city', 'county', 'state', 'country', 'post_code']"
 +                    requiredFields="['street1', 'city', 'state', 'country', 'post_code']"
 +                    query="{id: '*'}"
 +                    fmClass='acqpa'
 +                    defaultCellWidth='"auto"' 
 +                    editOnEnter='true'>
 +            </table>
 +        </div>
 +    </div>
 +
 +    <div dojoType="dijit.layout.ContentPane" title='Provider Contact' id='tab-pro-contact'>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
 +            <div>Provider Contact</div>
 +            <div>
 +            <button dojoType='dijit.form.Button' onClick='pcListGrid.showCreateDialog()'>New Contact</button>
 +            <button dojoType='dijit.form.Button' onClick='pcListGrid.deleteSelected()'>Delete Selected</button>
 +            </div>
 +        </div>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
 +            <table  jsId="pcListGrid"
 +                    dojoType="openils.widget.AutoGrid"
 +                    fieldOrder="['id', 'name', 'provider', 'role', 'email']"
 +                    requiredFields="['name']"
 +                    defaultCellWidth='"auto"'
 +                    query="{id: '*'}"
 +                    fmClass='acqpc'
 +                    editOnEnter='true'>
 +            </table>
 +        </div>
 +      
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
 +            <div>Contact Address</div>
 +            <div>
 +                <button dojoType='dijit.form.Button' onClick='pcaListGrid.showCreateDialog()'>New Contact Address</button>
 +                <button dojoType='dijit.form.Button' onClick='pcaListGrid.deleteSelected()'>Delete Selected</button>
 +            </div>
 +        </div>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
 +            <table  jsId="pcaListGrid"
 +                    dojoType="openils.widget.AutoGrid"
 +                    fieldOrder="['id', 'address_type', 'contact', 'street1', 'street2', 'city', 'county', 'state', 'country', 'post_code']"
 +                    requiredFields="['street1', 'city', 'state', 'country', 'post_code']"
 +                    query="{id: '*'}"
 +                    fmClass='acqpca'
 +                    defaultCellWidth='"auto"' 
 +                    editOnEnter='true'>
 +            </table>
 +        </div>
 +       
 +    </div>
 +    <div dojoType="dijit.layout.ContentPane" title='Attribute Definitions' id='tab-attr'>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
 +            <div> Attribute Definitions</div>
 +            <div>
 +                <button dojoType='dijit.form.Button' onClick='padListGrid.showCreateDialog()'>New Attribute Definition</button>
 +                <button dojoType='dijit.form.Button' onClick='padListGrid.deleteSelected()'>Delete Selected</button>
 +            </div>
 +        </div>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
 +            <table  jsId="padListGrid"
 +                    dojoType="openils.widget.AutoGrid"
 +                    fieldOrder="['id', 'provider', 'code', 'description',  'provider', 'ident', 'remove',  'tag', 'subfield', 'xpath']"
 +                    requiredFields="['code', 'description', 'xpath']"
 +                    query="{id: '*'}"
 +                    fmClass='acqlipad'
 +                    editOnEnter='true'>
 +                <thead>
 +                    <tr>
 +                        <th field="xpath" width='auto'/>
 +                        <th field="tag" name="Tag" get='getParsedTag'/>
 +                        <th field="subfield" name="Subfield" get='getParsedSubf'/>
 +                    </tr>
 +                </thead>
 +            </table>
 +        </div>
 +    </div>
 +
 +    <div dojoType="dijit.layout.ContentPane" title='Holding Subfield' id='tab-hold'>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
 +            <div>Holding Subfield</div>
 +            <div>
 +            <button dojoType='dijit.form.Button' onClick='phsListGrid.showCreateDialog()'>New Holding Subfield</button>
 +            <button dojoType='dijit.form.Button' onClick='phsListGrid.deleteSelected()'>Delete Selected</button>
 +            </div>
 +        </div>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:400px'>
 +            <table  jsId="phsListGrid"
 +                    dojoType="openils.widget.AutoGrid"
 +                    fieldOrder="['id', 'provider', 'name', 'subfield']"
 +                    requiredFields="['name', 'subfield']"
 +                    query="{id: '*'}"
 +                    fmClass='acqphsm'
 +                    editOnEnter='true'>
 +            </table>
 +        </div>
 +    </div>
 +
 +    <div dojoType="dijit.layout.ContentPane" title="Invoices" id="tab-invoice">
 +        <big class="oils-acq-basic-roomy"><strong>Invoices</strong></big>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style="height:400px">
 +            <table jsId="invListGrid"
 +                dojoType="openils.widget.AutoGrid"
 +                fieldOrder="['inv_ident', 'receiver', 'shipper']"
 +                suppressFields="['id', 'provider']"
 +                query="{id: '*'}"
 +                showPaginator='true'
 +                fmClass="acqinv">
 +                <thead>
 +                    <tr>
 +                        <th field="inv_ident" get="getInvIdent" formatter="formatInvIdent" />
 +                    </tr>
 +                </thead>
 +            </table>
 +        </div>
 +    </div>
 +</div>
 +</div>
 +
 +<script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/acq/provider.js'> </script>
 +
 +<script type="text/javascript"> 
 +    var providerId = '[% ctx.page_args.0 %]';
 +
 +function getInvIdent(rowIndex, item) {
 +    if (!item) return {};
 +    return {
 +          "id": this.grid.store.getValue(item, "id"),
 +        "name": this.grid.store.getValue(item, "inv_ident")
 +    };
 +}
 +
 +function formatInvIdent(o) {
 +    return "<a href='" + oilsBasePath + "/acq/invoice/view/" + o.id + "'>" + o.name + "</a>";
 +}
 +
 +function getProviderName(rowIndex, item) {
 +    if(!item) return '';
 +    var name = this.grid.store.getValue(item, 'name');
 +    var id   = this.grid.store.getValue(item, 'id');
 +    return id + ':' + name;
 +}
 +
 +function formatName(value) {
 +    if(value) {
 +        var vals = value.split(/:/);
 +        return '<a href="[% ctx.base_path %]/conify/global/acq/provider/'+vals[0]+'">'+vals[1]+'</a>';
 +    }
 +}
 +
 +</script>
 +
 +[% END %]
 +

commit 7ad01367e36c6b8dd0a07590c8708271641ec567
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Sep 6 12:12:36 2011 -0400

    TPac: first try audience_group SVF for audience maps
    
    Allow for configuration of an "audience_group"
    config.record_attr_definition for collecting MARC audience codes into more
    human-friendly groups.  This allows the TPac to behave more like the
    current OPAC, which groups audience values into simpler collections. As
    with "mattype", if no "audience_group" configuration exists, fall back to
    the traditional, long-form "audience" attribute.
    
    For future referene, here's an example setup using an "audience_group"
    attribute.
    
    -- Can be done in MARC Record Attributes admin UI
    INSERT INTO config.record_attr_definition
        (name, label, description, fixed_field, filter)
    VALUES
        ('audience_group', 'Audience Group', 'Audience Group', 'Audn', TRUE);
    
    -- Can be done in MARC Coded Value Maps admin UI
    INSERT INTO config.coded_value_map
        (ctype, code, value, description)
    VALUES
        ('audience_group', 'A', 'Adult', 'Adult Audience'),
        ('audience_group', 'T', 'Teen', 'Teen Audience'),
        ('audience_group', 'C', 'Children', 'Children Audience');
    
    -- No UI currently
    INSERT INTO config.record_attr_index_norm_map
        (attr, norm, params)
    VALUES
        ('audience_group', (
            SELECT id FROM
                config.index_normalizer WHERE func =
                'generic_map_normalizer'
            ),
            '["=>A g,e,f=>A a,c,j,b=>C d=>T"]'
    );
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
index f856ce8..7e300ed 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/search.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
@@ -42,7 +42,7 @@
             <td valign='top'>
                 <strong>[% l("Audience") %]</strong><br />
                     [% INCLUDE "opac/parts/coded_value_selector.tt2"
-                        attr="audience" multiple="multiple" size="4" %]
+                        attr=["audience_group", "audience"] multiple="multiple" size="4" %]
                 </select>
             </td>
             <td valign='top'>

commit 2f2613ef6835749f7e85069c3668b465da6d2889
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Sep 2 15:25:39 2011 -0400

    TPac: Multiple holds in staff client place-holds session
    
    Leave the patron_barcode cookie in place after holds placement succeeds
    from the embedded catalog so that the next hold request will use the
    same patron.  This allows for multiple hold request to take place within
    one session.  The negative is that the cookie sticks around even after a
    patron session is closed.  This is normally not a problem, because each
    new patron sesion will update the cookie.  (And when the cookie is not
    updated, staff still have the option to /not/ place a hold for the
    pre-selected user).  However, it would be nice to have the staff client
    clear the cookie at the right time.  Will look at that too.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index e32cd93..92858eb 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -647,11 +647,20 @@ sub load_place_hold {
 
 sub post_hold_redirect {
     my $self = shift;
+    
+    # XXX: Leave the barcode cookie in place.  Otherwise, it's not 
+    # possible to place more than one hold for the patron within 
+    # a staff/patron session.  This does leave the barcode to linger 
+    # longer than is ideal, but normal staff work flow will cause the 
+    # cookie to be replaced with each new patron anyway.
+    # TODO:  See about getting the staff client to clear the cookie
+    return $self->generic_redirect;
 
     # We also clear the patron_barcode (from the staff client)
     # cookie at this point (otherwise it haunts the staff user
     # later). XXX todo make sure this is best; also see that
     # template when staff mode calls xulG.opac_hold_placed()
+
     return $self->generic_redirect(
         undef,
         $self->cgi->cookie(

commit de2ca6f5dd4841397462921f8a74b2546389ef1f
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Sep 2 12:11:27 2011 -0400

    TPac: MARC expert search bug fixes
    
    - Allow for searching on tags w/o specifying subfield
    - Protect against empty search queries
    - Cleanup: Avoid some of the manual osrf session management by using
      $U->simplereq, which does all of that for us.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 884eaa9..376b316 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -297,7 +297,8 @@ sub marc_expert_search {
 
     my $query = [];
     for (my $i = 0; $i < scalar @tags; $i++) {
-        next if ($tags[$i] eq "" || $subfields[$i] eq "" || $terms[$i] eq "");
+        next if ($tags[$i] eq "" || $terms[$i] eq "");
+        $subfields[$i] = '_' unless $subfields[$i];
         push @$query, {
             "term" => $terms[$i],
             "restrict" => [{"tag" => $tags[$i], "subfield" => $subfields[$i]}]
@@ -305,45 +306,45 @@ sub marc_expert_search {
     }
 
     $logger->info("query for expert search: " . Dumper($query));
+
     # loc, limit and offset
     my $page = $self->cgi->param("page") || 0;
     my $limit = $self->_get_search_limit;
     my $org_unit = $self->cgi->param("loc") || $self->ctx->{aou_tree}->()->id;
     my $offset = $page * $limit;
 
-    if (my $search = create OpenSRF::AppSession("open-ils.search")) {
-        my $results = $search->request(
-            "open-ils.search.biblio.marc", {
-                "searches" => $query, "org_unit" => $org_unit
-            }, $limit, $offset
-        )->gather(1);
-        $search->kill_me;
-
-        if (defined $U->event_code($results)) {
-            $self->apache->log->warn(
-                "open-ils.search.biblio.marc returned event: " .
-                $U->event_code($results)
-            );
-            return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
-        }
-
-        my ($facets, @data) = $self->get_records_and_facets(
-            # filter out nulls that will turn up here
-            [ grep { $_ } @{$results->{ids}} ],
-            undef, {flesh => "{holdings_xml,mra}"}
+    $self->ctx->{records} = [];
+    $self->ctx->{search_facets} = {};
+    $self->ctx->{page_size} = $limit;
+    $self->ctx->{hit_count} = 0;
+        
+    # nothing to do
+    return Apache2::Const::OK if @$query == 0;
+
+    my $results = $U->simplereq(
+        'open-ils.search', 
+        'open-ils.search.biblio.marc',
+        {searches => $query, org_unit => $org_unit}, $limit, $offset);
+
+    if (defined $U->event_code($results)) {
+        $self->apache->log->warn(
+            "open-ils.search.biblio.marc returned event: " .
+            $U->event_code($results)
         );
+        return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+    }
 
-        $self->ctx->{records} = [@data];
-        $self->ctx->{search_facets} = {};
+    my ($facets, @data) = $self->get_records_and_facets(
+        # filter out nulls that will turn up here
+        [ grep { $_ } @{$results->{ids}} ],
+        undef, {flesh => "{holdings_xml,mra}"}
+    );
 
-        $self->ctx->{page_size} = $limit;
-        $self->ctx->{hit_count} = $results->{count};
+    $self->ctx->{records} = [@data];
+    $self->ctx->{page_size} = $limit;
+    $self->ctx->{hit_count} = $results->{count};
 
-        return Apache2::Const::OK;
-    } else {
-        $self->apache->log->warn("couldn't connect to open-ils.search");
-        return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
-    }
+    return Apache2::Const::OK;
 }
 
 sub call_number_browse_standalone {

commit 9320c6451c38908fbe19d2565bc1c3374164a613
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Sep 2 10:48:46 2011 -0400

    TPac: Submit search on sort/limit change
    
    By popular demand, when the user changes the search sort or
    limit-to-available options, the form is immediately resubmitted via
    JavaScript.  Fails gracefully in the absence of JS.
    
    Minor JS cleanup.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/filtersort.tt2 b/Open-ILS/src/templates/opac/parts/filtersort.tt2
index 428626c..664be17 100644
--- a/Open-ILS/src/templates/opac/parts/filtersort.tt2
+++ b/Open-ILS/src/templates/opac/parts/filtersort.tt2
@@ -1,4 +1,5 @@
-<select class="results_header_sel" id='opac.result.sort' name="sort">
+<select class="results_header_sel" id='opac.result.sort' name="sort"
+    [% IF submit_on_change %]onchange='this.form.submit()'[% END %]>
     <option value=''>[% l("Sort by Relevance") %]</option>
     <optgroup label='[% l("Sort by Title") %]'>
         <option value='titlesort'[% value == 'titlesort' ? ' selected="selected"' : '' %]>[% l("Title: A to Z") %]</option>
diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2
index 803a070..35eb883 100644
--- a/Open-ILS/src/templates/opac/results.tt2
+++ b/Open-ILS/src/templates/opac/results.tt2
@@ -46,7 +46,7 @@
                 [% END %]
                 <div class="results_header_div"></div>
                     <div class="results_header_lbl">[% l('Sort by') %]</div>
-                    [% INCLUDE "opac/parts/filtersort.tt2" value=CGI.param('sort') %]
+                    [% INCLUDE "opac/parts/filtersort.tt2" value=CGI.param('sort') submit_on_change=1 %]
                     <div class="results_header_div"></div>
 
                     <div class='results_header_sel' id='simple-detail-view-links'>
@@ -59,7 +59,7 @@
                     <div class="results_header_div"></div>
 
                     <input type="checkbox" id="limit_to_available" name="modifier" value="available"
-                        onchange="avail_change_adv_search(this)"
+                        onchange="limit_to_avail_onchange(this, true)"
                         [% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %] />
 
                     <label for="limit_to_available" class="results_header_lbl">
diff --git a/Open-ILS/web/js/ui/default/opac/simple.js b/Open-ILS/web/js/ui/default/opac/simple.js
index c120e4b..6e3d29f 100644
--- a/Open-ILS/web/js/ui/default/opac/simple.js
+++ b/Open-ILS/web/js/ui/default/opac/simple.js
@@ -46,7 +46,7 @@ function killRowIfAtLeast(min, link) {
 }
 function print_node(node_id) {
     var iframe = document.createElement("iframe");
-    var source_node = document.getElementById(node_id);
+    var source_node = $(node_id);
     source_node.parentNode.appendChild(iframe);
 
     var iwin = iframe.contentWindow;
@@ -73,9 +73,14 @@ function select_all_checkboxes(name, checked) {
         }
     }
 }
-function avail_change_adv_search(checkbox) {
+
+function limit_to_avail_onchange(checkbox, submitOnChange) {
     if (checkbox.form._adv && !checkbox.checked) {
-        var search_box = document.getElementById("search_box");
+        var search_box = $('search_box');
         search_box.value = search_box.value.replace(/#available ?/g, "");
     }
+
+    if (submitOnChange) {  
+        checkbox.form.submit(); 
+    }
 }

commit a50662d93bac54c92e3e4672cde8f0fefc680602
Merge: 793f282 9e5a0f0
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Sep 2 12:25:22 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge


commit 793f2829c4aeaa99de5c18693b61ffb543e22c1d
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Sep 1 14:41:42 2011 -0400

    TPac: more template scrubbing and cleaning
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/myopac/prefs.tt2 b/Open-ILS/src/templates/opac/myopac/prefs.tt2
index 2db15e5..2aeea79 100644
--- a/Open-ILS/src/templates/opac/myopac/prefs.tt2
+++ b/Open-ILS/src/templates/opac/myopac/prefs.tt2
@@ -58,95 +58,21 @@
             </tr>
 
             <tr>
-                <td class='color_4 light_border'>
-                [% l("Day Phone") %]</td>
-
-                <td class='light_border'
-                    id='myopac_summary_dayphone'>[% ctx.user.day_phone | html %]</td>
-
-                <td class='light_border'><a href='#'
-                   class="hide_me"
-                   id='myopac_summary_phone1_change'
-                   style=
-                   'text-decoration: underline;'>[% l("Change") %]</a></td>
-            </tr>
-
-            <tr id='myopac_update_phone1_row'
-                class='hide_me'>
-                <td class='myopac_update_cell'
-                    colspan='3'>
-                    <span class='myopac_update_span'>
-                        Enter New [% l("Day Phone") %]:
-                    </span>
-
-                    <input type='text' size='24' id='myopac_new_phone1' />
-                    <span class='myopac_update_span'>
-                        <button>
-                            <span class='myopac_update_span'>
-                                [% l("Submit") %]</span>
-                        </button>
-                    </span>
-                    <span class='myopac_update_span'>
-                        <button>
-                            <span class='myopac_update_span'>
-                                [% l("Cancel") %]</span>
-                        </button>
-                    </span>
-                </td>
+                <td class='color_4 light_border'>[% l("Day Phone") %]</td>
+                <td class='light_border'>[% ctx.user.day_phone | html %]</td>
+                <td></td>
             </tr>
 
             <tr>
-                <td class='color_4 light_border'>
-                [% l("Evening Phone") %]</td>
-
-                <td class='light_border'
-                    id='myopac_summary_eveningphone'>[% ctx.user.evening_phone | html %]</td>
-
-                <td class='light_border'><a href='#'
-                   class="hide_me"
-                   id='myopac_summary_phone2_change'
-                   style=
-                   'text-decoration: underline;'>[% l("Change") %]</a></td>
-            </tr>
-
-            <tr id='myopac_update_phone2_row'
-                class='hide_me'>
-                <td class='myopac_update_cell'
-                    colspan='3'><span class='myopac_update_span'>New
-                    [% l("Evening Phone") %]:</span>
-                    <input type='text' size='24' id='myopac_new_phone2' />
-                    <span class='myopac_update_span'><button><span class=
-                        'myopac_update_span'>[% l("Submit") %]</span></button></span>
-                    <span class='myopac_update_span'><button><span class=
-                        'myopac_update_span'>[% l("Cancel") %]</span></button></span>
-                </td>
+                <td class='color_4 light_border'>[% l("Evening Phone") %]</td>
+                <td class='light_border'>[% ctx.user.evening_phone | html %]</td>
+                <td></td>
             </tr>
 
             <tr>
-                <td class='color_4 light_border'>
-                [% l("Other Phone") %]</td>
-
-                <td class='light_border'
-                    id='myopac_summary_otherphone'>[% ctx.user.other_phone | html %]</td>
-
-                <td class='light_border'><a href='#'
-                   class="hide_me"
-                   id='myopac_summary_phone3_change'
-                   style=
-                   'text-decoration: underline;'>[% l("Change") %]</a></td>
-            </tr>
-
-            <tr id='myopac_update_phone3_row'
-                class='hide_me'>
-                <td class='myopac_update_cell'
-                    colspan='3'><span class='myopac_update_span'>Enter
-                    New [% l("Other Phone") %]:</span>
-                    <input type='text' size='24' id='myopac_new_phone3' />
-                    <span class='myopac_update_span'><button><span class=
-                        'myopac_update_span'>[% l("Submit") %]</span></button></span>
-                    <span class='myopac_update_span'><button><span class=
-                        'myopac_update_span'>[% l("Cancel") %]</span></button></span>
-                </td>
+                <td class='color_4 light_border'>[% l("Other Phone") %]</td>
+                <td class='light_border'>[% ctx.user.other_phone | html %]</td>
+                <td></td>
             </tr>
 
             <tr>
@@ -187,49 +113,19 @@
             </tr>[% END %]
 
             <tr>
-                <td class='color_4 light_border'>
-                [% l("Active Barcode") %]</td>
-
+                <td class='color_4 light_border'>[% l("Active Barcode") %]</td>
                 <td class='light_border'>[% ctx.user.card.barcode %]</td>
-
                 <td></td>
             </tr>
 
             <tr>
-                <td class='color_4 light_border'>
-                [% l("Home Library") %]</td>
+                <td class='color_4 light_border'>[% l("Home Library") %]</td>
                 <td class='light_border'>[% ctx.user.home_ou.name | html %]</td>
-                <td><a href='#'
-                   class="hide_me"
-                   style='text-decoration: underline;'>[% l("Change") %]</a></td>
-            </tr>
-            <tr class='hide_me'>
-                <td class='myopac_update_cell'
-                    colspan='3'>
-                    <span class='myopac_update_span'>
-                        New home library:</span>
-                    <select>
-                    </select>
-                    <span class='myopac_update_span'>
-                        <button>
-                            <span class= 'myopac_update_span'>
-                                [% l("Submit") %]</span>
-                        </button>
-                    </span>
-                    <span class='myopac_update_span'>
-                        <button>
-                            <span class= 'myopac_update_span'>
-                                [% l("Cancel") %]</span>
-                        </button>
-                    </span>
-                </td>
+                <td></td>
             </tr>
-            <tr class="hide_me">
-                <td class='color_4 light_border'>
-                    [% l("Account Creation Date") %]
-                </td>
-                <td class='light_border'
-                    id='myopac_summary_create_date'></td>
+            <tr>
+                <td class='color_4 light_border'>[% l("Account Creation Date") %]</td>
+                <td class='light_border'>[% date.format(ctx.parse_datetime(ctx.user.create_date), DATE_FORMAT) %]</td>
                 <td></td>
             </tr>
         </tbody>
@@ -334,12 +230,8 @@
                             <tr>
                                 <td><input type='submit' value="[% l('Save Changes') %]"/></td>
                                 <td>
-                                    [% IF pending_addr;
-                                        url = mkurl('', {delete_pending => pending_addr.id}, 1);
-                                    ELSE;
-                                        url = mkurl('', {}, 1);
-                                    END %]
-                                    <a href="[% url %]">[% l('Discard Pending Address') %]</a>
+                                    [% params = (pending_addr) ? {delete_pending => pending_addr.id} : {} %]
+                                    <a href="[% mkurl('', params, 1) %]">[% l('Discard Pending Address') %]</a>
                                 </td>
                             </tr>
                             <tr><td colspan='2'><i>[% l('Address changes will be verified by staff') %]</i></td></tr>
diff --git a/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2 b/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
index 91a3ce5..3729d37 100644
--- a/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
+++ b/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
@@ -3,7 +3,6 @@
     myopac_page = "prefs_notify";
     prefs_page = 'notify' %]
 
-
 <form method='POST'>
 
     <div style="float:right;width:65px;">
@@ -32,97 +31,6 @@
         </tbody>
     </table>
 </form>
-
-
-<!-- NOTIFICATION PREFS / leaving here for reference
-<table class="hide_me"
-       id="acct_notify_main">
-    <tbody>
-        <tr class="hide_me">
-            <td><span>[% l("Default Hold Notification Method") %]</span> <a class=
-            'classic_link'
-               href='#'>[% l("(Help)") %]</a></td>
-
-            <td style="padding-left:15px;"><select id=
-            'prefs_hold_notify'>
-                <option value='phone:email'
-                        selected='selected'>
-                    [% l("Use Phone and Email") %]
-                </option>
-
-                <option value='phone'>
-                    [% l("Use Phone Only") %]
-                </option>
-
-                <option value='email'>
-                    [% l("Use Email Only") %]
-                </option>
-            </select></td>
-        </tr>
-
-        <tr>
-            <td style="padding-top:10px;"><strong>Pick Up Notice for
-            Holds</strong><br />
-            <input type="checkbox"
-                   id="opac.hold_notify.email"
-                   name="opac.hold_notify.email" /> <label for=
-                   "opac.hold_notify.email">Email</label><br />
-            <input type="checkbox"
-                   id="opac.hold_notify.phone"
-                   name="opac.hold_notify.phone" /> <label for=
-                   "opac.hold_notify.phone">Phone</label>
-                   <b>(Temporarily phone notification will generate a
-                   mailed paper notice.)</b></td>
-        </tr>
-
-        <tr>
-            <td style="padding-top:10px;"><strong>Expire Notice for
-            Holds</strong><br />
-            <input type="checkbox"
-                   id="notification.hold.expire.email"
-                   name="notification.hold.expire.email" /> <label for=
-                   "notification.hold.expire.email">Email</label></td>
-        </tr>
-
-        <tr>
-            <td style="padding-top:10px;"><strong>Cancel Notice for
-            Holds</strong><br />
-            <input type="checkbox"
-                   id="notification.hold.cancel.email"
-                   name="notification.hold.cancel.email" /> <label for=
-                   "notification.hold.cancel.email">Email</label></td>
-        </tr>
-
-        <tr>
-            <td style="padding-top:10px;"><strong>Overdue First
-            Notice</strong><br />
-            <input type="checkbox"
-                   id="notification.overdue.first.email"
-                   name="notification.overdue.first.email" />
-                   <label for=
-                   "notification.overdue.first.email">Email</label><br />
-            <input type="checkbox"
-                   id="notification.overdue.first.phone"
-                   name="notification.overdue.first.phone" />
-                   <label for=
-                   "notification.overdue.first.phone">Phone</label>
-                   <b>(Temporarily phone notification will generate a
-                   mailed paper notice.)</b></td>
-        </tr>
-
-        <tr>
-            <td style="padding-top:10px;"><strong>Courtesy
-            Notice</strong><br />
-            <input type="checkbox"
-                   id="notification.predue.email"
-                   name="notification.predue.email" /> <label for=
-                   "notification.predue.email">Email</label><br /></td>
-        </tr>
-    </tbody>
-</table>
--->
-
-
 [% END %]
 
 
diff --git a/Open-ILS/src/templates/opac/parts/anon_list.tt2 b/Open-ILS/src/templates/opac/parts/anon_list.tt2
index a4630ca..5101117 100644
--- a/Open-ILS/src/templates/opac/parts/anon_list.tt2
+++ b/Open-ILS/src/templates/opac/parts/anon_list.tt2
@@ -1,6 +1,6 @@
         [% IF ctx.mylist.size %]
         <form action="[% ctx.opac_root %]/mylist/move" method="POST">
-        <div id='acct_list_template2'>
+        <div>
             <div style="width:100%">
                 <table cellpadding="0" cellspacing="0" border="0">
                     <tr>
@@ -45,7 +45,7 @@
                         </td>
                     </tr>
                 </thead>
-                <tbody id='anon_list_tbody'>
+                <tbody>
                     [% FOR item IN ctx.mylist;
                         attrs = {marc_xml => ctx.mylist_marc_xml.$item};
                         PROCESS get_marc_attrs args=attrs %]
diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2
index a256d35..a44e447 100644
--- a/Open-ILS/src/templates/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2
@@ -108,7 +108,7 @@
                             <td nowrap='nowrap' valign="top">
                                 <strong>[% IF attrs.publisher; l("Publisher"); END %]</strong>
                             </td>
-                            <td valign="top" id='rdetail_publisher'>[% attrs.publisher | html %]</td>
+                            <td valign="top">[% attrs.publisher | html %]</td>
                             <td nowrap='nowrap' valign="top">
                                 <strong>[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
                             </td>
diff --git a/Open-ILS/src/templates/opac/parts/result/lowhits.tt2 b/Open-ILS/src/templates/opac/parts/result/lowhits.tt2
index fe2d160..ecf245d 100644
--- a/Open-ILS/src/templates/opac/parts/result/lowhits.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/lowhits.tt2
@@ -1,22 +1,11 @@
-<div id='result_low_hits'>
+<div>
     <div id="zero_search_hits">
         <div>
             <p>[% l('Sorry, no entries were found for') %]
                 [% IF is_advanced OR is_special; l('your search'); ELSE %]
                 <q>[% CGI.param('query') | html %]</q>
                 [% END %]
-                <br />
-                <span id="zero_hits_label1" class="hide_me">[% l('Did you mean') %]
-                    <strong><a id="spell_check_link" href="javascript:;"></a></strong>?</span>
             </p>
-            <table cellpadding="0" cellspacing="0" border="0">
-                <tr>
-                    <td valign="top" style="padding-right:10px;">
-                        <span id="zero_hits_label2" class="hide_me">[% l('Other Possibilities:') %]</span>
-                    </td>
-                    <td id="zero_hits_suggestions"></td>
-                </tr>
-            </table>
         </div>
         <div style="float:right;width:353px;background:#ccc;padding:10px;margin-top:7px;">
             [% INCLUDE "opac/parts/result/lowhits_purchase.tt2" %]
@@ -48,47 +37,4 @@
             </p>
         </div>
     </div>
-    <div class="hide_me">
-        <div style='text-align: center; padding-bottom: 8px;' class="hide_me">
-            <div id='result_low_hits_msg' class='hide_me'>[% l("Few hits were returned for your search.") %]</div>
-            <div id='result_zero_hits_msg' class='hide_me'>[% l("Zero hits were returned for your search.") %]</div>
-        </div>
-
-        <!-- spell checker -->
-        <div id='did_you_mean' class='lowhits_div hide_me'>
-            <span>[% l("Maybe you meant:") %] </span>
-            <!-- <a class='classic_link' id='spell_check_link'> </a> -->
-        </div>
-
-        <div id='low_hits_remove_format' class='lowhits_div hide_me'>
-            <span>[% l("You will find more hits when searching all item formats:") %] </span>
-            <a id='low_hits_remove_format_link' class='classic_link'>[% l("Search again with all formats?") %]</a>
-        </div>
-
-        <div id='low_hits_cross_ref' class='lowhits_div hide_me'>
-            <span>[% l("You may also like to try these related searches:") %]</span>
-            <div style='padding: 5px;'>
-                <a id='low_hits_xref_link' class='classic_link' style='padding-right: 5px;'> </a>
-            </div>
-        </div>
-
-        <div id='low_hits_expand_range' class='lowhits_div hide_me'>
-            <span>[% l("You may also wish to expand your search range to:") %] </span>
-            <a id='low_hits_expand_link' class='classic_link' style='padding-right: 5px;'> </a>
-        </div>
-
-        <div id='low_hits_search_type' class='lowhits_div hide_me'>
-            <span>[% l("You can try searching the same terms by:") %]</span>
-            <a id='low_hits_title_search' class='hide_me classic_link' 
-                style='padding-right: 5px;'>[% l("title") %]</a>
-            <a id='low_hits_author_search' class='hide_me classic_link' 
-                style='padding-right: 5px;'>[% l("author") %]</a>
-            <a id='low_hits_subject_search' class='hide_me classic_link' 
-                style='padding-right: 5px;'>[% l("subject") %]</a>
-            <a id='low_hits_series_search' class='hide_me classic_link' 
-                    style='padding-right: 5px;'>[% l("series") %]</a>
-            <a id='low_hits_keyword_search' class='hide_me classic_link' 
-                style='padding-right: 5px;'>[% l("keyword") %]</a>
-        </div>
-    </div>
 </div>
diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index ed58d26..905307e 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -19,12 +19,13 @@
     <table cellpadding="0" cellspacing="0" border="0" width="100%">
         <tr>
             <td valign="top" width="1" style="padding-right:20px;">
-                <div style="width:174px;" class="hide_me" id="tehSideBar">SIDEBAR TODO
+                <div style="width:174px;" class="hide_me">
+                    SIDEBAR TODO
                 </div>
             </td>
             <td class='opac-auto-015' width="1"></td>
             <td valign="top">
-                <table id="res_table" cellpadding="0" cellspacing="0"
+                <table cellpadding="0" cellspacing="0"
                     border="0" width="100%" style="margin-top:10px;">
                     <tbody id="result_table">
                     [%  FOR rec IN ctx.records;
diff --git a/Open-ILS/src/templates/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2
index aec70db..0215c74 100644
--- a/Open-ILS/src/templates/opac/parts/searchbar.tt2
+++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2
@@ -52,13 +52,9 @@
                 [% INCLUDE "opac/parts/coded_value_selector.tt2" attr=["mattype", "item_type"] none_ok=1 none_label=l('All Formats') %]
             </td>
             <td>
-                <span id='depth_selector_span'>
+                <span>
                     [% PROCESS build_org_selector name='loc' value=CGI.param('loc') %]
                 </span>
-                <span id='lib_selector_span'>
-                    <a id='lib_selector_link' class='classic_link'
-                        href='#'>[% l("Choose a library to search") %]</a>
-                </span>
             </td>
         </tr>
         [% END %]
diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index 7eae4b5..dbae5b2 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -21,7 +21,6 @@
 /* ------------------------------------------- */
 
 
-#lib_selector_span { display: none }
 .float-left { float: left; }
 .bookbag-share { float: left; padding: 5px 0; }
 .bookbag-controls { float: left; padding: 5px 0px 0px 10px; }

commit 5e4a6150df52d23195637a14501f28da5fe2f81e
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Sep 1 13:24:43 2011 -0400

    Tpac: Support for skinning via Apache configuration
    
    More generally, support for augmenting the Template Toolkit template
    path list to allow for per-vhost template paths.
    
    For example, a 3-tier consortium could do something like this:
    
    <VirtualHost ...>
        [...]
        PerlAddVar OILSTemplatePath "/openils/var/templates_branch_abc"
        PerlAddVar OILSTemplatePath "/openils/var/templates_system_xyz"
        PerlAddVar OILSTemplatePath "/openils/var/templates_shared"
    </VirtualHost>
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf
index 48a259c..f018c73 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf
+++ b/Open-ILS/examples/apache/eg_vhost.conf
@@ -536,6 +536,13 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
     Options +ExecCGI
     PerlSendHeader On
     allow from all
+
+    # Example of overriding template paths.  Template paths will be
+    # checked in order of their appearance here.  The server will then
+    # go on to check template paths configured in oils_web.xml.
+    # PerlAddVar OILSTemplatePath "/openils/var/templates_BranchABC"
+    # PerlAddVar OILSTemplatePath "/openils/var/templates_SystemABC"
+
     <IfModule mod_deflate.c>
         SetOutputFilter DEFLATE
         BrowserMatch ^Mozilla/4 gzip-only-text/html
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index 220dc9d..92dc3c5 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -153,6 +153,12 @@ sub load_context {
     $ctx->{skin} = $cgi->cookie(OILS_HTTP_COOKIE_SKIN) || 'default';
     $ctx->{theme} = $cgi->cookie(OILS_HTTP_COOKIE_THEME) || 'default';
 
+    # Any paths configured in Apache will be placed in front of
+    # any paths configured in the global oils_web.xml config.
+    my @template_paths = $r->dir_config->get('OILSTemplatePath');
+    unshift(@{$ctx->{template_paths}}, $_) for reverse @template_paths;
+    $r->log->debug("template paths => @{$ctx->{template_paths}}");
+
     $ctx->{locale} = 
         $cgi->cookie(OILS_HTTP_COOKIE_LOCALE) || 
         parse_accept_lang($r->headers_in->get('Accept-Language')) || 'en-US';

commit 2daaac232315c858aa13166885e8b2ab252c103f
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Sep 1 13:02:33 2011 -0400

    Don't prepend / to relative template paths
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index 156d871..220dc9d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -227,7 +227,7 @@ sub find_template {
             }
             last if $template;
             push(@args, pop @parts);
-            $localpath = '/'.join('/', @parts);
+            $localpath = join('/', @parts);
         } 
 
         $page_args = [@args];

commit 88fd947e16d750f6d48f8f2618f09f78cfe19a40
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Sep 1 10:58:03 2011 -0400

    Remove /default/ from template paths
    
    The original goal of having a /default/ component to the template path
    was to support alternate skins.  However, Template Toolkit supports
    alternate skins through a more elegant mechanism of providing template
    overlays via template path configuration.  In other words, skin files
    will be differentiated by the location of their root path and not
    because they live in a different skin directory inside the main
    template root.
    
    Because of this, the /default/ component in the template path serves
    no purpose and generally just gets in the way.
    
    As a part of this, EGWeb.pm no longer inserts the skin name into the
    template file path.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index 8226be7..156d871 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -46,8 +46,6 @@ sub handler {
     return $stat unless $stat == Apache2::Const::OK;
     return Apache2::Const::DECLINED unless $template;
 
-    $template = $ctx->{skin} . "/$template";
-
     my $text_handler = set_text_handler($ctx, $r);
 
     my $tt = Template->new({
@@ -187,9 +185,8 @@ sub find_template {
     my $r = shift;
     my $base = shift;
     my $ctx = shift;
-    my $skin = $ctx->{skin};
     my $path = $r->uri;
-    $path =~ s/$base//og;
+    $path =~ s/$base\/?//og;
     my @parts = split('/', $path);
     my $template = '';
     my $page_args = [];
@@ -221,7 +218,7 @@ sub find_template {
         while(@parts) {
             last unless $localpath;
             for my $tpath (@{$ctx->{template_paths}}) {
-                my $fpath = "$tpath/$skin/$localpath.$ext";
+                my $fpath = "$tpath/$localpath.$ext";
                 $r->log->debug("egweb: looking at possible template $fpath");
                 if(-r $fpath) {
                     $template = "$localpath.$ext";
diff --git a/Open-ILS/src/templates/default/acq/common/claim_dialog.tt2 b/Open-ILS/src/templates/acq/common/claim_dialog.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/acq/common/claim_dialog.tt2
rename to Open-ILS/src/templates/acq/common/claim_dialog.tt2
diff --git a/Open-ILS/src/templates/default/acq/common/final_claim_dialog.tt2 b/Open-ILS/src/templates/acq/common/final_claim_dialog.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/acq/common/final_claim_dialog.tt2
rename to Open-ILS/src/templates/acq/common/final_claim_dialog.tt2
diff --git a/Open-ILS/src/templates/default/acq/common/info.tt2 b/Open-ILS/src/templates/acq/common/info.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/acq/common/info.tt2
rename to Open-ILS/src/templates/acq/common/info.tt2
diff --git a/Open-ILS/src/templates/default/acq/common/inv_dialog.tt2 b/Open-ILS/src/templates/acq/common/inv_dialog.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/acq/common/inv_dialog.tt2
rename to Open-ILS/src/templates/acq/common/inv_dialog.tt2
diff --git a/Open-ILS/src/templates/default/acq/common/jubgrid.tt2 b/Open-ILS/src/templates/acq/common/jubgrid.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/acq/common/jubgrid.tt2
rename to Open-ILS/src/templates/acq/common/jubgrid.tt2
diff --git a/Open-ILS/src/templates/default/acq/common/li_table.tt2 b/Open-ILS/src/templates/acq/common/li_table.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/acq/common/li_table.tt2
rename to Open-ILS/src/templates/acq/common/li_table.tt2
index 1851833..268e987 100644
--- a/Open-ILS/src/templates/default/acq/common/li_table.tt2
+++ b/Open-ILS/src/templates/acq/common/li_table.tt2
@@ -137,10 +137,10 @@
     </div>
 
     <!-- Bib record / Lineitem info table -->
-    [% INCLUDE "default/acq/common/info.tt2" which = "Lit" %]
+    [% INCLUDE "acq/common/info.tt2" which = "Lit" %]
 
     <!-- Lineitem notes table -->
-    [% INCLUDE "default/acq/common/notes.tt2" which = "Lit" %]
+    [% INCLUDE "acq/common/notes.tt2" which = "Lit" %]
 
     <!-- Copies table -->
     <div id='acq-lit-li-details' class='hidden'>
@@ -303,7 +303,7 @@
 
     <div class="hidden">
         <div jsId="acqLitLinkInvoiceDialog" dojoType="dijit.Dialog">
-            [% INCLUDE "default/acq/common/inv_dialog.tt2" which = "li" %]
+            [% INCLUDE "acq/common/inv_dialog.tt2" which = "li" %]
         </div>
     </div>
 
@@ -417,10 +417,10 @@
                 jsId="liClaimPolicySave">Save</span>
         </div>
         <div dojoType="dijit.Dialog" jsId="liClaimDialog">
-            [% INCLUDE "default/acq/common/claim_dialog.tt2" %]
+            [% INCLUDE "acq/common/claim_dialog.tt2" %]
         </div>
         <div dojoType="dijit.Dialog" jsId="finalClaimDialog">
-            [% INCLUDE "default/acq/common/final_claim_dialog.tt2" %]
+            [% INCLUDE "acq/common/final_claim_dialog.tt2" %]
         </div>
         <div dojoType="dijit.Dialog" jsId="batchFundUpdateDialog" title="Batch Update Funds">
             <div>
diff --git a/Open-ILS/src/templates/default/acq/common/li_table_pager.tt2 b/Open-ILS/src/templates/acq/common/li_table_pager.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/acq/common/li_table_pager.tt2
rename to Open-ILS/src/templates/acq/common/li_table_pager.tt2
diff --git a/Open-ILS/src/templates/default/acq/common/notes.tt2 b/Open-ILS/src/templates/acq/common/notes.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/acq/common/notes.tt2
rename to Open-ILS/src/templates/acq/common/notes.tt2
diff --git a/Open-ILS/src/templates/default/acq/financial/claim_eligible.tt2 b/Open-ILS/src/templates/acq/financial/claim_eligible.tt2
similarity index 95%
rename from Open-ILS/src/templates/default/acq/financial/claim_eligible.tt2
rename to Open-ILS/src/templates/acq/financial/claim_eligible.tt2
index 6df7fca..fc87842 100644
--- a/Open-ILS/src/templates/default/acq/financial/claim_eligible.tt2
+++ b/Open-ILS/src/templates/acq/financial/claim_eligible.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 [% ctx.page_title = "Items Eligible For Claiming" %]
 <script type="text/javascript">var filter = "[% ctx.page_args.0 %]";</script>
 <div>
@@ -49,7 +49,7 @@
 </div>
 <div class="hidden">
     <div dojoType="dijit.Dialog" jsId="finalClaimDialog">
-        [% INCLUDE "default/acq/common/final_claim_dialog.tt2" %]
+        [% INCLUDE "acq/common/final_claim_dialog.tt2" %]
     </div>
 </div>
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/financial/claim_eligible.js"> </script>
diff --git a/Open-ILS/src/templates/default/acq/financial/list_currency_types.tt2 b/Open-ILS/src/templates/acq/financial/list_currency_types.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/acq/financial/list_currency_types.tt2
rename to Open-ILS/src/templates/acq/financial/list_currency_types.tt2
index 2b00688..dfa5d2d 100644
--- a/Open-ILS/src/templates/default/acq/financial/list_currency_types.tt2
+++ b/Open-ILS/src/templates/acq/financial/list_currency_types.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
     <div>Currency Type</div>
     <div>
diff --git a/Open-ILS/src/templates/default/acq/financial/list_funding_sources.tt2 b/Open-ILS/src/templates/acq/financial/list_funding_sources.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/acq/financial/list_funding_sources.tt2
rename to Open-ILS/src/templates/acq/financial/list_funding_sources.tt2
index 2a5d91d..432c471 100644
--- a/Open-ILS/src/templates/default/acq/financial/list_funding_sources.tt2
+++ b/Open-ILS/src/templates/acq/financial/list_funding_sources.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 
 <!-- The main grid lives here -->
 <script type="text/javascript">
diff --git a/Open-ILS/src/templates/default/acq/financial/list_funds.tt2 b/Open-ILS/src/templates/acq/financial/list_funds.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/acq/financial/list_funds.tt2
rename to Open-ILS/src/templates/acq/financial/list_funds.tt2
index 4211e17..dca2a0a 100644
--- a/Open-ILS/src/templates/default/acq/financial/list_funds.tt2
+++ b/Open-ILS/src/templates/acq/financial/list_funds.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 [% ctx.page_title = 'Funds' %]
 
 <!-- load the page-specific JS -->
diff --git a/Open-ILS/src/templates/default/acq/financial/view_fund.tt2 b/Open-ILS/src/templates/acq/financial/view_fund.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/acq/financial/view_fund.tt2
rename to Open-ILS/src/templates/acq/financial/view_fund.tt2
index a1fcc3d..7eb63e3 100644
--- a/Open-ILS/src/templates/default/acq/financial/view_fund.tt2
+++ b/Open-ILS/src/templates/acq/financial/view_fund.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 <script type="text/javascript"> var fundID = [% ctx.page_args.0 %] </script>
 
 <div id='oils-acq-list-header' class='container'>
diff --git a/Open-ILS/src/templates/default/acq/financial/view_funding_source.tt2 b/Open-ILS/src/templates/acq/financial/view_funding_source.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/acq/financial/view_funding_source.tt2
rename to Open-ILS/src/templates/acq/financial/view_funding_source.tt2
index 55a372d..6ab5794 100644
--- a/Open-ILS/src/templates/default/acq/financial/view_funding_source.tt2
+++ b/Open-ILS/src/templates/acq/financial/view_funding_source.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 <script type="text/javascript"> var fundingSourceID = [% ctx.page_args.0 %]; </script>
 
 <div id='oils-acq-list-header' class='container'>
diff --git a/Open-ILS/src/templates/default/acq/financial/view_provider.tt2 b/Open-ILS/src/templates/acq/financial/view_provider.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/acq/financial/view_provider.tt2
rename to Open-ILS/src/templates/acq/financial/view_provider.tt2
index f37911e..6fdc425 100644
--- a/Open-ILS/src/templates/default/acq/financial/view_provider.tt2
+++ b/Open-ILS/src/templates/acq/financial/view_provider.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 <script type="text/javascript">var providerId = [% ctx.page_args.0 %]</script>
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
diff --git a/Open-ILS/src/templates/default/acq/invoice/view.tt2 b/Open-ILS/src/templates/acq/invoice/view.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/acq/invoice/view.tt2
rename to Open-ILS/src/templates/acq/invoice/view.tt2
index 05920f5..0ddca25 100644
--- a/Open-ILS/src/templates/default/acq/invoice/view.tt2
+++ b/Open-ILS/src/templates/acq/invoice/view.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 [% ctx.page_title = 'Invoicing' %]
 <script type="text/javascript">var invoiceId = '[% ctx.page_args.0 %]';</script>
 <div dojoType="dijit.layout.ContentPane" style="height:100%">
diff --git a/Open-ILS/src/templates/default/acq/lineitem/findbib.tt2 b/Open-ILS/src/templates/acq/lineitem/findbib.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/acq/lineitem/findbib.tt2
rename to Open-ILS/src/templates/acq/lineitem/findbib.tt2
index c2269c1..7eedc44 100644
--- a/Open-ILS/src/templates/default/acq/lineitem/findbib.tt2
+++ b/Open-ILS/src/templates/acq/lineitem/findbib.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 [% ctx.page_title = "Locate Bib Record" %]
 <script type="text/javascript">
     function iterateSubfields(item) {
diff --git a/Open-ILS/src/templates/default/acq/lineitem/history.tt2 b/Open-ILS/src/templates/acq/lineitem/history.tt2
similarity index 96%
rename from Open-ILS/src/templates/default/acq/lineitem/history.tt2
rename to Open-ILS/src/templates/acq/lineitem/history.tt2
index 4a363df..d4743a7 100644
--- a/Open-ILS/src/templates/default/acq/lineitem/history.tt2
+++ b/Open-ILS/src/templates/acq/lineitem/history.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 [% ctx.page_title = "Lineitem History" %]
 <h1>Lineitem History</h1>
 <br/>
diff --git a/Open-ILS/src/templates/default/acq/lineitem/related.tt2 b/Open-ILS/src/templates/acq/lineitem/related.tt2
similarity index 94%
rename from Open-ILS/src/templates/default/acq/lineitem/related.tt2
rename to Open-ILS/src/templates/acq/lineitem/related.tt2
index 61ee19f..487baaf 100644
--- a/Open-ILS/src/templates/default/acq/lineitem/related.tt2
+++ b/Open-ILS/src/templates/acq/lineitem/related.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 [% ctx.page_title = "Related Lineitems" %]
 <script type="text/javascript">var targetId = "[% ctx.page_args.0 %]";</script>
 <h1>Related Lineitems</h1>
@@ -65,7 +65,7 @@
     </div>
 
 </div>
-[% INCLUDE "default/acq/common/info.tt2" which = "Related" %]
-[% INCLUDE "default/acq/common/li_table.tt2" %]
+[% INCLUDE "acq/common/info.tt2" which = "Related" %]
+[% INCLUDE "acq/common/li_table.tt2" %]
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/lineitem/related.js"></script>
 [% END %]
diff --git a/Open-ILS/src/templates/default/acq/lineitem/search.tt2 b/Open-ILS/src/templates/acq/lineitem/search.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/acq/lineitem/search.tt2
rename to Open-ILS/src/templates/acq/lineitem/search.tt2
index f2cf8ad..730f910 100644
--- a/Open-ILS/src/templates/default/acq/lineitem/search.tt2
+++ b/Open-ILS/src/templates/acq/lineitem/search.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 [% ctx.page_title = 'Lineitem Search' %]
 <!-- later: "[% ctx.page_args.0 %]" -->
 <div id="oils-acq-li-search-form-holder" class="hidden">
@@ -110,6 +110,6 @@
         </div>
     </form>
 </div>
-[% INCLUDE 'default/acq/common/li_table.tt2' %]
+[% INCLUDE 'acq/common/li_table.tt2' %]
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/lineitem/search.js"></script>
 [% END %]
diff --git a/Open-ILS/src/templates/default/acq/lineitem/worksheet.tt2 b/Open-ILS/src/templates/acq/lineitem/worksheet.tt2
similarity index 93%
rename from Open-ILS/src/templates/default/acq/lineitem/worksheet.tt2
rename to Open-ILS/src/templates/acq/lineitem/worksheet.tt2
index 1882237..58548f6 100644
--- a/Open-ILS/src/templates/default/acq/lineitem/worksheet.tt2
+++ b/Open-ILS/src/templates/acq/lineitem/worksheet.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 [% ctx.page_title = "Lineitem Worksheet" %]
 <script type="text/javascript">var liId = "[% ctx.page_args.0 %]";</script>
 <h1>Lineitem Worksheet</h1>
diff --git a/Open-ILS/src/templates/default/acq/picklist/bib_search.tt2 b/Open-ILS/src/templates/acq/picklist/bib_search.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/acq/picklist/bib_search.tt2
rename to Open-ILS/src/templates/acq/picklist/bib_search.tt2
index f80d978..dd7e83c 100644
--- a/Open-ILS/src/templates/default/acq/picklist/bib_search.tt2
+++ b/Open-ILS/src/templates/acq/picklist/bib_search.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 <style type="text/css">
     @import "[% ctx.media_prefix %]/js/dojo/dojox/form/resources/CheckedMultiSelect.css";
 </style>
@@ -60,7 +60,7 @@
         </div>
     </div>
     <div dojoType='dijit.layout.ContentPane' layoutAlign='client'>
-        [% INCLUDE 'default/acq/common/li_table.tt2' %]
+        [% INCLUDE 'acq/common/li_table.tt2' %]
     </div>
 </div>
 
diff --git a/Open-ILS/src/templates/default/acq/picklist/brief_record.tt2 b/Open-ILS/src/templates/acq/picklist/brief_record.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/acq/picklist/brief_record.tt2
rename to Open-ILS/src/templates/acq/picklist/brief_record.tt2
index 4f8156b..9e10102 100644
--- a/Open-ILS/src/templates/default/acq/picklist/brief_record.tt2
+++ b/Open-ILS/src/templates/acq/picklist/brief_record.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 <h1>New Brief Record</h1><br/>
 <form dojoType='dijit.form.Form'>
     <script type='dojo/method' event='onSubmit'>
diff --git a/Open-ILS/src/templates/default/acq/picklist/from_bib.tt2 b/Open-ILS/src/templates/acq/picklist/from_bib.tt2
similarity index 86%
rename from Open-ILS/src/templates/default/acq/picklist/from_bib.tt2
rename to Open-ILS/src/templates/acq/picklist/from_bib.tt2
index 0a422ec..4cd61e0 100644
--- a/Open-ILS/src/templates/default/acq/picklist/from_bib.tt2
+++ b/Open-ILS/src/templates/acq/picklist/from_bib.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 [% ctx.page_title = "Items by Bibliographic ID" %]
 <div id="acq-frombib-upload-box">
     <div class="oils-acq-basic-roomy">
@@ -18,7 +18,7 @@
     <button onclick="location.href=location.href;">Begin a new search</button>
 </div>
 <hr />
-[% INCLUDE "default/acq/common/li_table_pager.tt2" %]
-[% INCLUDE "default/acq/common/li_table.tt2" %]
+[% INCLUDE "acq/common/li_table_pager.tt2" %]
+[% INCLUDE "acq/common/li_table.tt2" %]
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/picklist/from_bib.js"> </script>
 [% END %]
diff --git a/Open-ILS/src/templates/default/acq/picklist/list.tt2 b/Open-ILS/src/templates/acq/picklist/list.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/acq/picklist/list.tt2
rename to Open-ILS/src/templates/acq/picklist/list.tt2
index 217cbb6..1fd98a6 100644
--- a/Open-ILS/src/templates/default/acq/picklist/list.tt2
+++ b/Open-ILS/src/templates/acq/picklist/list.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 [% ctx.page_title = 'Selection Lists' %]
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
diff --git a/Open-ILS/src/templates/default/acq/picklist/upload.tt2 b/Open-ILS/src/templates/acq/picklist/upload.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/acq/picklist/upload.tt2
rename to Open-ILS/src/templates/acq/picklist/upload.tt2
index b05ddc0..31b7620 100644
--- a/Open-ILS/src/templates/default/acq/picklist/upload.tt2
+++ b/Open-ILS/src/templates/acq/picklist/upload.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 
 <h1>Upload</h1><br/>
 <form id="acq-pl-upload-form" enctype="multipart/form-data">
diff --git a/Open-ILS/src/templates/default/acq/picklist/user_request.tt2 b/Open-ILS/src/templates/acq/picklist/user_request.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/acq/picklist/user_request.tt2
rename to Open-ILS/src/templates/acq/picklist/user_request.tt2
index 02e3683..3622a60 100644
--- a/Open-ILS/src/templates/default/acq/picklist/user_request.tt2
+++ b/Open-ILS/src/templates/acq/picklist/user_request.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 [% ctx.page_title = 'Patron Requests' %]
 <script type="text/javascript">var reqId = '[% ctx.page_args.0 %]';</script>
 
diff --git a/Open-ILS/src/templates/default/acq/picklist/view.tt2 b/Open-ILS/src/templates/acq/picklist/view.tt2
similarity index 91%
rename from Open-ILS/src/templates/default/acq/picklist/view.tt2
rename to Open-ILS/src/templates/acq/picklist/view.tt2
index dcb693d..a209c3e 100644
--- a/Open-ILS/src/templates/default/acq/picklist/view.tt2
+++ b/Open-ILS/src/templates/acq/picklist/view.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 [% ctx.page_title = 'Selection List' %]
 <div dojoType="dijit.layout.ContentPane" style="height:100%">
     <div class='container'>
@@ -13,7 +13,7 @@
         </div>
     </div>
     <script type="text/javascript">var plId = '[% ctx.page_args.0 %]';</script>
-    [% INCLUDE 'default/acq/common/li_table.tt2' %]
+    [% INCLUDE 'acq/common/li_table.tt2' %]
 </div>
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/picklist/view.js'></script>
 [% END %]
diff --git a/Open-ILS/src/templates/default/acq/po/create.tt2 b/Open-ILS/src/templates/acq/po/create.tt2
similarity index 85%
rename from Open-ILS/src/templates/default/acq/po/create.tt2
rename to Open-ILS/src/templates/acq/po/create.tt2
index 5dde850..01473d2 100644
--- a/Open-ILS/src/templates/default/acq/po/create.tt2
+++ b/Open-ILS/src/templates/acq/po/create.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 [% ctx.page_title = "Create Purchase Order" %]
 <h1>Create Purchase Order</h1>
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/po/create.js"> </script>
diff --git a/Open-ILS/src/templates/default/acq/po/edi_messages.tt2 b/Open-ILS/src/templates/acq/po/edi_messages.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/acq/po/edi_messages.tt2
rename to Open-ILS/src/templates/acq/po/edi_messages.tt2
index 76c2101..c936616 100644
--- a/Open-ILS/src/templates/default/acq/po/edi_messages.tt2
+++ b/Open-ILS/src/templates/acq/po/edi_messages.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 [% ctx.page_title = "EDI Messages" %]
 [% IF ctx.page_args.0 %]
 <h1>EDI Messages (Purchase Order [% ctx.page_args.0 %])</h1>
diff --git a/Open-ILS/src/templates/default/acq/po/events.tt2 b/Open-ILS/src/templates/acq/po/events.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/acq/po/events.tt2
rename to Open-ILS/src/templates/acq/po/events.tt2
index a06fc89..03c183e 100644
--- a/Open-ILS/src/templates/default/acq/po/events.tt2
+++ b/Open-ILS/src/templates/acq/po/events.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 
 <!-- grid -->
 
diff --git a/Open-ILS/src/templates/default/acq/po/history.tt2 b/Open-ILS/src/templates/acq/po/history.tt2
similarity index 96%
rename from Open-ILS/src/templates/default/acq/po/history.tt2
rename to Open-ILS/src/templates/acq/po/history.tt2
index 2b3c5d0..ad92007 100644
--- a/Open-ILS/src/templates/default/acq/po/history.tt2
+++ b/Open-ILS/src/templates/acq/po/history.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 [% ctx.page_title = "PO History" %]
 <h1>Purchase Order History</h1>
 <br/>
diff --git a/Open-ILS/src/templates/default/acq/po/item_table.tt2 b/Open-ILS/src/templates/acq/po/item_table.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/acq/po/item_table.tt2
rename to Open-ILS/src/templates/acq/po/item_table.tt2
diff --git a/Open-ILS/src/templates/default/acq/po/search.tt2 b/Open-ILS/src/templates/acq/po/search.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/acq/po/search.tt2
rename to Open-ILS/src/templates/acq/po/search.tt2
index de8bd1d..ff3a1c1 100644
--- a/Open-ILS/src/templates/default/acq/po/search.tt2
+++ b/Open-ILS/src/templates/acq/po/search.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Purchase Orders' %]
 <script type="text/javascript">
     var poIds = function(s) {
@@ -136,7 +136,7 @@
         </tbody>
     </table>
 </div>
-[% INCLUDE 'default/acq/common/li_table.tt2' %]
+[% INCLUDE 'acq/common/li_table.tt2' %]
 
 <!-- load the page-specific JS -->
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/po/search.js'> </script>
diff --git a/Open-ILS/src/templates/default/acq/po/view.tt2 b/Open-ILS/src/templates/acq/po/view.tt2
similarity index 95%
rename from Open-ILS/src/templates/default/acq/po/view.tt2
rename to Open-ILS/src/templates/acq/po/view.tt2
index bfbc776..55f6679 100644
--- a/Open-ILS/src/templates/default/acq/po/view.tt2
+++ b/Open-ILS/src/templates/acq/po/view.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 [% ctx.page_title = "Purchase Order" %]
 <div dojoType="dijit.layout.ContentPane" style="height:100%">
     <div>
@@ -76,7 +76,7 @@
                                             );
                                     }
                                 </script>
-                                [% INCLUDE "default/acq/common/inv_dialog.tt2"
+                                [% INCLUDE "acq/common/inv_dialog.tt2"
                                     which = "po" %]
                             </div>
                         </button>
@@ -126,13 +126,13 @@
             liFocus = null;
         }
     </script>
-    [% INCLUDE 'default/acq/common/li_table.tt2' %]
-    [% INCLUDE "default/acq/common/notes.tt2" which = "Po" %]
+    [% INCLUDE 'acq/common/li_table.tt2' %]
+    [% INCLUDE "acq/common/notes.tt2" which = "Po" %]
     <div class='hidden' id='acq-po-no-lineitems'>
         <button type='dijit.form.Button' onclick='location.href = oilsBasePath + "/acq/picklist/brief_record?po=" + poId'>
             Add Brief Record
         </button>
     </div>
-    [% INCLUDE "default/acq/po/item_table.tt2" %]
+    [% INCLUDE "acq/po/item_table.tt2" %]
 </div>
 [% END %]
diff --git a/Open-ILS/src/templates/default/acq/receiving/process.tt2 b/Open-ILS/src/templates/acq/receiving/process.tt2
similarity index 95%
rename from Open-ILS/src/templates/default/acq/receiving/process.tt2
rename to Open-ILS/src/templates/acq/receiving/process.tt2
index 2604d7c..17ff83c 100644
--- a/Open-ILS/src/templates/default/acq/receiving/process.tt2
+++ b/Open-ILS/src/templates/acq/receiving/process.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
     <h1>Receiving Processing</h1><br/>
     <div id='oils-acq-recv-search-block' class='container'>
         <form dojoType='dijit.form.Form' action='' method=''>
@@ -30,7 +30,7 @@
     <script type="text/javascript">dojo.style('searchProgress', 'visibility', 'hidden');</script>
     <div id='oils-acq-recv-grid' style='height:100%'>
         [% grid_jsid = 'liGrid'; domprefix = 'oils-acq-recv' %]
-        [% INCLUDE 'default/acq/common/jubgrid.tt2' %]
+        [% INCLUDE 'acq/common/jubgrid.tt2' %]
     </div>
     <script type="text/javascript">dojo.style('oils-acq-recv-grid', 'visibility', 'hidden');</script>
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/receiving/process.js'> </script>
diff --git a/Open-ILS/src/templates/default/acq/search/unified.tt2 b/Open-ILS/src/templates/acq/search/unified.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/acq/search/unified.tt2
rename to Open-ILS/src/templates/acq/search/unified.tt2
index 1d3f369..68e7dcd 100644
--- a/Open-ILS/src/templates/default/acq/search/unified.tt2
+++ b/Open-ILS/src/templates/acq/search/unified.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 [% ctx.page_title = "Acquisitions Search" %]
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/common/base64.js"></script>
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/search/unified.js"></script>
@@ -238,8 +238,8 @@
         There are no results from your search.
     </div>
     <div id="acq-unified-results-lineitem" class="hidden">
-        [% INCLUDE "default/acq/common/li_table_pager.tt2" %]
-        [% INCLUDE "default/acq/common/li_table.tt2" %]
+        [% INCLUDE "acq/common/li_table_pager.tt2" %]
+        [% INCLUDE "acq/common/li_table.tt2" %]
     </div>
     <div jsId='progressDialog' dojoType='openils.widget.ProgressDialog'/>
 </div>
diff --git a/Open-ILS/src/templates/default/acq/settings/li_attr.tt2 b/Open-ILS/src/templates/acq/settings/li_attr.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/acq/settings/li_attr.tt2
rename to Open-ILS/src/templates/acq/settings/li_attr.tt2
index 357a047..d096f96 100644
--- a/Open-ILS/src/templates/default/acq/settings/li_attr.tt2
+++ b/Open-ILS/src/templates/acq/settings/li_attr.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
     <div dojoType="dijit.form.DropDownButton">
diff --git a/Open-ILS/src/templates/default/actor/user/register.tt2 b/Open-ILS/src/templates/actor/user/register.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/actor/user/register.tt2
rename to Open-ILS/src/templates/actor/user/register.tt2
index a821020..71f0f4e 100644
--- a/Open-ILS/src/templates/default/actor/user/register.tt2
+++ b/Open-ILS/src/templates/actor/user/register.tt2
@@ -1,5 +1,5 @@
 [% ctx.page_title = 'User Editor' %]
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/actor/user/register.js'></script>
 <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/[% ctx.skin %]/register.css" />
 
@@ -10,7 +10,7 @@
         return false;
     </script>
     <table>
-        [% INCLUDE default/actor/user/register_table.tt2 %]
+        [% INCLUDE actor/user/register_table.tt2 %]
     </table>
 </div>
 
diff --git a/Open-ILS/src/templates/default/actor/user/register_table.tt2 b/Open-ILS/src/templates/actor/user/register_table.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/actor/user/register_table.tt2
rename to Open-ILS/src/templates/actor/user/register_table.tt2
diff --git a/Open-ILS/src/templates/default/actor/user/trigger_events.tt2 b/Open-ILS/src/templates/actor/user/trigger_events.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/actor/user/trigger_events.tt2
rename to Open-ILS/src/templates/actor/user/trigger_events.tt2
index d17cfac..ec0c2f4 100644
--- a/Open-ILS/src/templates/default/actor/user/trigger_events.tt2
+++ b/Open-ILS/src/templates/actor/user/trigger_events.tt2
@@ -1,5 +1,5 @@
 [% ctx.page_title = 'Events' %]
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/actor/user/trigger_events.js'></script>
 <script type="text/javascript">patronId = '[% ctx.page_args.0 %]'</script>
 
diff --git a/Open-ILS/src/templates/base.tt2 b/Open-ILS/src/templates/base.tt2
index d4f4ebb..8a7d682 100644
--- a/Open-ILS/src/templates/base.tt2
+++ b/Open-ILS/src/templates/base.tt2
@@ -1,27 +1,39 @@
 [%- ctx.final_dtd = 
-    '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' -%]
+'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' -%]
 [%- IF !ctx.dtd; ctx.dtd = ctx.final_dtd; END -%]
 [% ctx.dtd %]
+<!-- note: after vandelay strings are ported to l('...'), we can remove the DTD conditional -->
 <html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.locale %]' xml:lang='[% ctx.locale %]'>
     <head>
         <title>[% ctx.page_title %]</title>
         <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-        <link rel='stylesheet' type='text/css'
-            href='[% ctx.media_prefix %]/css/skin/[% ctx.skin %].css' />
-        <link rel='stylesheet' type='text/css'
-            href='[% ctx.media_prefix %]/css/theme/[% ctx.skin %].css' />
+        <link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/skin/[% ctx.skin %].css' />
+        <link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/theme/[% ctx.skin %].css' />
 	    <script language='javascript' src='/IDL2js' type='text/javascript'></script>
         <script type="text/javascript">var djConfig = {parseOnLoad:true,isDebug:false};</script>
         <script type="text/javascript" src="/js/dojo/dojo/dojo.js"></script>
         <script type="text/javascript" src="[% ctx.media_prefix %]/js/dojo/dojo/openils_dojo.js"></script>
         <script type="text/javascript" src="[% ctx.media_prefix %]/js/dojo/opensrf/md5.js"></script>
+        <script type="text/javascript">var oilsBasePath = '[% ctx.base_path %]'</script>
+        <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/base.js"></script>
         <script type="text/javascript">
-            var oilsBasePath = '[% ctx.base_path %]';
+            dojo.require("dijit.layout.LayoutContainer");
+            dojo.require("dijit.layout.ContentPane");
         </script>
-        <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/base.js"></script>
     </head>
     <body class='tundra'>
         [% INCLUDE login.tt2 %] <!-- shared login page -->
-        [% content %] <!-- Page body -->
+        <div id="oils-base-body-block" class="tundra" dojoType="dijit.layout.LayoutContainer"> 
+            <div id="oils-base-header-block" dojoType="dijit.layout.ContentPane" layoutAlign="top">
+                <div id='oils-base-header-auto-login-block'>
+                    [% INCLUDE header.tt2 %]
+                </div>
+            </div>
+            <div id="oils-base-main-block" dojoType="dijit.layout.LayoutContainer" layoutAlign="client">
+                <div id="oils-base-content-block" dojoType="dijit.layout.ContentPane" layoutAlign="client">
+                    [% content %]
+                </div>
+            </div>
+        </div>
     </body>
 </html>
diff --git a/Open-ILS/src/templates/default/booking/capture.tt2 b/Open-ILS/src/templates/booking/capture.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/booking/capture.tt2
rename to Open-ILS/src/templates/booking/capture.tt2
index 79d7e4e..2e02d9c 100644
--- a/Open-ILS/src/templates/default/booking/capture.tt2
+++ b/Open-ILS/src/templates/booking/capture.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/booking/common.js"></script>
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/booking/capture.js"></script>
 <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/[% ctx.skin %]/booking.css" id="booking_stylesheet_link" />
diff --git a/Open-ILS/src/templates/default/booking/pickup.tt2 b/Open-ILS/src/templates/booking/pickup.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/booking/pickup.tt2
rename to Open-ILS/src/templates/booking/pickup.tt2
index 8cff3fa..d8784c9 100644
--- a/Open-ILS/src/templates/default/booking/pickup.tt2
+++ b/Open-ILS/src/templates/booking/pickup.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/[% ctx.skin %]/booking.css" />
 <div id="auto_l10n_start_here">
     <h1 class="booking AUTO_h1"></h1>
diff --git a/Open-ILS/src/templates/default/booking/pull_list.tt2 b/Open-ILS/src/templates/booking/pull_list.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/booking/pull_list.tt2
rename to Open-ILS/src/templates/booking/pull_list.tt2
index d4f6765..002855f 100644
--- a/Open-ILS/src/templates/default/booking/pull_list.tt2
+++ b/Open-ILS/src/templates/booking/pull_list.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/booking/common.js"></script>
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/booking/pull_list.js"></script>
 <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/[% ctx.skin %]/booking.css" />
diff --git a/Open-ILS/src/templates/default/booking/reservation.tt2 b/Open-ILS/src/templates/booking/reservation.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/booking/reservation.tt2
rename to Open-ILS/src/templates/booking/reservation.tt2
index 5eb4a1d..5888049 100644
--- a/Open-ILS/src/templates/default/booking/reservation.tt2
+++ b/Open-ILS/src/templates/booking/reservation.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/[% ctx.skin %]/booking.css" />
 <div id="auto_l10n_start_here">
     <div id="brt_search_block" class="container">
diff --git a/Open-ILS/src/templates/default/booking/return.tt2 b/Open-ILS/src/templates/booking/return.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/booking/return.tt2
rename to Open-ILS/src/templates/booking/return.tt2
index a2f61c7..40e1a32 100644
--- a/Open-ILS/src/templates/default/booking/return.tt2
+++ b/Open-ILS/src/templates/booking/return.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/[% ctx.skin %]/booking.css" />
 <div id="auto_l10n_start_here">
     <h1 class="booking AUTO_return_h1"></h1>
diff --git a/Open-ILS/src/templates/default/cat/authority/list.tt2 b/Open-ILS/src/templates/cat/authority/list.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/cat/authority/list.tt2
rename to Open-ILS/src/templates/cat/authority/list.tt2
index cfc341f..c58040b 100644
--- a/Open-ILS/src/templates/default/cat/authority/list.tt2
+++ b/Open-ILS/src/templates/cat/authority/list.tt2
@@ -1,5 +1,5 @@
 [% ctx.page_title = 'Authority record list' %]
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/cat/authority/list.js'> </script>
 
diff --git a/Open-ILS/src/templates/default/circ/selfcheck/audio_config.tt2 b/Open-ILS/src/templates/circ/selfcheck/audio_config.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/circ/selfcheck/audio_config.tt2
rename to Open-ILS/src/templates/circ/selfcheck/audio_config.tt2
diff --git a/Open-ILS/src/templates/default/circ/selfcheck/banner.tt2 b/Open-ILS/src/templates/circ/selfcheck/banner.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/circ/selfcheck/banner.tt2
rename to Open-ILS/src/templates/circ/selfcheck/banner.tt2
diff --git a/Open-ILS/src/templates/default/circ/selfcheck/circ_page.tt2 b/Open-ILS/src/templates/circ/selfcheck/circ_page.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/circ/selfcheck/circ_page.tt2
rename to Open-ILS/src/templates/circ/selfcheck/circ_page.tt2
diff --git a/Open-ILS/src/templates/default/circ/selfcheck/fines.tt2 b/Open-ILS/src/templates/circ/selfcheck/fines.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/circ/selfcheck/fines.tt2
rename to Open-ILS/src/templates/circ/selfcheck/fines.tt2
diff --git a/Open-ILS/src/templates/default/circ/selfcheck/holds_page.tt2 b/Open-ILS/src/templates/circ/selfcheck/holds_page.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/circ/selfcheck/holds_page.tt2
rename to Open-ILS/src/templates/circ/selfcheck/holds_page.tt2
diff --git a/Open-ILS/src/templates/default/circ/selfcheck/main.tt2 b/Open-ILS/src/templates/circ/selfcheck/main.tt2
similarity index 82%
rename from Open-ILS/src/templates/default/circ/selfcheck/main.tt2
rename to Open-ILS/src/templates/circ/selfcheck/main.tt2
index 888ff4c..3c2be14 100644
--- a/Open-ILS/src/templates/default/circ/selfcheck/main.tt2
+++ b/Open-ILS/src/templates/circ/selfcheck/main.tt2
@@ -1,12 +1,12 @@
 [% ctx.page_title = 'Self Checkout' %]
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/circ/selfcheck/selfcheck.js'> </script>
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/circ/selfcheck/payment.js"></script>
 <link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/skin/[% ctx.skin %]/selfcheck.css'/>
-[% INCLUDE 'default/circ/selfcheck/audio_config.tt2' %]
+[% INCLUDE 'circ/selfcheck/audio_config.tt2' %]
 
 <div id='oils-selfck-top-div'>
-    [% INCLUDE 'default/circ/selfcheck/banner.tt2' %]
+    [% INCLUDE 'circ/selfcheck/banner.tt2' %]
 </div>
 <div id='oils-selfck-bottom-div'>
     <div id='oils-selfck-content-div'>
@@ -15,23 +15,23 @@
         </div>
         <div id='oils-selfck-circ-page' class='hidden'>
             <!-- Checkout / renewal and items out interface -->
-            [% INCLUDE 'default/circ/selfcheck/circ_page.tt2' %]
+            [% INCLUDE 'circ/selfcheck/circ_page.tt2' %]
         </div>
         <div id='oils-selfck-holds-page' class='hidden'>
             <!-- Patron holds interface -->
-            [% INCLUDE 'default/circ/selfcheck/holds_page.tt2' %]
+            [% INCLUDE 'circ/selfcheck/holds_page.tt2' %]
         </div>
         <div id='oils-selfck-fines-page' class='hidden'>
             <!-- Fines and interface -->
-            [% INCLUDE 'default/circ/selfcheck/fines.tt2' %]
+            [% INCLUDE 'circ/selfcheck/fines.tt2' %]
         </div>
         <div id='oils-selfck-payment-page' class='hidden'>
             <!-- credit card payments interface -->
-            [% INCLUDE 'default/circ/selfcheck/payment.tt2' %]
+            [% INCLUDE 'circ/selfcheck/payment.tt2' %]
         </div>
     </div>
     <div id='oils-selfck-summary-div'>
-        [% INCLUDE 'default/circ/selfcheck/summary.tt2' %]
+        [% INCLUDE 'circ/selfcheck/summary.tt2' %]
     </div>
 </div>
 <div dojoType='openils.widget.ProgressDialog' jsId='progressDialog'></div>
diff --git a/Open-ILS/src/templates/default/circ/selfcheck/patron_login.tt2 b/Open-ILS/src/templates/circ/selfcheck/patron_login.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/circ/selfcheck/patron_login.tt2
rename to Open-ILS/src/templates/circ/selfcheck/patron_login.tt2
diff --git a/Open-ILS/src/templates/default/circ/selfcheck/payment.tt2 b/Open-ILS/src/templates/circ/selfcheck/payment.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/circ/selfcheck/payment.tt2
rename to Open-ILS/src/templates/circ/selfcheck/payment.tt2
diff --git a/Open-ILS/src/templates/default/circ/selfcheck/summary.tt2 b/Open-ILS/src/templates/circ/selfcheck/summary.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/circ/selfcheck/summary.tt2
rename to Open-ILS/src/templates/circ/selfcheck/summary.tt2
diff --git a/Open-ILS/src/templates/default/conify/global/acq/cancel_reason.tt2 b/Open-ILS/src/templates/conify/global/acq/cancel_reason.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/acq/cancel_reason.tt2
rename to Open-ILS/src/templates/conify/global/acq/cancel_reason.tt2
index 4595ab6..63597a6 100644
--- a/Open-ILS/src/templates/default/conify/global/acq/cancel_reason.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/cancel_reason.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Cancel Reasons' %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/acq/cancel_reason.js'> </script>
 
diff --git a/Open-ILS/src/templates/default/conify/global/acq/claim_event_type.tt2 b/Open-ILS/src/templates/conify/global/acq/claim_event_type.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/acq/claim_event_type.tt2
rename to Open-ILS/src/templates/conify/global/acq/claim_event_type.tt2
index ab91d78..6931809 100644
--- a/Open-ILS/src/templates/default/conify/global/acq/claim_event_type.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/claim_event_type.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Claim Event Types' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane"
diff --git a/Open-ILS/src/templates/default/conify/global/acq/claim_policy.tt2 b/Open-ILS/src/templates/conify/global/acq/claim_policy.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/acq/claim_policy.tt2
rename to Open-ILS/src/templates/conify/global/acq/claim_policy.tt2
index 9bfa598..8409db1 100644
--- a/Open-ILS/src/templates/default/conify/global/acq/claim_policy.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/claim_policy.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Claim Policies' %]
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
diff --git a/Open-ILS/src/templates/default/conify/global/acq/claim_policy_action.tt2 b/Open-ILS/src/templates/conify/global/acq/claim_policy_action.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/acq/claim_policy_action.tt2
rename to Open-ILS/src/templates/conify/global/acq/claim_policy_action.tt2
index 603b543..a50c0dd 100644
--- a/Open-ILS/src/templates/default/conify/global/acq/claim_policy_action.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/claim_policy_action.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Claim Policy Actions' %]
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
diff --git a/Open-ILS/src/templates/default/conify/global/acq/claim_type.tt2 b/Open-ILS/src/templates/conify/global/acq/claim_type.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/acq/claim_type.tt2
rename to Open-ILS/src/templates/conify/global/acq/claim_type.tt2
index 7f0fbc3..e9fc2ee 100644
--- a/Open-ILS/src/templates/default/conify/global/acq/claim_type.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/claim_type.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Claim Types' %]
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
diff --git a/Open-ILS/src/templates/default/conify/global/acq/distribution_formula.tt2 b/Open-ILS/src/templates/conify/global/acq/distribution_formula.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/conify/global/acq/distribution_formula.tt2
rename to Open-ILS/src/templates/conify/global/acq/distribution_formula.tt2
index 13b8647..a877a08 100644
--- a/Open-ILS/src/templates/default/conify/global/acq/distribution_formula.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/distribution_formula.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Distribution Formulas' %]
 
 <div id='formula-list-div'>
diff --git a/Open-ILS/src/templates/default/conify/global/acq/edi_account.tt2 b/Open-ILS/src/templates/conify/global/acq/edi_account.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/conify/global/acq/edi_account.tt2
rename to Open-ILS/src/templates/conify/global/acq/edi_account.tt2
index eebadd4..12e9acb 100644
--- a/Open-ILS/src/templates/default/conify/global/acq/edi_account.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/edi_account.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'EDI Accounts' %]
 <style type="text/css">
     .footer_notes { padding-top: 16px; font-size: smaller; }
diff --git a/Open-ILS/src/templates/default/conify/global/acq/exchange_rate.tt2 b/Open-ILS/src/templates/conify/global/acq/exchange_rate.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/acq/exchange_rate.tt2
rename to Open-ILS/src/templates/conify/global/acq/exchange_rate.tt2
index 47694e6..8991b47 100644
--- a/Open-ILS/src/templates/default/conify/global/acq/exchange_rate.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/exchange_rate.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Exchange Rates' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
     <div>Exchange Rates</div>
diff --git a/Open-ILS/src/templates/default/conify/global/acq/fund_tag.tt2 b/Open-ILS/src/templates/conify/global/acq/fund_tag.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/acq/fund_tag.tt2
rename to Open-ILS/src/templates/conify/global/acq/fund_tag.tt2
index b3368b3..f1a875d 100644
--- a/Open-ILS/src/templates/default/conify/global/acq/fund_tag.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/fund_tag.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Fund Tags' %]
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/conify/global/acq/fund_tag.js"> </script>
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
diff --git a/Open-ILS/src/templates/default/conify/global/acq/invoice_item_type.tt2 b/Open-ILS/src/templates/conify/global/acq/invoice_item_type.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/acq/invoice_item_type.tt2
rename to Open-ILS/src/templates/conify/global/acq/invoice_item_type.tt2
index b1eeced..a038372 100644
--- a/Open-ILS/src/templates/default/conify/global/acq/invoice_item_type.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/invoice_item_type.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Invoice Item Types' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
     <div>Invoice Item Types</div>
diff --git a/Open-ILS/src/templates/default/conify/global/acq/invoice_payment_method.tt2 b/Open-ILS/src/templates/conify/global/acq/invoice_payment_method.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/acq/invoice_payment_method.tt2
rename to Open-ILS/src/templates/conify/global/acq/invoice_payment_method.tt2
index 3138991..e24fd08 100644
--- a/Open-ILS/src/templates/default/conify/global/acq/invoice_payment_method.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/invoice_payment_method.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Invoice Payment Methods' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
     <div>Invoice Payment Methods</div>
diff --git a/Open-ILS/src/templates/default/conify/global/acq/lineitem_alert.tt2 b/Open-ILS/src/templates/conify/global/acq/lineitem_alert.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/acq/lineitem_alert.tt2
rename to Open-ILS/src/templates/conify/global/acq/lineitem_alert.tt2
index 33079c0..7ac3f94 100644
--- a/Open-ILS/src/templates/default/conify/global/acq/lineitem_alert.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/lineitem_alert.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Line Item Alerts' %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/acq/lineitem_alert.js'> </script>
 
diff --git a/Open-ILS/src/templates/default/conify/global/acq/lineitem_marc_attr_def.tt2 b/Open-ILS/src/templates/conify/global/acq/lineitem_marc_attr_def.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/acq/lineitem_marc_attr_def.tt2
rename to Open-ILS/src/templates/conify/global/acq/lineitem_marc_attr_def.tt2
index efa0295..6504100 100644
--- a/Open-ILS/src/templates/default/conify/global/acq/lineitem_marc_attr_def.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/lineitem_marc_attr_def.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Line Item MARC Attributes' %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/acq/lineitem_marc_attr_def.js'> </script>
 
diff --git a/Open-ILS/src/templates/default/conify/global/acq/provider.tt2 b/Open-ILS/src/templates/conify/global/acq/provider.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/conify/global/acq/provider.tt2
rename to Open-ILS/src/templates/conify/global/acq/provider.tt2
index 05f9e6b..117f8e2 100644
--- a/Open-ILS/src/templates/default/conify/global/acq/provider.tt2
+++ b/Open-ILS/src/templates/conify/global/acq/provider.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Providers' %]
 
 <div class="hidden">
diff --git a/Open-ILS/src/templates/default/conify/global/action/survey.tt2 b/Open-ILS/src/templates/conify/global/action/survey.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/conify/global/action/survey.tt2
rename to Open-ILS/src/templates/conify/global/action/survey.tt2
index e08fae7..9b530ee 100644
--- a/Open-ILS/src/templates/default/conify/global/action/survey.tt2
+++ b/Open-ILS/src/templates/conify/global/action/survey.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
    <div dojoType="dijit.layout.ContentPane" layoutAlign='top'>
         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
             <div>Survey List</div>
diff --git a/Open-ILS/src/templates/default/conify/global/action/survey/edit.tt2 b/Open-ILS/src/templates/conify/global/action/survey/edit.tt2
similarity index 95%
rename from Open-ILS/src/templates/default/conify/global/action/survey/edit.tt2
rename to Open-ILS/src/templates/conify/global/action/survey/edit.tt2
index f498d8a..fe4fdb5 100644
--- a/Open-ILS/src/templates/default/conify/global/action/survey/edit.tt2
+++ b/Open-ILS/src/templates/conify/global/action/survey/edit.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 <link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/skin/default/conify.css'/>
 <link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/theme/default/conify.css'/>
 
diff --git a/Open-ILS/src/templates/default/conify/global/action_trigger/event_definition.tt2 b/Open-ILS/src/templates/conify/global/action_trigger/event_definition.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/conify/global/action_trigger/event_definition.tt2
rename to Open-ILS/src/templates/conify/global/action_trigger/event_definition.tt2
index cb74df4..08626f8 100644
--- a/Open-ILS/src/templates/default/conify/global/action_trigger/event_definition.tt2
+++ b/Open-ILS/src/templates/conify/global/action_trigger/event_definition.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Event Definitions' %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/action_trigger/event_definition.js'></script>
 <script type="text/javascript">openils.Util.addOnLoad(loadEventDef)</script>
diff --git a/Open-ILS/src/templates/default/conify/global/action_trigger/event_definition_data.tt2 b/Open-ILS/src/templates/conify/global/action_trigger/event_definition_data.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/conify/global/action_trigger/event_definition_data.tt2
rename to Open-ILS/src/templates/conify/global/action_trigger/event_definition_data.tt2
index 997af3d..a435757 100644
--- a/Open-ILS/src/templates/default/conify/global/action_trigger/event_definition_data.tt2
+++ b/Open-ILS/src/templates/conify/global/action_trigger/event_definition_data.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
     <h2 id='at-event-def-name'/>
 </div>
diff --git a/Open-ILS/src/templates/default/conify/global/asset/copy_location_order.tt2 b/Open-ILS/src/templates/conify/global/asset/copy_location_order.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/asset/copy_location_order.tt2
rename to Open-ILS/src/templates/conify/global/asset/copy_location_order.tt2
index 77548af..281eff7 100644
--- a/Open-ILS/src/templates/default/conify/global/asset/copy_location_order.tt2
+++ b/Open-ILS/src/templates/conify/global/asset/copy_location_order.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Copy Location Order' %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/asset/copy_location_order.js'> </script>
 <link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/js/dojo/dojo/resources/dnd.css'/>
diff --git a/Open-ILS/src/templates/default/conify/global/asset/copy_template.tt2 b/Open-ILS/src/templates/conify/global/asset/copy_template.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/asset/copy_template.tt2
rename to Open-ILS/src/templates/conify/global/asset/copy_template.tt2
index f36feb4..495df04 100644
--- a/Open-ILS/src/templates/default/conify/global/asset/copy_template.tt2
+++ b/Open-ILS/src/templates/conify/global/asset/copy_template.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = "Copy Templates" %]
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/conify/global/asset/copy_template.js"> </script>
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
diff --git a/Open-ILS/src/templates/default/conify/global/biblio/monograph_part.tt2 b/Open-ILS/src/templates/conify/global/biblio/monograph_part.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/biblio/monograph_part.tt2
rename to Open-ILS/src/templates/conify/global/biblio/monograph_part.tt2
index ee1256b..08fc5c0 100644
--- a/Open-ILS/src/templates/default/conify/global/biblio/monograph_part.tt2
+++ b/Open-ILS/src/templates/conify/global/biblio/monograph_part.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Configure Monograph Parts' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
diff --git a/Open-ILS/src/templates/default/conify/global/booking/resource.tt2 b/Open-ILS/src/templates/conify/global/booking/resource.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/booking/resource.tt2
rename to Open-ILS/src/templates/conify/global/booking/resource.tt2
index 4e3fe1f..bb51583 100644
--- a/Open-ILS/src/templates/default/conify/global/booking/resource.tt2
+++ b/Open-ILS/src/templates/conify/global/booking/resource.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Resources' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
     <div>Resources</div>
diff --git a/Open-ILS/src/templates/default/conify/global/booking/resource_attr.tt2 b/Open-ILS/src/templates/conify/global/booking/resource_attr.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/booking/resource_attr.tt2
rename to Open-ILS/src/templates/conify/global/booking/resource_attr.tt2
index b9a3ece..d3ef1c4 100644
--- a/Open-ILS/src/templates/default/conify/global/booking/resource_attr.tt2
+++ b/Open-ILS/src/templates/conify/global/booking/resource_attr.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Resource Attributes' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
     <div>Resource Attributes</div>
diff --git a/Open-ILS/src/templates/default/conify/global/booking/resource_attr_map.tt2 b/Open-ILS/src/templates/conify/global/booking/resource_attr_map.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/booking/resource_attr_map.tt2
rename to Open-ILS/src/templates/conify/global/booking/resource_attr_map.tt2
index a691fa3..9943afc 100644
--- a/Open-ILS/src/templates/default/conify/global/booking/resource_attr_map.tt2
+++ b/Open-ILS/src/templates/conify/global/booking/resource_attr_map.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Resource Attribute Maps' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
     <div>Resource Attribute Maps</div>
diff --git a/Open-ILS/src/templates/default/conify/global/booking/resource_attr_value.tt2 b/Open-ILS/src/templates/conify/global/booking/resource_attr_value.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/booking/resource_attr_value.tt2
rename to Open-ILS/src/templates/conify/global/booking/resource_attr_value.tt2
index 3593db9..61c4519 100644
--- a/Open-ILS/src/templates/default/conify/global/booking/resource_attr_value.tt2
+++ b/Open-ILS/src/templates/conify/global/booking/resource_attr_value.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Resource Attribute Values' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
     <div>Resource Attribute Values</div>
diff --git a/Open-ILS/src/templates/default/conify/global/booking/resource_type.tt2 b/Open-ILS/src/templates/conify/global/booking/resource_type.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/booking/resource_type.tt2
rename to Open-ILS/src/templates/conify/global/booking/resource_type.tt2
index ac4c3a4..3783aa2 100644
--- a/Open-ILS/src/templates/default/conify/global/booking/resource_type.tt2
+++ b/Open-ILS/src/templates/conify/global/booking/resource_type.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Resource Types' %]
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
         <div>Resource Types</div>
diff --git a/Open-ILS/src/templates/default/conify/global/cat/authority/browse_axis.tt2 b/Open-ILS/src/templates/conify/global/cat/authority/browse_axis.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/cat/authority/browse_axis.tt2
rename to Open-ILS/src/templates/conify/global/cat/authority/browse_axis.tt2
index 8834b02..4594158 100644
--- a/Open-ILS/src/templates/default/conify/global/cat/authority/browse_axis.tt2
+++ b/Open-ILS/src/templates/conify/global/cat/authority/browse_axis.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER 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">
diff --git a/Open-ILS/src/templates/default/conify/global/cat/authority/browse_axis_authority_field_map.tt2 b/Open-ILS/src/templates/conify/global/cat/authority/browse_axis_authority_field_map.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/cat/authority/browse_axis_authority_field_map.tt2
rename to Open-ILS/src/templates/conify/global/cat/authority/browse_axis_authority_field_map.tt2
index 8bb1af1..c80403c 100644
--- a/Open-ILS/src/templates/default/conify/global/cat/authority/browse_axis_authority_field_map.tt2
+++ b/Open-ILS/src/templates/conify/global/cat/authority/browse_axis_authority_field_map.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER 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">
diff --git a/Open-ILS/src/templates/default/conify/global/cat/authority/control_set.tt2 b/Open-ILS/src/templates/conify/global/cat/authority/control_set.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/conify/global/cat/authority/control_set.tt2
rename to Open-ILS/src/templates/conify/global/cat/authority/control_set.tt2
index 69ba1d2..48bb176 100644
--- a/Open-ILS/src/templates/default/conify/global/cat/authority/control_set.tt2
+++ b/Open-ILS/src/templates/conify/global/cat/authority/control_set.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER 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">
diff --git a/Open-ILS/src/templates/default/conify/global/cat/authority/control_set_authority_field.tt2 b/Open-ILS/src/templates/conify/global/cat/authority/control_set_authority_field.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/conify/global/cat/authority/control_set_authority_field.tt2
rename to Open-ILS/src/templates/conify/global/cat/authority/control_set_authority_field.tt2
index ed260df..ca873da 100644
--- a/Open-ILS/src/templates/default/conify/global/cat/authority/control_set_authority_field.tt2
+++ b/Open-ILS/src/templates/conify/global/cat/authority/control_set_authority_field.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER 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">
diff --git a/Open-ILS/src/templates/default/conify/global/cat/authority/control_set_bib_field.tt2 b/Open-ILS/src/templates/conify/global/cat/authority/control_set_bib_field.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/cat/authority/control_set_bib_field.tt2
rename to Open-ILS/src/templates/conify/global/cat/authority/control_set_bib_field.tt2
index 28b9916..5c2714a 100644
--- a/Open-ILS/src/templates/default/conify/global/cat/authority/control_set_bib_field.tt2
+++ b/Open-ILS/src/templates/conify/global/cat/authority/control_set_bib_field.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER 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">
diff --git a/Open-ILS/src/templates/default/conify/global/cat/authority/thesaurus.tt2 b/Open-ILS/src/templates/conify/global/cat/authority/thesaurus.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/conify/global/cat/authority/thesaurus.tt2
rename to Open-ILS/src/templates/conify/global/cat/authority/thesaurus.tt2
index 883cb28..29c42a0 100644
--- a/Open-ILS/src/templates/default/conify/global/cat/authority/thesaurus.tt2
+++ b/Open-ILS/src/templates/conify/global/cat/authority/thesaurus.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER 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">
diff --git a/Open-ILS/src/templates/default/conify/global/config/acn_prefix.tt2 b/Open-ILS/src/templates/conify/global/config/acn_prefix.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/acn_prefix.tt2
rename to Open-ILS/src/templates/conify/global/config/acn_prefix.tt2
index 5e7f640..abe096d 100644
--- a/Open-ILS/src/templates/default/conify/global/config/acn_prefix.tt2
+++ b/Open-ILS/src/templates/conify/global/config/acn_prefix.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Call Number Prefixes' %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/acn_prefix.js'> </script>
 
diff --git a/Open-ILS/src/templates/default/conify/global/config/acn_suffix.tt2 b/Open-ILS/src/templates/conify/global/config/acn_suffix.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/acn_suffix.tt2
rename to Open-ILS/src/templates/conify/global/config/acn_suffix.tt2
index 40dcbb9..70f0a5c 100644
--- a/Open-ILS/src/templates/default/conify/global/config/acn_suffix.tt2
+++ b/Open-ILS/src/templates/conify/global/config/acn_suffix.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Call Number Suffixes' %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/acn_suffix.js'> </script>
 
diff --git a/Open-ILS/src/templates/default/conify/global/config/actor_sip_fields.tt2 b/Open-ILS/src/templates/conify/global/config/actor_sip_fields.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/actor_sip_fields.tt2
rename to Open-ILS/src/templates/conify/global/config/actor_sip_fields.tt2
index 5a0c897..ee28617 100644
--- a/Open-ILS/src/templates/default/conify/global/config/actor_sip_fields.tt2
+++ b/Open-ILS/src/templates/conify/global/config/actor_sip_fields.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Actor Stat Cat Sip Fields' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/asset_sip_fields.tt2 b/Open-ILS/src/templates/conify/global/config/asset_sip_fields.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/asset_sip_fields.tt2
rename to Open-ILS/src/templates/conify/global/config/asset_sip_fields.tt2
index bdf6e7e..1e51a81 100644
--- a/Open-ILS/src/templates/default/conify/global/config/asset_sip_fields.tt2
+++ b/Open-ILS/src/templates/conify/global/config/asset_sip_fields.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Asset Stat Cat Sip Fields' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/barcode_completion.tt2 b/Open-ILS/src/templates/conify/global/config/barcode_completion.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/barcode_completion.tt2
rename to Open-ILS/src/templates/conify/global/config/barcode_completion.tt2
index fc81951..37c8bbf 100644
--- a/Open-ILS/src/templates/default/conify/global/config/barcode_completion.tt2
+++ b/Open-ILS/src/templates/conify/global/config/barcode_completion.tt2
@@ -1,5 +1,5 @@
 [% ctx.page_title = 'Barcode Completion Configuration' %]
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/barcode_completion.js'> </script>
 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
     <div>Barcode Completion Configuration</div>
diff --git a/Open-ILS/src/templates/default/conify/global/config/billing_type.tt2 b/Open-ILS/src/templates/conify/global/config/billing_type.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/billing_type.tt2
rename to Open-ILS/src/templates/conify/global/config/billing_type.tt2
index 8811067..95de4e4 100644
--- a/Open-ILS/src/templates/default/conify/global/config/billing_type.tt2
+++ b/Open-ILS/src/templates/conify/global/config/billing_type.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Billing Types' %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/billing_type.js'> </script>
 
diff --git a/Open-ILS/src/templates/default/conify/global/config/circ_matrix_matchpoint.tt2 b/Open-ILS/src/templates/conify/global/config/circ_matrix_matchpoint.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/conify/global/config/circ_matrix_matchpoint.tt2
rename to Open-ILS/src/templates/conify/global/config/circ_matrix_matchpoint.tt2
index e3725a2..be33bdb 100644
--- a/Open-ILS/src/templates/default/conify/global/config/circ_matrix_matchpoint.tt2
+++ b/Open-ILS/src/templates/conify/global/config/circ_matrix_matchpoint.tt2
@@ -1,5 +1,5 @@
 [% ctx.page_title = 'Circulation Policy Configuration' %]
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/circ_matrix_matchpoint.js'> </script>
 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
     <div>Circulation Policy Configuration</div>
diff --git a/Open-ILS/src/templates/default/conify/global/config/circ_matrix_weights.tt2 b/Open-ILS/src/templates/conify/global/config/circ_matrix_weights.tt2
similarity index 96%
rename from Open-ILS/src/templates/default/conify/global/config/circ_matrix_weights.tt2
rename to Open-ILS/src/templates/conify/global/config/circ_matrix_weights.tt2
index 0615abf..0b18935 100644
--- a/Open-ILS/src/templates/default/conify/global/config/circ_matrix_weights.tt2
+++ b/Open-ILS/src/templates/conify/global/config/circ_matrix_weights.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Circ Matrix Weights' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/circ_modifier.tt2 b/Open-ILS/src/templates/conify/global/config/circ_modifier.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/config/circ_modifier.tt2
rename to Open-ILS/src/templates/conify/global/config/circ_modifier.tt2
index 7d60814..36b3a2c 100644
--- a/Open-ILS/src/templates/default/conify/global/config/circ_modifier.tt2
+++ b/Open-ILS/src/templates/conify/global/config/circ_modifier.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 <h1>Circulation Modifier</h1> <br/>
 
 <div class='hidden'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/coded_value_map.tt2 b/Open-ILS/src/templates/conify/global/config/coded_value_map.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/config/coded_value_map.tt2
rename to Open-ILS/src/templates/conify/global/config/coded_value_map.tt2
index 592e539..58f81ed 100644
--- a/Open-ILS/src/templates/default/conify/global/config/coded_value_map.tt2
+++ b/Open-ILS/src/templates/conify/global/config/coded_value_map.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 <h1>Code Value Maps</h1> <br/>
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/global_flag.tt2 b/Open-ILS/src/templates/conify/global/config/global_flag.tt2
similarity index 96%
rename from Open-ILS/src/templates/default/conify/global/config/global_flag.tt2
rename to Open-ILS/src/templates/conify/global/config/global_flag.tt2
index 10a7a33..2aa5fe7 100644
--- a/Open-ILS/src/templates/default/conify/global/config/global_flag.tt2
+++ b/Open-ILS/src/templates/conify/global/config/global_flag.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Global Flags' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/hard_due_date.tt2 b/Open-ILS/src/templates/conify/global/config/hard_due_date.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/config/hard_due_date.tt2
rename to Open-ILS/src/templates/conify/global/config/hard_due_date.tt2
index 2e671cf..7a1da16 100644
--- a/Open-ILS/src/templates/default/conify/global/config/hard_due_date.tt2
+++ b/Open-ILS/src/templates/conify/global/config/hard_due_date.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = "Hard Due Dates" %]
 <script type="text/javascript">
     dojo.require("openils.CGI");
diff --git a/Open-ILS/src/templates/default/conify/global/config/hard_due_date_values.tt2 b/Open-ILS/src/templates/conify/global/config/hard_due_date_values.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/config/hard_due_date_values.tt2
rename to Open-ILS/src/templates/conify/global/config/hard_due_date_values.tt2
index 5c51664..08847a7 100644
--- a/Open-ILS/src/templates/default/conify/global/config/hard_due_date_values.tt2
+++ b/Open-ILS/src/templates/conify/global/config/hard_due_date_values.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = "Hard Due Date Values" %]
 <script type="text/javascript">
     dojo.require("openils.CGI");
diff --git a/Open-ILS/src/templates/default/conify/global/config/hold_matrix_matchpoint.tt2 b/Open-ILS/src/templates/conify/global/config/hold_matrix_matchpoint.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/hold_matrix_matchpoint.tt2
rename to Open-ILS/src/templates/conify/global/config/hold_matrix_matchpoint.tt2
index 9315214..f1efcbc 100644
--- a/Open-ILS/src/templates/default/conify/global/config/hold_matrix_matchpoint.tt2
+++ b/Open-ILS/src/templates/conify/global/config/hold_matrix_matchpoint.tt2
@@ -1,5 +1,5 @@
 [% ctx.page_title = 'Hold Policy Configuration' %]
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
     <div>Hold Policy Configuration</div>
     <div><button dojoType='dijit.form.Button' onClick='hmGrid.showCreatePane()'>New</button></div>
diff --git a/Open-ILS/src/templates/default/conify/global/config/hold_matrix_weights.tt2 b/Open-ILS/src/templates/conify/global/config/hold_matrix_weights.tt2
similarity index 96%
rename from Open-ILS/src/templates/default/conify/global/config/hold_matrix_weights.tt2
rename to Open-ILS/src/templates/conify/global/config/hold_matrix_weights.tt2
index 1aa25eb..5c12e69 100644
--- a/Open-ILS/src/templates/default/conify/global/config/hold_matrix_weights.tt2
+++ b/Open-ILS/src/templates/conify/global/config/hold_matrix_weights.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Hold Matrix Weights' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/idl_field_doc.tt2 b/Open-ILS/src/templates/conify/global/config/idl_field_doc.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/idl_field_doc.tt2
rename to Open-ILS/src/templates/conify/global/config/idl_field_doc.tt2
index 9f6ac06..291c086 100644
--- a/Open-ILS/src/templates/default/conify/global/config/idl_field_doc.tt2
+++ b/Open-ILS/src/templates/conify/global/config/idl_field_doc.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Field Documentation' %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/idl_field_doc.js'> </script>
 <table style='width:100%;margin-bottom:10px;'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/metabib_field.tt2 b/Open-ILS/src/templates/conify/global/config/metabib_field.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/metabib_field.tt2
rename to Open-ILS/src/templates/conify/global/config/metabib_field.tt2
index 0a811a7..3de2f74 100644
--- a/Open-ILS/src/templates/default/conify/global/config/metabib_field.tt2
+++ b/Open-ILS/src/templates/conify/global/config/metabib_field.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Metabib Field' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/org_unit_setting_type.tt2 b/Open-ILS/src/templates/conify/global/config/org_unit_setting_type.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/config/org_unit_setting_type.tt2
rename to Open-ILS/src/templates/conify/global/config/org_unit_setting_type.tt2
index 4768cce..970f801 100644
--- a/Open-ILS/src/templates/default/conify/global/config/org_unit_setting_type.tt2
+++ b/Open-ILS/src/templates/conify/global/config/org_unit_setting_type.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Org Unit Setting Types' %]
 
 <div class='hidden'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/record_attr_definition.tt2 b/Open-ILS/src/templates/conify/global/config/record_attr_definition.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/record_attr_definition.tt2
rename to Open-ILS/src/templates/conify/global/config/record_attr_definition.tt2
index 4af3b48..7c0a33a 100644
--- a/Open-ILS/src/templates/default/conify/global/config/record_attr_definition.tt2
+++ b/Open-ILS/src/templates/conify/global/config/record_attr_definition.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'MARC Record Attribute Definitions' %]
 <h1>Record Attribute Definitions</h1> <br/>
 
diff --git a/Open-ILS/src/templates/default/conify/global/config/rule_age_hold_protect.tt2 b/Open-ILS/src/templates/conify/global/config/rule_age_hold_protect.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/rule_age_hold_protect.tt2
rename to Open-ILS/src/templates/conify/global/config/rule_age_hold_protect.tt2
index 50ed1c9..ef42277 100644
--- a/Open-ILS/src/templates/default/conify/global/config/rule_age_hold_protect.tt2
+++ b/Open-ILS/src/templates/conify/global/config/rule_age_hold_protect.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Age Hold Protect Rules' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/rule_circ_duration.tt2 b/Open-ILS/src/templates/conify/global/config/rule_circ_duration.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/rule_circ_duration.tt2
rename to Open-ILS/src/templates/conify/global/config/rule_circ_duration.tt2
index 697362d..1ba7b23 100644
--- a/Open-ILS/src/templates/default/conify/global/config/rule_circ_duration.tt2
+++ b/Open-ILS/src/templates/conify/global/config/rule_circ_duration.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Circ Duration Rules' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/rule_max_fine.tt2 b/Open-ILS/src/templates/conify/global/config/rule_max_fine.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/rule_max_fine.tt2
rename to Open-ILS/src/templates/conify/global/config/rule_max_fine.tt2
index f6ad07a..721649b 100644
--- a/Open-ILS/src/templates/default/conify/global/config/rule_max_fine.tt2
+++ b/Open-ILS/src/templates/conify/global/config/rule_max_fine.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Circ Max Fine Rules' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/rule_recurring_fine.tt2 b/Open-ILS/src/templates/conify/global/config/rule_recurring_fine.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/rule_recurring_fine.tt2
rename to Open-ILS/src/templates/conify/global/config/rule_recurring_fine.tt2
index fbb25f6..60edd14 100644
--- a/Open-ILS/src/templates/default/conify/global/config/rule_recurring_fine.tt2
+++ b/Open-ILS/src/templates/conify/global/config/rule_recurring_fine.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Recurring Fine Rules' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/standing_penalty.tt2 b/Open-ILS/src/templates/conify/global/config/standing_penalty.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/config/standing_penalty.tt2
rename to Open-ILS/src/templates/conify/global/config/standing_penalty.tt2
index 598e639..0e8e165 100644
--- a/Open-ILS/src/templates/default/conify/global/config/standing_penalty.tt2
+++ b/Open-ILS/src/templates/conify/global/config/standing_penalty.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 <style type="text/css">
     @import "[% ctx.media_prefix %]/js/dojo/dojox/form/resources/CheckedMultiSelect.css";
 </style>
diff --git a/Open-ILS/src/templates/default/conify/global/config/usr_setting_type.tt2 b/Open-ILS/src/templates/conify/global/config/usr_setting_type.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/conify/global/config/usr_setting_type.tt2
rename to Open-ILS/src/templates/conify/global/config/usr_setting_type.tt2
index 2b477a2..4c213ed 100644
--- a/Open-ILS/src/templates/default/conify/global/config/usr_setting_type.tt2
+++ b/Open-ILS/src/templates/conify/global/config/usr_setting_type.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'User Setting Types' %]
 
 <div class='hidden'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/weight_assoc.tt2 b/Open-ILS/src/templates/conify/global/config/weight_assoc.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/config/weight_assoc.tt2
rename to Open-ILS/src/templates/conify/global/config/weight_assoc.tt2
index 8f66e81..9e42f9c 100644
--- a/Open-ILS/src/templates/default/conify/global/config/weight_assoc.tt2
+++ b/Open-ILS/src/templates/conify/global/config/weight_assoc.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Matrix Weight Associations' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
diff --git a/Open-ILS/src/templates/default/conify/global/config/z3950_source.tt2 b/Open-ILS/src/templates/conify/global/config/z3950_source.tt2
similarity index 96%
rename from Open-ILS/src/templates/default/conify/global/config/z3950_source.tt2
rename to Open-ILS/src/templates/conify/global/config/z3950_source.tt2
index 67063d0..cf32681 100644
--- a/Open-ILS/src/templates/default/conify/global/config/z3950_source.tt2
+++ b/Open-ILS/src/templates/conify/global/config/z3950_source.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Z39.50 Servers' %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/z3950_source.js'> </script>
 
diff --git a/Open-ILS/src/templates/default/conify/global/permission/grp_penalty_threshold.tt2 b/Open-ILS/src/templates/conify/global/permission/grp_penalty_threshold.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/conify/global/permission/grp_penalty_threshold.tt2
rename to Open-ILS/src/templates/conify/global/permission/grp_penalty_threshold.tt2
index 5984739..3a1e21f 100644
--- a/Open-ILS/src/templates/default/conify/global/permission/grp_penalty_threshold.tt2
+++ b/Open-ILS/src/templates/conify/global/permission/grp_penalty_threshold.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Group Penalty Thresholds' %]
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
diff --git a/Open-ILS/src/templates/default/conify/global/vandelay/match_set.tt2 b/Open-ILS/src/templates/conify/global/vandelay/match_set.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/conify/global/vandelay/match_set.tt2
rename to Open-ILS/src/templates/conify/global/vandelay/match_set.tt2
index fad64db..2a719d2 100644
--- a/Open-ILS/src/templates/default/conify/global/vandelay/match_set.tt2
+++ b/Open-ILS/src/templates/conify/global/vandelay/match_set.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = 'Vandelay Match Sets' %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
diff --git a/Open-ILS/src/templates/default/conify/global/vandelay/match_set_tree.tt2 b/Open-ILS/src/templates/conify/global/vandelay/match_set_tree.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/conify/global/vandelay/match_set_tree.tt2
rename to Open-ILS/src/templates/conify/global/vandelay/match_set_tree.tt2
index cc5c788..3ffa80b 100644
--- a/Open-ILS/src/templates/default/conify/global/vandelay/match_set_tree.tt2
+++ b/Open-ILS/src/templates/conify/global/vandelay/match_set_tree.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 [% ctx.page_title = 'Vandelay Match Set Editor' %]
 <style type="text/css">
     h1 { margin: 1ex 0; }
diff --git a/Open-ILS/src/templates/default/base.tt2 b/Open-ILS/src/templates/default/base.tt2
deleted file mode 100644
index 0570b12..0000000
--- a/Open-ILS/src/templates/default/base.tt2
+++ /dev/null
@@ -1,39 +0,0 @@
-[% WRAPPER 'base.tt2' %]
-<script type="text/javascript">
- dojo.require("dijit.layout.LayoutContainer");
- dojo.require("dijit.layout.ContentPane");
-</script>
-
-<!-- define the basic page structure -->
-<div id="oils-base-body-block" class="tundra" dojoType="dijit.layout.LayoutContainer"> 
-    <div id="oils-base-header-block" dojoType="dijit.layout.ContentPane" layoutAlign="top">
-
-        <!-- Hide the non-xul menu for now.  
-             Will probably remove at some point since it's perpetually out 
-             of sync and exists solely as a development tool
-
-        <div id='oils-base-header-menu-block'>
-            [%# INCLUDE default/menu.tt2 #%]
-        </div>
-        -->
-
-        <div id='oils-base-header-auto-login-block'>
-            [% INCLUDE default/header.tt2 %]
-        </div>
-    </div>
-    <div id="oils-base-main-block" dojoType="dijit.layout.LayoutContainer" layoutAlign="client">
-        <!--
-        <div id="oils-base-navigate-block" dojoType="dijit.layout.ContentPane" layoutAlign="left">
-        </div>
-        -->
-        <div id="oils-base-content-block" dojoType="dijit.layout.ContentPane" layoutAlign="client">
-            [% content %]
-        </div>
-    </div>
-    <!--
-    <div id="oils-base-footer-block">
-        [% INCLUDE default/footer.tt2 %]
-    </div>
-    -->
-</div>
-[% END %]
diff --git a/Open-ILS/src/templates/default/opac/home.tt2 b/Open-ILS/src/templates/default/opac/home.tt2
deleted file mode 100644
index 5e1fe41..0000000
--- a/Open-ILS/src/templates/default/opac/home.tt2
+++ /dev/null
@@ -1,16 +0,0 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    WRAPPER "default/opac/parts/base.tt2";
-    INCLUDE "default/opac/parts/topnav.tt2";
-    ctx.page_title = l("Home") %]
-    <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/printnav.tt2" %]
-        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
-    </div>
-    <div id="content-wrapper">
-        <div id="main-content-home">
-            <div class="common-full-pad"></div>
-            [% INCLUDE "default/opac/parts/homesearch.tt2" %]
-            <div class="common-full-pad"></div>	
-        </div>
-    </div>
-[% END %]
diff --git a/Open-ILS/src/templates/default/opac/place_hold.tt2 b/Open-ILS/src/templates/default/opac/place_hold.tt2
deleted file mode 100644
index 0badd80..0000000
--- a/Open-ILS/src/templates/default/opac/place_hold.tt2
+++ /dev/null
@@ -1,20 +0,0 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    WRAPPER "default/opac/parts/base.tt2";
-    INCLUDE "default/opac/parts/topnav.tt2";
-    ctx.page_title = l("Place Hold") %]
-    <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/printnav.tt2" %]
-        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
-    </div>
-    <div id="content-wrapper">
-        <div id="main-content">
-            <div class="common-full-pad"></div>	
-            [% IF ctx.hold_attempt_made %]
-                [% INCLUDE "default/opac/parts/place_hold_result.tt2" %]
-            [% ELSE %]
-                [% INCLUDE "default/opac/parts/place_hold.tt2" %]
-            [% END %]
-            <div class="common-full-pad"></div>	
-        </div>
-    </div>
-[% END %]
diff --git a/Open-ILS/src/templates/default/opac/record.tt2 b/Open-ILS/src/templates/default/opac/record.tt2
deleted file mode 100644
index bc5275c..0000000
--- a/Open-ILS/src/templates/default/opac/record.tt2
+++ /dev/null
@@ -1,16 +0,0 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/config.tt2";
-    WRAPPER "default/opac/parts/base.tt2";
-    INCLUDE "default/opac/parts/topnav.tt2";
-    ctx.page_title = l("Record Detail") %]
-    <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/printnav.tt2" %]
-        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
-    </div>
-    <div id="content-wrapper" class="content-wrapper-record-page">
-        <div id="main-content">
-            [% INCLUDE "default/opac/parts/record/body.tt2" %]
-            <div class="common-full-pad"></div>	
-        </div>
-    </div>
-[% END %]
diff --git a/Open-ILS/src/templates/default/footer.tt2 b/Open-ILS/src/templates/footer.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/footer.tt2
rename to Open-ILS/src/templates/footer.tt2
diff --git a/Open-ILS/src/templates/default/header.tt2 b/Open-ILS/src/templates/header.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/header.tt2
rename to Open-ILS/src/templates/header.tt2
diff --git a/Open-ILS/src/templates/default/menu.tt2 b/Open-ILS/src/templates/menu.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/menu.tt2
rename to Open-ILS/src/templates/menu.tt2
diff --git a/Open-ILS/src/templates/default/opac/advanced.tt2 b/Open-ILS/src/templates/opac/advanced.tt2
similarity index 72%
rename from Open-ILS/src/templates/default/opac/advanced.tt2
rename to Open-ILS/src/templates/opac/advanced.tt2
index e752636..23066bf 100644
--- a/Open-ILS/src/templates/default/opac/advanced.tt2
+++ b/Open-ILS/src/templates/opac/advanced.tt2
@@ -1,10 +1,10 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    WRAPPER "default/opac/parts/base.tt2";
-    INCLUDE "default/opac/parts/topnav.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/base.tt2";
+    INCLUDE "opac/parts/topnav.tt2";
     ctx.page_title = l("Advanced Search");
     pane = CGI.param("pane") || "advanced" %]
     <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/printnav.tt2" %]
+        [% INCLUDE "opac/parts/printnav.tt2" %]
         <div id="adv_search_parent">
             <div id="adv_search_tabs">
                 <a href="?pane=advanced" alt="[% l('Advanced Search') %]" [% IF pane == 'advanced' %]class="on" [% END %]id="adv_search"></a>
@@ -17,11 +17,11 @@
         <div id="main-content">
             <div class="advanced_div">
             [% IF pane == 'advanced' %]
-            [% INCLUDE "default/opac/parts/advanced/search.tt2" %]
+            [% INCLUDE "opac/parts/advanced/search.tt2" %]
             [% ELSIF pane == 'numeric' %]
-            [% INCLUDE "default/opac/parts/advanced/numeric.tt2" %]
+            [% INCLUDE "opac/parts/advanced/numeric.tt2" %]
             [% ELSIF pane == 'expert' %]
-            [% INCLUDE "default/opac/parts/advanced/expert.tt2" %]
+            [% INCLUDE "opac/parts/advanced/expert.tt2" %]
             [% END %]
             </div>
             <div class="common-full-pad"></div>	
diff --git a/Open-ILS/src/templates/default/opac/cnbrowse.tt2 b/Open-ILS/src/templates/opac/cnbrowse.tt2
similarity index 55%
rename from Open-ILS/src/templates/default/opac/cnbrowse.tt2
rename to Open-ILS/src/templates/opac/cnbrowse.tt2
index b9c7453..6e0ad0b 100644
--- a/Open-ILS/src/templates/default/opac/cnbrowse.tt2
+++ b/Open-ILS/src/templates/opac/cnbrowse.tt2
@@ -1,19 +1,19 @@
 [%  # This is the stand-alone call-number browser.  This mainly wraps around
     # the same guts as the "shelf browser" part of a record results page.
 
-    PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/base.tt2";
-    INCLUDE "default/opac/parts/topnav.tt2";
+    PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/base.tt2";
+    INCLUDE "opac/parts/topnav.tt2";
     ctx.page_title = l("Call Number Browse"); %]
     <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/printnav.tt2" %]
-        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
+        [% INCLUDE "opac/parts/printnav.tt2" %]
+        [% INCLUDE "opac/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
         <div id="main-content">
             <div class="cnbrowse_div">
-                [% INCLUDE "default/opac/parts/record/cnbrowse.tt2" %]
+                [% INCLUDE "opac/parts/record/cnbrowse.tt2" %]
             </div>
             <div class="common-full-pad"></div>	
         </div>
diff --git a/Open-ILS/src/templates/opac/home.tt2 b/Open-ILS/src/templates/opac/home.tt2
new file mode 100644
index 0000000..fa64e65
--- /dev/null
+++ b/Open-ILS/src/templates/opac/home.tt2
@@ -0,0 +1,16 @@
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/base.tt2";
+    INCLUDE "opac/parts/topnav.tt2";
+    ctx.page_title = l("Home") %]
+    <div id="search-wrapper">
+        [% INCLUDE "opac/parts/printnav.tt2" %]
+        [% INCLUDE "opac/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content-home">
+            <div class="common-full-pad"></div>
+            [% INCLUDE "opac/parts/homesearch.tt2" %]
+            <div class="common-full-pad"></div>	
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/src/templates/default/opac/login.tt2 b/Open-ILS/src/templates/opac/login.tt2
similarity index 70%
rename from Open-ILS/src/templates/default/opac/login.tt2
rename to Open-ILS/src/templates/opac/login.tt2
index 5f4d03f..b5741e2 100644
--- a/Open-ILS/src/templates/default/opac/login.tt2
+++ b/Open-ILS/src/templates/opac/login.tt2
@@ -1,14 +1,14 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    WRAPPER "default/opac/parts/base.tt2";
-    INCLUDE "default/opac/parts/topnav.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/base.tt2";
+    INCLUDE "opac/parts/topnav.tt2";
     ctx.page_title = l("Account Login") %]
     <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/printnav.tt2" %]
-        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
+        [% INCLUDE "opac/parts/printnav.tt2" %]
+        [% INCLUDE "opac/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
         <div id="main-content">
-            [% INCLUDE "default/opac/parts/login/form.tt2" %]
+            [% INCLUDE "opac/parts/login/form.tt2" %]
             <div class="clear-both very-big-height"></div>	
             <script type="text/javascript">
                 /* Note: when common browsers suppor HTML5 "autofocus", we can remove this */
diff --git a/Open-ILS/src/templates/default/opac/mylist.tt2 b/Open-ILS/src/templates/opac/mylist.tt2
similarity index 54%
rename from Open-ILS/src/templates/default/opac/mylist.tt2
rename to Open-ILS/src/templates/opac/mylist.tt2
index 2ec8a5d..ac24efd 100644
--- a/Open-ILS/src/templates/default/opac/mylist.tt2
+++ b/Open-ILS/src/templates/opac/mylist.tt2
@@ -1,16 +1,16 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/base.tt2";
-    INCLUDE "default/opac/parts/topnav.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/base.tt2";
+    INCLUDE "opac/parts/topnav.tt2";
     ctx.page_title = l("Record Detail") %]
     <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/printnav.tt2" %]
-        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
+        [% INCLUDE "opac/parts/printnav.tt2" %]
+        [% INCLUDE "opac/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
         <div id="main-content">
             [%  IF ctx.mylist.size;
-                    INCLUDE "default/opac/parts/anon_list.tt2";
+                    INCLUDE "opac/parts/anon_list.tt2";
                 ELSE %]
                 <div class="opac-auto-171 opac-auto-097">[% l("You have not created a list yet."); %]</div>
                 [% END %]
diff --git a/Open-ILS/src/templates/default/opac/myopac/circ_history.tt2 b/Open-ILS/src/templates/opac/myopac/circ_history.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/opac/myopac/circ_history.tt2
rename to Open-ILS/src/templates/opac/myopac/circ_history.tt2
index d7c7989..feb5bfa 100644
--- a/Open-ILS/src/templates/default/opac/myopac/circ_history.tt2
+++ b/Open-ILS/src/templates/opac/myopac/circ_history.tt2
@@ -1,6 +1,6 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
     myopac_page = "circs"
     limit = ctx.circ_history_limit;
     offset = ctx.circ_history_offset;
diff --git a/Open-ILS/src/templates/default/opac/myopac/circs.tt2 b/Open-ILS/src/templates/opac/myopac/circs.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/opac/myopac/circs.tt2
rename to Open-ILS/src/templates/opac/myopac/circs.tt2
index c878524..4b474c1 100644
--- a/Open-ILS/src/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/src/templates/opac/myopac/circs.tt2
@@ -1,6 +1,6 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
     myopac_page = "circs"  %]
 <div id='myopac_checked_div' style="padding:0px;">
 
diff --git a/Open-ILS/src/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/src/templates/opac/myopac/hold_history.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/opac/myopac/hold_history.tt2
rename to Open-ILS/src/templates/opac/myopac/hold_history.tt2
index ca0ac59..9fdfd8b 100644
--- a/Open-ILS/src/templates/default/opac/myopac/hold_history.tt2
+++ b/Open-ILS/src/templates/opac/myopac/hold_history.tt2
@@ -1,6 +1,6 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
     myopac_page = "holds"  
     limit = ctx.hold_history_limit;
     offset = ctx.hold_history_offset;
diff --git a/Open-ILS/src/templates/default/opac/myopac/holds.tt2 b/Open-ILS/src/templates/opac/myopac/holds.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/opac/myopac/holds.tt2
rename to Open-ILS/src/templates/opac/myopac/holds.tt2
index e5f5c94..4690f67 100644
--- a/Open-ILS/src/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/src/templates/opac/myopac/holds.tt2
@@ -1,6 +1,6 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
     myopac_page = "holds"  %]
 <div id='myopac_holds_div'>
 
diff --git a/Open-ILS/src/templates/default/opac/myopac/holds/edit.tt2 b/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
similarity index 95%
rename from Open-ILS/src/templates/default/opac/myopac/holds/edit.tt2
rename to Open-ILS/src/templates/opac/myopac/holds/edit.tt2
index f432697..f0b1e52 100644
--- a/Open-ILS/src/templates/default/opac/myopac/holds/edit.tt2
+++ b/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
@@ -1,8 +1,7 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    PROCESS "default/opac/parts/org_selector.tt2";
-    WRAPPER "default/opac/parts/base.tt2" +
-        "default/opac/parts/myopac/base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    PROCESS "opac/parts/org_selector.tt2";
+    WRAPPER "opac/parts/base.tt2" + "opac/parts/myopac/base.tt2";
     myopac_page = "holds"; # in this case, just for tab coloring.
 
     hold = ctx.holds.0;
diff --git a/Open-ILS/src/templates/default/opac/myopac/lists.tt2 b/Open-ILS/src/templates/opac/myopac/lists.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/opac/myopac/lists.tt2
rename to Open-ILS/src/templates/opac/myopac/lists.tt2
index 0c4852f..9e1ba61 100644
--- a/Open-ILS/src/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/src/templates/opac/myopac/lists.tt2
@@ -1,6 +1,6 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
     myopac_page = "lists"  %]
 <div id='myopac_bookbag_div' style="padding:5px;">
 
@@ -51,7 +51,7 @@
         </table>
     </form>
 
-    [% INCLUDE "default/opac/parts/anon_list.tt2" %]
+    [% INCLUDE "opac/parts/anon_list.tt2" %]
     [% IF ctx.bookbags.size %]
     <div id='acct_lists_prime'>
         [% FOR bbag IN ctx.bookbags %]
diff --git a/Open-ILS/src/templates/default/opac/myopac/main.tt2 b/Open-ILS/src/templates/opac/myopac/main.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/opac/myopac/main.tt2
rename to Open-ILS/src/templates/opac/myopac/main.tt2
index 818d75c..9dbbabc 100644
--- a/Open-ILS/src/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/src/templates/opac/myopac/main.tt2
@@ -1,6 +1,6 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/main_base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/main_base.tt2";
     myopac_page = "main";
     myopac_main_page = "main";
 %]
diff --git a/Open-ILS/src/templates/default/opac/myopac/main_pay.tt2 b/Open-ILS/src/templates/opac/myopac/main_pay.tt2
similarity index 93%
rename from Open-ILS/src/templates/default/opac/myopac/main_pay.tt2
rename to Open-ILS/src/templates/opac/myopac/main_pay.tt2
index e1cfcbd..86ee7e8 100644
--- a/Open-ILS/src/templates/default/opac/myopac/main_pay.tt2
+++ b/Open-ILS/src/templates/opac/myopac/main_pay.tt2
@@ -1,6 +1,6 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
     myopac_page = "main";
     myopac_main_page = "pay" %]
 <div id="myopac_summary_div">
diff --git a/Open-ILS/src/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/src/templates/opac/myopac/main_payment_form.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/opac/myopac/main_payment_form.tt2
rename to Open-ILS/src/templates/opac/myopac/main_payment_form.tt2
index 55cf823..c54f4e0 100644
--- a/Open-ILS/src/templates/default/opac/myopac/main_payment_form.tt2
+++ b/Open-ILS/src/templates/opac/myopac/main_payment_form.tt2
@@ -1,6 +1,6 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/main_base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/main_base.tt2";
     myopac_page = "main";
     myopac_main_page = "payment_form";
 
@@ -177,7 +177,7 @@
                             onclick="history.go(-1);" />
                     </td>
                 </tr>
-                [% INCLUDE "default/opac/parts/myopac/main_refund_policy.tt2" %]
+                [% INCLUDE "opac/parts/myopac/main_refund_policy.tt2" %]
             </tbody>
         </table>
     [% END %]
diff --git a/Open-ILS/src/templates/default/opac/myopac/main_payments.tt2 b/Open-ILS/src/templates/opac/myopac/main_payments.tt2
similarity index 94%
rename from Open-ILS/src/templates/default/opac/myopac/main_payments.tt2
rename to Open-ILS/src/templates/opac/myopac/main_payments.tt2
index 80755fb..a30edeb 100644
--- a/Open-ILS/src/templates/default/opac/myopac/main_payments.tt2
+++ b/Open-ILS/src/templates/opac/myopac/main_payments.tt2
@@ -1,6 +1,6 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/main_base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/main_base.tt2";
     myopac_page = "main";
     myopac_main_page = "payments";
     limit = ctx.payment_history_limit;
diff --git a/Open-ILS/src/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/src/templates/opac/myopac/prefs.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/opac/myopac/prefs.tt2
rename to Open-ILS/src/templates/opac/myopac/prefs.tt2
index 2150fb1..2db15e5 100644
--- a/Open-ILS/src/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/src/templates/opac/myopac/prefs.tt2
@@ -1,5 +1,5 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    WRAPPER "default/opac/parts/myopac/prefs_base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/myopac/prefs_base.tt2";
     myopac_page = "prefs";
     prefs_page = 'personal' %]
 
diff --git a/Open-ILS/src/templates/default/opac/myopac/prefs_notify.tt2 b/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/opac/myopac/prefs_notify.tt2
rename to Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
index da3d520..91a3ce5 100644
--- a/Open-ILS/src/templates/default/opac/myopac/prefs_notify.tt2
+++ b/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
@@ -1,5 +1,5 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    WRAPPER "default/opac/parts/myopac/prefs_base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/myopac/prefs_base.tt2";
     myopac_page = "prefs_notify";
     prefs_page = 'notify' %]
 
diff --git a/Open-ILS/src/templates/default/opac/myopac/prefs_settings.tt2 b/Open-ILS/src/templates/opac/myopac/prefs_settings.tt2
similarity index 95%
rename from Open-ILS/src/templates/default/opac/myopac/prefs_settings.tt2
rename to Open-ILS/src/templates/opac/myopac/prefs_settings.tt2
index e664e91..fc5f846 100644
--- a/Open-ILS/src/templates/default/opac/myopac/prefs_settings.tt2
+++ b/Open-ILS/src/templates/opac/myopac/prefs_settings.tt2
@@ -1,5 +1,5 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    WRAPPER "default/opac/parts/myopac/prefs_base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/myopac/prefs_base.tt2";
     myopac_page = "prefs_notify";
     prefs_page = 'settings' %]
 
@@ -96,5 +96,5 @@
             </tbody>
         </table>
     </form>
-    [% INCLUDE "default/opac/parts/myopac/prefs_hints.tt2" %]
+    [% INCLUDE "opac/parts/myopac/prefs_hints.tt2" %]
 [% END %]
diff --git a/Open-ILS/src/templates/default/opac/myopac/receipt_email.tt2 b/Open-ILS/src/templates/opac/myopac/receipt_email.tt2
similarity index 80%
rename from Open-ILS/src/templates/default/opac/myopac/receipt_email.tt2
rename to Open-ILS/src/templates/opac/myopac/receipt_email.tt2
index 3745e5f..15b744f 100644
--- a/Open-ILS/src/templates/default/opac/myopac/receipt_email.tt2
+++ b/Open-ILS/src/templates/opac/myopac/receipt_email.tt2
@@ -1,6 +1,6 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
     myopac_page = "prefs"  %]
     [% IF ctx.email_receipt_result; # result should be undef on success %]
     <div class="payment-error">
diff --git a/Open-ILS/src/templates/default/opac/myopac/receipt_print.tt2 b/Open-ILS/src/templates/opac/myopac/receipt_print.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/myopac/receipt_print.tt2
rename to Open-ILS/src/templates/opac/myopac/receipt_print.tt2
diff --git a/Open-ILS/src/templates/default/opac/myopac/update_email.tt2 b/Open-ILS/src/templates/opac/myopac/update_email.tt2
similarity index 85%
rename from Open-ILS/src/templates/default/opac/myopac/update_email.tt2
rename to Open-ILS/src/templates/opac/myopac/update_email.tt2
index 6bbedf2..3b9b762 100644
--- a/Open-ILS/src/templates/default/opac/myopac/update_email.tt2
+++ b/Open-ILS/src/templates/opac/myopac/update_email.tt2
@@ -1,6 +1,6 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
     myopac_page = "prefs"  %]
 <div id='myopac_summary_div' style="padding:0px;">
 
diff --git a/Open-ILS/src/templates/default/opac/myopac/update_password.tt2 b/Open-ILS/src/templates/opac/myopac/update_password.tt2
similarity index 88%
rename from Open-ILS/src/templates/default/opac/myopac/update_password.tt2
rename to Open-ILS/src/templates/opac/myopac/update_password.tt2
index d248cdf..c4ad3de 100644
--- a/Open-ILS/src/templates/default/opac/myopac/update_password.tt2
+++ b/Open-ILS/src/templates/opac/myopac/update_password.tt2
@@ -1,6 +1,6 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
     myopac_page = "prefs"  %]
 
 <div id='myopac_summary_div' style="padding:0px;">
diff --git a/Open-ILS/src/templates/default/opac/myopac/update_username.tt2 b/Open-ILS/src/templates/opac/myopac/update_username.tt2
similarity index 87%
rename from Open-ILS/src/templates/default/opac/myopac/update_username.tt2
rename to Open-ILS/src/templates/opac/myopac/update_username.tt2
index 017d753..7455cc9 100644
--- a/Open-ILS/src/templates/default/opac/myopac/update_username.tt2
+++ b/Open-ILS/src/templates/opac/myopac/update_username.tt2
@@ -1,6 +1,6 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
     myopac_page = "prefs"  %]
 <div id='myopac_summary_div' style="padding:0px;">
 
diff --git a/Open-ILS/src/templates/default/opac/parts/advanced/expert.tt2 b/Open-ILS/src/templates/opac/parts/advanced/expert.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/advanced/expert.tt2
rename to Open-ILS/src/templates/opac/parts/advanced/expert.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2
similarity index 96%
rename from Open-ILS/src/templates/default/opac/parts/advanced/global_row.tt2
rename to Open-ILS/src/templates/opac/parts/advanced/global_row.tt2
index e523ec9..1598b69 100644
--- a/Open-ILS/src/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2
@@ -26,7 +26,7 @@
 
         <!-- keyword, subject, etc. selector -->
         <span class="qtype_selector_margin">
-            [% INCLUDE "default/opac/parts/qtype_selector.tt2"
+            [% INCLUDE "opac/parts/qtype_selector.tt2"
                 query_type=qtype %]
         </span>
 
diff --git a/Open-ILS/src/templates/default/opac/parts/advanced/numeric.tt2 b/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/advanced/numeric.tt2
rename to Open-ILS/src/templates/opac/parts/advanced/numeric.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
similarity index 93%
rename from Open-ILS/src/templates/default/opac/parts/advanced/search.tt2
rename to Open-ILS/src/templates/opac/parts/advanced/search.tt2
index 868e3ad..f856ce8 100644
--- a/Open-ILS/src/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
@@ -14,7 +14,7 @@
                     </tr>
                 </thead>
                 <tbody id='adv_global_tbody'>
-                    [% INCLUDE "default/opac/parts/advanced/global_row.tt2" %]
+                    [% INCLUDE "opac/parts/advanced/global_row.tt2" %]
                     <!-- add a new row -->
                     <tr id='adv_global_addrow'>
                         <td align='left' style="padding-top:7px;">
@@ -31,17 +31,17 @@
           <table cellpadding='10' cellspacing='0' border='0'><tr>
             <td valign='top'>
                 <strong>[% l("Item Type") %]</strong><br />
-                [%  INCLUDE "default/opac/parts/coded_value_selector.tt2"
+                [%  INCLUDE "opac/parts/coded_value_selector.tt2"
                         attr=["mattype", "item_type"] multiple="multiple" size="4" %]
             </td>
             <td valign='top'>
                 <strong>[% l("Language") %]</strong><br />
-                [%  INCLUDE "default/opac/parts/coded_value_selector.tt2"
+                [%  INCLUDE "opac/parts/coded_value_selector.tt2"
                         attr="item_lang" multiple="multiple" size="4" %]
             </td>
             <td valign='top'>
                 <strong>[% l("Audience") %]</strong><br />
-                    [% INCLUDE "default/opac/parts/coded_value_selector.tt2"
+                    [% INCLUDE "opac/parts/coded_value_selector.tt2"
                         attr="audience" multiple="multiple" size="4" %]
                 </select>
             </td>
@@ -50,7 +50,7 @@
               <table class='adv_global_filter_sort'>
                 <tr>
                     <td align='center' width='100%'>
-                        [% INCLUDE "default/opac/parts/filtersort.tt2"
+                        [% INCLUDE "opac/parts/filtersort.tt2"
                             value=CGI.param('sort') %]
                     </td>
                 </tr>
@@ -66,7 +66,7 @@
                     <tr>
                         <td valign='top'>
                             <strong>[% l("Search Library") %]</strong><br />
-                            [% PROCESS "default/opac/parts/org_selector.tt2";
+                            [% PROCESS "opac/parts/org_selector.tt2";
                                 PROCESS build_org_selector name='loc' value=loc %]
                             <div style="position:relative;top:7px;">
                                 <input type='checkbox' name="modifier"
diff --git a/Open-ILS/src/templates/default/opac/parts/anon_list.tt2 b/Open-ILS/src/templates/opac/parts/anon_list.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/anon_list.tt2
rename to Open-ILS/src/templates/opac/parts/anon_list.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/base.tt2 b/Open-ILS/src/templates/opac/parts/base.tt2
similarity index 84%
rename from Open-ILS/src/templates/default/opac/parts/base.tt2
rename to Open-ILS/src/templates/opac/parts/base.tt2
index 1fd0536..c66c74f 100644
--- a/Open-ILS/src/templates/default/opac/parts/base.tt2
+++ b/Open-ILS/src/templates/opac/parts/base.tt2
@@ -12,8 +12,8 @@
     </head>
     <body>
         [% content %] 
-        [% INCLUDE 'default/opac/parts/footer.tt2' %]
-        [% INCLUDE 'default/opac/parts/js.tt2' %]
-        [% INCLUDE 'default/opac/parts/chilifresh.tt2' %]
+        [% INCLUDE 'opac/parts/footer.tt2' %]
+        [% INCLUDE 'opac/parts/js.tt2' %]
+        [% INCLUDE 'opac/parts/chilifresh.tt2' %]
     </body>
 </html>
diff --git a/Open-ILS/src/templates/default/opac/parts/chilifresh.tt2 b/Open-ILS/src/templates/opac/parts/chilifresh.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/chilifresh.tt2
rename to Open-ILS/src/templates/opac/parts/chilifresh.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/coded_value_selector.tt2 b/Open-ILS/src/templates/opac/parts/coded_value_selector.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/coded_value_selector.tt2
rename to Open-ILS/src/templates/opac/parts/coded_value_selector.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/config.tt2
rename to Open-ILS/src/templates/opac/parts/config.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/filtersort.tt2 b/Open-ILS/src/templates/opac/parts/filtersort.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/filtersort.tt2
rename to Open-ILS/src/templates/opac/parts/filtersort.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/footer.tt2 b/Open-ILS/src/templates/opac/parts/footer.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/footer.tt2
rename to Open-ILS/src/templates/opac/parts/footer.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/header.tt2 b/Open-ILS/src/templates/opac/parts/header.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/header.tt2
rename to Open-ILS/src/templates/opac/parts/header.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/hold_error_messages.tt2 b/Open-ILS/src/templates/opac/parts/hold_error_messages.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/hold_error_messages.tt2
rename to Open-ILS/src/templates/opac/parts/hold_error_messages.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/homesearch.tt2 b/Open-ILS/src/templates/opac/parts/homesearch.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/homesearch.tt2
rename to Open-ILS/src/templates/opac/parts/homesearch.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/js.tt2 b/Open-ILS/src/templates/opac/parts/js.tt2
similarity index 95%
rename from Open-ILS/src/templates/default/opac/parts/js.tt2
rename to Open-ILS/src/templates/opac/parts/js.tt2
index b117131..22ae555 100644
--- a/Open-ILS/src/templates/default/opac/parts/js.tt2
+++ b/Open-ILS/src/templates/opac/parts/js.tt2
@@ -1,7 +1,7 @@
 <!-- JS imports, etc.  -->
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/opac/simple.js"></script>
 
-[%- PROCESS "default/opac/parts/config.tt2"; %]
+[%- PROCESS "opac/parts/config.tt2"; %]
 
 [%- IF ctx.is_staff %]
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/opac/staff.js"></script>
diff --git a/Open-ILS/src/templates/default/opac/parts/login/form.tt2 b/Open-ILS/src/templates/opac/parts/login/form.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/opac/parts/login/form.tt2
rename to Open-ILS/src/templates/opac/parts/login/form.tt2
index 15814ba..b22c616 100644
--- a/Open-ILS/src/templates/default/opac/parts/login/form.tt2
+++ b/Open-ILS/src/templates/opac/parts/login/form.tt2
@@ -116,7 +116,7 @@
                         <tr>
                             <td valign="top" class="lbl1">
                                 [% l('PIN Number or Password') %]<br />
-                                [% INCLUDE "default/opac/parts/login/password_hint.tt2" %]
+                                [% INCLUDE "opac/parts/login/password_hint.tt2" %]
                             </td>
                             <td valign="top">
                                 <div class="input_bg">
@@ -148,7 +148,7 @@
                     <br /><br />
                 </td>
 	            <td><div style="width:10px;"></div></td>
-                [% INCLUDE "default/opac/parts/login/help.tt2" %]
+                [% INCLUDE "opac/parts/login/help.tt2" %]
             </tr>
         </table>
     </form>
diff --git a/Open-ILS/src/templates/default/opac/parts/login/help.tt2 b/Open-ILS/src/templates/opac/parts/login/help.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/login/help.tt2
rename to Open-ILS/src/templates/opac/parts/login/help.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/login/password_hint.tt2 b/Open-ILS/src/templates/opac/parts/login/password_hint.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/login/password_hint.tt2
rename to Open-ILS/src/templates/opac/parts/login/password_hint.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/misc_util.tt2
rename to Open-ILS/src/templates/opac/parts/misc_util.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/myopac/base.tt2 b/Open-ILS/src/templates/opac/parts/myopac/base.tt2
similarity index 84%
rename from Open-ILS/src/templates/default/opac/parts/myopac/base.tt2
rename to Open-ILS/src/templates/opac/parts/myopac/base.tt2
index fccb14b..6a4e839 100644
--- a/Open-ILS/src/templates/default/opac/parts/myopac/base.tt2
+++ b/Open-ILS/src/templates/opac/parts/myopac/base.tt2
@@ -1,4 +1,4 @@
-[%  WRAPPER "default/opac/parts/base.tt2" %]
+[%  WRAPPER "opac/parts/base.tt2" %]
 
 [% myopac_pages = [
         {url => "main", name => "Account Summary"},
@@ -9,10 +9,10 @@
     ];
     skin_root = "../"
 %]
-    [% INCLUDE "default/opac/parts/topnav.tt2" %]
+    [% INCLUDE "opac/parts/topnav.tt2" %]
     <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/printnav.tt2" %]
-        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
+        [% INCLUDE "opac/parts/printnav.tt2" %]
+        [% INCLUDE "opac/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
         <div id="myopac_tabs">
diff --git a/Open-ILS/src/templates/default/opac/parts/myopac/main_base.tt2 b/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
similarity index 96%
rename from Open-ILS/src/templates/default/opac/parts/myopac/main_base.tt2
rename to Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
index 8356287..7eb9c71 100644
--- a/Open-ILS/src/templates/default/opac/parts/myopac/main_base.tt2
+++ b/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
@@ -1,6 +1,6 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/base.tt2";
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
 %]
 
 <div id='myopac_summary_div' style="padding:0px;">
diff --git a/Open-ILS/src/templates/default/opac/parts/myopac/main_refund_policy.tt2 b/Open-ILS/src/templates/opac/parts/myopac/main_refund_policy.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/myopac/main_refund_policy.tt2
rename to Open-ILS/src/templates/opac/parts/myopac/main_refund_policy.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/myopac/prefs_base.tt2 b/Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2
similarity index 95%
rename from Open-ILS/src/templates/default/opac/parts/myopac/prefs_base.tt2
rename to Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2
index fb896ad..0bd3eac 100644
--- a/Open-ILS/src/templates/default/opac/parts/myopac/prefs_base.tt2
+++ b/Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2
@@ -1,5 +1,5 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    WRAPPER "default/opac/parts/myopac/base.tt2"; %]
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2"; %]
 
 <div id='myopac_prefs_div'>
     <div id="acct_prefs_tabs" style="padding-bottom: 12px;color:#666;">
diff --git a/Open-ILS/src/templates/default/opac/parts/myopac/prefs_hints.tt2 b/Open-ILS/src/templates/opac/parts/myopac/prefs_hints.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/myopac/prefs_hints.tt2
rename to Open-ILS/src/templates/opac/parts/myopac/prefs_hints.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/org_selector.tt2 b/Open-ILS/src/templates/opac/parts/org_selector.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/org_selector.tt2
rename to Open-ILS/src/templates/opac/parts/org_selector.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/src/templates/opac/parts/place_hold.tt2
similarity index 95%
rename from Open-ILS/src/templates/default/opac/parts/place_hold.tt2
rename to Open-ILS/src/templates/opac/parts/place_hold.tt2
index f3a564c..e7b67cd 100644
--- a/Open-ILS/src/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/src/templates/opac/parts/place_hold.tt2
@@ -1,5 +1,5 @@
-[%  PROCESS "default/opac/parts/misc_util.tt2";
-    PROCESS "default/opac/parts/hold_error_messages.tt2";
+[%  PROCESS "opac/parts/misc_util.tt2";
+    PROCESS "opac/parts/hold_error_messages.tt2";
 %]
 
 <div id='holds_box' class='canvas' style='margin-top: 6px;'>
@@ -53,7 +53,7 @@
 
         <p>
             [% l('Pickup location:') %]
-            [% PROCESS "default/opac/parts/org_selector.tt2";
+            [% PROCESS "opac/parts/org_selector.tt2";
                 PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib id='pickup_lib' can_have_vols_only=1 %]
         </p>
         <p>
diff --git a/Open-ILS/src/templates/default/opac/parts/place_hold_result.tt2 b/Open-ILS/src/templates/opac/parts/place_hold_result.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/opac/parts/place_hold_result.tt2
rename to Open-ILS/src/templates/opac/parts/place_hold_result.tt2
index ac07c0d..794ecfa 100644
--- a/Open-ILS/src/templates/default/opac/parts/place_hold_result.tt2
+++ b/Open-ILS/src/templates/opac/parts/place_hold_result.tt2
@@ -1,5 +1,5 @@
-[%  PROCESS "default/opac/parts/misc_util.tt2";
-    PROCESS "default/opac/parts/hold_error_messages.tt2";
+[%  PROCESS "opac/parts/misc_util.tt2";
+    PROCESS "opac/parts/hold_error_messages.tt2";
     override_possible = 0;
 %]
 
diff --git a/Open-ILS/src/templates/default/opac/parts/printnav.tt2 b/Open-ILS/src/templates/opac/parts/printnav.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/printnav.tt2
rename to Open-ILS/src/templates/opac/parts/printnav.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/qtype_selector.tt2 b/Open-ILS/src/templates/opac/parts/qtype_selector.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/qtype_selector.tt2
rename to Open-ILS/src/templates/opac/parts/qtype_selector.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/record/authors.tt2 b/Open-ILS/src/templates/opac/parts/record/authors.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/record/authors.tt2
rename to Open-ILS/src/templates/opac/parts/record/authors.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/record/awards.tt2 b/Open-ILS/src/templates/opac/parts/record/awards.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/record/awards.tt2
rename to Open-ILS/src/templates/opac/parts/record/awards.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/record/body.tt2 b/Open-ILS/src/templates/opac/parts/record/body.tt2
similarity index 93%
rename from Open-ILS/src/templates/default/opac/parts/record/body.tt2
rename to Open-ILS/src/templates/opac/parts/record/body.tt2
index 3444a59..184bd7c 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/body.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/body.tt2
@@ -1,6 +1,6 @@
 <!-- ****************** page_rdetail.xml ***************************** -->
 [%  attrs = {marc_xml => ctx.marc_xml};
-    PROCESS "default/opac/parts/misc_util.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
     PROCESS get_marc_attrs args=attrs %]
 <div id='canvas_main' class='canvas'>
     <div id="rdetail_header" class="hide_me">[%#
@@ -41,8 +41,8 @@
         class='hide_me color_4' id='rdetail_deleted_exp'>
         [% l("This record has been deleted from the database.  We recommend that you remove this title from any bookbags it may have been added to.") %]
     </div>
-    [% INCLUDE "default/opac/parts/record/summary.tt2" %]
+    [% INCLUDE "opac/parts/record/summary.tt2" %]
     <br />
-    [% INCLUDE "default/opac/parts/record/extras.tt2" %]
+    [% INCLUDE "opac/parts/record/extras.tt2" %]
 </div>
 <!-- ****************** end; page_rdetail.xml ***************************** -->
diff --git a/Open-ILS/src/templates/default/opac/parts/record/cnbrowse.tt2 b/Open-ILS/src/templates/opac/parts/record/cnbrowse.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/record/cnbrowse.tt2
rename to Open-ILS/src/templates/opac/parts/record/cnbrowse.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/src/templates/opac/parts/record/extras.tt2
similarity index 97%
rename from Open-ILS/src/templates/default/opac/parts/record/extras.tt2
rename to Open-ILS/src/templates/opac/parts/record/extras.tt2
index ec9b62a..22751d2 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/extras.tt2
@@ -49,7 +49,7 @@
                         ctx.marchtml;
                     ELSE;
                         # Load the template for the selected extra
-                        INCLUDE "default/opac/parts/record/${name}.tt2";
+                        INCLUDE "opac/parts/record/${name}.tt2";
                     END;
                 END; 
             %]
diff --git a/Open-ILS/src/templates/default/opac/parts/record/issues.tt2 b/Open-ILS/src/templates/opac/parts/record/issues.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/record/issues.tt2
rename to Open-ILS/src/templates/opac/parts/record/issues.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/record/refworks.tt2 b/Open-ILS/src/templates/opac/parts/record/refworks.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/record/refworks.tt2
rename to Open-ILS/src/templates/opac/parts/record/refworks.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/record/series.tt2 b/Open-ILS/src/templates/opac/parts/record/series.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/record/series.tt2
rename to Open-ILS/src/templates/opac/parts/record/series.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/record/subjects.tt2 b/Open-ILS/src/templates/opac/parts/record/subjects.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/record/subjects.tt2
rename to Open-ILS/src/templates/opac/parts/record/subjects.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/opac/parts/record/summary.tt2
rename to Open-ILS/src/templates/opac/parts/record/summary.tt2
index 4a6d93f..a256d35 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2
@@ -1,4 +1,4 @@
-[%  PROCESS "default/opac/parts/misc_util.tt2";
+[%  PROCESS "opac/parts/misc_util.tt2";
     USE ResolverResolver;
     ctx.page_title = attrs.title | html
 %]
@@ -6,7 +6,7 @@
 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
 
 [%- IF ctx.refworks.enabled == 'true' %]
-    [% INCLUDE 'default/opac/parts/record/refworks.tt2' %]
+    [% INCLUDE 'opac/parts/record/refworks.tt2' %]
 [%- END %]
 
 <!-- This holds the record summary information -->
diff --git a/Open-ILS/src/templates/default/opac/parts/record/summaryplus.tt2 b/Open-ILS/src/templates/opac/parts/record/summaryplus.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/record/summaryplus.tt2
rename to Open-ILS/src/templates/opac/parts/record/summaryplus.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/result/lowhits.tt2 b/Open-ILS/src/templates/opac/parts/result/lowhits.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/opac/parts/result/lowhits.tt2
rename to Open-ILS/src/templates/opac/parts/result/lowhits.tt2
index 4d29419..fe2d160 100644
--- a/Open-ILS/src/templates/default/opac/parts/result/lowhits.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/lowhits.tt2
@@ -19,7 +19,7 @@
             </table>
         </div>
         <div style="float:right;width:353px;background:#ccc;padding:10px;margin-top:7px;">
-            [% INCLUDE "default/opac/parts/result/lowhits_purchase.tt2" %]
+            [% INCLUDE "opac/parts/result/lowhits_purchase.tt2" %]
             <p>
                 <strong>Keyword Search Tips</strong><br />
                 Try changing to <strong>Advanced Search</strong>.
diff --git a/Open-ILS/src/templates/default/opac/parts/result/lowhits_purchase.tt2 b/Open-ILS/src/templates/opac/parts/result/lowhits_purchase.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/result/lowhits_purchase.tt2
rename to Open-ILS/src/templates/opac/parts/result/lowhits_purchase.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/result/paginate.tt2 b/Open-ILS/src/templates/opac/parts/result/paginate.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/result/paginate.tt2
rename to Open-ILS/src/templates/opac/parts/result/paginate.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/opac/parts/result/table.tt2
rename to Open-ILS/src/templates/opac/parts/result/table.tt2
index 75751ff..ed58d26 100644
--- a/Open-ILS/src/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -1,4 +1,4 @@
-[%  PROCESS "default/opac/parts/misc_util.tt2";
+[%  PROCESS "opac/parts/misc_util.tt2";
 
     USE ResolverResolver;
 
@@ -11,7 +11,7 @@
 
 <div style="height: 10px;"></div>
 
-[% PROCESS "default/opac/parts/result/paginate.tt2" %] 
+[% PROCESS "opac/parts/result/paginate.tt2" %] 
 [% ctx.results_count_header = PROCESS results_count_header;
     ctx.results_count_header %]
 
diff --git a/Open-ILS/src/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2
similarity index 93%
rename from Open-ILS/src/templates/default/opac/parts/searchbar.tt2
rename to Open-ILS/src/templates/opac/parts/searchbar.tt2
index c39fd57..aec70db 100644
--- a/Open-ILS/src/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2
@@ -1,4 +1,4 @@
-[% PROCESS "default/opac/parts/org_selector.tt2" %]
+[% PROCESS "opac/parts/org_selector.tt2" %]
 <div id="search-box">    
     [% UNLESS took_care_of_form -%]
     <form action="[% ctx.opac_root %]/results" method="GET">
@@ -18,7 +18,7 @@
                 <input type="hidden" name="_adv" value="1" />
             [% ELSE %]
             <td>
-            [% INCLUDE "default/opac/parts/qtype_selector.tt2" %]
+            [% INCLUDE "opac/parts/qtype_selector.tt2" %]
             </td>
             [% END %]
             [% IF ctx.processed_search_query OR (NOT is_advanced AND NOT is_special) %]
@@ -49,7 +49,7 @@
         [% UNLESS is_advanced OR is_special %]
         <tr>
             <td>
-                [% INCLUDE "default/opac/parts/coded_value_selector.tt2" attr=["mattype", "item_type"] none_ok=1 none_label=l('All Formats') %]
+                [% INCLUDE "opac/parts/coded_value_selector.tt2" attr=["mattype", "item_type"] none_ok=1 none_label=l('All Formats') %]
             </td>
             <td>
                 <span id='depth_selector_span'>
diff --git a/Open-ILS/src/templates/default/opac/parts/tips.tt2 b/Open-ILS/src/templates/opac/parts/tips.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/tips.tt2
rename to Open-ILS/src/templates/opac/parts/tips.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/topnav.tt2 b/Open-ILS/src/templates/opac/parts/topnav.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/opac/parts/topnav.tt2
rename to Open-ILS/src/templates/opac/parts/topnav.tt2
index 5aaa7b8..19690fe 100644
--- a/Open-ILS/src/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/src/templates/opac/parts/topnav.tt2
@@ -1,7 +1,7 @@
 [% IF !ctx.is_staff %]
 <div id="header">
     <div class="float-left">
-        [% INCLUDE "default/opac/parts/topnav_logo.tt2" %]
+        [% INCLUDE "opac/parts/topnav_logo.tt2" %]
     </div>
     <div class="float-right">
         [% IF !ctx.user %]
@@ -103,4 +103,4 @@
     <div class="common-no-pad"></div>
 </div>
 [% END %]
-[% INCLUDE "default/opac/parts/topnav_links.tt2" %]
+[% INCLUDE "opac/parts/topnav_links.tt2" %]
diff --git a/Open-ILS/src/templates/default/opac/parts/topnav_links.tt2 b/Open-ILS/src/templates/opac/parts/topnav_links.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/topnav_links.tt2
rename to Open-ILS/src/templates/opac/parts/topnav_links.tt2
diff --git a/Open-ILS/src/templates/default/opac/parts/topnav_logo.tt2 b/Open-ILS/src/templates/opac/parts/topnav_logo.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/opac/parts/topnav_logo.tt2
rename to Open-ILS/src/templates/opac/parts/topnav_logo.tt2
diff --git a/Open-ILS/src/templates/opac/place_hold.tt2 b/Open-ILS/src/templates/opac/place_hold.tt2
new file mode 100644
index 0000000..bbe6951
--- /dev/null
+++ b/Open-ILS/src/templates/opac/place_hold.tt2
@@ -0,0 +1,20 @@
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/base.tt2";
+    INCLUDE "opac/parts/topnav.tt2";
+    ctx.page_title = l("Place Hold") %]
+    <div id="search-wrapper">
+        [% INCLUDE "opac/parts/printnav.tt2" %]
+        [% INCLUDE "opac/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content">
+            <div class="common-full-pad"></div>	
+            [% IF ctx.hold_attempt_made %]
+                [% INCLUDE "opac/parts/place_hold_result.tt2" %]
+            [% ELSE %]
+                [% INCLUDE "opac/parts/place_hold.tt2" %]
+            [% END %]
+            <div class="common-full-pad"></div>	
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/src/templates/opac/record.tt2 b/Open-ILS/src/templates/opac/record.tt2
new file mode 100644
index 0000000..7434865
--- /dev/null
+++ b/Open-ILS/src/templates/opac/record.tt2
@@ -0,0 +1,16 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/config.tt2";
+    WRAPPER "opac/parts/base.tt2";
+    INCLUDE "opac/parts/topnav.tt2";
+    ctx.page_title = l("Record Detail") %]
+    <div id="search-wrapper">
+        [% INCLUDE "opac/parts/printnav.tt2" %]
+        [% INCLUDE "opac/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper" class="content-wrapper-record-page">
+        <div id="main-content">
+            [% INCLUDE "opac/parts/record/body.tt2" %]
+            <div class="common-full-pad"></div>	
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/src/templates/default/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2
similarity index 89%
rename from Open-ILS/src/templates/default/opac/results.tt2
rename to Open-ILS/src/templates/opac/results.tt2
index bfe9633..803a070 100644
--- a/Open-ILS/src/templates/default/opac/results.tt2
+++ b/Open-ILS/src/templates/opac/results.tt2
@@ -1,8 +1,8 @@
-[%  PROCESS "default/opac/parts/header.tt2";
+[%  PROCESS "opac/parts/header.tt2";
     USE POSIX;
 
-    WRAPPER "default/opac/parts/base.tt2";
-    INCLUDE "default/opac/parts/topnav.tt2";
+    WRAPPER "opac/parts/base.tt2";
+    INCLUDE "opac/parts/topnav.tt2";
 
     IF is_advanced || is_special;
         ctx.page_title = l("Search Results");
@@ -17,8 +17,8 @@
 %]
     <form action="[% ctx.opac_root %]/results" method="GET">
     <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/printnav.tt2" %]
-        [% INCLUDE "default/opac/parts/searchbar.tt2" took_care_of_form=1 %]
+        [% INCLUDE "opac/parts/printnav.tt2" %]
+        [% INCLUDE "opac/parts/searchbar.tt2" took_care_of_form=1 %]
     </div>
     <div class="almost-content-wrapper">
         <div id="results_header_bar">
@@ -46,7 +46,7 @@
                 [% END %]
                 <div class="results_header_div"></div>
                     <div class="results_header_lbl">[% l('Sort by') %]</div>
-                    [% INCLUDE "default/opac/parts/filtersort.tt2" value=CGI.param('sort') %]
+                    [% INCLUDE "opac/parts/filtersort.tt2" value=CGI.param('sort') %]
                     <div class="results_header_div"></div>
 
                     <div class='results_header_sel' id='simple-detail-view-links'>
@@ -73,7 +73,7 @@
     <div id="content-wrapper">
         <div id="main-content">
             <div id="tehResultsPage">
-                [% path = "default/opac/parts/result/" _
+                [% path = "opac/parts/result/" _
                     (ctx.records.size ? "table.tt2" : "lowhits.tt2");
                 INCLUDE $path %]
             </div>
diff --git a/Open-ILS/src/templates/default/serial/list_item.tt2 b/Open-ILS/src/templates/serial/list_item.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/serial/list_item.tt2
rename to Open-ILS/src/templates/serial/list_item.tt2
index e182c03..edbbb82 100644
--- a/Open-ILS/src/templates/default/serial/list_item.tt2
+++ b/Open-ILS/src/templates/serial/list_item.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = "Items" %]
 [% BLOCK status_values %]
                 <option value="Expected">Expected</option>
diff --git a/Open-ILS/src/templates/default/serial/list_stream.tt2 b/Open-ILS/src/templates/serial/list_stream.tt2
similarity index 99%
rename from Open-ILS/src/templates/default/serial/list_stream.tt2
rename to Open-ILS/src/templates/serial/list_stream.tt2
index 52e641c..7aedaf2 100644
--- a/Open-ILS/src/templates/default/serial/list_stream.tt2
+++ b/Open-ILS/src/templates/serial/list_stream.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = "Streams" %]
 <style type="text/css">
     #new-srlu-table { width: 100%; }
diff --git a/Open-ILS/src/templates/default/serial/list_subscription.tt2 b/Open-ILS/src/templates/serial/list_subscription.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/serial/list_subscription.tt2
rename to Open-ILS/src/templates/serial/list_subscription.tt2
index f7c2dfc..42e43ec 100644
--- a/Open-ILS/src/templates/default/serial/list_subscription.tt2
+++ b/Open-ILS/src/templates/serial/list_subscription.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = "Subscriptions" %]
 <script
     type="text/javascript"
diff --git a/Open-ILS/src/templates/default/serial/print_routing_list_users.tt2 b/Open-ILS/src/templates/serial/print_routing_list_users.tt2
similarity index 98%
rename from Open-ILS/src/templates/default/serial/print_routing_list_users.tt2
rename to Open-ILS/src/templates/serial/print_routing_list_users.tt2
index 31d76c1..c3942fb 100644
--- a/Open-ILS/src/templates/default/serial/print_routing_list_users.tt2
+++ b/Open-ILS/src/templates/serial/print_routing_list_users.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER default/base.tt2 %]
+[% WRAPPER base.tt2 %]
 [% ctx.page_title = "Serial Routing List" %]
 <div class="hidden">
     <div id="list_template">
diff --git a/Open-ILS/src/templates/default/serial/subscription.tt2 b/Open-ILS/src/templates/serial/subscription.tt2
similarity index 96%
rename from Open-ILS/src/templates/default/serial/subscription.tt2
rename to Open-ILS/src/templates/serial/subscription.tt2
index 95a5f8d..c835d39 100644
--- a/Open-ILS/src/templates/default/serial/subscription.tt2
+++ b/Open-ILS/src/templates/serial/subscription.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER "default/base.tt2" %]
+[% WRAPPER "base.tt2" %]
 <script>
     var cap_editor;
     var cap_importer;
@@ -75,7 +75,7 @@
                     });
             }
         </script>
-        [% INCLUDE "default/serial/subscription/distribution.tt2" %]
+        [% INCLUDE "serial/subscription/distribution.tt2" %]
     </div>
 
     <!-- Caption/Pattern -->
@@ -87,7 +87,7 @@
                 cap_importer = new SCAPImporter(sub);
             }
         </script>
-        [% INCLUDE "default/serial/subscription/caption_and_pattern.tt2" %]
+        [% INCLUDE "serial/subscription/caption_and_pattern.tt2" %]
     </div>
 
     <!-- Issuances -->
@@ -129,7 +129,7 @@
             }
             fresh_scap_selector(iss_grid);
         </script>
-        [% INCLUDE "default/serial/subscription/issuance.tt2" %]
+        [% INCLUDE "serial/subscription/issuance.tt2" %]
     </div>
 </div>
 <div class="hidden">
diff --git a/Open-ILS/src/templates/default/serial/subscription/caption_and_pattern.tt2 b/Open-ILS/src/templates/serial/subscription/caption_and_pattern.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/serial/subscription/caption_and_pattern.tt2
rename to Open-ILS/src/templates/serial/subscription/caption_and_pattern.tt2
diff --git a/Open-ILS/src/templates/default/serial/subscription/distribution.tt2 b/Open-ILS/src/templates/serial/subscription/distribution.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/serial/subscription/distribution.tt2
rename to Open-ILS/src/templates/serial/subscription/distribution.tt2
diff --git a/Open-ILS/src/templates/default/serial/subscription/issuance.tt2 b/Open-ILS/src/templates/serial/subscription/issuance.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/serial/subscription/issuance.tt2
rename to Open-ILS/src/templates/serial/subscription/issuance.tt2
diff --git a/Open-ILS/src/templates/default/vandelay/inc/attrs.tt2 b/Open-ILS/src/templates/vandelay/inc/attrs.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/vandelay/inc/attrs.tt2
rename to Open-ILS/src/templates/vandelay/inc/attrs.tt2
diff --git a/Open-ILS/src/templates/default/vandelay/inc/export.tt2 b/Open-ILS/src/templates/vandelay/inc/export.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/vandelay/inc/export.tt2
rename to Open-ILS/src/templates/vandelay/inc/export.tt2
diff --git a/Open-ILS/src/templates/default/vandelay/inc/import_errors.tt2 b/Open-ILS/src/templates/vandelay/inc/import_errors.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/vandelay/inc/import_errors.tt2
rename to Open-ILS/src/templates/vandelay/inc/import_errors.tt2
diff --git a/Open-ILS/src/templates/default/vandelay/inc/item_attrs.tt2 b/Open-ILS/src/templates/vandelay/inc/item_attrs.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/vandelay/inc/item_attrs.tt2
rename to Open-ILS/src/templates/vandelay/inc/item_attrs.tt2
diff --git a/Open-ILS/src/templates/default/vandelay/inc/marchtml.tt2 b/Open-ILS/src/templates/vandelay/inc/marchtml.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/vandelay/inc/marchtml.tt2
rename to Open-ILS/src/templates/vandelay/inc/marchtml.tt2
diff --git a/Open-ILS/src/templates/default/vandelay/inc/matches.tt2 b/Open-ILS/src/templates/vandelay/inc/matches.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/vandelay/inc/matches.tt2
rename to Open-ILS/src/templates/vandelay/inc/matches.tt2
diff --git a/Open-ILS/src/templates/default/vandelay/inc/profiles.tt2 b/Open-ILS/src/templates/vandelay/inc/profiles.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/vandelay/inc/profiles.tt2
rename to Open-ILS/src/templates/vandelay/inc/profiles.tt2
diff --git a/Open-ILS/src/templates/default/vandelay/inc/progress.tt2 b/Open-ILS/src/templates/vandelay/inc/progress.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/vandelay/inc/progress.tt2
rename to Open-ILS/src/templates/vandelay/inc/progress.tt2
diff --git a/Open-ILS/src/templates/default/vandelay/inc/queue.tt2 b/Open-ILS/src/templates/vandelay/inc/queue.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/vandelay/inc/queue.tt2
rename to Open-ILS/src/templates/vandelay/inc/queue.tt2
diff --git a/Open-ILS/src/templates/default/vandelay/inc/queueselect.tt2 b/Open-ILS/src/templates/vandelay/inc/queueselect.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/vandelay/inc/queueselect.tt2
rename to Open-ILS/src/templates/vandelay/inc/queueselect.tt2
diff --git a/Open-ILS/src/templates/default/vandelay/inc/toolbar.tt2 b/Open-ILS/src/templates/vandelay/inc/toolbar.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/vandelay/inc/toolbar.tt2
rename to Open-ILS/src/templates/vandelay/inc/toolbar.tt2
diff --git a/Open-ILS/src/templates/default/vandelay/inc/upload.tt2 b/Open-ILS/src/templates/vandelay/inc/upload.tt2
similarity index 100%
rename from Open-ILS/src/templates/default/vandelay/inc/upload.tt2
rename to Open-ILS/src/templates/vandelay/inc/upload.tt2
diff --git a/Open-ILS/src/templates/default/vandelay/vandelay.tt2 b/Open-ILS/src/templates/vandelay/vandelay.tt2
similarity index 74%
rename from Open-ILS/src/templates/default/vandelay/vandelay.tt2
rename to Open-ILS/src/templates/vandelay/vandelay.tt2
index 78f23a8..7aaac3f 100644
--- a/Open-ILS/src/templates/default/vandelay/vandelay.tt2
+++ b/Open-ILS/src/templates/vandelay/vandelay.tt2
@@ -1,4 +1,4 @@
-[% WRAPPER 'default/base.tt2' %]
+[% WRAPPER 'base.tt2' %]
 [% ctx.page_title = 'MARC Import/Export' %]
 [% ctx.dtd = '<!DOCTYPE html SYSTEM "'_ ctx.web_dir _'/opac/locale/' _ ctx.locale _ '/vandelay.dtd">' %]
 
@@ -7,43 +7,43 @@
 <link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/theme/[% ctx.skin %]/vandelay.css'/>
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign='top' id="vl-nav-bar" style="visibility: hidden;">
-    [% INCLUDE 'default/vandelay/inc/toolbar.tt2' %]
+    [% INCLUDE 'vandelay/inc/toolbar.tt2' %]
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
-    [% INCLUDE 'default/vandelay/inc/progress.tt2' %]
+    [% INCLUDE 'vandelay/inc/progress.tt2' %]
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-marc-export-div' class='hidden content'>
-    [% INCLUDE 'default/vandelay/inc/export.tt2' %]
+    [% INCLUDE 'vandelay/inc/export.tt2' %]
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-marc-upload-div' class='hidden content'>
-    [% INCLUDE 'default/vandelay/inc/upload.tt2' %]
+    [% INCLUDE 'vandelay/inc/upload.tt2' %]
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-queue-div' class='hidden content'>
-    [% INCLUDE 'default/vandelay/inc/queue.tt2' %]
+    [% INCLUDE 'vandelay/inc/queue.tt2' %]
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-match-div' class='hidden content'>
-    [% INCLUDE 'default/vandelay/inc/matches.tt2' %]
+    [% INCLUDE 'vandelay/inc/matches.tt2' %]
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-marc-html-div' class='hidden content'>
-    [% INCLUDE 'default/vandelay/inc/marchtml.tt2' %]
+    [% INCLUDE 'vandelay/inc/marchtml.tt2' %]
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-queue-select-div' class='hidden content'>
-    [% INCLUDE 'default/vandelay/inc/queueselect.tt2' %]
+    [% INCLUDE 'vandelay/inc/queueselect.tt2' %]
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client"  id="vl-attr-editor-div" 
         class='hidden attr-editor-detail-content-pane content' title='&vandelay.edit.attrs;'>
-    [% INCLUDE 'default/vandelay/inc/attrs.tt2' %]
+    [% INCLUDE 'vandelay/inc/attrs.tt2' %]
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-profile-editor-div' class='hidden content'>
-    [% INCLUDE 'default/vandelay/inc/profiles.tt2' %]
+    [% INCLUDE 'vandelay/inc/profiles.tt2' %]
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-match-set-editor-div' class='hidden content'>
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-item-attr-editor-div' class='hidden content'>
-    [% INCLUDE 'default/vandelay/inc/item_attrs.tt2' %]
+    [% INCLUDE 'vandelay/inc/item_attrs.tt2' %]
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-import-error-div' class='hidden content'>
-    [% INCLUDE 'default/vandelay/inc/import_errors.tt2' %]
+    [% INCLUDE 'vandelay/inc/import_errors.tt2' %]
 </div>
 
 

commit 5c86e9989a8d6076ddb206faaf29815dbe4ec828
Merge: e7b515a b5579de
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Sep 1 09:27:45 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge


commit e7b515aa363e3990fdbe7f5b6104999911e568a8
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Sep 1 08:44:20 2011 -0400

    Removed (very) old, unused template files
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/strings/ex.ttk b/Open-ILS/src/templates/strings/ex.ttk
deleted file mode 100644
index b41820e..0000000
--- a/Open-ILS/src/templates/strings/ex.ttk
+++ /dev/null
@@ -1,53 +0,0 @@
-[%-
-	# ------------------------------------------------------------------	
-	# return macro... ignore me.
-	# ------------------------------------------------------------------
-	MACRO ret(str) PROCESS ret_block s=str;
-	BLOCK ret_block;
-		s;
-		STOP;
-	END;
-	# ------------------------------------------------------------------
--%]
-
-
-
-
-[%-
-	# ------------------------------------------------------------------	
-	# RULES
-	# ------------------------------------------------------------------
-
-	IF type == ex_types.SEARCH_TOO_LARGE;
-		ret("Search term is too broad, please narrow your search");	END;
-
-	IF type == ex_types.UNKNOWN_BARCODE;
-		ret("Barcode does not exist in the database");	END;
-
-	IF type == ex_types.DUPLICATE_INVALID_USER_BARCODE;
-		ret("Barcode is a duplicate or is not valid");	END;
-
-	IF type == ex_types.DUPLICATE_USER_USERNAME;
-		ret("Username is a duplicate");	END;
-
-	IF type == ex_types.USER_WRONG_PASSWORD;
-		ret("Password is incorrect");	END;
-
-	IF type == ex_types.UNKNOWN_USER;
-		ret("User is not recognized"); END;
-
-	IF type == ex_types.MAX_RENEWALS_REACHED;
-		ret("The maximun number of renewals has been reached"); END;
-
-	IF type == ex_types.COPY_NEEDED_FOR_HOLD;
-		ret("Copy is needed to fulfill a hold"); END;
-
-	IF type == ex_types.NO_HOLD_FOUND;
-		ret("The requested hold could not be found"); END;
-
-	IF type == ex_types.NO_TRANSACTION_FOUND;
-		ret("The requested transaction could not be found"); END;
-
-	ret("Unknown exception occured");
-
--%]
diff --git a/Open-ILS/src/templates/strings/perm.ttk b/Open-ILS/src/templates/strings/perm.ttk
deleted file mode 100644
index 01de49e..0000000
--- a/Open-ILS/src/templates/strings/perm.ttk
+++ /dev/null
@@ -1,29 +0,0 @@
-[%-
-	# ------------------------------------------------------------------	
-	# return macro... 
-	# ------------------------------------------------------------------
-	MACRO ret(str) PROCESS ret_block s=str;
-	BLOCK ret_block; "Permission Denied: " _ s; STOP; END;
-	# ------------------------------------------------------------------
--%]
-
-[%
-
-	perm_map = {};
-	perm_map.EDIT_MARC = "MARC Editing";
-	perm_map.OPAC_LOGIN = "OPAC Login";
-	perm_map.STAFF_LOGIN = "STAFF Login";
-	perm_map.COPY_HOLDS = "Copy level holds";
-	perm_map.VOLUME_HOLDS = "Volume level holds";
-	perm_map.TITLE_HOLDS = "Title level holds";
-	perm_map.MR_HOLDS = "Metarecord/Title Group level holds";
-	perm_map.REQUEST_HOLDS = "Requesting a hold for another user";
-	perm_map.REQUEST_HOLDS_OVERRIDE = "Requesting a dissallowed hold for another user";
-	perm_map.RENEW_HOLD_OVERRIDE = "Requesting renew for copy needed for hold";
-	perm_map.CREATE_VOLUME = "Creating a new volume";
-
-
-	ret(perm_map.$type);
-
-%]
-

commit 514d6e5878d46971b012a08b4582c1880d98daca
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 31 17:13:23 2011 -0400

    TPac: more cleanup of unused IDs and files
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/default/opac/parts/record/cn_details.tt2 b/Open-ILS/src/templates/default/opac/parts/record/cn_details.tt2
deleted file mode 100644
index ea48f3e..0000000
--- a/Open-ILS/src/templates/default/opac/parts/record/cn_details.tt2
+++ /dev/null
@@ -1,91 +0,0 @@
-<table class="hide_me">
-    <tbody>
-        <tr class='opac-auto-009' id='rdetail_volume_details_row' templateRow='1'>
-            <td colspan='10'>
-                <div style='text-align: center; margin-top: 6px; margin-bottom: 6px'>
-                    <a name='print' href='#' class='classic_link'>[% l("print these details") %]</a>
-                    <table class='data_grid data_grid_center' style='width: 100%'>
-                        <tbody name='copies_tbody' class='copy_details_table' width='100%'>
-
-                                <!-- XXX keeping for now for reference...
-                                <td>
-                                    <span name='barcode'> </span>
-                                    <a class='hide_me classic_link copy_more_info'
-                                        name='details_link'>[% l("more info...") %]</a>
-                                    <a class='hide_me classic_link copy_more_info'
-                                        name='less_details_link'>[% l("less info") %]</a>
-                                    <a class='hide_me classic_link copy_more_info'
-                                        name='copy_hold_link' href='#'>[% l("place hold") %]</a>
-                                </td>
-                                <td name='status'> </td>
-                                <td name='location'> </td>
-                                <td name='age_protect_value' class='hide_me'>[% l("- Disabled -") %]</td>
-                                <td name='create_date_value' class='hide_me'> </td>
-                                <td name='copy_holdable_td' class='hide_me'>
-                                    <span name='copy_is_holdable'> </span>
-                                </td>
-                                <td name='copy_due_date_td' class='hide_me'>
-                                    <span name='copy_due_date'> </span>
-                                </td>
-                            </tr>
-                                -->
-
-                            <tr name='copy_extras_row' class='hide_me'>
-                                <td colspan='10'>
-                                    <table width='100%' class='data_grid'>
-                                        <tbody name='extras_tbody'>
-                                            <tr name='extras_row' class='hide_me'>
-                                                <td name='type' width='20%'>
-                                                    <span name='note' class='hide_me'>
-                                                        <b>[% l("Copy Note") %]</b>
-                                                    </span>
-                                                    <span name='cat' class='hide_me'>
-                                                        <b>[% l("Copy Category") %]</b>
-                                                    </span>
-                                                </td>
-                                                <td>
-                                                    <span name='key'> </span> : <span name='value'> </span>
-                                                </td>
-                                            </tr>
-                                        </tbody>
-                                    </table>
-                                </td>
-                            </tr>
-                        </tbody>
-                    </table>
-                </div>
-            </td>
-        </tr>
-    </tbody>
-</table>
-
-<span class='hide_me' id='rdetail.yes'>[% l("Yes") %]</span>
-<span class='hide_me' id='rdetail.no'>[% l("No") %]</span>
-
-<div id='rdetail_print_details' class='hide_me'>
-    <div style='text-align: center; padding: 20px; width: 100%'>
-        <div style='width:100%; border: 2px solid #E0F0E0; margin-bottom: 20px;'>
-            <input type='submit' value='[% l("Print Page") %]' onclick='window.print();' />
-        </div>
-        <div name='body'>
-            <table>
-                <tbody name='tbody'>
-                    <tr><td>[% l("Library") %]</td><td colspan='2' name='lib'></td></tr>
-                    <tr><td>[% l("Title") %]</td><td colspan='2' name='title'></td></tr>
-                    <tr><td>[% l("Author") %]</td><td colspan='2' name='author'></td></tr>
-                    <tr><td>[% l("Edition") %]</td><td colspan='2' name='edition'></td></tr>
-                    <tr><td>[% l("Publication Date") %]</td><td colspan='2' name='pubdate'></td></tr>
-                    <tr><td>[% l("Publisher") %]</td><td colspan='2' name='publisher'></td></tr>
-                    <tr><td>[% l("Physical Description") %]</td><td colspan='2' name='phys'></td></tr>
-                    <tr>
-                        <td colspan='3' class='rdetail_print_details_cn_spacer'> </td>
-                    </tr>
-                    <tr name='cnrow'>
-                        <td><b>[% l("Call Number") %]</b></td>
-                        <td><b colspan='2' name='cn'></b></td>
-                    </tr>
-                </tbody>
-            </table>
-        </div>
-    </div>
-</div>
diff --git a/Open-ILS/src/templates/default/opac/parts/record/cnbrowse.tt2 b/Open-ILS/src/templates/default/opac/parts/record/cnbrowse.tt2
index 1b83642..b9498bb 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/cnbrowse.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/cnbrowse.tt2
@@ -13,17 +13,17 @@
             <thead>
                 <tr>
                     <td>
-                        <a id='cn_browse_prev' class='classic_link' 
+                        <a class='classic_link' 
                             href="[% mkurl('', {cnoffset => cnoffset - 1}) %]#cnbrowse"><b>[% l("&lt;&lt; Previous Page") %]</b></a>
                     </td>
                     <td colspan='1' align='center'>[% l("Shelf Browser") %]</td>
                     <td>
-                        <a id='cn_browse_next' class='classic_link' 
+                        <a class='classic_link' 
                             href="[% mkurl('', {cnoffset => cnoffset + 1}) %]#cnbrowse"><b>[% l("Next Page &gt;&gt;") %]</b></a>
                     </td>
                 </tr>
             </thead>
-            <tbody id='cn_tbody'>
+            <tbody>
             [% tr_open = 0; FOR cn IN ctx.browsed_call_numbers %]
                 [%- IF loop.index % 3 == 0; tr_open = 1 %]
                 <tr class='cn_browse_row'>
diff --git a/Open-ILS/src/templates/default/opac/parts/record/copyinfo.tt2 b/Open-ILS/src/templates/default/opac/parts/record/copyinfo.tt2
deleted file mode 100644
index 9d4673f..0000000
--- a/Open-ILS/src/templates/default/opac/parts/record/copyinfo.tt2
+++ /dev/null
@@ -1,68 +0,0 @@
-<!-- ****************** rdetail_copyinfo.xml ***************************** -->
-<div id='rdetail_copy_info_div' class='rdetail_extras_div hide_me'>
-    <div style='width: 100%; text-align: center; padding-bottom: 5px;'>
-        <span>
-            <a href='javascript:void(0);' id='copy_info_local_link' 
-                class='rdetail_copy_nav_link hide_me classic_link'><b>[% l("View Copy Information for this location only") %]</b></a>
-        </span>
-        <span width=''>
-            <a href='javascript:void(0);' id='copy_info_all_link' 
-                class='rdetail_copy_nav_link classic_link'><b>[% l("View copy information for all libraries") %]</b></a>
-        </span>
-    </div>
-    <table id='rdetail_copy_info_table' class='data_grid'>
-        <thead>
-            <tr>
-                <td class='rdetail_copy_info_header_cell'>[% l("Library") %]</td>
-                <td class='rdetail_copy_info_header_cell'>[% l("Callnumber") %]</td>
-                <td name='rdetail_copylocation_header' class='rdetail_copy_info_header_cell hide_me'>
-                    [% l("Copy Location") %]
-                </td>
-                <td class='rdetail_copy_info_header_cell'>[% l("Actions") %]</td>
-                <td nowrap='nowrap' class='rdetail_copy_info_header_cell' id='rdetail_copy_info_status'> 
-                    <div name='rdetail_status_cell'> </div>
-                </td>
-            </tr>
-        </thead>
-        <tbody id='rdetail_copy_info_tbody'>
-            <tr id='rdetail_copy_info_row' class='hide_me'>
-                <td name='rdetail_library_cell'>
-                    <a name='lib_print_link' class='hide_me classic_link'
-                        style='font-size: 8pt; padding-left: 20px;'>[% l("Print Call Numbers for this library") %]</a>
-                </td>
-                <td name='rdetail_callnumber_cell'> </td>
-                <td class="hide_me" name='rdetail_copylocation_cell'> </td>
-                <td name='rdetail_actions_cell'> 
-                    <div style='padding-bottom: 1px;'>
-                        <a style='font-size: 8pt;'
-                            name='details' class='hide_me classic_link'>[% l("Copy Details") %]</a>
-                    </div>
-                    <div style='margin-top: 2px;'>
-                        <a name='browse' style='font-size: 8pt;'
-                            class='hide_me classic_link'>[% l("Browse Call Numbers") %]</a>
-                    </div>
-                    <div style='margin-top: 2px;' name='hold_div' class='hide_me'>
-                        <a name='hold' style='font-size: 8pt;' href='javascript:void(0);'
-                            class='classic_link'>[% l("Place Hold") %]</a>
-                    </div>
-                </td>
-                <td nowrap='nowrap' class='rdetail_copy_count_cell vertical' 
-                    name='rdetail_copy_count_cell'>
-                </td>
-            </tr>
-            <tr id='rdetail_copy_info_loading'>
-                <td>
-                    [% l("Loading copy information...") %]
-                </td>
-            </tr>
-        </tbody>
-    </table>
-    <!-- <table class='hide_me'>
-        <tbody>
-        <tr class='opac-auto-009' id='rdetail_volume_details_row'><td colspan='10'></td></tr>
-        </tbody>
-    </table> -->
-    <br/><br/>
-    <div id='rdetail_copy_info_none' class='hide_me'>[% l(" * There are no copies in this location") %]</div>
-</div> <!-- copy info -->
-<!-- ****************** end: rdetail_copyinfo.xml ***************************** -->
diff --git a/Open-ILS/src/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/src/templates/default/opac/parts/record/extras.tt2
index a800317..ec9b62a 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/extras.tt2
@@ -1,4 +1,4 @@
-<div id="rdetail_main_div">
+<div>
     <div id='rdetail_extras_div' style='width: 100%;'> 
 
         [%  # Hidden extras are not yet implemented.  Some may require JS
@@ -26,7 +26,6 @@
             {name => 'issues',   label => l('Issues Held'), hide => !ctx.have_holdings_to_show},
             {name => 'preview',  label => l('Preview'), hide => 1}, 
             {name => 'cnbrowse', label => l('Shelf Browser')},
-            {name => 'copyinfo', label => l('Copy Summary'), hide => 1}, 
             {name => 'marchtml', label => l('MARC Record')}
         ];
 
@@ -57,9 +56,4 @@
         </div>
         [% END %]
     </div>
-    <!--
-    <div id='rdetail_preview_full_text' class='hide_me'>[% l("Full text") %]</div>
-    <div id='rdetail_preview_title' class='hide_me'>[% l("See the full text of this book.") %]</div>
-    <div id='rdetail_preview_badge' class='hide_me'>[% l("Show a preview of this book from Google Book Search") %]</div>
-    -->
 </div>
diff --git a/Open-ILS/src/templates/default/opac/parts/record/issues.tt2 b/Open-ILS/src/templates/default/opac/parts/record/issues.tt2
index 551567d..e13efb2 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/issues.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/issues.tt2
@@ -1,4 +1,4 @@
-<div id='rdetail_issues_div' class='rdetail_extras_div'>
+<div class='rdetail_extras_div'>
 [%
 base_expando = ctx.full_path _ "?expand=issues";
 FOREACH type IN ctx.holding_summaries.keys;
diff --git a/Open-ILS/src/templates/default/opac/parts/record/series.tt2 b/Open-ILS/src/templates/default/opac/parts/record/series.tt2
index cdfe588..edf99ba 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/series.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/series.tt2
@@ -3,7 +3,7 @@
     loc = CGI.param('loc');
 %]
 
-<div id='rdetail_series_div'>
+<div>
     <table cellpadding="0" cellspacing="0" border="0">
     [%  FOR tag IN series_tags; %]
         <tr><td style='padding-top:5px;'>
diff --git a/Open-ILS/src/templates/default/opac/parts/record/subjects.tt2 b/Open-ILS/src/templates/default/opac/parts/record/subjects.tt2
index 3d02231..25f6e2e 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/subjects.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/subjects.tt2
@@ -48,7 +48,7 @@
     END 
 %]
 
-<div id='rdetail_subject_div'>
+<div>
     <table cellpadding="0" cellspacing="0" border="0">
     [%  any_subjects = 0;
         FOREACH subj IN subjects;
diff --git a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
index e2408d1..4a6d93f 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
@@ -12,11 +12,11 @@
 <!-- This holds the record summary information -->
 
 <table width="100%" border="0" cellpadding="0" cellspacing="0" id="rdetail_details_table">
-    <tbody id="rdetail_details_tbody">
+    <tbody>
         <tr>
             <td width="90" valign="top" id="rdetail_image_cell">
                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
-                <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident | uri %]'><img
+                <a href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident | uri %]'><img
                     alt="[% l('Image of item') %]" id='rdetail_image'
                     src='[% ctx.media_prefix %]/opac/extras/ac/jacket/[% record.summary.jacket_size %]/[% ident | uri %]' /></a>
                 [% END %]
@@ -31,7 +31,6 @@
                             [% IF attrs.author %]
                             <span class='opac-auto-030'>[% l("Author") %]:</span>
                             <em><a title='[% l("Perform an author search") %]'
-                                    id='rdetail_author'
                                     href="[%- 
                                         authorquery = attrs.author | replace('[,\.:;]', '');
                                         mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
@@ -70,15 +69,15 @@
                     <table border="0" cellpadding="0" width="100%">
                         <tr>
                             <td nowrap='nowrap' valign="top">
-                                [% IF attrs.isbns.0 %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
+                                [% IF attrs.isbns.0 %]<strong>[% l("ISBN") %]</strong>[% END %]
                             </td>
-                            <td valign="top" id='rdetail_isbn'>
+                            <td valign="top">
                                 [% FOR isbn IN attrs.isbns %][% IF !loop.first; %]<br/>[% END; isbn | html ; END %]
                             </td>
                             <td nowrap='nowrap' valign="top">
-                                [% IF attrs.phys_desc %]<strong id="rdetail_phys_lbl">[% l("Physical Description") %]</strong>[% END %]
+                                [% IF attrs.phys_desc %]<strong>[% l("Physical Description") %]</strong>[% END %]
                             </td>
-                            <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc | html %]</td>
+                            <td valign="top">[% attrs.phys_desc | html %]</td>
                         </tr>
                         [%- IF openurl.enabled == 'true';
                             FOR issn IN args.issns;
@@ -101,19 +100,19 @@
                             </td>
                             <td valign="top">[% attrs.marc_cn | html %]</td>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
+                                <strong>[% IF attrs.edition; l("Edition"); END %]</strong>
                             </td>
-                            <td valign="top" id='rdetail_edition'>[% attrs.edition | html %]</td>
+                            <td valign="top">[% attrs.edition | html %]</td>
                         </tr>
                         <tr>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
+                                <strong>[% IF attrs.publisher; l("Publisher"); END %]</strong>
                             </td>
                             <td valign="top" id='rdetail_publisher'>[% attrs.publisher | html %]</td>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
+                                <strong>[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
                             </td>
-                            <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate | html %]</td>
+                            <td valign="top">[% attrs.pubdate | html %]</td>
                         </tr>
                     </table>
 
@@ -143,7 +142,7 @@
 
 <table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
     <thead>
-        <tr id="rdetails_status_head">
+        <tr>
             <td>[% l("Location") %]</td>
             <td>[% l("Call Number") %]</td>
             <td>[% l("Barcode") %]</td>
diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index 2ec83d5..7eae4b5 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -1,7 +1,6 @@
 /* once done renaming and everything, combine with style.css */
 
 /* Verfied in-use classes --------------------------- */
-.rdetail_print_details_cn_spacer { background: #E0F0E0; }
 .opac-auto-009 { border: 3px solid #E0E0E0; }
 .opac-auto-010 { border-bottom: 1px dotted #ccc; padding-top: 10px; }
 .opac-auto-011 { border-bottom: 1px dotted #ccc; padding-top: 6px; }
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 89a3da3..f1707af 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -966,8 +966,6 @@ div.select-wrapper:hover {
     float: left; position: relative; top: 2px;
     left: -2px; margin-right: 4px;
 }
-#rdetail_copy_info_table { font-size: 8pt; }
-#rdetail_copy_info_table td { padding: 3px; }
 .search_page_nav_link { cursor: pointer; }
 #opac.result.sort { width: 160px; }
 .renew-summary { font-size: 125%; font-style: italic; margin: 0.5ex 0; }

commit e3fb1e9f5e1629f4742a70a6ebee839339ddb3c7
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 31 14:02:30 2011 -0400

    Tpac: more unused ID cleanup; parts/record
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/default/opac/parts/myopac/main_base.tt2 b/Open-ILS/src/templates/default/opac/parts/myopac/main_base.tt2
index 18f39f4..8356287 100644
--- a/Open-ILS/src/templates/default/opac/parts/myopac/main_base.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/myopac/main_base.tt2
@@ -37,7 +37,7 @@
             </div>
         </div>
         [% l('Fines:') %]
-        <span id="myopac_sum_fines_bal" class='[% ctx.user_stats.fines.balance_owed ? "red" : ""%]'>
+        <span class='[% ctx.user_stats.fines.balance_owed ? "red" : ""%]'>
             [% money(ctx.user_stats.fines.balance_owed) %]
         </span><br />
 
@@ -52,7 +52,7 @@
 
     <div style="width:662px;">
         <div style="float:left;">
-            <div style="padding:10px 0px;" id="myopac_sum_name"></div>
+            <div style="padding:10px 0px;"></div>
             <div class="acct_sum_row">
                 <table width="100%" cellspacing="0" cellpadding="0">
                     <tr>
diff --git a/Open-ILS/src/templates/default/opac/parts/record/authors.tt2 b/Open-ILS/src/templates/default/opac/parts/record/authors.tt2
index 7304aeb..3a03c3e 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/authors.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/authors.tt2
@@ -37,7 +37,7 @@ BLOCK build_author_links;
 END;
 %]
 
-<div id='rdetail_authors_div' class='rdetail_extras_div'>
+<div class='rdetail_extras_div'>
 [% FOREACH author IN authors;
     NEXT UNLESS author.xpath; 
     links = PROCESS build_author_links(xpath=author.xpath);
diff --git a/Open-ILS/src/templates/default/opac/parts/record/awards.tt2 b/Open-ILS/src/templates/default/opac/parts/record/awards.tt2
index 25fdd55..68d93ce 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/awards.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/awards.tt2
@@ -11,7 +11,7 @@
         <!-- Reviews from added content provider -->
         [% IF 0 %] 
         <strong>[% l('Reviews:') %]</strong>
-        <div id='rdetail_review_container' style="margin-bottom:20px;"></div>
+        <div style="margin-bottom:20px;"></div>
         [% END %]
 
         <!-- Novelist suggestions-->

commit 38991ac4191498188652ecdc7ab898b28fa9da20
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 31 11:13:58 2011 -0400

    Tpac: removed unused code and IDs in advanced search parts
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/default/opac/parts/advanced/expert.tt2 b/Open-ILS/src/templates/default/opac/parts/advanced/expert.tt2
index 935da51..4dc76b3 100644
--- a/Open-ILS/src/templates/default/opac/parts/advanced/expert.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/advanced/expert.tt2
@@ -1,4 +1,4 @@
-<form id="adv_search_form" action="[% ctx.opac_root %]/results" method="GET">
+<form action="[% ctx.opac_root %]/results" method="GET">
     <div class="header_middle">[% l("Expert Search") %]</div>
     <input type="hidden" name="_special" value="1" />
     <table class="expert-search">
diff --git a/Open-ILS/src/templates/default/opac/parts/advanced/numeric.tt2 b/Open-ILS/src/templates/default/opac/parts/advanced/numeric.tt2
index f10d4aa..de54947 100644
--- a/Open-ILS/src/templates/default/opac/parts/advanced/numeric.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/advanced/numeric.tt2
@@ -1,4 +1,4 @@
-<form id="adv_search_form" action="[% ctx.opac_root %]/results" method="GET">
+<form action="[% ctx.opac_root %]/results" method="GET">
     <div class="header_middle">[% l("Numeric Search") %]</div>
     <input type="hidden" name="contains" value="contains" />
     <input type="hidden" name="_special" value="1" />
@@ -6,6 +6,7 @@
         <tr>
             <td>
                 <select name="qtype">
+                    <!-- TODO: Pull labels from config.metabib_field.label -->
                     <option value="identifier|isbn">[% l('ISBN') %]</option>
                     <option value="identifier|issn">[% l('ISSN') %]</option>
                     <option value="identifier|bib_cn">[% l('Bib Call Number') %]</option>
diff --git a/Open-ILS/src/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/default/opac/parts/advanced/search.tt2
index a6e9ad5..868e3ad 100644
--- a/Open-ILS/src/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/advanced/search.tt2
@@ -1,4 +1,4 @@
-<form id="adv_search_form" action="[% ctx.opac_root %]/results" method="GET">
+<form action="[% ctx.opac_root %]/results" method="GET">
 <table id='adv_global_search' class='data_grid data_grid_center' width='100%'>
     <tr style='border-bottom: none;'>
         <!-- Contains the user-addable(?) rows to define search class, containment and text -->
@@ -32,8 +32,7 @@
             <td valign='top'>
                 <strong>[% l("Item Type") %]</strong><br />
                 [%  INCLUDE "default/opac/parts/coded_value_selector.tt2"
-                        attr=["mattype", "item_type"] multiple="multiple" size="4"
-                        id="adv_global_item_type_basic" %]
+                        attr=["mattype", "item_type"] multiple="multiple" size="4" %]
             </td>
             <td valign='top'>
                 <strong>[% l("Language") %]</strong><br />
@@ -43,22 +42,8 @@
             <td valign='top'>
                 <strong>[% l("Audience") %]</strong><br />
                     [% INCLUDE "default/opac/parts/coded_value_selector.tt2"
-                        attr="audience" id="adv_global_audience_basic" 
-                        multiple="multiple" size="4" %]
+                        attr="audience" multiple="multiple" size="4" %]
                 </select>
-                    <!--<a id='adv_global_audience_link_adv' class='classic_link adv_adv_link'
-                        href='javascript:void(0);' onclick='
-                        hideMe($("adv_global_audience_basic"));
-                        unHideMe($("adv_global_audience"));
-                        hideMe(this);
-                        unHideMe($("adv_global_audience_link_basic"));
-                        '>[% l("Advanced") %]</a>
-                    <a id='adv_global_audience_link_basic' class='hide_me classic_link adv_adv_link'
-                        href='javascript:void(0);' onclick='
-                        unHideMe($("adv_global_audience_basic"));
-                        hideMe($("adv_global_audience"));
-                        unHideMe($("adv_global_audience_link_adv"));
-                        hideMe(this);'>[% l("Basic") %]</a>-->
             </td>
             <td valign='top'>
             <strong>[% l("Sort Results") %]</strong>
@@ -85,7 +70,7 @@
                                 PROCESS build_org_selector name='loc' value=loc %]
                             <div style="position:relative;top:7px;">
                                 <input type='checkbox' name="modifier"
-                                value="available"[% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %]
+                                    value="available"[% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %]
                                     id='opac.result.limit2avail' />
                                 <label style="position:relative;top:-2px;"
                                     for='opac.result.limit2avail'>
@@ -94,7 +79,7 @@
                         </td>
                         <td valign='top'>
                             <strong>[% l("Publication Year") %]</strong><br />
-                            <select id='adv_global_pub_date_type' name='pubdate' onchange='
+                            <select name='pubdate' onchange='
                                 if(this.selectedIndex == 3)
                                     unHideMe($("adv_global_pub_date_2_span"));
                                 else
@@ -110,18 +95,19 @@
                                     [%  END; END %]
                             </select>    
                             <div style='margin-top:5px;'>
-                                <input id='adv_global_pub_date_1' name='date1' type='text' size='4' maxlength='4' value="[% CGI.param('date1') | html %]" />
+                                <input name='date1' type='text' size='4' maxlength='4' value="[% CGI.param('date1') | html %]" />
                                 <span id='adv_global_pub_date_2_span' class='[% CGI.param("pubdate") == "between" ? "" : "hide_me" %]'>
-                                   [% l("and") %] <input name='date2' id='adv_global_pub_date_2' type='text' size='4' maxlength='4' value="[% CGI.param('date2') | html %]" />
+                                   [% l("and") %] <input name='date2' type='text' size='4' maxlength='4' value="[% CGI.param('date2') | html %]" />
                                 </span>
                             </div>
                         </td>
                     </tr>
-                    <!-- copy location selector -->
-                    <tr id='adv_copy_location_filter_row' class='hide_me'>
+                    <!-- TODO: Copy Location Filter -->
+                    <tr class='hide_me'>
                         <td align='right'>[% l("Shelving Location") %]</td>
-                        <td align='left' id='adv_copy_location_filter_td'>
-                            <select size='3' id='adv_copy_location_filter_select' multiple='multiple'>
+                        <td align='left'>
+                            <select size='3' multiple='multiple'>
+                                [%# TODO: add filter options... %]
                             </select>
                         </td>
                     </tr>
@@ -134,71 +120,9 @@
             <input type="image" src="[% ctx.media_prefix %]/images/search_btn.gif"
             alt="[% l('Search') %]" class='pointer' />
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            <a href="javascript:document.getElementById('adv_search_form').reset();"
-                id="adv_reset">[% l('Reset Form') %]</a>
+            <a href="[% mkurl('', {}, 1) %]">[% l('Reset Form') %]</a>
         </td>
     </tr>
 </table>
 <input type="hidden" name="_adv" value="1" />
 </form>
-<div id='adv_quick_search_sidebar' class='sidebar_chunk hide_me'> 
-    <div id='adv_quick_search'>
-        <div class='adv_quick_search color_4'><b>[% l("Quick Search") %]</b></div>
-        <div style='margin-top: 8px;'>
-            <table><tbody><tr>
-                <td>
-                    <select id='adv_quick_type'>
-                        <option value='isbn'>[% l("ISBN") %]</option>
-                        <option value='issn'>[% l("ISSN") %]</option>
-                        <option value='cn'>[% l("Call Number") %]</option>
-                        <option value='lccn'>[% l("LCCN") %]</option>
-                        <option value='tcn'>[% l("TCN") %]</option>
-                        <option value='barcode'>[% l("Item Barcode") %]</option>
-                    </select>
-                </td><td>
-                    <input type='text' id='adv_quick_text' size='16' />
-                </td>
-            </tr></tbody></table>
-        </div>
-
-        <div style='margin-top: 8px;' class='adv_quick_search_submit'>
-            <!-- XXX TODO make a real form, and make a real submitter (quick
-            submit, FKA advGenericSearch() -->
-            <img src="[% ctx.media_prefix %]/images/search_btn.gif"
-                alt="[% l('Search') %]" id="adv_quick_submit" class='pointer' />
-        </div>
-    </div>
-</div>
-
-
-<div id='adv_marc_search_sidebar' class='sidebar_chunk hide_me'
-    style='width:400px; margin-top: 20px;'> 
-    <div class='adv_quick_search color_4'><b>[% l("MARC Expert Search") %]</b></div>
-    <table style='margin: 3px; width: 100%;' id='adv_sdbar_table'
-        class='border_4_3'>
-        <tbody>
-            <tr>
-                <td align="right">[% l("Tag:") %]</td>
-                <td align="left"><input name='advanced.marc.tag' maxlength='3' size='3' /></td>
-                <td align="right">[% l("Subfield:") %]</td>
-                <td align="left"><input name='advanced.marc.subfield' maxlength='1' size='1' /></td>
-            </tr>
-            <tr>
-                <td align="right">[% l("Value:") %]</td>
-                <td colspan='3' align="left"><input name='advanced.marc.value' size='18' /></td>
-            </tr>
-            <tr name='crow' class='hide_me'>
-                <td colspan='4' align='center'>
-                    <a href='javascript:void(0);' class='classic_link'>[% l("close") %]</a>
-                </td>
-            </tr>
-        </tbody>
-    </table>
-    <div id='adv_marc_submit' class='adv_quick_search_submit'>
-        <a style='margin-right: 4px; position:relative;top:-10px;'
-            class='classic_link' href='javascript:advAddMARC();'>[% l("Add Row") %]</a>
-        <!-- XXX TODO make a real form, and make a real submitter (FKA
-        advMARCRun()) -->
-        <img alt="Search" src="[% ctx.media_prefix %]/images/search_btn.gif" class='pointer' />
-    </div>
-</div>

commit c212d670eae1603942c56342ab13dfa8ef3777a3
Merge: 54a37f3 9836fe8
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 31 09:36:52 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge


commit 54a37f381503b47b042efcfe37e784123eeb5773
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Aug 30 12:54:48 2011 -0400

    Tpac: only show opac_visible notification opt-in settings
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 344696a..e32cd93 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -163,6 +163,9 @@ sub fetch_optin_prefs {
         'open-ils.actor.event_def.opt_in.settings.atomic',
         $e->authtoken, $e->requestor->home_ou);
 
+    # some opt-ins are staff-only
+    $opt_ins = [ grep { $U->is_true($_->opac_visible) } @$opt_ins ];
+
     # fetch user setting values for each of the opt-in settings
     my $user_set = $U->simplereq(
         'open-ils.actor',

commit 8cf890a519236156202d0f4505aee63f3934a70b
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 10 13:55:40 2011 -0400

    Tpac: Support for adding/editing pending addresses
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index b329daa..344696a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -82,7 +82,59 @@ sub local_avail_concern {
 #   user : au object, fleshed
 sub load_myopac_prefs {
     my $self = shift;
-    return $self->prepare_extended_user_info || Apache2::Const::OK;
+    my $cgi = $self->cgi;
+    my $e = $self->editor;
+    my $pending_addr = $cgi->param('pending_addr');
+    my $replace_addr = $cgi->param('replace_addr');
+    my $delete_pending = $cgi->param('delete_pending');
+
+    $self->prepare_extended_user_info;
+    my $user = $self->ctx->{user};
+
+    return Apache2::Const::OK unless 
+        $pending_addr or $replace_addr or $delete_pending;
+
+    my @form_fields = qw/address_type street1 street2 city county state country post_code/;
+
+    my $paddr;
+    if( $pending_addr ) { # update an existing pending address
+
+        ($paddr) = grep { $_->id == $pending_addr } @{$user->addresses};
+        return Apache2::Const::HTTP_BAD_REQUEST unless $paddr;
+        $paddr->$_( $cgi->param($_) ) for @form_fields;
+
+    } elsif( $replace_addr ) { # create a new pending address for 'replace_addr'
+
+        $paddr = Fieldmapper::actor::user_address->new;
+        $paddr->isnew(1);
+        $paddr->usr($user->id);
+        $paddr->pending('t');
+        $paddr->replaces($replace_addr);
+        $paddr->$_( $cgi->param($_) ) for @form_fields;
+
+    } elsif( $delete_pending ) {
+        $paddr = $e->retrieve_actor_user_address($delete_pending);
+        return Apache2::Const::HTTP_BAD_REQUEST unless 
+            $paddr and $paddr->usr == $user->id and $U->is_true($paddr->pending);
+        $paddr->isdeleted(1);
+    }
+
+    my $resp = $U->simplereq(
+        'open-ils.actor', 
+        'open-ils.actor.user.address.pending.cud',
+        $e->authtoken, $paddr);
+
+    if( $U->event_code($resp) ) {
+        $logger->error("Error updating pending address: $resp");
+        return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+    }
+
+    # in light of these changes, re-fetch latest data
+    $e->xact_begin; 
+    $self->prepare_extended_user_info;
+    $e->rollback;
+
+    return Apache2::Const::OK;
 }
 
 sub load_myopac_prefs_notify {
diff --git a/Open-ILS/src/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/src/templates/default/opac/myopac/prefs.tt2
index 17783b3..2150fb1 100644
--- a/Open-ILS/src/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/prefs.tt2
@@ -241,66 +241,112 @@
         <thead>
             <tr>
                 <td><strong>[% l("Addresses") %]</strong></td>
-
+                <td><strong>[% l("Pending Addresses") %]</strong></td>
             </tr>
         </thead>
-        <tbody id='myopac_addr_tbody'>
-            [% FOR addr IN ctx.user.addresses %]
-            <tr class='[% addr.pending == "t" ? "pending-addr" : "light_border" %]'>
+        <tbody>
+            [% 
+                # cycle through the non-pending address.  For each non-pending addr
+                # that has a corresponding pending addr, render the pending addr 
+                # along the right inside it's own edit form
+                pending = {};
+                regular = [];
+                edit_addr_id = CGI.param('edit_address');
+                FOR addr IN ctx.user.addresses;
+                    IF addr.pending == 't';
+                        replaces = addr.replaces;
+                        pending.$replaces = addr;
+                    ELSE;
+                        regular.push(addr);
+                    END;
+                END;
+            FOR addr IN regular;
+                cur_id = addr.id; 
+                pending_addr = pending.$cur_id;
+            %]
+            <tr>
                 <td>
-                    <table>
-                        <tr>
-                            <td>[% l("Address Type") %]</td>
-                            <td name='myopac_addr_type'>[%
-                                IF addr.pending == "t";
-                                    "<strong>" _ l("*** PENDING ***") _ "</strong> ";
-                                END;
-                                addr.address_type | lower | ucfirst | html ;
-                            %]</td>
-                        </tr>
-                        <tr>
-                            <td>[% l("Street") %]</td>
-                            <td name='myopac_addr_street'>[% addr.street1 | html %]</td>
-                        </tr>
-                        [% IF addr.street2 %]<tr>
-                            <td>[% l("Street") %]</td>
-                            <td name='myopac_addr_street2'>[% addr.street2 | html %]</td>
-                        </tr>[% END %]
-
-                        <tr>
-                            <td>[% l("City") %]</td>
-                            <td name='myopac_addr_city'>[% addr.city | html %]</td>
-                        </tr>
-
-                        <tr>
-                            <td>[% l("County") %]</td>
-                            <td name='myopac_addr_county'>[% addr.county| html  %]</td>
-                        </tr>
-
-                        <tr>
-                            <td>[% l("State") %]</td>
-                            <td name='myopac_addr_state'>[% addr.state | html %]</td>
-                        </tr>
-
-                        <tr>
-                            <td>[% l("Country") %]</td>
-                            <td name='myopac_addr_country'>[% addr.country | html %]</td>
-                        </tr>
-
-                        <tr>
-                            <td>[% l("Zip") %]</td>
-                            <td name='myopac_addr_zip'>[% addr.post_code | html %]</td>
-                        </tr>
+                    <!-- read-only address display -->
+                    <table class='light_border'>
+                        <tr><td>[% l("Address Type") %]</td><td>[% addr.address_type | html %]</td></tr>
+                        <tr><td>[% l("Street") %]</td><td>[% addr.street1 | html %]</td></tr>
+                        <tr><td>[% l("Street") %]</td><td>[% addr.street2 | html %]</td></tr>
+                        <tr><td>[% l("City") %]</td><td>[% addr.city | html %]</td></tr>
+                        <tr><td>[% l("County") %]</td><td>[% addr.county| html  %]</td></tr>
+                        <tr><td>[% l("State") %]</td><td>[% addr.state | html %]</td></tr>
+                        <tr><td>[% l("Country") %]</td><td>[% addr.country | html %]</td></tr>
+                        <tr><td>[% l("Zip") %]</td><td>[% addr.post_code | html %]</td></tr>
+                        [% IF ctx.get_org_setting(ctx.user.home_ou.id, 'opac.allow_pending_address') 
+                                AND !pending_addr AND edit_addr_id != cur_id %]
                         <tr>
-                            <td name='myopac_addr_edit_td'
-                                colspan='2' class='hide_me'>
-                                <a class='classic_link'
-                                    name='myopac_addr_edit_link'
-                                    href='#'>Edit Address</a>
+                            <td colspan='2'>
+                                <a href='?edit_address=[% addr.id %]'>[% l('Edit Address') %]</a>
                             </td>
                         </tr>
+                        [% END %]
                     </table>
                 </td>
+
+                <!-- pending address form -->
+                [% IF pending_addr OR edit_addr_id == cur_id;
+                    update_addr = pending_addr || addr %]
+                <td>
+                    <form method='POST'>
+                        [% IF pending_addr %]
+                            <input type='hidden' name='pending_addr' value='[% pending_addr.id %]'/>
+                        [% ELSE %]
+                            <input type='hidden' name='replace_addr' value='[% edit_addr_id | html %]'/>
+                        [% END %]
+                        <table class='pending-addr'>
+                            <tr>
+                                <td>[% l("Address Type") %]</td>
+                                <td><input name='address_type' value='[% update_addr.address_type | html %]'/></td>
+                            </tr>
+                            <tr>
+                                <td>[% l("Street") %]</td>
+                                <td><input name='street1' value='[% update_addr.street1 | html %]'/></td>
+                            </tr>
+                            <tr>
+                                <td>[% l("Street") %]</td>
+                                <td><input name='street2' value='[% update_addr.street2 | html %]'/></td>
+                            </tr>
+                            <tr>
+                                <td>[% l("City") %]</td>
+                                <td><input name='city' value='[% update_addr.city | html %]'/></td>
+                            </tr>
+                            <tr>
+                                <td>[% l("County") %]</td>
+                                <td><input name='county' value='[% update_addr.county| html %]'/></td>
+                            </tr>
+                            <tr>
+                                <td>[% l("State") %]</td>
+                                <td><input name='state' value='[% update_addr.state | html %]'</td>
+                            </tr>
+                            <tr>
+                                <td>[% l("Country") %]</td>
+                                <td><input name='country' value='[% update_addr.country | html %]'/></td>
+                            </tr>
+
+                            <tr>
+                                <td>[% l("Zip") %]</td>
+                                <td><input name='post_code' value='[% update_addr.post_code | html %]'/></td>
+                            </tr>
+                            <tr>
+                                <td><input type='submit' value="[% l('Save Changes') %]"/></td>
+                                <td>
+                                    [% IF pending_addr;
+                                        url = mkurl('', {delete_pending => pending_addr.id}, 1);
+                                    ELSE;
+                                        url = mkurl('', {}, 1);
+                                    END %]
+                                    <a href="[% url %]">[% l('Discard Pending Address') %]</a>
+                                </td>
+                            </tr>
+                            <tr><td colspan='2'><i>[% l('Address changes will be verified by staff') %]</i></td></tr>
+                        </table>
+                    </form>
+                </td>
+                [% END %] <!-- if pending_addr -->
             </tr>
             [% END %]
         </tbody>

commit bf452cc06e40b4fc3cae63965c37882efc6075c5
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 29 15:27:04 2011 -0400

    Tpac: show hold/copy count summary in holds status
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/default/opac/parts/misc_util.tt2
index 346b32b..f1ded0e 100644
--- a/Open-ILS/src/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/misc_util.tt2
@@ -155,6 +155,10 @@
             l("In Transit");
         ELSIF hold.hold.status < 3;
             l("Waiting for copy");
-        END;
-    END;
+        END %]
+        <div>
+            [% l('[_1] hold on [quant,_2,circulating copy,circulating copies]',
+                    hold.hold.queue_position, hold.hold.potential_copies) %]
+        </div>
+    [% END
 %]

commit cfe78d6cc6da1a631817b673cc3841458fbf6ccf
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 29 11:45:01 2011 -0400

    TPac: apply the select-all JS to holds list
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/default/opac/myopac/holds.tt2 b/Open-ILS/src/templates/default/opac/myopac/holds.tt2
index df5bd33..e5f5c94 100644
--- a/Open-ILS/src/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/holds.tt2
@@ -89,7 +89,7 @@
             border='0' width="100%">
             <tr>
                 <td width="36" align="center">
-                    <input type="checkbox" id="check_all_holds" />
+                    <input type="checkbox" onclick="var inputs=document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs[i].name == 'hold_id' && !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
                 </td>
                 <td width="138">
                     <span title="Click to sort"

commit bcdf0d18670f80d57f6cdb7b50259ce74c4faf25
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 29 13:47:16 2011 -0400

    Tpac: config option for record detail jacket size
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/default/opac/parts/config.tt2 b/Open-ILS/src/templates/default/opac/parts/config.tt2
index a792838..ab61c23 100644
--- a/Open-ILS/src/templates/default/opac/parts/config.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/config.tt2
@@ -41,4 +41,15 @@ openurl.baseurl = 'http://sfx.example.com/instance';
 google_analytics.enabled = 'false';
 google_analytics.code = 'UA-9999999-99';
 
+##############################################################################
+# Misc. UI Settings
+##############################################################################
+
+##############################################################################
+# Size of the jacket image to display on the record detail summary.
+# Sizes vary depending on added content provider.
+# Options are "small", "medium", and "large"
+record.summary.jacket_size = 'medium';
+
+
 %]
diff --git a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
index 4fed6d0..e2408d1 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
@@ -18,7 +18,7 @@
                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
                 <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident | uri %]'><img
                     alt="[% l('Image of item') %]" id='rdetail_image'
-                    src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/[% ident | uri %]' /></a>
+                    src='[% ctx.media_prefix %]/opac/extras/ac/jacket/[% record.summary.jacket_size %]/[% ident | uri %]' /></a>
                 [% END %]
                 <br />
             </td>

commit 87f00eefa05b039019464aac9d0679998f36f6d4
Merge: e97ae45 d1b79a2
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 29 13:37:19 2011 -0400

    Tpac: merged esi/template-toolkit-opac; conflict resolution
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --cc Open-ILS/src/templates/default/opac/myopac/lists.tt2
index 4cef8b0,e94f94f..0c4852f
--- a/Open-ILS/src/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/lists.tt2
@@@ -111,9 -111,9 +111,9 @@@
                          <td width="49%" style="padding-left: 5px;">[% l('Title') %]</td>
                          <td width="49%">[% l('Author(s)') %]</td>
                          <td width="1%" class="nowrap">
 -                            <select class="opac-auto-179" name="action">
 +                            <select class="selector_actions_for_list" name="action">
                                  <option>[% l('-- Actions for this list --') %]</option>
-                                 <!-- XXX not ready yet<option value="hold">[% l('Place Hold') %]</option> -->
+                                 <option value="place_hold">[% l('Place Hold') %]</option>
                                  <option value="del_item">[% l('Remove Items') %]</option>
                              </select>
                              <input type="submit" value="[% l('Go') %]" />
diff --cc Open-ILS/src/templates/default/opac/parts/anon_list.tt2
index f1b7d0b,89273a6..a4630ca
--- a/Open-ILS/src/templates/default/opac/parts/anon_list.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/anon_list.tt2
@@@ -29,9 -29,9 +29,9 @@@
                          <td width="49%" style="padding-left:5px;">[% l('Title') %]</td>
                          <td width="49%" style="padding-left:5px;">[% l('Author(s)') %]</td>
                          <td width="1%" class="nowrap">
 -                            <select class="opac-auto-179" name="action">
 +                            <select class="selector_actions_for_list" name="action">
                                  <option>[% l('-- Actions for this list --') %]</option>
-                                 <!-- XXX not ready <option value="hold">[% l('Place Hold') %]</option> -->
+                                 <option value="place_hold">[% l('Place Hold') %]</option>
                                  <option value="delete">[% l('Remove Items') %]</option>
                                  [% IF ctx.user AND ctx.bookbags.size %]
                                  <optgroup label="Move selected items to">
diff --cc Open-ILS/src/templates/default/opac/parts/place_hold_result.tt2
index 0000000,ac07c0d..ac07c0d
mode 000000,100644..100644
--- a/Open-ILS/src/templates/default/opac/parts/place_hold_result.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/place_hold_result.tt2

commit e97ae45e48e3df2fb697886d8cdef61f9e24228e
Merge: f7550e1 817a79b
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 29 13:08:15 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge


commit d1b79a261ce05c385cfe334d829470fd63966f37
Merge: 5978a4f 817a79b
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 29 11:23:54 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 5978a4f9f74ccaef678a7bc664231cda4e1592b7
Merge: 5c43def ca2d65d
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 29 11:23:44 2011 -0400

    Merge branch 'template-toolkit-opac' of git.evergreen-ils.org:evergreen/equinox into template-toolkit-opac


commit ca2d65ded730e1ee83b6dccf6e702f0665acdd28
Merge: a5ea78e c601157
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Thu Aug 25 16:24:46 2011 -0400

    Merge branch 'ttopac-advanced-sort-avail' into template-toolkit-opac


commit 5c43defce39395e1e254be914241ef9a39ef1b5a
Merge: a5ea78e 75acf58
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 25 16:03:27 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit a5ea78eb3092b5367204bb90afadce63ff100294
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Aug 23 10:42:54 2011 -0400

    UI cleanup for batch-holds from lists
    
    * Handle hold placement override with a single form and checkboxes
    instead of a series individual forms
    
    * Added a cancel button on the override page
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 547c578..b329daa 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -401,6 +401,8 @@ sub load_place_hold {
     $ctx->{hold_type} = $cgi->param('hold_type');
     $ctx->{default_pickup_lib} = $e->requestor->home_ou; # unless changed below
 
+    return $self->post_hold_redirect unless @targets;
+
     $logger->info("Looking at hold targets: @targets");
 
     # if the staff client provides a patron barcode, fetch the patron
@@ -585,6 +587,12 @@ sub load_place_hold {
     # if successful, do some cleanup and return the 
     # user to the requesting page.
 
+    return $self->post_hold_redirect;
+}
+
+sub post_hold_redirect {
+    my $self = shift;
+
     # We also clear the patron_barcode (from the staff client)
     # cookie at this point (otherwise it haunts the staff user
     # later). XXX todo make sure this is best; also see that
@@ -599,8 +607,6 @@ sub load_place_hold {
             -expires => "-1h"
         )
     );
-
-    return Apache2::Const::OK;
 }
 
 
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index f5354ff..72a5566 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1024,7 +1024,7 @@ a.dash-link:hover { text-decoration: underline !important; }
 .results-paginator-selected { color: red; }
 .inactive-hold { background: #e5e5e5; }
 
-#hold-items-list li { margin-bottom: 20px; }
+#hold-items-list td { padding: 5px; margin-bottom: 20px; }
 .hold-items-list-title { font-size: 120%; }
 .hold-items-list-problem { color: red; }
 
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index d9fb32c..f3a564c 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -38,16 +38,18 @@
         [% END %]
 
         <!-- loop through the holds and display status of request where appropriate -->
-        <ul id='hold-items-list'>
+        <table id='hold-items-list'>
         [% FOR hdata IN ctx.hold_data;
             attrs = {marc_xml => hdata.marc_xml};
             PROCESS get_marc_attrs args=attrs %]
-            <li>
-                <input type="hidden" name="hold_target" value="[% hdata.target.id | html %]" />
-                <div class='hold-items-list-title'>[% attrs.title_extended | html %]</div>
-            </li>
+            <tr>
+                <td>
+                    <input type="hidden" name="hold_target" value="[% hdata.target.id | html %]" />
+                    <div class='hold-items-list-title'>[% attrs.title_extended | html %]</div>
+                </td>
+            </tr>
         [% END %]
-        </ul>
+        </table>
 
         <p>
             [% l('Pickup location:') %]
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold_result.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold_result.tt2
index 0f03fa8..ac07c0d 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold_result.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold_result.tt2
@@ -1,7 +1,6 @@
 [%  PROCESS "default/opac/parts/misc_util.tt2";
     PROCESS "default/opac/parts/hold_error_messages.tt2";
-    override_ok = [];
-    fail_count = 0;
+    override_possible = 0;
 %]
 
 <!-- TODO: CSS for big/strong-->
@@ -9,95 +8,90 @@
 <div id='holds_box' class='canvas' style='margin-top: 6px;'>
     <h1>[% l('Place Hold') %]</h1>
 
-    <ul id='hold-items-list'>
-
-    [% FOR hdata IN ctx.hold_data;
-        attrs = {marc_xml => hdata.marc_xml};
-        PROCESS get_marc_attrs args=attrs %]
-        <li>
-            <div class='hold-items-list-title'>[% attrs.title_extended | html %]</div>
-            <div>
-                [% IF hdata.hold_success %]
-
-                <div>[% l("Hold was successfully placed"); %]</div>
+    <form method="POST">
+        <input type="hidden" type="name" name="override" value="1" />
+        [% FOR k IN ctx.orig_params.keys %]
+        <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | html %]" />
+        [% END %]
 
-                [% ELSIF hdata.hold_failed;
-                    fail_count = fail_count + 1 %]
+        <table id='hold-items-list'>
 
+        [% FOR hdata IN ctx.hold_data;
+            attrs = {marc_xml => hdata.marc_xml};
+            PROCESS get_marc_attrs args=attrs %]
+            <tr>
+                <td>
+                    [% 
+                        override = 0;
+                        IF hdata.could_override || hdata.hold_local_alert;
+                            override_possible = 1;
+                            override = 1;
+                        END;
+                    %]
+                    <input 
+                        type="checkbox" name="hold_target" value="[% hdata.target.id | html %]"
+                        [% IF override %] checked='checked' [% ELSE %] disabled='disabled' [% END %]/>
+                </td>
+                <td>
+                    <div class='hold-items-list-title'>[% attrs.title_extended | html %]</div>
+                    <div>
+                        [% IF hdata.hold_success %]
 
-                    <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
-                    [% IF hdata.hold_local_block %]
-                        <div>[% l("There is already a copy available at your local library.") %]</div>
-                    [% ELSIF hdata.hold_failed_event || hdata.hold_local_alert %]
-                        <div>
-                            <span class='hold-items-list-problem'>[% l('Problem:') %]</span>
-                            <span title="[% hdata.hold_failed_event.textcode | html %]">
-                                <em>[%
-                                        fail_part_key = hdata.hold_failed_event.payload.fail_part;
-                                        event_key = hdata.hold_failed_event.textcode;
+                        <div>[% l("Hold was successfully placed"); %]</div>
 
-                                        # display:
-                                        l(FAIL_PART_MSG_MAP.$fail_part_key) ||
-                                        l(EVENT_MSG_MAP.$event_key) ||
-                                        l(hdata.hold_failed_event.desc) ||
-                                        hdata.hold_failed_event.payload.fail_part ||
-                                        hdata.hold_failed_event.textcode ||
-                                        (hdata.hold_local_alert ?
-                                            l("There is already a copy available at your local library.") :
-                                            l("Unknown problem")) | html
-                                    %]</em>
-                                    [% IF event_key == 'PERM_FAILURE' %]
-                                    <div>[% l('Permission: "[_1]"', hdata.hold_failed_event.ilsperm) | html %]</div>
-                                    [% END %]
-                            </span>
+                        [% ELSIF hdata.hold_failed %]
 
-                            [% IF hdata.hold_copy_available %]
-                                <p>[%  l('Find a copy in the shelving location, "[_1]."', locname) | html %]</p>
-                            [% END %]
+                            <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
+                            [% IF hdata.hold_local_block %]
+                                <div>[% l("There is already a copy available at your local library.") %]</div>
+                            [% ELSIF hdata.hold_failed_event || hdata.hold_local_alert %]
+                                <div>
+                                    <span class='hold-items-list-problem'>[% l('Problem:') %]</span>
+                                    <span title="[% hdata.hold_failed_event.textcode | html %]">
+                                        <em>[%
+                                                fail_part_key = hdata.hold_failed_event.payload.fail_part;
+                                                event_key = hdata.hold_failed_event.textcode;
 
-                            [% IF hdata.could_override || hdata.hold_local_alert %]
-                                [% override_ok.push(hdata.target.id) %]
-                                <p>
-                                    <big>[% l("You have permission to place this hold anyway.") %]</big>
-                                    <br />
-                                    [% l("Click submit below to override and place your hold.") %]
-                                </p>
-                                <form method="POST">
-                                    <input type="hidden" type="name" name="override" value="1" />
-                                    <input type="hidden" name="hold_target" value="[% hdata.target.id | html %]" />
-                                    [% FOR k IN ctx.orig_params.keys %]
-                                    <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | html %]" />
+                                                # display:
+                                                l(FAIL_PART_MSG_MAP.$fail_part_key) ||
+                                                l(EVENT_MSG_MAP.$event_key) ||
+                                                l(hdata.hold_failed_event.desc) ||
+                                                hdata.hold_failed_event.payload.fail_part ||
+                                                hdata.hold_failed_event.textcode ||
+                                                (hdata.hold_local_alert ?
+                                                    l("There is already a copy available at your local library.") :
+                                                    l("Unknown problem")) | html
+                                            %]</em>
+                                            [% IF event_key == 'PERM_FAILURE' %]
+                                            <div>[% l('Permission: "[_1]"', hdata.hold_failed_event.ilsperm) | html %]</div>
+                                            [% END %]
+                                    </span>
+                                    [% IF hdata.hold_copy_available %]
+                                        <p>[%  l('Find a copy in the shelving location, "[_1]."', locname) | html %]</p>
                                     [% END %]
-                                    <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
-                                        alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
-                                </form>
-                            [% END %]
-                        </div>
-                    [% ELSIF hdata.hold_local_block;
-                        l("There is already a copy available at your local library");
-                    END;
-                END %]
-            </div>
-        </li>
-    [% END %]
-    <div>
-        [% IF fail_count > 1 AND fail_count == override_ok.size %]
+                                </div>
+                            [% END;
+                        END %]
+                    </div>
+                </td>
+            </tr>
+        [% END %]
+        </table>
+        [% IF override_possible %]
+            <br/>
             <hr/>
-            <form method="POST">
-                <input type="hidden" type="name" name="override" value="1" />
-                [% FOR k IN ctx.orig_params.keys %]
-                <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | html %]" />
-                [% END %]
-                [% FOR target IN override_ok %]
-                    <input type="hidden" name="hold_target" value="[% target | html %]" />
-                [% END %]
-                <div class='big-strong'>[% l('Override all holds') %]</div>
-                <br/>
+            <div class='big-strong'>
+                [% |l %]You have permission to override some of the failed holds.<br/>  Click Submit to override and place your hold on the selected items.[% END %]
+            </div>
+            <span style='padding-right: 10px;'>
                 <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
                     alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
-            </form>
+            </span>
         [% END %]
-    </div>
-    </ul>
+        <span>
+        <a href="[% CGI.param('redirect_to') || CGI.referer | html %]" id="holds_cancel"><img
+            alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+        </span>
+    </form>
 </div>
 

commit c601157a51cf90a71b291958e33278400c402089
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Mon Aug 22 18:28:18 2011 -0400

    Make the sort-by and limit-to-available controls appear after adv search
    
    This is hackish and suboptimal until we leverage the parsed queries soon
    to be returned by QP.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index d97ac96..d15c722 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -54,7 +54,10 @@ sub _prepare_biblio_search {
 
     my $query = _prepare_biblio_search_basics($cgi) || '';
 
-    $query = ('#' . $_ . ' ' . $query) foreach ($cgi->param('modifier'));
+    foreach ($cgi->param('modifier')) {
+        # The unless bit is to avoid stacking modifiers.
+        $query = ('#' . $_ . ' ' . $query) unless $query =~ qr/\#\Q$_/;
+    }
 
     # filters
     foreach (grep /^fi:/, $cgi->param) {
@@ -63,10 +66,16 @@ sub _prepare_biblio_search {
         $query .= " $1($term)" if length $term;
     }
 
+    # sort is treated specially, even though it's actually a filter
     if ($cgi->param('sort')) {
+        $query =~ s/sort\([^\)]*\)//g;  # override existing sort(). no stacking.
         my ($axis, $desc) = split /\./, $cgi->param('sort');
         $query .= " sort($axis)";
-        $query .= '#descending' if $desc;
+        if ($desc and not $query =~ /\#descending/) {
+            $query .= '#descending';
+        } elsif (not $desc) {
+            $query =~ s/\#descending//;
+        }
     }
 
     if ($cgi->param('pubdate') && $cgi->param('date1')) {
@@ -204,6 +213,7 @@ sub load_rresults {
     $ctx->{search_facets} = {};
     $ctx->{page_size} = $limit;
     $ctx->{hit_count} = $results->{count};
+    $ctx->{parsed_query} = $results->{parsed_query};
 
     return Apache2::Const::OK if @$rec_ids == 0;
 
diff --git a/Open-ILS/web/js/ui/default/opac/simple.js b/Open-ILS/web/js/ui/default/opac/simple.js
index eaa11e2..c120e4b 100644
--- a/Open-ILS/web/js/ui/default/opac/simple.js
+++ b/Open-ILS/web/js/ui/default/opac/simple.js
@@ -73,3 +73,9 @@ function select_all_checkboxes(name, checked) {
         }
     }
 }
+function avail_change_adv_search(checkbox) {
+    if (checkbox.form._adv && !checkbox.checked) {
+        var search_box = document.getElementById("search_box");
+        search_box.value = search_box.value.replace(/#available ?/g, "");
+    }
+}
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index d368a70..bfe9633 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -45,7 +45,6 @@
                 </div>
                 [% END %]
                 <div class="results_header_div"></div>
-                [% UNLESS is_advanced || is_special %]
                     <div class="results_header_lbl">[% l('Sort by') %]</div>
                     [% INCLUDE "default/opac/parts/filtersort.tt2" value=CGI.param('sort') %]
                     <div class="results_header_div"></div>
@@ -60,12 +59,12 @@
                     <div class="results_header_div"></div>
 
                     <input type="checkbox" id="limit_to_available" name="modifier" value="available"
+                        onchange="avail_change_adv_search(this)"
                         [% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %] />
 
                     <label for="limit_to_available" class="results_header_lbl">
                         [% l('Limit to available items') %]
                     </label>
-                [% END %]
                 <div class="clear-both"></div>
             </div>
         </div>

commit d35910fa12d279687b96665f1e1dd60b2ee58f10
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 18 17:14:38 2011 -0400

    TPac: batch holds from on-the-fly lists and bookbags
    
    * Enable the 'Place Hold' action in the drop-down for bookbag and
    on-the-fly list items
    
    * Place hold form now support lists of targets and will report error
    conditions for each target
    
    * Batch and individual hold overrides supported where appropriate
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 698f467..547c578 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -34,11 +34,10 @@ sub prepare_extended_user_info {
 # permission to override?  XXX Should the permission check be scoped to a
 # given org_unit context?
 sub test_could_override {
-    my ($self) = @_;
-    my $event = $self->ctx->{"hold_failed_event"};
+    my ($self, $event) = @_;
 
     return 0 unless $event;
-    return 1 if $self->editor->allowed($event . ".override");
+    return 1 if $self->editor->allowed($event->{textcode} . ".override");
     return 1 if $event->{"fail_part"} and
         $self->editor->allowed($event->{"fail_part"} . ".override");
     return 0;
@@ -46,7 +45,7 @@ sub test_could_override {
 
 # Find out whether we care that local copies are available
 sub local_avail_concern {
-    my ($self, $allowed, $hold_target, $hold_type, $pickup_lib) = @_;
+    my ($self, $hold_target, $hold_type, $pickup_lib) = @_;
 
     my $would_block = $self->ctx->{get_org_setting}->
         ($pickup_lib, "circ.holds.hold_has_copy_at.block");
@@ -56,7 +55,7 @@ sub local_avail_concern {
                 not $self->cgi->param("override")
     ) unless $would_block;
 
-    if ($allowed->{"success"} and ($would_block or $would_alert)) {
+    if ($would_block or $would_alert) {
         my $args = {
             "hold_target" => $hold_target,
             "hold_type" => $hold_type,
@@ -396,186 +395,211 @@ sub load_place_hold {
     my $gos = $ctx->{get_org_setting};
     my $e = $self->editor;
     my $cgi = $self->cgi;
-    $self->ctx->{page} = 'place_hold';
 
-    $ctx->{hold_target} = $cgi->param('hold_target');
+    $self->ctx->{page} = 'place_hold';
+    my @targets = $cgi->param('hold_target');
     $ctx->{hold_type} = $cgi->param('hold_type');
-
     $ctx->{default_pickup_lib} = $e->requestor->home_ou; # unless changed below
 
+    $logger->info("Looking at hold targets: @targets");
+
+    # if the staff client provides a patron barcode, fetch the patron
     if (my $bc = $self->cgi->cookie("patron_barcode")) {
-        # passed in from staff client
         $ctx->{patron_recipient} = $U->simplereq(
             "open-ils.actor", "open-ils.actor.user.fleshed.retrieve_by_barcode",
             $self->editor->authtoken, $bc
-        ) or return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+        ) or return Apache2::Const::HTTP_BAD_REQUEST;
 
         $ctx->{default_pickup_lib} = $ctx->{patron_recipient}->home_ou;
     }
 
     my $request_lib = $e->requestor->ws_ou;
+    my @hold_data;
+    $ctx->{hold_data} = \@hold_data;
+
+    my $type_dispatch = {
+        T => sub {
+            my $recs = $e->batch_retrieve_biblio_record_entry(\@targets, {substream => 1});
+            for my $id (@targets) { # force back into the correct order
+                my ($rec) = grep {$_->id eq $id} @$recs;
+                push(@hold_data, {target => $rec, record => $rec});
+            }
+        },
+        V => sub {
+            my $vols = $e->batch_retrieve_asset_call_number([
+                \@targets, {
+                    "flesh" => 1,
+                    "flesh_fields" => {"acn" => ["record"]}
+                }
+            ], {substream => 1});
 
-    # XXX check for failure of the retrieve_* methods called below, and
-    # possibly replace all the if,elsif with a dispatch table (meh, elegance)
-
-    my $target_field;
-    if ($ctx->{hold_type} eq 'T') {
-        $target_field = "titleid";
-        $ctx->{record} = $e->retrieve_biblio_record_entry($ctx->{hold_target});
-    } elsif ($ctx->{hold_type} eq 'V') {
-        $target_field = "volume_id";
-        my $vol = $e->retrieve_asset_call_number([
-            $ctx->{hold_target}, {
-                "flesh" => 1,
-                "flesh_fields" => {"acn" => ["record"]}
+            for my $id (@targets) { 
+                my ($vol) = grep {$_->id eq $id} @$vols;
+                push(@hold_data, {target => $vol, record => $vol->record});
             }
-        ]);
-        $ctx->{record} = $vol->record;
-    } elsif ($ctx->{hold_type} eq 'C') {
-        $target_field = "copy_id";
-        my $copy = $e->retrieve_asset_copy([
-            $ctx->{hold_target}, {
-                "flesh" => 2,
-                "flesh_fields" => {
-                    "acn" => ["record"],
-                    "acp" => ["call_number"]
+        },
+        C => sub {
+            my $copies = $e->batch_retrieve_asset_copy([
+                \@targets, {
+                    "flesh" => 2,
+                    "flesh_fields" => {
+                        "acn" => ["record"],
+                        "acp" => ["call_number"]
+                    }
                 }
+            ], {substream => 1});
+
+            for my $id (@targets) { 
+                my ($copy) = grep {$_->id eq $id} @$copies;
+                push(@hold_data, {target => $copy, record => $copy->call_number->record});
             }
-        ]);
-        $ctx->{record} = $copy->call_number->record;
-    } elsif ($ctx->{hold_type} eq 'I') {
-        $target_field = "issuanceid";
-        my $iss = $e->retrieve_serial_issuance([
-            $ctx->{hold_target}, {
-                "flesh" => 2,
-                "flesh_fields" => {
-                    "siss" => ["subscription"], "ssub" => ["record_entry"]
+        },
+        I => sub {
+            my $isses = $e->batch_retrieve_serial_issuance([
+                \@targets, {
+                    "flesh" => 2,
+                    "flesh_fields" => {
+                        "siss" => ["subscription"], "ssub" => ["record_entry"]
+                    }
                 }
+            ], {substream => 1});
+
+            for my $id (@targets) { 
+                my ($iss) = grep {$_->id eq $id} @$isses;
+                push(@hold_data, {target => $iss, record => $iss->subscription->record_entry});
             }
-        ]);
-        $ctx->{record} = $iss->subscription->record_entry;
-    }
-    # ...
+        }
+        # ...
 
-    $ctx->{marc_xml} = XML::LibXML->new->parse_string($ctx->{record}->marc);
+    }->{$ctx->{hold_type}}->();
 
-    if (my $pickup_lib = $cgi->param('pickup_lib')) {
-        my $requestor = $e->requestor->id;
-        my $usr; 
+    # caller sent bad target IDs or the wrong hold type
+    return Apache2::Const::HTTP_BAD_REQUEST unless @hold_data;
 
-        if ((not $ctx->{"is_staff"}) or
-            ($cgi->param("hold_usr_is_requestor"))) {
-            $usr = $requestor;
-        } else {
-            my $actor = create OpenSRF::AppSession("open-ils.actor");
-            $usr = $actor->request(
-                "open-ils.actor.user.retrieve_id_by_barcode_or_username",
-                $e->authtoken, $cgi->param("hold_usr")
-            )->gather(1);
-
-            if (defined $U->event_code($usr)) {
-                $ctx->{hold_failed} = 1;
-                $ctx->{hold_failed_event} = $usr;
-            }
-            $actor->kill_me;
-        }
+    # generate the MARC xml for each record
+    $_->{marc_xml} = XML::LibXML->new->parse_string($_->{record}->marc) for @hold_data;
 
-        my $args = {
-            patronid => $usr,
-            $target_field => $ctx->{"hold_target"},
-            pickup_lib => $pickup_lib,
-            hold_type => $ctx->{"hold_type"},
-            depth => 0, # XXX
-        };
+    my $pickup_lib = $cgi->param('pickup_lib');
+    # no pickup lib means no holds placement
+    return Apache2::Const::OK unless $pickup_lib;
 
-        my $allowed = $U->simplereq(
-            'open-ils.circ',
-            'open-ils.circ.title_hold.is_possible',
-            $e->authtoken, $args
-        );
+    $ctx->{hold_attempt_made} = 1;
 
-        $logger->info('hold permit result ' . OpenSRF::Utils::JSON->perl2JSON($allowed));
+    # Give the original CGI params back to the user in case they
+    # want to try to override something.
+    $ctx->{orig_params} = $cgi->Vars;
+    delete $ctx->{orig_params}{submit};
+    delete $ctx->{orig_params}{hold_target};
 
-        my ($local_block, $local_alert) = $self->local_avail_concern(
-            $allowed, $args->{$target_field}, $args->{hold_type}, $pickup_lib
-        );
+    my $usr = $e->requestor->id;
 
-        # Give the original CGI params back to the user in case they
-        # want to try to override something.
-        $ctx->{orig_params} = $cgi->Vars;
+    if ($ctx->{is_staff} and !$cgi->param("hold_usr_is_requestor")) {
+        # find the real hold target
 
-        if ($local_block) {
+        $usr = $U->simplereq(
+            'open-ils.actor', 
+            "open-ils.actor.user.retrieve_id_by_barcode_or_username",
+            $e->authtoken, $cgi->param("hold_usr"));
+
+        if (defined $U->event_code($usr)) {
             $ctx->{hold_failed} = 1;
-            $ctx->{hold_local_block} = 1;
+            $ctx->{hold_failed_event} = $usr;
+        }
+    }
+
+    # First see if we should warn/block for any holds that 
+    # might have locally available items.
+    for my $hdata (@hold_data) {
+        my ($local_block, $local_alert) = $self->local_avail_concern(
+            $hdata->{target}->id, $ctx->{hold_type}, $pickup_lib);
+    
+        if ($local_block) {
+            $hdata->{hold_failed} = 1;
+            $hdata->{hold_local_block} = 1;
         } elsif ($local_alert) {
-            $ctx->{hold_failed} = 1;
-            $ctx->{hold_local_alert} = 1;
-        } elsif ($allowed->{success}) {
-            my $hold = Fieldmapper::action::hold_request->new;
-
-            $hold->pickup_lib($pickup_lib);
-            $hold->requestor($requestor);
-            $hold->usr($usr);
-            $hold->target($ctx->{hold_target});
-            $hold->hold_type($ctx->{hold_type});
-            # frozen, expired, etc..
-
-            my $method =  "open-ils.circ.holds.create";
-            $method .= ".override" if $cgi->param("override");
-
-            my $stat = $U->simplereq(
-                "open-ils.circ", $method, $e->authtoken, $hold
-            );
+            $hdata->{hold_failed} = 1;
+            $hdata->{hold_local_alert} = 1;
+        }
+    }
 
-            # The following did not cover all the possible return values of
-            # open-ils.circ.holds.create
-            #if($stat and $stat > 0) {
-            if ($stat and (not ref $stat) and $stat > 0) {
-                # if successful, return the user to the requesting page
-                $self->apache->log->info(
-                    "Redirecting back to " . $cgi->param('redirect_to')
-                );
-
-                # We also clear the patron_barcode (from the staff client)
-                # cookie at this point (otherwise it haunts the staff user
-                # later). XXX todo make sure this is best; also see that
-                # template when staff mode calls xulG.opac_hold_placed()
-                return $self->generic_redirect(
-                    undef,
-                    $self->cgi->cookie(
-                        -name => "patron_barcode",
-                        -path => "/",
-                        -secure => 1,
-                        -value => "",
-                        -expires => "-1h"
-                    )
-                );
 
-            } else {
-                $ctx->{hold_failed} = 1;
+    my $method = 'open-ils.circ.holds.test_and_create.batch';
+    $method .= '.override' if $cgi->param('override');
+
+    my @create_targets = map {$_->{target}->id} (grep { !$_->{hold_failed} } @hold_data);
 
-                delete $ctx->{orig_params}{submit};
+    if(@create_targets) {
+
+        my $bses = OpenSRF::AppSession->create('open-ils.circ');
+        my $breq = $bses->request( 
+            $method, 
+            $e->authtoken, 
+            {   patronid => $usr, 
+                pickup_lib => $pickup_lib, 
+                hold_type => $ctx->{hold_type}
+            }, 
+            \@create_targets
+        );
+
+        while (my $resp = $breq->recv) {
+
+            $resp = $resp->content;
+            $logger->info('batch hold placement result: ' . OpenSRF::Utils::JSON->perl2JSON($resp));
+
+            if ($U->event_code($resp)) {
+                $ctx->{general_hold_error} = $resp;
+                last;
+            }
 
-                if (ref $stat eq 'ARRAY') {
-                    $ctx->{hold_failed_event} = shift @$stat;
-                } elsif (defined $U->event_code($stat)) {
-                    $ctx->{hold_failed_event} = $stat;
+            my ($hdata) = grep {$_->{target}->id eq $resp->{target}} @hold_data;
+            my $result = $resp->{result};
+
+            if ($U->event_code($result)) {
+                # e.g. permission denied
+                $hdata->{hold_failed} = 1;
+                $hdata->{hold_failed_event} = $result;
+
+            } else {
+                
+                if(not ref $result and $result > 0) {
+                    # successul hold returns the hold ID
+
+                    $hdata->{hold_success} = $result; 
+    
                 } else {
-                    $self->apache->log->info(
-                        "attempt to create hold returned $stat"
-                    );
+                    # hold-specific failure event 
+                    $hdata->{hold_failed} = 1;
+                    $hdata->{hold_failed_event} = $result->{last_event};
+                    $hdata->{could_override} = $self->test_could_override($hdata->{hold_failed_event});
                 }
-
-                $ctx->{could_override} = $self->test_could_override;
             }
-        } else { # hold *check* failed
-            $ctx->{hold_failed} = 1; # XXX process the events, etc
-            $ctx->{hold_failed_event} = $allowed->{last_event};
         }
 
-        # hold permit failed
+        $bses->kill_me;
     }
 
+    # stay on the current page and display the results
+    return Apache2::Const::OK if 
+        (grep {$_->{hold_failed}} @hold_data) or $ctx->{general_hold_error};
+
+    # if successful, do some cleanup and return the 
+    # user to the requesting page.
+
+    # We also clear the patron_barcode (from the staff client)
+    # cookie at this point (otherwise it haunts the staff user
+    # later). XXX todo make sure this is best; also see that
+    # template when staff mode calls xulG.opac_hold_placed()
+    return $self->generic_redirect(
+        undef,
+        $self->cgi->cookie(
+            -name => "patron_barcode",
+            -path => "/",
+            -secure => 1,
+            -value => "",
+            -expires => "-1h"
+        )
+    );
+
     return Apache2::Const::OK;
 }
 
@@ -1164,10 +1188,10 @@ sub load_myopac_bookbags {
 }
 
 
-# actions are create, delete, show, hide, rename, add_rec, delete_item
+# actions are create, delete, show, hide, rename, add_rec, delete_item, place_hold
 # CGI is action, list=list_id, add_rec/record=bre_id, del_item=bucket_item_id, name=new_bucket_name
 sub load_myopac_bookbag_update {
-    my ($self, $action, $list_id) = @_;
+    my ($self, $action, $list_id, @hold_recs) = @_;
     my $e = $self->editor;
     my $cgi = $self->cgi;
 
@@ -1175,7 +1199,7 @@ sub load_myopac_bookbag_update {
     $list_id ||= $cgi->param('list');
 
     my @add_rec = $cgi->param('add_rec') || $cgi->param('record');
-    my @del_item = $cgi->param('del_item');
+    my @selected_item = $cgi->param('selected_item');
     my $shared = $cgi->param('shared');
     my $name = $cgi->param('name');
     my $success = 0;
@@ -1190,6 +1214,23 @@ sub load_myopac_bookbag_update {
         $success = $U->simplereq('open-ils.actor', 
             'open-ils.actor.container.create', $e->authtoken, 'biblio', $list)
 
+    } elsif($action eq 'place_hold') {
+
+        # @hold_recs comes from anon lists redirect; selected_itesm comes from existing buckets
+        unless (@hold_recs) {
+            if (@selected_item) {
+                my $items = $e->search_container_biblio_record_entry_bucket_item({id => \@selected_item});
+                @hold_recs = map { $_->target_biblio_record_entry } @$items;
+            }
+        }
+                
+        return Apache2::Const::OK unless @hold_recs;
+        $logger->info("placing holds from list page on: @hold_recs");
+
+        my $url = $self->ctx->{opac_root} . '/place_hold?hold_type=T';
+        $url .= ';hold_target=' . $_ for @hold_recs;
+        return $self->generic_redirect($url);
+
     } else {
 
         $list = $e->retrieve_container_biblio_record_entry_bucket($list_id);
@@ -1234,7 +1275,7 @@ sub load_myopac_bookbag_update {
         }
 
     } elsif($action eq 'del_item') {
-        foreach (@del_item) {
+        foreach (@selected_item) {
             $success = $U->simplereq(
                 'open-ils.actor',
                 'open-ils.actor.container.item.delete', $e->authtoken, 'biblio', $_
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
index 7f87104..be45ffc 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
@@ -60,6 +60,10 @@ sub load_mylist_add {
 sub load_mylist_move {
     my $self = shift;
     my @rec_ids = $self->cgi->param('record');
+    my $action = $self->cgi->param('action') || '';
+
+    return $self->load_myopac_bookbag_update('place_hold', undef, @rec_ids)
+        if $action eq 'place_hold';
 
     my ($cache_key, $list) = $self->fetch_mylist;
     return $self->mylist_action_redirect unless $cache_key;
@@ -73,7 +77,7 @@ sub load_mylist_move {
         $cache_key, ANON_CACHE_MYLIST, \@keep
     );
 
-    if ($self->ctx->{user} and $self->cgi->param('action') =~ /^\d+$/) {
+    if ($self->ctx->{user} and $action =~ /^\d+$/) {
         # in this case, action becomes list_id
         $self->load_myopac_bookbag_update('add_rec', $self->cgi->param('action'));
         # XXX TODO: test for failure of above
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index cd496ab..f5354ff 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1023,3 +1023,9 @@ a.dash-link:hover { text-decoration: underline !important; }
 
 .results-paginator-selected { color: red; }
 .inactive-hold { background: #e5e5e5; }
+
+#hold-items-list li { margin-bottom: 20px; }
+.hold-items-list-title { font-size: 120%; }
+.hold-items-list-problem { color: red; }
+
+.big-strong {font-weight: bold; font-size: 120%; }
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index 87aec45..e94f94f 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -104,7 +104,7 @@
                         <input type="checkbox" onclick="
                             var inputs=document.getElementsByTagName('input'); 
                             for (i = 0; i < inputs.length; i++) { 
-                                if (inputs[i].name == 'del_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %]) 
+                                if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %]) 
                                     inputs[i].checked = this.checked;}"/>
 
                         </td>
@@ -113,7 +113,7 @@
                         <td width="1%" class="nowrap">
                             <select class="opac-auto-179" name="action">
                                 <option>[% l('-- Actions for this list --') %]</option>
-                                <!-- XXX not ready yet<option value="hold">[% l('Place Hold') %]</option> -->
+                                <option value="place_hold">[% l('Place Hold') %]</option>
                                 <option value="del_item">[% l('Remove Items') %]</option>
                             </select>
                             <input type="submit" value="[% l('Go') %]" />
@@ -131,7 +131,7 @@
                         attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
                         PROCESS get_marc_attrs args=attrs %]
                     <tr>
-                        <td class="item_list_padding" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
+                        <td class="item_list_padding" style="padding-left: 10px;"><input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
                         <td class="item_list_padding" style="padding-left: 5px;">[% attrs.title | html %]</td>
                         <td class="item_list_padding">[% attrs.author | html %]</td>
                     </tr>
diff --git a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2 b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
index 6f91af7..89273a6 100644
--- a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
@@ -31,7 +31,7 @@
                         <td width="1%" class="nowrap">
                             <select class="opac-auto-179" name="action">
                                 <option>[% l('-- Actions for this list --') %]</option>
-                                <!-- XXX not ready <option value="hold">[% l('Place Hold') %]</option> -->
+                                <option value="place_hold">[% l('Place Hold') %]</option>
                                 <option value="delete">[% l('Remove Items') %]</option>
                                 [% IF ctx.user AND ctx.bookbags.size %]
                                 <optgroup label="Move selected items to">
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index 903cbb6..d9fb32c 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -1,369 +1,81 @@
 [%  PROCESS "default/opac/parts/misc_util.tt2";
-    attrs = {marc_xml => ctx.marc_xml};
-    PROCESS get_marc_attrs args=attrs;
-
     PROCESS "default/opac/parts/hold_error_messages.tt2";
 %]
-<div>
-    <div id='holds_box' class='canvas' style='margin-top: 6px;'>
-        [% IF ctx.hold_success %]
-        <div><big><strong>[% l("Hold was successfully placed"); %]</strong></big></div>
-        [% ELSIF ctx.hold_failed %]
-        <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
-            [% IF ctx.hold_local_block %]
-            <div>[% l("There is already a copy available at your local library.") %]</div>
-            [% ELSIF ctx.hold_failed_event || ctx.hold_local_alert %]
-        <div>
-            <strong>[% l('Problem:') %]</strong>
-            <span title="[% ctx.hold_failed_event.textcode | html %]">
-                <em>[%
-                        fail_part_key = ctx.hold_failed_event.payload.fail_part;
-                        event_key = ctx.hold_failed_event.textcode;
-
-                        # display:
-                        l(FAIL_PART_MSG_MAP.$fail_part_key) ||
-                        l(EVENT_MSG_MAP.$event_key) ||
-                        l(ctx.hold_failed_event.desc) ||
-                        ctx.hold_failed_event.payload.fail_part ||
-                        ctx.hold_failed_event.textcode ||
-                        (ctx.hold_local_alert ?
-                            l("There is already a copy available at your local library.") :
-                            l("Unknown problem")) %]</em>
-            </span>
 
-            [% IF ctx.hold_copy_available %]<p>
-            [%  l('Find a copy in the shelving location, "[_1]."', locname) | html %]
-            </p>[% END %]
-
-            [% IF ctx.could_override || ctx.hold_local_alert %]
-            <p>
-                <big>[% l("You have permission to place this hold anyway.") %]</big>
-                <br />
-                [% l("Click submit below to override the system's objection and place your hold.") %]
-            </p>
-            <form method="POST">
-                <input type="hidden" type="name" name="override" value="1" />
-                [% FOR k IN ctx.orig_params.keys %]
-                <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | uri %]" />
-                [% END %]
-                <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
-                    alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
-            </form>
-            [% END %]
-        </div>
-            [% END;
-        ELSIF ctx.hold_local_block;
-            l("There is already a copy available at your local library");
-        ELSE %]
-        <form method="POST">
-            <br/>
-            <input type="hidden" name="hold_target"
-                value="[% CGI.param('hold_target') | html %]" />
-            <input type="hidden" name="hold_type"
-                value="[% CGI.param('hold_type') | html %]" />
-            [%
-                new_redirect_to = ctx.referer;
-                IF new_redirect_to.match('redirect_to');
-                    new_redirect_to = 'https://' _ ctx.hostname _ ctx.opac_root _ '/home';
-                ELSE;
-                    new_redirect_to = new_redirect_to | replace('^http:', 'https:');
-                END;
-            %]
-            <input type="hidden" name="redirect_to"
-                value="[% new_redirect_to | html %]" />
-            <h1>Place Hold</h1>
-            [% IF ctx.is_staff %]
-            <p class="staff-hold">
-                <input type="radio" id="hold_usr_is_requestor_not"
+<div id='holds_box' class='canvas' style='margin-top: 6px;'>
+    <h1>[% l('Place Hold') %]</h1>
+    <form method="POST">
+        <input type="hidden" name="hold_type" value="[% CGI.param('hold_type') | html %]" />
+        [%#
+            new_redirect_to = ctx.referer;
+            IF new_redirect_to.match('redirect_to');
+                new_redirect_to = 'https://' _ ctx.hostname _ ctx.opac_root _ '/home';
+            ELSE;
+                new_redirect_to = new_redirect_to | replace('^http:', 'https:');
+            END;
+        %]
+        <input type="hidden" name="redirect_to" value="[% CGI.param('redirect_to') || CGI.referer | html %]" />
+
+        [% IF ctx.is_staff %]
+        <p class="staff-hold">
+            <input type="radio" id="hold_usr_is_requestor_not"
+                onchange="staff_hold_usr_input_disabler(this);"
+                name="hold_usr_is_requestor" value="0"
+                [% IF ctx.patron_recipient; ' checked="checked"'; END %] />
+            <label for="hold_usr_is_requestor_not">
+                [% l("Place hold for patron by barcode:") %]
+            </label>
+            <input type="text" name="hold_usr" id="hold_usr_input" value="[% ctx.patron_recipient.card.barcode | html %]" /><br />[%# XXX multi-barcode users? %]
+            <span>
+                <input type="radio" id="hold_usr_is_requestor"
                     onchange="staff_hold_usr_input_disabler(this);"
-                    name="hold_usr_is_requestor" value="0"
-                    [% IF ctx.patron_recipient; ' checked="checked"'; END %]
-                    />
-                <label for="hold_usr_is_requestor_not">
-                    [% l("Place hold for patron by barcode:") %]
+                    name="hold_usr_is_requestor" value="1" />
+                <label for="hold_usr_is_requestor">
+                    [% l("Place this hold for me ([_1] [_2])", ctx.user.first_given_name, ctx.user.family_name) | html %]
                 </label>
-                <input type="text" name="hold_usr" id="hold_usr_input" value="[% ctx.patron_recipient.card.barcode | html %]" /><br />[%# XXX multi-barcode users? %]
-                <span>
-                    <input type="radio" id="hold_usr_is_requestor"
-                        onchange="staff_hold_usr_input_disabler(this);"
-                        name="hold_usr_is_requestor" value="1" />
-                    <label for="hold_usr_is_requestor">
-                        [% l("Place this hold for me ([_1] [_2])", ctx.user.first_given_name, ctx.user.family_name) | html %]
-                    </label>
-                </span>
-            </p>
-            [% END %]
-            <p>
-                [%  title = attrs.title | html; libname = ctx.get_aou(ctx.default_pickup_lib).name | html %]
-                [% | l(title, libname) %]
-                You would like to place a hold on <strong><q>[_1]</q></strong>.<br />
-                If this is correct, confirm your pickup location and click <strong>SUBMIT</strong>.
-                [% END %]
-            </p>
-            <p>
-                [% l('Pickup location:') %]
-                [% PROCESS "default/opac/parts/org_selector.tt2";
-                    PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib id='pickup_lib' can_have_vols_only=1 %]
-            </p>
-            <p>
-                [% |l %]If you use the Traveling Library Center (TLC) and ABC Express
-                services, please select "Outreach" to have the item delivered
-                during your scheduled visit.[% END %]
-            </p>
-            <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
-                alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
-            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            <a href="javascript:history.go(-1);" id="holds_cancel"><img
-                alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
-        </form>
-        <br /><br />
+            </span>
+        </p>
+        [% END %]
+
+        <!-- loop through the holds and display status of request where appropriate -->
+        <ul id='hold-items-list'>
+        [% FOR hdata IN ctx.hold_data;
+            attrs = {marc_xml => hdata.marc_xml};
+            PROCESS get_marc_attrs args=attrs %]
+            <li>
+                <input type="hidden" name="hold_target" value="[% hdata.target.id | html %]" />
+                <div class='hold-items-list-title'>[% attrs.title_extended | html %]</div>
+            </li>
+        [% END %]
+        </ul>
+
         <p>
-            [% |l %]* If you need your item today, and it is checked in at your
-            library, please place your hold and then call your library to set it
-            aside. Placing a hold without calling the library will increase your
-            wait time.[% END %]
-            <br /><a href="#">[% l('Library phone numbers.') %]</a>
+            [% l('Pickup location:') %]
+            [% PROCESS "default/opac/parts/org_selector.tt2";
+                PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib id='pickup_lib' can_have_vols_only=1 %]
         </p>
         <p>
-            [% |l %]* For best possible service, we recommend keeping 
-            a printed copy of your most recent holds list.[% END %]
+            [% |l %]If you use the Traveling Library Center (TLC) and ABC Express
+            services, please select "Outreach" to have the item delivered
+            during your scheduled visit.[% END %]
         </p>
-        [% END %] <!-- ctx.hold_success -->
-        <table width='90%' border="1" class="hide_me">
-            <tbody>
-                <tr>
-                    <td class='holds_cell color_1' 
-                        align='center' colspan='2'>[% l("Create / Edit a Hold") %]</td>
-                </tr>
-                <tr>
-                    <td class='holds_cell'>[% l("Recipient") %]:</td>
-                    <td class='holds_cell' id='holds_recipient'> </td>
-                </tr>
-                <tr>
-                    <td class='holds_cell'>[% l("Title:") %]</td>
-                    <!-- <td class='holds_cell' id='holds_title'> </td> -->
-                </tr>
-                <tr>
-                    <td class='holds_cell'>[% l("Author") %]</td>
-                    <td class='holds_cell' id='holds_author'> </td>
-                </tr>
-                <tr>
-                    <td class='holds_cell'>[% l("Format") %]</td>
-                    <td class='holds_cell' id='holds_format'> </td>
-                </tr>
-                <tr id='hold_physical_desc_row'>
-                    <td class='holds_cell'>[% l("Physical Description:") %]</td>
-                    <td class='holds_cell' id='holds_physical_desc'> </td>
-                </tr>
-
-                <tr class='hide_me' id='holds_cn_row'>
-                    <td class='holds_cell'>[% l("Call Number:") %]</td>
-                    <td class='holds_cell'><b id='holds_cn'/> </td>
-                </tr>
-
-                <tr class='hide_me' id='holds_copy_row'>
-                    <td class='holds_cell'>[% l("Copy Barcode:") %]</td>
-                    <td class='holds_cell'><b id='holds_copy'/> </td>
-                </tr>
-
-                <tr class='hide_me' id='holds_type_row'>
-                    <td class='holds_cell'>[% l("Hold Type:") %]</td>
-                    <td class='holds_cell hide_me' id='holds_is_cn'>
-                        <b>[% l("Volume Hold") %]</b>
-                    </td>
-                    <td class='holds_cell hide_me' id='holds_is_copy'>
-                        <b>[% l("Copy Hold") %]</b>
-                    </td>
-                </tr>
-                <tr>
-                    <td class='holds_cell'>[% l("Contact telephone number") %]:</td>
-                    <td class='holds_cell'>
-                        <input id='holds_phone' size='13' maxlength='12'/>
-                        <span style='margin-left: 4px; font-size: 7pt;'>
-                            [% l("(XXX-YYY-ZZZZ)") %]
-                        </span>
-                    </td>
-                </tr>
-                <tr>
-                    <td class='holds_cell'>[% l("Enable phone notifications for this hold?") %]</td>
-                    <td class='holds_cell'>
-                        <input type='checkbox' id='holds_enable_phone'
-                            checked='checked' />
-                    </td>
-                </tr>
-                <tr>
-                    <td class='holds_cell'>[% l("Contact email address") %]:</td>
-                    <td class='holds_cell' id='holds_email'> 
-                        <span class='hide_me' id='holds.no_email'>
-                           ([% l("Patron has no configured email address") %])<br/>
-                           ([% l("See") %] <a class='classic_link' id='holds.no_email.my_account'>[% l("My Account") %]</a> [% l("for setting your email address") %])
-                        </span>
-                        <span class='hide_me' id='holds.no_email.xul'>
-                           [% l("(Patron has no configured email address)") %] 
-                        </span>
-                    </td>
-                </tr>
-                <tr>
-                    <td class='holds_cell'>[% l("Enable email notifications for this hold?") %]</td>
-                    <td class='holds_cell'>
-                        <input type='checkbox' id='holds_enable_email'
-                            checked='checked'/>
-                    </td>
-                </tr>
-                <!--
-                <tr id='holds_depth_selector_row' class='hide_me'>
-                    <td class='holds_cell'>Hold Range</td>
-                    <td class='holds_cell'>
-                        <select id='holds_depth_selector'></select>
-                    </td>
-                </tr>
-                -->
-                <tr>
-                    <td class='holds_cell'>[% l("Pickup location") %]</td>
-                    <td class='holds_cell'>
-                        <!-- <select id='holds_org_selector'> </select> -->
-                    </td>
-                </tr>
-
-                <tr>
-                    <td class='holds_cell'>[% l("Expiration date") %]</td>
-                    <td class='holds_cell'>
-                        <input size='10' maxlength='10'
-                         id='holds_expire_time' />
-                    </td>
-                </tr>
-
-                <tr>
-                    <td class='holds_cell'>
-                        [% l("Suspend this hold") %]
-                        <a class='classic_link'
-                            href='#'>[% l("(Help)") %]</a>
-                        </td>
-                    <td class='holds_cell'>
-                        <input type='checkbox' id='holds_frozen_chkbox' /> 
-                    </td>
-                </tr>
-                <tr id='hold_frozen_thaw_row' class='hide_me'>
-                    <td class='holds_cell'>
-                        <!-- XXX TODO there used to be script here dealing with
-                        frozen holds -->
-                        [% l("Automatically activate hold on:") %]
-                    </td>
-                    <td class='holds_cell'>
-                        <input size='10' maxlength='10'
-                            id='holds_frozen_thaw_input' />
-                    </td>
-                </tr>
-
-                <tr id='holds_alt_formats_row_extras' class='hide_me'>
-                    <td colspan='2' align='center'>
-                        <div style='padding: 8px;'>
-                            <a class='classic_link' href='#'
-                                style='padding: 5px;'>[% l("Advanced Hold Options") %]</a>
-                        </div>
-                    </td>
-                </tr>
-
-                <tr id='holds_alt_formats_row' class='hide_me'>
-
-                    <td class='holds_cell'>
-                        <div style='margin-bottom: 5px;'>
-                            <span>[% l("Acceptable Alternative Formats:") %] </span>
-                            <span><a class='classic_link red' href='#'>[% l("(Help)") %]</a></span>
-                        </div>
-                        <div>[% l("(control-click to select multiple formats)") %]</div>
-                    </td>
-
-                    <td class='holds_cell'>
-                        <select id='hold_alt_form_selector' multiple='multiple' style='width: 14em;'>
-                            <option value='at'    class='hide_me'>[% l("Books") %]</option>
-                            <option value='at-d' class='hide_me'>[% l("Large Print Books") %]</option>
-                            <option value='i'        class='hide_me'>[% l("Audiobooks") %]</option>
-                            <option value='g'        class='hide_me'>[% l("Video Recordings") %]</option>
-                            <option value='j'        class='hide_me'>[% l("Music") %]</option>
-                        </select>
-                    </td>
-                </tr>
-                <tr>
-                    <td class='holds_cell' align='center' colspan='2'>
-                        <!-- <button id='holds_submit'>[% l("Place Hold") %]</button> -->
-                        <button class='hide_me' id='holds_update'>[% l("Update Hold") %]</button>
-                        <span style='padding: 20px;'> </span>
-                        <!-- <button id='holds_cancel'>[% l("Cancel") %]</button> -->
-                    </td>
-                </tr>
-            </tbody>
-        </table>
-        <span class='hide_me' id='holds_bad_phone'>
-            [% l("The phone number does not have the correct format. The expected format is XXX-YYY-ZZZZ") %]
-        </span>
-        <span class='hide_me' id='hold_not_allowed'>
-            [% |l %]No items were found that could fulfill the requested holds.  
-                It's possible that choosing a different format will result in a successful hold.  
-                It is also possible that you have exceeded the number of allowable holds.  
-                For further information, please consult your local librarian.[% END %]
-        </span>
-    </div>
-    <div id="anonListTable" class="hide_me" style="margin-top: 6px;">
-        <select id="holdsCacheSel" class="hide_me"></select><br />
-        <a href="#">Place hold on selected</a><br />
-        <a href="#">Remove selected</a>
-        
-        <table id="temp_list_holds" cellpadding='0' cellspacing='0' border='0'
-            style="margin-top:10px;">
-            <tr>
-                <td width="1%" style="padding-left:10px;">
-                    <input type='checkbox' title='Select All'
-                        id='anon_selector' />
-                </td>
-                <td width="1%">
-                </td>
-                <td width="98%" style="padding-left:40px;">
-                    <strong>Title</strong>
-                </td>
-            </tr>
-        </table>
-        <table width='100%' style="margin-left:7px;margin-bottom:10px;">
-            <thead>
-                <tr><td width='20'></td><td width='30'></td><td></td></tr>
-            </thead>
-            <tbody id="anonListParent">
-                <tr id="anonListTemp">
-                  <td><input type='checkbox' name='anon_selector' /></td>
-                  <td name="curr_row"></td>
-                  <td name="title"></td>
-                </tr>
-            </tbody>
-        </table>
-        <a href="#">Back to search results</a>
-    </div>
-
-    <span class='hide_me' id='format_words'>
-        <span name='at'>[% l("Books") %]</span>
-        <span name='at-d'>[% l("Large Print Books") %]</span>
-        <span name='i'>[% l("Audiobooks") %]</span>
-        <span name='g'>[% l("Video Recordings") %]</span>
-        <span name='j'>[% l("Music") %]</span>
-        <span name='m'>[% l("Electronic Resources") %]</span>
-    </span>
-
-    <span class='hide_me' id='holds_explain_adv'>
-        [% |l %]If you wish to broaden the scope of your hold to include other versions of this title, 
-        select the formats that would be acceptable.  The first available copy will be sent to you.[% END %]
-    </span>
-
-    <span class='hide_me' id='holds_pick_good_org'>[% l("Please select a physical location where your hold can be delivered.") %]</span>
-    <span class='hide_me' id='hold_dup_exists'>[% l("A hold already exists on the requested item.") %]</span>
-    <span class='hide_me' id='hold_dup_exists_override'>[% l("A hold already exists on the requested item. Would you like to create the hold anyway?") %]</span>
-
-    <span id='hold_failed_patron_barred' class='hide_me'>
-        [% |l %]PATRON BARRED. Please see any notes in the "Staff Notes" section of your 
-        "My Account" page or contact your local library.[% END %]
-    </span>
-
-    <span id='invalid_hold' class='hide_me'>
-        [% |l %]This hold is no longer valid. It's likely that the target for the hold was 
-        deleted from the system.  Please cancel this hold and place a new one.[% END %]
-    </span>
-    <span id='holds_invalid_recipient' class='hide_me'>[% l("The patron barcode entered as the hold recipient is invalid.") %]</span>
+        <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
+            alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
+        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+        <a href="javascript:history.go(-1);" id="holds_cancel"><img
+            alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+    </form>
+    <br /><br />
+    <p>
+        [% |l %]* If you need your item today, and it is checked in at your
+        library, please place your hold and then call your library to set it
+        aside. Placing a hold without calling the library will increase your
+        wait time.[% END %]
+        <br /><a href="#">[% l('Library phone numbers.') %]</a>
+    </p>
+    <p>
+        [% |l %]* For best possible service, we recommend keeping 
+        a printed copy of your most recent holds list.[% END %]
+    </p>
 </div>
+
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold_result.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold_result.tt2
new file mode 100644
index 0000000..0f03fa8
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold_result.tt2
@@ -0,0 +1,103 @@
+[%  PROCESS "default/opac/parts/misc_util.tt2";
+    PROCESS "default/opac/parts/hold_error_messages.tt2";
+    override_ok = [];
+    fail_count = 0;
+%]
+
+<!-- TODO: CSS for big/strong-->
+
+<div id='holds_box' class='canvas' style='margin-top: 6px;'>
+    <h1>[% l('Place Hold') %]</h1>
+
+    <ul id='hold-items-list'>
+
+    [% FOR hdata IN ctx.hold_data;
+        attrs = {marc_xml => hdata.marc_xml};
+        PROCESS get_marc_attrs args=attrs %]
+        <li>
+            <div class='hold-items-list-title'>[% attrs.title_extended | html %]</div>
+            <div>
+                [% IF hdata.hold_success %]
+
+                <div>[% l("Hold was successfully placed"); %]</div>
+
+                [% ELSIF hdata.hold_failed;
+                    fail_count = fail_count + 1 %]
+
+
+                    <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
+                    [% IF hdata.hold_local_block %]
+                        <div>[% l("There is already a copy available at your local library.") %]</div>
+                    [% ELSIF hdata.hold_failed_event || hdata.hold_local_alert %]
+                        <div>
+                            <span class='hold-items-list-problem'>[% l('Problem:') %]</span>
+                            <span title="[% hdata.hold_failed_event.textcode | html %]">
+                                <em>[%
+                                        fail_part_key = hdata.hold_failed_event.payload.fail_part;
+                                        event_key = hdata.hold_failed_event.textcode;
+
+                                        # display:
+                                        l(FAIL_PART_MSG_MAP.$fail_part_key) ||
+                                        l(EVENT_MSG_MAP.$event_key) ||
+                                        l(hdata.hold_failed_event.desc) ||
+                                        hdata.hold_failed_event.payload.fail_part ||
+                                        hdata.hold_failed_event.textcode ||
+                                        (hdata.hold_local_alert ?
+                                            l("There is already a copy available at your local library.") :
+                                            l("Unknown problem")) | html
+                                    %]</em>
+                                    [% IF event_key == 'PERM_FAILURE' %]
+                                    <div>[% l('Permission: "[_1]"', hdata.hold_failed_event.ilsperm) | html %]</div>
+                                    [% END %]
+                            </span>
+
+                            [% IF hdata.hold_copy_available %]
+                                <p>[%  l('Find a copy in the shelving location, "[_1]."', locname) | html %]</p>
+                            [% END %]
+
+                            [% IF hdata.could_override || hdata.hold_local_alert %]
+                                [% override_ok.push(hdata.target.id) %]
+                                <p>
+                                    <big>[% l("You have permission to place this hold anyway.") %]</big>
+                                    <br />
+                                    [% l("Click submit below to override and place your hold.") %]
+                                </p>
+                                <form method="POST">
+                                    <input type="hidden" type="name" name="override" value="1" />
+                                    <input type="hidden" name="hold_target" value="[% hdata.target.id | html %]" />
+                                    [% FOR k IN ctx.orig_params.keys %]
+                                    <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | html %]" />
+                                    [% END %]
+                                    <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
+                                        alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
+                                </form>
+                            [% END %]
+                        </div>
+                    [% ELSIF hdata.hold_local_block;
+                        l("There is already a copy available at your local library");
+                    END;
+                END %]
+            </div>
+        </li>
+    [% END %]
+    <div>
+        [% IF fail_count > 1 AND fail_count == override_ok.size %]
+            <hr/>
+            <form method="POST">
+                <input type="hidden" type="name" name="override" value="1" />
+                [% FOR k IN ctx.orig_params.keys %]
+                <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | html %]" />
+                [% END %]
+                [% FOR target IN override_ok %]
+                    <input type="hidden" name="hold_target" value="[% target | html %]" />
+                [% END %]
+                <div class='big-strong'>[% l('Override all holds') %]</div>
+                <br/>
+                <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
+                    alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
+            </form>
+        [% END %]
+    </div>
+    </ul>
+</div>
+
diff --git a/Open-ILS/web/templates/default/opac/place_hold.tt2 b/Open-ILS/web/templates/default/opac/place_hold.tt2
index 3e6d2bd..0badd80 100644
--- a/Open-ILS/web/templates/default/opac/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/place_hold.tt2
@@ -9,7 +9,11 @@
     <div id="content-wrapper">
         <div id="main-content">
             <div class="common-full-pad"></div>	
-            [% INCLUDE "default/opac/parts/place_hold.tt2" %]
+            [% IF ctx.hold_attempt_made %]
+                [% INCLUDE "default/opac/parts/place_hold_result.tt2" %]
+            [% ELSE %]
+                [% INCLUDE "default/opac/parts/place_hold.tt2" %]
+            [% END %]
             <div class="common-full-pad"></div>	
         </div>
     </div>

commit f7550e1a26ec9eae0927b03516e5ce214204885b
Author: Dan Scott <dan at coffeecode.net>
Date:   Fri Aug 19 16:46:39 2011 -0400

    T-PAC: Localize payment refund policy message
    
    The policy in all likelihood will differ from library to library anyway,
    but we might as well ensure that it can be translated.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/default/opac/parts/myopac/main_refund_policy.tt2 b/Open-ILS/src/templates/default/opac/parts/myopac/main_refund_policy.tt2
index a1a81f9..0a41658 100644
--- a/Open-ILS/src/templates/default/opac/parts/myopac/main_refund_policy.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/myopac/main_refund_policy.tt2
@@ -1,16 +1,18 @@
 <tr>
     <td colspan="3">
         <br />
-        Important! You must have a printed receipt to be
-        eligible for a refund on lost items (regulations allow
-        for no exceptions).
+        [% l('Important! You must have a printed receipt
+              to be eligible for a refund on lost items
+              (regulations allow for no exceptions).')
+        %]
         <br />
         <strong>
-            To ensure your necessary receipt information is
-            not lost, enter your email address above and a
-            receipt will be emailed to you. Otherwise, make
-            certain you have a printed receipt in hand before
-            closing the payment receipt screen.
+        [% l('To ensure your necessary receipt information
+             is not lost, enter your email address above 
+             and a receipt will be emailed to you. Otherwise,
+             make certain you have a printed receipt in hand
+             before closing the payment receipt screen.')
+        %]
         </strong>
     </td>
 </tr>

commit e7537865c2486e643d47d3974eb6e7d519c2c201
Author: Dan Scott <dan at coffeecode.net>
Date:   Fri Aug 19 16:35:12 2011 -0400

    Disable Google Analytics in T-PAC by default
    
    The option to enable Google Analytics has been turned into a config
    setting in parts/config.tt2 for now, with a place to set the GA account
    code.
    
    Also, get consistent with foo.enabled instead of a mix of foo.enable /
    foo.enabled in config.tt2.
    
    Also, be a bit more careful about whitespace and hide comments in the
    HTML source about things that are disabled (such as ChiliFresh and
    Google Analytics) until they are enabled.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/default/opac/parts/chilifresh.tt2 b/Open-ILS/src/templates/default/opac/parts/chilifresh.tt2
index d58b3f5..937e20f 100644
--- a/Open-ILS/src/templates/default/opac/parts/chilifresh.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/chilifresh.tt2
@@ -1,13 +1,11 @@
-
-<!-- Set up the chilifresh account information and load the JS -->
-
-[%  IF ENV.OILS_CHILIFRESH_URL AND ENV.OILS_CHILIFRESH_ACCOUNT 
+[%-  IF ENV.OILS_CHILIFRESH_URL AND ENV.OILS_CHILIFRESH_ACCOUNT 
             AND (ctx.page == 'rresult' OR ctx.page == 'record');
         chili_url = ENV.OILS_CHILIFRESH_URL;
         IF CGI.https AND ENV.OILS_CHILIFRESH_HTTPS_URL;
             chili_url = ENV.OILS_CHILIFRESH_HTTPS_URL;
         END; 
 %]
+    <!-- Set up the chilifresh account information and load the JS -->
     <input type="hidden" id="chilifresh_account" name="chilifresh_account" value="[% ENV.OILS_CHILIFRESH_ACCOUNT %]"/>
     <!--
     <input type="hidden" id="chilifresh_profile" name="chilifresh_profile" value="[% ENV.OILS_CHILIFRESH_PROFILE %]"/>
@@ -16,5 +14,4 @@
     <input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
     <script type="text/javascript" src="[% chili_url %]"></script>
     <script>try { setTimeout(chili_init, 0); } catch(E) {}</script>
-[% END %]
-
+[%- END %]
diff --git a/Open-ILS/src/templates/default/opac/parts/config.tt2 b/Open-ILS/src/templates/default/opac/parts/config.tt2
index 4c26301..a792838 100644
--- a/Open-ILS/src/templates/default/opac/parts/config.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/config.tt2
@@ -9,7 +9,7 @@
 # RefWorks configuration
 ##############################################################################
 # RefWorks is a Web-based citation manager
-ctx.refworks.enable = 'false';
+ctx.refworks.enabled = 'false';
 
 # Base URL for RefWorks
 ctx.refworks.url = 'http://www.refworks.com';
@@ -32,4 +32,13 @@ ctx.refworks.url = 'http://www.refworks.com';
 openurl.enabled = 'false';
 openurl.baseurl = 'http://sfx.example.com/instance';
 
+##############################################################################
+# Google Analytics support
+##############################################################################
+# You can enable Google Analytics support in Evergreen by entering a
+# valid Google Analytics code and changing 'false' to 'true'
+##############################################################################
+google_analytics.enabled = 'false';
+google_analytics.code = 'UA-9999999-99';
+
 %]
diff --git a/Open-ILS/src/templates/default/opac/parts/js.tt2 b/Open-ILS/src/templates/default/opac/parts/js.tt2
index b69c90b..b117131 100644
--- a/Open-ILS/src/templates/default/opac/parts/js.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/js.tt2
@@ -1,22 +1,24 @@
 <!-- JS imports, etc.  -->
-
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/opac/simple.js"></script>
 
-[% IF ctx.is_staff %]
+[%- PROCESS "default/opac/parts/config.tt2"; %]
+
+[%- IF ctx.is_staff %]
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/opac/staff.js"></script>
-[% END %]
+[%- END %]
 
-[% IF ENV.OILS_NOVELIST_URL AND ctx.page == 'record';
+[%- IF ENV.OILS_NOVELIST_URL AND ctx.page == 'record';
     url = ENV.OILS_NOVELIST_URL;
     IF CGI.https; url = url.replace('^http:', 'https:'); END; %]
 <script type='text/javascript' id='EIT' src='[% url %]'></script>
-[% END %]
+[%- END %]
 
+[%- IF google_analytics.enabled == 'true' %]
 <!-- Google Analytics -->
 <script type="text/javascript">
 /* uncomment when ready */ /*
   var _gaq = _gaq || [];
-  _gaq.push(['_setAccount', 'UA-3018520-10']);
+  _gaq.push(['_setAccount', '[% google_analytics.code %]']);
   _gaq.push(['_trackPageview']);
 
   (function() {
@@ -27,4 +29,4 @@
 */
 </script>
 <!-- End Google Analytics -->
-
+[%- END %]
diff --git a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
index 4aca693..4fed6d0 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
@@ -5,9 +5,9 @@
 <!-- ****************** rdetail_summary.xml ***************************** -->
 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
 
-[% IF ctx.refworks.enable == 'true' %]
+[%- IF ctx.refworks.enabled == 'true' %]
     [% INCLUDE 'default/opac/parts/record/refworks.tt2' %]
-[% END %]
+[%- END %]
 
 <!-- This holds the record summary information -->
 
@@ -80,7 +80,7 @@
                             </td>
                             <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc | html %]</td>
                         </tr>
-                        [% IF openurl.enabled == 'true';
+                        [%- IF openurl.enabled == 'true';
                             FOR issn IN args.issns;
                                 sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl);
                                 FOR res IN sfx;
diff --git a/Open-ILS/src/templates/default/opac/parts/result/table.tt2 b/Open-ILS/src/templates/default/opac/parts/result/table.tt2
index 9884045..75751ff 100644
--- a/Open-ILS/src/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/result/table.tt2
@@ -97,7 +97,7 @@
                                                                 <td>[% attrs.isbns.0 | html %]</td>
                                                             </tr>
                                                         [% END %]
-                                                        [% IF openurl.enabled == 'true';
+                                                        [%- IF openurl.enabled == 'true';
                                                             FOR issn IN args.issns;
                                                                 sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl);
                                                                 FOR res IN sfx;

commit 3c4c4ef5f65c0ad961b47063e6ab1dde2ff35fa3
Merge: 2a72596 9dc1775
Author: Dan Scott <dan at coffeecode.net>
Date:   Fri Aug 19 15:39:12 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into dbs/ttopac-master-merge


commit 2a725966f0a8ba80ecaa5f1b7533e8b5c1df650b
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Aug 19 09:56:48 2011 -0400

    Tpac: fetch bib record piles non-atomicly to avoid large messages
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 3ab34ff..6af3a7a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -236,7 +236,7 @@ sub fetch_marc_xml_by_id {
         "select" => {"bre" => ["id", "marc"]},
         "from" => {"bre" => {}},
         "where" => {"id" => $id_list}
-    }) or return $self->editor->die_event;
+    }, {substream => 1}) or return $self->editor->die_event;
 
     my $marc_xml = {};
     for my $r (@$results) {

commit 2e39c96db9d271e35072a10c9b4b55c3c8840677
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Aug 19 09:56:48 2011 -0400

    Tpac: fetch bib record piles non-atomicly to avoid large messages
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 3ab34ff..6af3a7a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -236,7 +236,7 @@ sub fetch_marc_xml_by_id {
         "select" => {"bre" => ["id", "marc"]},
         "from" => {"bre" => {}},
         "where" => {"id" => $id_list}
-    }) or return $self->editor->die_event;
+    }, {substream => 1}) or return $self->editor->die_event;
 
     my $marc_xml = {};
     for my $r (@$results) {

commit 2af9bebeeb2dd6ceab91d44010cf214701140143
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Aug 19 08:48:04 2011 -0400

    Tpac: stream bookbag entry retrieval to reduce msg size
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 9d3fab0..698f467 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -1134,11 +1134,13 @@ sub load_myopac_bookbags {
         offset => $self->cgi->param('offset') || 0
     };
 
-    $ctx->{bookbags} = $e->search_container_biblio_record_entry_bucket([
-        {owner => $self->editor->requestor->id, btype => 'bookbag'},
-        # XXX what to do about the possibility of really large bookbags here?
-        {"flesh" => 1, "flesh_fields" => {"cbreb" => ["items"]}, %$args}
-    ]);
+    $ctx->{bookbags} = $e->search_container_biblio_record_entry_bucket(
+        [
+            {owner => $self->editor->requestor->id, btype => 'bookbag'},
+            {"flesh" => 1, "flesh_fields" => {"cbreb" => ["items"]}, %$args}
+        ], 
+        {substream => 1}
+    );
 
     if(!$ctx->{bookbags}) {
         $e->rollback;

commit d842599e0df6cb7cd70080eb85556780af078224
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Aug 19 08:48:04 2011 -0400

    Tpac: stream bookbag entry retrieval to reduce msg size
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 9d3fab0..698f467 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -1134,11 +1134,13 @@ sub load_myopac_bookbags {
         offset => $self->cgi->param('offset') || 0
     };
 
-    $ctx->{bookbags} = $e->search_container_biblio_record_entry_bucket([
-        {owner => $self->editor->requestor->id, btype => 'bookbag'},
-        # XXX what to do about the possibility of really large bookbags here?
-        {"flesh" => 1, "flesh_fields" => {"cbreb" => ["items"]}, %$args}
-    ]);
+    $ctx->{bookbags} = $e->search_container_biblio_record_entry_bucket(
+        [
+            {owner => $self->editor->requestor->id, btype => 'bookbag'},
+            {"flesh" => 1, "flesh_fields" => {"cbreb" => ["items"]}, %$args}
+        ], 
+        {substream => 1}
+    );
 
     if(!$ctx->{bookbags}) {
         $e->rollback;

commit 43cab367d7b6bea7481f252c2e270f1d915fd783
Merge: 21b7467 3dfc7f0
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 18 12:27:54 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 7b7f8360915b1fa2ee2406a4e695519dd5c3d70b
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 18 12:17:03 2011 -0400

    Tpac: style inactive holds w/ grey bground
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/default/opac/myopac/holds.tt2 b/Open-ILS/src/templates/default/opac/myopac/holds.tt2
index a835223..df5bd33 100644
--- a/Open-ILS/src/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/holds.tt2
@@ -129,7 +129,7 @@
                     PROCESS get_marc_attrs args=attrs;
                     ahr = hold.hold.hold %]
                 <tr id="acct_holds_temp" name="acct_holds_temp"
-                    class="acct_holds_temp">
+                    class="acct_holds_temp[% ahr.frozen == 't' ? ' inactive-hold' : '' %]">
                     <td width="36" align="center" style="text-align:center;">
                         <input type="checkbox" name="hold_id" value="[% ahr.id %]" />
                     </td>
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index b83cc69..67dc6be 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1027,3 +1027,4 @@ a.dash-link:hover { text-decoration: underline !important; }
 .cn_browse_item { padding: 2ex; }
 
 .results-paginator-selected { color: red; }
+.inactive-hold { background: #e5e5e5; }

commit 21b7467c71a649b6e07558314c506e3f44945dd5
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 18 12:17:03 2011 -0400

    Tpac: style inactive holds w/ grey bground
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index b166507..cd496ab 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1022,3 +1022,4 @@ a.dash-link:hover { text-decoration: underline !important; }
 .cn_browse_item { padding: 2ex; }
 
 .results-paginator-selected { color: red; }
+.inactive-hold { background: #e5e5e5; }
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 7fac506..c2b587e 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -129,7 +129,7 @@
                     PROCESS get_marc_attrs args=attrs;
                     ahr = hold.hold.hold %]
                 <tr id="acct_holds_temp" name="acct_holds_temp"
-                    class="acct_holds_temp">
+                    class="acct_holds_temp[% ahr.frozen == 't' ? ' inactive-hold' : '' %]">
                     <td width="36" align="center" style="text-align:center;">
                         <input type="checkbox" name="hold_id" value="[% ahr.id %]" />
                     </td>

commit 415f78c9862d853d8412f339a29354c58ab56517
Author: Dan Scott <dan at coffeecode.net>
Date:   Thu Aug 18 11:04:20 2011 -0400

    T-PAC: Point the Basic Catalog link to the T-PAC
    
    Now that the T-PAC provides the base functionality (and more!) required
    by the HTML-only basic catalog, but in a more extensible / skinnable
    fashion, replace the link from the JSPAC to the Basic Catalog with a
    link to the T-PAC - and add a reciprocal link from the T-PAC back to the
    JSPAC, in case anybody wants to go that route.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/default/opac/parts/footer.tt2 b/Open-ILS/src/templates/default/opac/parts/footer.tt2
index eb6db18..0443b97 100644
--- a/Open-ILS/src/templates/default/opac/parts/footer.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/footer.tt2
@@ -1,5 +1,9 @@
+[%- 
+    USE CGI = CGI_utf8;
+    hostname = CGI.url({'-base' => 1});
+-%]
 <div id="footer">
-    <a href="http://example.com">[% l('Bottom Link 1') %]</a> &nbsp;|&nbsp;
+    <a href="[% hostname %]">[% l('Dynamic catalog') %]</a> &nbsp;|&nbsp;
     <a href="http://example.com">[% l('Bottom Link 2') %]</a> &nbsp;|&nbsp;
     <a href="http://example.com">[% l('Bottom Link 3') %]</a> &nbsp;|&nbsp;
     <a href="http://example.com">[% l('Bottom Link 4') %]</a> &nbsp;|&nbsp;
diff --git a/Open-ILS/web/opac/skin/default/xml/footer.xml b/Open-ILS/web/opac/skin/default/xml/footer.xml
index ab53c9d..71d77c3 100644
--- a/Open-ILS/web/opac/skin/default/xml/footer.xml
+++ b/Open-ILS/web/opac/skin/default/xml/footer.xml
@@ -1,8 +1,7 @@
 <div id='copyright_block'>
 		<div id='footer_links'>
 				<span class='footer_link'>
-					<a class='classic_link'
-						href='/opac/<!--#echo var="locale"-->/extras/slimpac/start.html'>&opac.basic;</a>
+					<a class='classic_link' href='/eg/opac/home'>&opac.basic;</a>
 				</span> 
 				<span> | </span>
 				<span class='footer_link'>

commit 60cb2b9d3eca7b2d1807bad96b06ef7befe469dd
Merge: 23f951a 3dfc7f0
Author: Dan Scott <dan at coffeecode.net>
Date:   Thu Aug 18 09:22:17 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into dbs/ttopac-master-merge


commit 23f951a15724538e67cef3529cc81f233077e66f
Author: Dan Scott <dan at coffeecode.net>
Date:   Thu Aug 18 07:36:18 2011 -0400

    TPAC: Remove one more KCLS reference
    
    KCLS probably doesn't want us to link to their libraries from every
    Evergreen instance...
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
index 38685ed..4aca693 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
@@ -162,13 +162,11 @@
         FOR copy_info IN ctx.copies;
             NEXT IF copy_info.call_number_label == '##URI##' %]
         <tr>
-            <td>[%
-                # XXX KCLS-specific kludging
+            <td>
+            [%-
                 org_name = ctx.get_aou(copy_info.circ_lib).name;
-                dir = org_name | lower | replace('[^\w]', '') |
-                    replace('.+320th', '320th'); %]
-                <a href="http://www.kcls.org/[% dir %]/"
-                    class="classic_link">[% org_name %]</a>
+                org_name | html
+            -%]
             </td>
             <td>[% copy_info.call_number_label | html %]</td>
             <td>[% copy_info.barcode | html %]</td>

commit 060e9c47484116a1fcbdccb47ba4e349138f4466
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 17 17:37:13 2011 -0400

    Tpac: repaired propagator casulaty; using mkurl instead
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index ccce432..ac55055 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -65,7 +65,7 @@
     [% UNLESS took_care_of_form %]</form>[% END %]
     [% IF (is_advanced AND NOT is_special) AND CGI.param('qtype') %]
     <div class="opac-auto-102">
-        [ <a href="[% ctx.opac_root %]/advanced?[% query_string %]">[%
+        [ <a href="[% mkurl(ctx.opac_root _ '/advanced') %]">[%
             l('Click to Refine Your Original Search')
         %]</a> ]
     </div>

commit f67c71f4452d184693b59bfea43215fa100124b3
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Aug 17 17:18:54 2011 -0400

    TPAC: Strip the "page" GET param from author searches
    
    mkurl() generates a URL that, by default, retains all of the parameters
    that the currnt query string includes - useful for retaining library
    search scope, etc. However, searches for authors that are launched by
    clicking on the author's name in the search results page / record
    details were failing in many cases because the "page" parameter came
    along with it - and if there weren't five pages of results for page=5,
    for example, then no hits would be shown.
    
    This commit removes the page param from the URL. In other places, all of
    the params are stripped (see cnbrowse) but as I assume we want to retain
    search scope and potentially other parameters, we'll start with the
    smallest possible change.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 96d0988..f66c7bf 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -26,7 +26,7 @@
                                     id='rdetail_author'
                                     href="[%- 
                                         authorquery = attrs.author | replace('[,\.:;]', '');
-                                        mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
+                                        mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
                                         -%]">[% attrs.author | html %]</a></em>
                             [% END %]
                         </td>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index ce8562e..ad97115 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -59,7 +59,7 @@
                                                                 name='item_author'
                                                                 href="[%- 
                                                                     authorquery = attrs.author | replace('[,\.:;]', '');
-                                                                    mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
+                                                                    mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
                                                                     -%]">[% attrs.author | html %]</a></em>
                                                         &nbsp;&nbsp;
                                                         [% attrs.pubdate | html %]

commit eb25c85bcf277e341a94bb7d8bf5b70c045ee0e9
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Aug 17 16:43:46 2011 -0400

    Mark a string for i18n support in the TPAC
    
    Even alt strings deserve translation support...
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index a49b2ec..d368a70 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -38,7 +38,7 @@
                 [% IF ctx.mylist.size %]
                 <div class="results_header_btns cached_list_div">
                     <a href="[% ctx.opac_root; ctx.user ? '/myopac/lists' : '/mylist' %]"><img
-                        alt="View My List"
+                        alt="[% l('View My List') %]"
                         src="[% ctx.media_prefix %]/images/view_my_list.png"
                         onmouseover="this.src='[% ctx.media_prefix %]/images/view_my_list_hover.png';"
                         onmouseout="this.src='[% ctx.media_prefix %]/images/view_my_list.png';" /></a>

commit b38535de56dfd8a909811bf9822c90e6d679fdf6
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Aug 17 15:36:15 2011 -0400

    Escape TPAC "myopac" output to protect against XSS attacks
    
    We're using the Template::Toolkit html and uri filters to ensure that
    the usual suspects are escaped at output time to prevent trivial XSS
    attacks.
    
    berick: did some merge cleanup
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
index a095558..55bbc00 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
@@ -71,9 +71,9 @@
                     <tr>
                         <td style="padding-left:5px;padding-bottom:10px;">
                             <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" 
-                                name="[% l('Catalog record') %]">[% attrs.title %]</a>
+                                name="[% l('Catalog record') %]">[% attrs.title | html %]</a>
                             [% IF attrs.author %] /
-                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
                             [% END %]
                         </td>
                         <td style="padding-left:5px;">
@@ -90,8 +90,8 @@
                                 <span style='color:blue;'>*</span><!-- meh -->
                             [% END; %]
                         </td>
-                        <td>[% circ.circ.target_copy.barcode %]</td>
-                        <td>[% circ.circ.target_copy.call_number.label %]</td>
+                        <td>[% circ.circ.target_copy.barcode | html %]</td>
+                        <td>[% circ.circ.target_copy.call_number.label | html %]</td>
                     </tr>
                 [% END %]
             </tbody>
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 67f94b8..107597b 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -106,9 +106,9 @@
                         <td width="40%"
                             style="padding-left:5px;padding-bottom:10px;"
                             name="author">
-                            <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" name="[% l('Catalog record') %]">[% attrs.title %]</a>
+                            <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" name="[% l('Catalog record') %]">[% attrs.title | html %]</a>
                             [% IF attrs.author %] /
-                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
                             [% END %]
                         </td>
                         <td width="8%" name="renewals" align="center">
@@ -119,18 +119,18 @@
                             [% date.format(ctx.parse_datetime(circ.circ.due_date),DATE_FORMAT) %]
                         </td>
                         <td width="16%" name="barcode">
-                            [% circ.circ.target_copy.barcode %]
+                            [% circ.circ.target_copy.barcode | html %]
                         </td>
                         <td width="22%" name="call_number">
-                            [% circ.circ.target_copy.call_number.label %]
+                            [% circ.circ.target_copy.call_number.label | html %]
                         </td>
                     </tr>
                     [%  IF circ.renewal_response AND
                             circ.renewal_response.textcode != 'SUCCESS' %]
                     <tr>
                         <td colspan="6">[%# XXX colspan="0" does not work in IE %]
-                            <span class="failure-text" title="[% circ.renewal_response.textcode %] / [% circ.renewal_response.payload.fail_part %]">
-                                [% circ.renewal_response.desc || circ.renewal_response.payload.fail_part || circ.renewal_response.textcode %]
+                            <span class="failure-text" title="[% circ.renewal_response.textcode | html %] / [% circ.renewal_response.payload.fail_part | html %]">
+                                [% (circ.renewal_response.desc || circ.renewal_response.payload.fail_part || circ.renewal_response.textcode) | html %]
                             </span>
                         </td>
                     </tr>
diff --git a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
index 43f3256..0419cd3 100644
--- a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
@@ -81,7 +81,7 @@
                         </div>
                     </td>
                     <td width="136">
-                        [% ctx.get_aou(ahr.pickup_lib).name %]
+                        [% ctx.get_aou(ahr.pickup_lib).name | html %]
                     </td>
                     <td width="104">
                         [% IF ahr.frozen == 't' AND ahr.thaw_date;
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index a6bb670..7fac506 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -154,7 +154,7 @@
                         </div>
                     </td>
                     <td width="136">
-                        [% ctx.get_aou(ahr.pickup_lib).name %]
+                        [% ctx.get_aou(ahr.pickup_lib).name | html %]
                     </td>
                     <td width="104">
                         <!-- <input
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2
index 2fda76c..f432697 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2
@@ -23,14 +23,14 @@
     </div>
     <div id="hold_editor">
         [% IF hold %]
-            <h1>[% attrs.title %]</h1>
-            <h2>[% attrs.author %]</h2>
+            <h1>[% attrs.title | html %]</h1>
+            <h2>[% attrs.author | html %]</h2>
             [% IF attrs.format_icon %]<p>
                 <strong>[% l('Format:') %]</strong>
-                <img src="[% ctx.media_prefix %]/images/[% attrs.format_icon %]" alt="[% attrs.format %]" title="[% attrs.title %]" />
+                <img src="[% ctx.media_prefix %]/images/[% attrs.format_icon %]" alt="[% attrs.format %]" title="[% attrs.title | html %]" />
             </p>[% END %]
             <p>
-                <strong>[% l('Status') %]</strong>: [% hold.human_status %]
+                <strong>[% l('Status') %]</strong>: [% hold.human_status | html %]
             </p>
             <form method="POST">
                 <table id="hold_editor_table">
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index ba8d556..87aec45 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -80,9 +80,9 @@
                     <big><strong>
                     [% IF bbag.pub == 't' %]
                         [% url = 'http://' _ ctx.hostname _ '/opac/extras/feed/bookbag/html-full/' _ bbag.id %]
-                        <a target='_blank' href='[% url %]'>[% bbag.name %]</a>
+                        <a target='_blank' href='[% url %]'>[% bbag.name | html %]</a>
                     [% ELSE %]
-                    [% bbag.name %]
+                    [% bbag.name | html %]
                     [% END %]
                     </strong></big>
                 </div>
@@ -131,9 +131,9 @@
                         attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
                         PROCESS get_marc_attrs args=attrs %]
                     <tr>
-                        <td class="opac-auto-097b" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
-                        <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title %]</td>
-                        <td class="opac-auto-097b">[% attrs.author %]</td>
+                        <td class="item_list_padding" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
+                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.title | html %]</td>
+                        <td class="item_list_padding">[% attrs.author | html %]</td>
                     </tr>
                     [% END %]
                 </tbody>
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 354b5b0..818d75c 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -41,13 +41,13 @@
                     <td>
                         [% recid = f.xact.circulation.target_copy.call_number.record.id || f.xact.reservation.target_resource_type.record.id;
                         IF recid; %]
-                        <a href="[% ctx.opac_root %]/record/[% recid %]">[% attrs.title %]</a>
+                        <a href="[% ctx.opac_root %]/record/[% recid %]">[% attrs.title | html %]</a>
                         [% ELSE %]
-                        [% attrs.title %]
+                        [% attrs.title | html %]
                         [% END %]
                     </td>
                     <td>
-                        <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                        <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
                     </td>
                     <td name='myopac_circ_trans_start'>
                         [% ts = f.xact.circulation.xact_start || f.xact.reservation.start_time || 0;
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
index ac68b6e..e1cfcbd 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
@@ -37,7 +37,7 @@
                     (ctx.printable_receipt.textcode ? ctx.printable_receipt.textcode _ ' / ' _ ctx.printable_receipt.desc : 0) ||
                     ctx.printable_receipt.error_output.data ||
                     l('No receipt data returned from server')
-                ) %]
+                ) | html %]
         </div>
         [% END %]
         <p>[ <a href="[% ctx.opac_root %]/myopac/main">[%
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
index 52534d2..55cf823 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
@@ -59,7 +59,7 @@
                                     attrs.title = f.xact.reservation.target_resource_type.name;
                                 END %]
                                 <tr>
-                                    <td>[% attrs.title %]</td>
+                                    <td>[% attrs.title | html %]</td>
                                     <td class="text-right">[% money(f.xact.balance_owed) %]</td>
                                 </tr>
                             [%
@@ -68,7 +68,7 @@
                                 NEXT IF CGI.param('xact_misc').size &&
                                     !CGI.param('xact_misc').grep(f.xact.id).size %]
                                 <tr>
-                                    <td>[% f.xact.last_billing_type %]</td>
+                                    <td>[% f.xact.last_billing_type | html %]</td>
                                     <td class="text-right">[% money(f.xact.balance_owed) %]</td>
                                 </tr>
                             [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
index 0a3b192..80755fb 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
@@ -32,7 +32,11 @@
             [% FOR payment IN ctx.payments %]
             <tr>
                 <td>[% date.format(ctx.parse_datetime(payment.mp.payment_ts), DATE_FORMAT) %]</td>
-                <td>[% (payment.xact_type == 'grocery') ? payment.last_billing_type : payment.title %]</td>
+                <td>[% 
+                    btype = payment.last_billing_type | html;
+                    ptitle = payment.title | html;
+                    (payment.xact_type == 'grocery') ? btype : ptitle
+                %]</td>
                 <td>[% money(payment.mp.amount) %]</td>
                 <td>
                     <form action="[% ctx.opac_root %]/myopac/receipt_print" method="POST">
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
index 8ceeec3..17783b3 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
@@ -198,7 +198,7 @@
             <tr>
                 <td class='color_4 light_border'>
                 [% l("Home Library") %]</td>
-                <td class='light_border'>[% ctx.user.home_ou.name %]</td>
+                <td class='light_border'>[% ctx.user.home_ou.name | html %]</td>
                 <td><a href='#'
                    class="hide_me"
                    style='text-decoration: underline;'>[% l("Change") %]</a></td>
@@ -255,7 +255,7 @@
                                 IF addr.pending == "t";
                                     "<strong>" _ l("*** PENDING ***") _ "</strong> ";
                                 END;
-                                addr.address_type | lower | ucfirst;
+                                addr.address_type | lower | ucfirst | html ;
                             %]</td>
                         </tr>
                         <tr>
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs_notify.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs_notify.tt2
index 14a824e..da3d520 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs_notify.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs_notify.tt2
@@ -21,10 +21,10 @@
             [% END %]
             [% FOR optin IN ctx.opt_in_settings %]
                 <tr>
-                    <td>[% optin.cust.label %]</td>
+                    <td>[% optin.cust.label | html %]</td>
                     <td>
                         <input type='checkbox' name='setting' 
-                            value='[% optin.cust.name %]' 
+                            value='[% optin.cust.name | uri %]' 
                             [% IF optin.value %] checked='checked' [% END %]/>
                     </td>
                 </tr>
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
index fda86fe..e664e91 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
@@ -37,9 +37,9 @@
                         [% setting = 'opac.hits_per_page' %]
                         <select name='[% setting %]'>
                             [%  FOR val IN [5, 8, 10, 15, 20, 25, 50] %]
-                                <option value='[% val %]' 
+                                <option value='[% val | uri %]' 
                                     [% IF ctx.user_setting_map.$setting == val %]
-                                        selected='selected'[% END %]>[% val %]</option>
+                                        selected='selected'[% END %]>[% val | html %]</option>
                             [% END %]
                         </select>
                     </td>
diff --git a/Open-ILS/web/templates/default/opac/myopac/receipt_email.tt2 b/Open-ILS/web/templates/default/opac/myopac/receipt_email.tt2
index 51acccb..3745e5f 100644
--- a/Open-ILS/web/templates/default/opac/myopac/receipt_email.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/receipt_email.tt2
@@ -5,12 +5,14 @@
     [% IF ctx.email_receipt_result; # result should be undef on success %]
     <div class="payment-error">
         [% l('Error preparing receipt:') %]
-        <span title="[% ctx.email_receipt_result.textcode %]">
-            [% ctx.email_receipt_result.desc %]
+        <span title="[% ctx.email_receipt_result.textcode | html %]">
+            [% ctx.email_receipt_result.desc | html %]
         </span>
     </div>
     [% ELSE %]
-    <div>[% l('Your receipt will be emailed to [_1]', ctx.user.email) %]</div>
+    <div>
+        [% l('Your receipt will be emailed to [_1]', ctx.user.email) | html %]
+    </div>
     [% END %]
     <p>
         [ <a href="[% ctx.opac_root %]/myopac/main_payments">[%
diff --git a/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2 b/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2
index 766f9b5..fe68495 100644
--- a/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2
@@ -15,7 +15,7 @@
                     (ctx.printable_receipt.textcode ? ctx.printable_receipt.textcode _ ' / ' _ ctx.printable_receipt.desc : 0) ||
                     ctx.printable_receipt.error_output.data ||
                     l('No receipt data returned from server')
-                ) %]
+                ) | html %]
         </div>
         [% END %]
         <hr />
diff --git a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2 b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
index a6e62ec..6bbedf2 100644
--- a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
@@ -6,9 +6,7 @@
 
 [% IF ctx.invalid_email %]
     <div id='account-update-email-error'>
-        [% | l(ctx.invalid_email) %]
-        The email address "<b>[_1]</b>" is invalid.  Please try a different email address.
-        [% END %]
+        [% l('The email address "<b>[_1]</b>" is invalid.  Please try a different email address.', ctx.invalid_email) | html %]
     </div>
 [% END %]
 
diff --git a/Open-ILS/web/templates/default/opac/myopac/update_username.tt2 b/Open-ILS/web/templates/default/opac/myopac/update_username.tt2
index 1294917..017d753 100644
--- a/Open-ILS/web/templates/default/opac/myopac/update_username.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/update_username.tt2
@@ -6,14 +6,13 @@
 
 [% IF ctx.invalid_username %]
     <div id='account-update-email-error'> <!-- borrow css from update-email page -->
-        [% | l(ctx.invalid_username) %]
-        "<b>[_1]</b>" is not a valid username.  Usernames cannot have any spaces.  Please try a different username.
-        [% END %]
+        [% l('"<b>[_1]</b>" is not a valid username.  Usernames cannot have any spaces.  Please try a different username.', ctx.invalid_username) | html %]
     </div>
 
 [% ELSIF ctx.username_exists %]
     <div id='account-update-email-error'>
-        [% | l(ctx.username_exists) %]
+        [% bad_user = ctx.username_exists | html %]
+        [% | l(bad_user) %]
         The username "<b>[_1]</b>" is taken.  Please try a different username.
         [% END %]
     </div>

commit 9a3c9bd5b4fdc0e40078c8bd726623e762c8cc13
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Aug 17 13:01:08 2011 -0400

    Assume username, not barcode, in TPAC login
    
    In the absence of a barcode regex OU setting (opac.barcode_regex), the
    TPAC was assuming that the entered value was a barcode. However, the
    default JSPAC assumption was that the entered value was a username. This
    commit makes the TPAC continue to function with the same assumptions as
    the default JSPAC in the absence of a barcode regex OU setting.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 6412907..a9d0565 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -288,15 +288,15 @@ sub load_login {
 		'open-ils.auth.authenticate.init', $username);
 
     my $args = {	
-        barcode => $username, 
+        username => $username, 
         password => md5_hex($seed . md5_hex($password)), 
         type => ($persist) ? 'persist' : 'opac' 
     };
 
     my $bc_regex = $ctx->{get_org_setting}->($org_unit, 'opac.barcode_regex');
 
-    $args->{username} = delete $args->{barcode} 
-        if $bc_regex and !($username =~ /$bc_regex/);
+    $args->{barcode} = delete $args->{username} 
+        if $bc_regex and ($username =~ /$bc_regex/);
 
 	my $response = $U->simplereq(
         'open-ils.auth', 'open-ils.auth.authenticate.complete', $args);

commit 16b9e665371dae76fde0db3e0b63387e89a895df
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Aug 17 17:18:54 2011 -0400

    TPAC: Strip the "page" GET param from author searches
    
    mkurl() generates a URL that, by default, retains all of the parameters
    that the currnt query string includes - useful for retaining library
    search scope, etc. However, searches for authors that are launched by
    clicking on the author's name in the search results page / record
    details were failing in many cases because the "page" parameter came
    along with it - and if there weren't five pages of results for page=5,
    for example, then no hits would be shown.
    
    This commit removes the page param from the URL. In other places, all of
    the params are stripped (see cnbrowse) but as I assume we want to retain
    search scope and potentially other parameters, we'll start with the
    smallest possible change.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
index d77c07f..38685ed 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
@@ -34,7 +34,7 @@
                                     id='rdetail_author'
                                     href="[%- 
                                         authorquery = attrs.author | replace('[,\.:;]', '');
-                                        mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
+                                        mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
                                         -%]">[% attrs.author | html %]</a></em>
                             [% END %]
                         </td>
diff --git a/Open-ILS/src/templates/default/opac/parts/result/table.tt2 b/Open-ILS/src/templates/default/opac/parts/result/table.tt2
index a22308d..9884045 100644
--- a/Open-ILS/src/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/result/table.tt2
@@ -62,7 +62,7 @@
                                                                 name='item_author'
                                                                 href="[%- 
                                                                     authorquery = attrs.author | replace('[,\.:;]', '');
-                                                                    mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
+                                                                    mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
                                                                     -%]">[% attrs.author | html %]</a></em>
                                                         &nbsp;&nbsp;
                                                         [% attrs.pubdate | html %]

commit deadf59b3d98b52ee1175843c7fe91836cfb16ae
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 17 16:55:43 2011 -0400

    TPac: Removed errant 'html' almost-filter
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
index 5f3e74d..d77c07f 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
@@ -176,7 +176,7 @@
             [% IF ctx.is_staff %]
             <td>
                 [% copy_info.age_protect ?
-                    ctx.get_crahp(copy_info.age_protect).name html : l('None') | html %]
+                    ctx.get_crahp(copy_info.age_protect).name : l('None') | html %]
             </td>
             <td>[% date.format(
                 ctx.parse_datetime(copy_info.create_date),

commit f95c4db643391cbb63f35ff321dc5cbbac75b6c3
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 17 16:50:50 2011 -0400

    Tpac: more html output sanitizing
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/default/opac/parts/record/authors.tt2 b/Open-ILS/src/templates/default/opac/parts/record/authors.tt2
index 93a8b83..7304aeb 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/authors.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/authors.tt2
@@ -42,7 +42,7 @@ END;
     NEXT UNLESS author.xpath; 
     links = PROCESS build_author_links(xpath=author.xpath);
     IF links.match('\S') %]
-    <strong>[% author.label %]</strong>
+    <strong>[% author.label | html %]</strong>
     <div class='rdetail-author-div'>[% links %]</div>
     [% END %]
 [% END %]
diff --git a/Open-ILS/src/templates/default/opac/parts/record/awards.tt2 b/Open-ILS/src/templates/default/opac/parts/record/awards.tt2
index 57f1003..25fdd55 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/awards.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/awards.tt2
@@ -4,8 +4,8 @@
         <!-- Chilifresh patron reviews -->
         <strong>[% l('Patron Reviews:') %]</strong>
         <div style="margin-bottom:20px;">
-            <div class="chili_review" id="isbn_[% attrs.isbn_clean %]"> </div>
-            <div id="chili_review_[% attrs.isbn_clean %]" style="display: none;" align="center" width="100%"></div>
+            <div class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </div>
+            <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center" width="100%"></div>
         </div>
     
         <!-- Reviews from added content provider -->
diff --git a/Open-ILS/src/templates/default/opac/parts/record/cnbrowse.tt2 b/Open-ILS/src/templates/default/opac/parts/record/cnbrowse.tt2
index 83621b1..1b83642 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/cnbrowse.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/cnbrowse.tt2
@@ -1,10 +1,13 @@
-[% cnoffset = CGI.param('cnoffset') || 0; %]
+[% 
+    cnoffset = CGI.param('cnoffset');
+    cnoffset = cnoffset.match('^\d+$') ? cnoffset : 0; # verify cnoffset is a sane value
+%]
 
 <div id='cn_browse' class='cn_browser'>
     <div id='cn_browse_div'> 
         <div class='color_4'>
             <span>[% l("You are now browsing") %]</span>
-            <strong>[% ctx.browsing_ou.name %]</strong>
+            <strong>[% ctx.browsing_ou.name | html %]</strong>
         </div>
         <table class='data_grid bookshelf' width='100%'>
             <thead>
@@ -32,21 +35,21 @@
                             IF ident %]
                         <a href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {}, 1) %]"><img height='60' width='50' 
                             class='cn_browse_info' name='cn_browse_pic' border='0'
-                            src="[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]" /></a>
+                            src="[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident | uri %]" /></a>
                         [% END %]
-                        <div class='cn_browse_info bold' name='cn_browse_cn'>[% cn.label %]</div>
+                        <div class='cn_browse_info bold' name='cn_browse_cn'>[% cn.label | html %]</div>
                         <div class='cn_browse_info'>
                             <a name='cn_browse_title' class='classic_link' 
-                                href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {}, 1) %]">[% rec_attrs.title %]</a>
+                                href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {}, 1) %]">[% rec_attrs.title | html %]</a>
                         </div>
                         [% IF rec_attrs.author %]<div class='cn_browse_info'>
                             <a name='cn_browse_author' class='classic_link'
                                 href="[%-
                                     authorquery = rec_attrs.author | replace('[,\.:;]', '');
                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, 1)
-                                    -%]">[% rec_attrs.author | html_entity %]</a>
+                                    -%]">[% rec_attrs.author | html %]</a>
                         </div>[% END %]
-                        <div class='cn_browse_info' name='cn_browse_lib'>[% cn.owning_lib.name %]</div>
+                        <div class='cn_browse_info' name='cn_browse_lib'>[% cn.owning_lib.name | html %]</div>
                     </td>
                 [% IF loop.index % 3 == 2; tr_open = 0 %]
                 </tr>
diff --git a/Open-ILS/src/templates/default/opac/parts/record/issues.tt2 b/Open-ILS/src/templates/default/opac/parts/record/issues.tt2
index 4f9f295..551567d 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/issues.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/issues.tt2
@@ -11,7 +11,7 @@ FOREACH type IN ctx.holding_summaries.keys;
         <table>
             [% FOR blob IN ctx.expanded_holdings %]
             <tr>
-                <td class="rdetail-issue-issue">[% blob.issuance.label %]</td>
+                <td class="rdetail-issue-issue">[% blob.issuance.label | html %]</td>
                 [% IF blob.has_units %]
                 <td class="rdetail-issue-place-hold">
                     <a href="[% ctx.opac_root %]/place_hold?hold_target=[% blob.issuance.id %]&amp;hold_type=I">[% l("Place Hold") %]</a>
diff --git a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
index 53c22d2..5f3e74d 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
@@ -1,6 +1,6 @@
 [%  PROCESS "default/opac/parts/misc_util.tt2";
     USE ResolverResolver;
-    ctx.page_title = attrs.title | html_entity
+    ctx.page_title = attrs.title | html
 %]
 <!-- ****************** rdetail_summary.xml ***************************** -->
 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
@@ -16,9 +16,9 @@
         <tr>
             <td width="90" valign="top" id="rdetail_image_cell">
                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
-                <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident %]'><img
+                <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident | uri %]'><img
                     alt="[% l('Image of item') %]" id='rdetail_image'
-                    src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/[% ident %]' /></a>
+                    src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/[% ident | uri %]' /></a>
                 [% END %]
                 <br />
             </td>
@@ -27,7 +27,7 @@
                 <table border="0" cellpadding="0" cellspacing="0" width="100%">
                     <tr>
                         <td valign="top">
-                            <span id='rdetail_title'>[% attrs.title_extended | html_entity %]</span><br />
+                            <span id='rdetail_title'>[% attrs.title_extended | html %]</span><br />
                             [% IF attrs.author %]
                             <span class='opac-auto-030'>[% l("Author") %]:</span>
                             <em><a title='[% l("Perform an author search") %]'
@@ -35,7 +35,7 @@
                                     href="[%- 
                                         authorquery = attrs.author | replace('[,\.:;]', '');
                                         mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
-                                        -%]">[% attrs.author | html_entity %]</a></em>
+                                        -%]">[% attrs.author | html %]</a></em>
                             [% END %]
                         </td>
                         <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
@@ -59,7 +59,7 @@
                                 </div>
                                 <div style="float:right;margin-right:17px;">
                                     [% IF attrs.format_icon %]
-                                    <img alt="[% attrs.format_label %]" title="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
+                                    <img alt="[% attrs.format_label %]" title="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
                                     [% END %]
                                 </div>
                             </div>
@@ -73,12 +73,12 @@
                                 [% IF attrs.isbns.0 %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
                             </td>
                             <td valign="top" id='rdetail_isbn'>
-                                [% FOR isbn IN attrs.isbns %][% IF !loop.first; %]<br/>[% END; isbn; END %]
+                                [% FOR isbn IN attrs.isbns %][% IF !loop.first; %]<br/>[% END; isbn | html ; END %]
                             </td>
                             <td nowrap='nowrap' valign="top">
                                 [% IF attrs.phys_desc %]<strong id="rdetail_phys_lbl">[% l("Physical Description") %]</strong>[% END %]
                             </td>
-                            <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc %]</td>
+                            <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc | html %]</td>
                         </tr>
                         [% IF openurl.enabled == 'true';
                             FOR issn IN args.issns;
@@ -99,21 +99,21 @@
                             <td nowrap='nowrap' valign="top">
                                 <strong>[% IF attrs.marc_cn; l("Call Number"); END %]</strong>
                             </td>
-                            <td valign="top">[% attrs.marc_cn %]</td>
+                            <td valign="top">[% attrs.marc_cn | html %]</td>
                             <td nowrap='nowrap' valign="top">
                                 <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
                             </td>
-                            <td valign="top" id='rdetail_edition'>[% attrs.edition %]</td>
+                            <td valign="top" id='rdetail_edition'>[% attrs.edition | html %]</td>
                         </tr>
                         <tr>
                             <td nowrap='nowrap' valign="top">
                                 <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
                             </td>
-                            <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
+                            <td valign="top" id='rdetail_publisher'>[% attrs.publisher | html %]</td>
                             <td nowrap='nowrap' valign="top">
                                 <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
                             </td>
-                            <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
+                            <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate | html %]</td>
                         </tr>
                     </table>
 
@@ -170,13 +170,13 @@
                 <a href="http://www.kcls.org/[% dir %]/"
                     class="classic_link">[% org_name %]</a>
             </td>
-            <td>[% copy_info.call_number_label %]</td>
-            <td>[% copy_info.barcode %]</td>
-            <td>[% copy_info.copy_location %]</td>
+            <td>[% copy_info.call_number_label | html %]</td>
+            <td>[% copy_info.barcode | html %]</td>
+            <td>[% copy_info.copy_location | html %]</td>
             [% IF ctx.is_staff %]
             <td>
                 [% copy_info.age_protect ?
-                    ctx.get_crahp(copy_info.age_protect).name : l('None') %]
+                    ctx.get_crahp(copy_info.age_protect).name html : l('None') | html %]
             </td>
             <td>[% date.format(
                 ctx.parse_datetime(copy_info.create_date),
@@ -199,7 +199,7 @@
                         l("No");
                     END %]</td>
             [% END %]
-            <td>[% copy_info.copy_status %]</td>
+            <td>[% copy_info.copy_status | html %]</td>
             <td>[%
                 IF copy_info.due_date;
                     date.format(
diff --git a/Open-ILS/src/templates/default/opac/parts/record/summaryplus.tt2 b/Open-ILS/src/templates/default/opac/parts/record/summaryplus.tt2
index 4b7552f..d397b48 100644
--- a/Open-ILS/src/templates/default/opac/parts/record/summaryplus.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/summaryplus.tt2
@@ -4,7 +4,7 @@
         <strong>[% l('Summary: ') %]</strong>
         [% FOR sum IN attrs.summary %]
             [% IF !loop.first; '<br/>'; END %]
-            <span>[% sum %] </span>
+            <span>[% sum | html %] </span>
         [% END %]
     </div>
     [% END %]
@@ -13,7 +13,7 @@
     [% ident = attrs.isbn_clean || attrs.upc %]
     <iframe width="100%" height="400" frameborder="0" 
         src="http[% CGI.https ? 's' : '' %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
-            ENV.OILS_CONTENT_CAFE_USER %]&Password=[% ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident %]&Options=Y" >
+            ENV.OILS_CONTENT_CAFE_USER %]&Password=[% ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident | uri %]&Options=Y" >
     </iframe>
 </div>
 

commit 861fcbdede629fa6f48def88925aaf9f73627cc9
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 17 16:55:43 2011 -0400

    TPac: Removed errant 'html' almost-filter
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index e9cd335..96d0988 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -150,7 +150,7 @@
             [% IF ctx.is_staff %]
             <td>
                 [% copy_info.age_protect ?
-                    ctx.get_crahp(copy_info.age_protect).name html : l('None') | html %]
+                    ctx.get_crahp(copy_info.age_protect).name : l('None') | html %]
             </td>
             <td>[% date.format(
                 ctx.parse_datetime(copy_info.create_date),

commit 623b057c2f582d03109560b69ad74d08d266e7aa
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 17 16:50:50 2011 -0400

    Tpac: more html output sanitizing
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/authors.tt2 b/Open-ILS/web/templates/default/opac/parts/record/authors.tt2
index 93a8b83..7304aeb 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/authors.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/authors.tt2
@@ -42,7 +42,7 @@ END;
     NEXT UNLESS author.xpath; 
     links = PROCESS build_author_links(xpath=author.xpath);
     IF links.match('\S') %]
-    <strong>[% author.label %]</strong>
+    <strong>[% author.label | html %]</strong>
     <div class='rdetail-author-div'>[% links %]</div>
     [% END %]
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/record/awards.tt2 b/Open-ILS/web/templates/default/opac/parts/record/awards.tt2
index 57f1003..25fdd55 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/awards.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/awards.tt2
@@ -4,8 +4,8 @@
         <!-- Chilifresh patron reviews -->
         <strong>[% l('Patron Reviews:') %]</strong>
         <div style="margin-bottom:20px;">
-            <div class="chili_review" id="isbn_[% attrs.isbn_clean %]"> </div>
-            <div id="chili_review_[% attrs.isbn_clean %]" style="display: none;" align="center" width="100%"></div>
+            <div class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </div>
+            <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center" width="100%"></div>
         </div>
     
         <!-- Reviews from added content provider -->
diff --git a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
index 83621b1..1b83642 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
@@ -1,10 +1,13 @@
-[% cnoffset = CGI.param('cnoffset') || 0; %]
+[% 
+    cnoffset = CGI.param('cnoffset');
+    cnoffset = cnoffset.match('^\d+$') ? cnoffset : 0; # verify cnoffset is a sane value
+%]
 
 <div id='cn_browse' class='cn_browser'>
     <div id='cn_browse_div'> 
         <div class='color_4'>
             <span>[% l("You are now browsing") %]</span>
-            <strong>[% ctx.browsing_ou.name %]</strong>
+            <strong>[% ctx.browsing_ou.name | html %]</strong>
         </div>
         <table class='data_grid bookshelf' width='100%'>
             <thead>
@@ -32,21 +35,21 @@
                             IF ident %]
                         <a href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {}, 1) %]"><img height='60' width='50' 
                             class='cn_browse_info' name='cn_browse_pic' border='0'
-                            src="[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]" /></a>
+                            src="[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident | uri %]" /></a>
                         [% END %]
-                        <div class='cn_browse_info bold' name='cn_browse_cn'>[% cn.label %]</div>
+                        <div class='cn_browse_info bold' name='cn_browse_cn'>[% cn.label | html %]</div>
                         <div class='cn_browse_info'>
                             <a name='cn_browse_title' class='classic_link' 
-                                href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {}, 1) %]">[% rec_attrs.title %]</a>
+                                href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {}, 1) %]">[% rec_attrs.title | html %]</a>
                         </div>
                         [% IF rec_attrs.author %]<div class='cn_browse_info'>
                             <a name='cn_browse_author' class='classic_link'
                                 href="[%-
                                     authorquery = rec_attrs.author | replace('[,\.:;]', '');
                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, 1)
-                                    -%]">[% rec_attrs.author | html_entity %]</a>
+                                    -%]">[% rec_attrs.author | html %]</a>
                         </div>[% END %]
-                        <div class='cn_browse_info' name='cn_browse_lib'>[% cn.owning_lib.name %]</div>
+                        <div class='cn_browse_info' name='cn_browse_lib'>[% cn.owning_lib.name | html %]</div>
                     </td>
                 [% IF loop.index % 3 == 2; tr_open = 0 %]
                 </tr>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/issues.tt2 b/Open-ILS/web/templates/default/opac/parts/record/issues.tt2
index 4f9f295..551567d 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/issues.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/issues.tt2
@@ -11,7 +11,7 @@ FOREACH type IN ctx.holding_summaries.keys;
         <table>
             [% FOR blob IN ctx.expanded_holdings %]
             <tr>
-                <td class="rdetail-issue-issue">[% blob.issuance.label %]</td>
+                <td class="rdetail-issue-issue">[% blob.issuance.label | html %]</td>
                 [% IF blob.has_units %]
                 <td class="rdetail-issue-place-hold">
                     <a href="[% ctx.opac_root %]/place_hold?hold_target=[% blob.issuance.id %]&amp;hold_type=I">[% l("Place Hold") %]</a>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 60a9df2..e9cd335 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -1,4 +1,4 @@
-[% ctx.page_title = attrs.title | html_entity %]
+[% ctx.page_title = attrs.title | html %]
 <!-- ****************** rdetail_summary.xml ***************************** -->
 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
 <!-- This holds the record summary information -->
@@ -8,9 +8,9 @@
         <tr>
             <td width="90" valign="top" id="rdetail_image_cell">
                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
-                <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident %]'><img
+                <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident | uri %]'><img
                     alt="[% l('Image of item') %]" id='rdetail_image'
-                    src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/[% ident %]' /></a>
+                    src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/[% ident | uri %]' /></a>
                 [% END %]
                 <br />
             </td>
@@ -19,7 +19,7 @@
                 <table border="0" cellpadding="0" cellspacing="0" width="100%">
                     <tr>
                         <td valign="top">
-                            <span id='rdetail_title'>[% attrs.title_extended | html_entity %]</span><br />
+                            <span id='rdetail_title'>[% attrs.title_extended | html %]</span><br />
                             [% IF attrs.author %]
                             <span class='opac-auto-030'>[% l("Author") %]:</span>
                             <em><a title='[% l("Perform an author search") %]'
@@ -27,7 +27,7 @@
                                     href="[%- 
                                         authorquery = attrs.author | replace('[,\.:;]', '');
                                         mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
-                                        -%]">[% attrs.author | html_entity %]</a></em>
+                                        -%]">[% attrs.author | html %]</a></em>
                             [% END %]
                         </td>
                         <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
@@ -57,7 +57,7 @@
                                 </div>
                                 <div style="float:right;margin-right:17px;">
                                     [% IF attrs.format_icon %]
-                                    <img alt="[% attrs.format_label %]" title="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
+                                    <img alt="[% attrs.format_label %]" title="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
                                     [% END %]
                                 </div>
                             </div>
@@ -71,32 +71,32 @@
                                 [% IF attrs.isbns.0 %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
                             </td>
                             <td valign="top" id='rdetail_isbn'>
-                                [% FOR isbn IN attrs.isbns %][% IF !loop.first; %]<br/>[% END; isbn; END %]
+                                [% FOR isbn IN attrs.isbns %][% IF !loop.first; %]<br/>[% END; isbn | html ; END %]
                             </td>
                             <td nowrap='nowrap' valign="top">
                                 [% IF attrs.phys_desc %]<strong id="rdetail_phys_lbl">[% l("Physical Description") %]</strong>[% END %]
                             </td>
-                            <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc %]</td>
+                            <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc | html %]</td>
                         </tr>
                         <tr>
                             <td nowrap='nowrap' valign="top">
                                 <strong>[% IF attrs.marc_cn; l("Call Number"); END %]</strong>
                             </td>
-                            <td valign="top">[% attrs.marc_cn %]</td>
+                            <td valign="top">[% attrs.marc_cn | html %]</td>
                             <td nowrap='nowrap' valign="top">
                                 <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
                             </td>
-                            <td valign="top" id='rdetail_edition'>[% attrs.edition %]</td>
+                            <td valign="top" id='rdetail_edition'>[% attrs.edition | html %]</td>
                         </tr>
                         <tr>
                             <td nowrap='nowrap' valign="top">
                                 <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
                             </td>
-                            <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
+                            <td valign="top" id='rdetail_publisher'>[% attrs.publisher | html %]</td>
                             <td nowrap='nowrap' valign="top">
                                 <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
                             </td>
-                            <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
+                            <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate | html %]</td>
                         </tr>
                     </table>
 
@@ -144,13 +144,13 @@
                 <a href="http://www.kcls.org/[% dir %]/"
                     class="classic_link">[% org_name %]</a>
             </td>
-            <td>[% copy_info.call_number_label %]</td>
-            <td>[% copy_info.barcode %]</td>
-            <td>[% copy_info.copy_location %]</td>
+            <td>[% copy_info.call_number_label | html %]</td>
+            <td>[% copy_info.barcode | html %]</td>
+            <td>[% copy_info.copy_location | html %]</td>
             [% IF ctx.is_staff %]
             <td>
                 [% copy_info.age_protect ?
-                    ctx.get_crahp(copy_info.age_protect).name : l('None') %]
+                    ctx.get_crahp(copy_info.age_protect).name html : l('None') | html %]
             </td>
             <td>[% date.format(
                 ctx.parse_datetime(copy_info.create_date),
@@ -173,7 +173,7 @@
                         l("No");
                     END %]</td>
             [% END %]
-            <td>[% copy_info.copy_status %]</td>
+            <td>[% copy_info.copy_status | html %]</td>
             <td>[%
                 IF copy_info.due_date;
                     date.format(
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2
index 4b7552f..d397b48 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2
@@ -4,7 +4,7 @@
         <strong>[% l('Summary: ') %]</strong>
         [% FOR sum IN attrs.summary %]
             [% IF !loop.first; '<br/>'; END %]
-            <span>[% sum %] </span>
+            <span>[% sum | html %] </span>
         [% END %]
     </div>
     [% END %]
@@ -13,7 +13,7 @@
     [% ident = attrs.isbn_clean || attrs.upc %]
     <iframe width="100%" height="400" frameborder="0" 
         src="http[% CGI.https ? 's' : '' %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
-            ENV.OILS_CONTENT_CAFE_USER %]&Password=[% ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident %]&Options=Y" >
+            ENV.OILS_CONTENT_CAFE_USER %]&Password=[% ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident | uri %]&Options=Y" >
     </iframe>
 </div>
 

commit 246b9c0574f05e3e7a3cf167d07682f87a418612
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Aug 17 16:43:46 2011 -0400

    Mark a string for i18n support in the TPAC
    
    Even alt strings deserve translation support...
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/default/opac/results.tt2 b/Open-ILS/src/templates/default/opac/results.tt2
index a49b2ec..d368a70 100644
--- a/Open-ILS/src/templates/default/opac/results.tt2
+++ b/Open-ILS/src/templates/default/opac/results.tt2
@@ -38,7 +38,7 @@
                 [% IF ctx.mylist.size %]
                 <div class="results_header_btns cached_list_div">
                     <a href="[% ctx.opac_root; ctx.user ? '/myopac/lists' : '/mylist' %]"><img
-                        alt="View My List"
+                        alt="[% l('View My List') %]"
                         src="[% ctx.media_prefix %]/images/view_my_list.png"
                         onmouseover="this.src='[% ctx.media_prefix %]/images/view_my_list_hover.png';"
                         onmouseout="this.src='[% ctx.media_prefix %]/images/view_my_list.png';" /></a>

commit 6db2f588280e5181b274cb914050f26f5f265348
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 17 15:45:44 2011 -0400

    Tpac: more html output scrubbing
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/default/opac/parts/result/lowhits.tt2 b/Open-ILS/src/templates/default/opac/parts/result/lowhits.tt2
index 78679fc..4d29419 100644
--- a/Open-ILS/src/templates/default/opac/parts/result/lowhits.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/result/lowhits.tt2
@@ -6,7 +6,7 @@
                 <q>[% CGI.param('query') | html %]</q>
                 [% END %]
                 <br />
-                <span id="zero_hits_label1" class="hide_me">Did you mean
+                <span id="zero_hits_label1" class="hide_me">[% l('Did you mean') %]
                     <strong><a id="spell_check_link" href="javascript:;"></a></strong>?</span>
             </p>
             <table cellpadding="0" cellspacing="0" border="0">
diff --git a/Open-ILS/src/templates/default/opac/parts/result/table.tt2 b/Open-ILS/src/templates/default/opac/parts/result/table.tt2
index 07fe359..a22308d 100644
--- a/Open-ILS/src/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/result/table.tt2
@@ -45,16 +45,16 @@
                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
                                                 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"><img alt="[% l('Image of item') %]"
                                                         name='item_jacket' class='result_table_pic' width="55"
-                                                        src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a><br />
+                                                        src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident | uri %]' /></a><br />
                                                 [% END %]
                                             </td>
                                             <td class='result_table_title_cell'
                                                 name='result_table_title_cell'
                                                 valign="top">
                                                 <div class="bold">
-                                                    <a title="[% attrs.title %]" name='item_title'
+                                                    <a title="[% attrs.title | uri %]" name='item_title'
                                                         href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"
-                                                        class='search_link'>[% attrs.title | html_entity%]</a>
+                                                        class='search_link'>[% attrs.title | html %]</a>
                                                 </div>
                                                 <div style="font-size:11px;">
                                                     <div>
@@ -63,9 +63,9 @@
                                                                 href="[%- 
                                                                     authorquery = attrs.author | replace('[,\.:;]', '');
                                                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
-                                                                    -%]">[% attrs.author | html_entity %]</a></em>
+                                                                    -%]">[% attrs.author | html %]</a></em>
                                                         &nbsp;&nbsp;
-                                                        [% attrs.pubdate %]
+                                                        [% attrs.pubdate | html %]
                                                     </div>
                                                     <table cellpadding="0" cellspacing="0" border="0"
                                                         class="results_info_table">
@@ -74,7 +74,7 @@
                                                             <td valign='top'>
                                                                 <strong>[% l('Call number:') %]</strong>
                                                             </td>
-                                                            <td>[% args.holdings.0.label %]</td>
+                                                            <td>[% args.holdings.0.label | html %]</td>
                                                         </tr>
                                                         [% END %]
 
@@ -86,7 +86,7 @@
                                                                 <td valign="top">
                                                                     <strong>[% l('Publisher:') %]</strong>
                                                                 </td>
-                                                                <td>[% attrs.publisher; %]</td>
+                                                                <td>[% attrs.publisher | html %]</td>
                                                             </tr>
                                                         [% END %]
                                                         [% IF attrs.isbns.size > 0 %]
@@ -94,7 +94,7 @@
                                                                 <td valign="top">
                                                                     <strong>[% l('ISBN:') %]</strong>
                                                                 </td>
-                                                                <td>[% attrs.isbns.0 %]</td>
+                                                                <td>[% attrs.isbns.0 | html %]</td>
                                                             </tr>
                                                         [% END %]
                                                         [% IF openurl.enabled == 'true';
@@ -105,9 +105,9 @@
                                                         <tr name="results_issn_tr">
                                                             <td valign="top">
                                                                 <strong><a href="[% res.target_url %]">
-                                                                [% res.public_name %]</a></strong>
+                                                                [% res.public_name | html %]</a></strong>
                                                             </td>
-                                                            <td>[% res.target_coverage %]</td>
+                                                            <td>[% res.target_coverage | html %]</td>
                                                         </tr>
                                                                 [% END %]
                                                             [% END %]
@@ -118,7 +118,7 @@
                                                                 <td valign="top">
                                                                     <strong>[% l('Edition:') %]</strong>
                                                                 </td>
-                                                                <td>[% attrs.edition %]</td>
+                                                                <td>[% attrs.edition | html %]</td>
                                                             </tr>
                                                         [% END %]
                                                         [% IF attrs.phys_desc %]
@@ -127,7 +127,7 @@
                                                                     <strong>[% l('Phys. Desc.:') %]</strong>
                                                                 </td>
                                                                 <td>
-                                                                    [% args.phys_desc %]
+                                                                    [% args.phys_desc | html %]
                                                                 </td>
                                                             </tr>
                                                         [% END %]
@@ -136,7 +136,7 @@
                                                                 <td valign='top'>
                                                                     <strong>[% l('Electronic resource') %]</strong>
                                                                 </td>
-                                                                <td><a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]</td>
+                                                                <td><a href="[% uri.href %]">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
                                                             </tr>
                                                             [% END %]
                                                             [% IF args.holdings.size > 0 %]
@@ -152,10 +152,10 @@
                                                                         <tbody>
                                                                 [% FOR copy IN args.holdings %]
                                                                         <tr>
-                                                                            <td>[% copy.library %]</td>
-                                                                            <td>[% copy.location %]</td>
-                                                                            <td>[% copy.label %]</td>
-                                                                            <td>[% copy.status %]</td>
+                                                                            <td>[% copy.library | html %]</td>
+                                                                            <td>[% copy.location | html %]</td>
+                                                                            <td>[% copy.label | html %]</td>
+                                                                            <td>[% copy.status | html %]</td>
                                                                         </tr>
                                                                 [% END %]
                                                                         </tbody>
@@ -188,7 +188,7 @@
                                             <td name='result_table_format_cell' class='result_table_format_cell' width="1">
 
                                                 [% IF attrs.format_icon %]
-                                                <img title="[% attrs.format_label %]" alt="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
+                                                <img title="[% attrs.format_label | html %]" alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
                                                 [% END %]
 
                                                 <!-- unAPI link -->
@@ -228,13 +228,13 @@
                                         <tr>
                                             <td/>
                                             <td align='center'> <!-- Chilifresh reviews link --> 
-                                                <div class="chili_review" id="isbn_[% attrs.isbn_clean %]"> </div>
+                                                <div class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </div>
                                             </td>
                                         </tr>
                                         <tr>
                                             <td/>
                                             <td colspan='5'> <!-- Chilifresh reviews panel -->
-                                                <div id="chili_review_[% attrs.isbn_clean %]" style="display: none;" align="center" width="100%"></div>
+                                                <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center" width="100%"></div>
                                             </td>
                                         </tr>
                                         <tr><td colspan="5"><div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div></td></tr>

commit 75aeccc2be082e5fc35578a10f4c554369e2697f
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 17 15:45:44 2011 -0400

    Tpac: more html output scrubbing
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2 b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
index 78679fc..4d29419 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
@@ -6,7 +6,7 @@
                 <q>[% CGI.param('query') | html %]</q>
                 [% END %]
                 <br />
-                <span id="zero_hits_label1" class="hide_me">Did you mean
+                <span id="zero_hits_label1" class="hide_me">[% l('Did you mean') %]
                     <strong><a id="spell_check_link" href="javascript:;"></a></strong>?</span>
             </p>
             <table cellpadding="0" cellspacing="0" border="0">
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 424b952..ce8562e 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -42,16 +42,16 @@
                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
                                                 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"><img alt="[% l('Image of item') %]"
                                                         name='item_jacket' class='result_table_pic' width="55"
-                                                        src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a><br />
+                                                        src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident | uri %]' /></a><br />
                                                 [% END %]
                                             </td>
                                             <td class='result_table_title_cell'
                                                 name='result_table_title_cell'
                                                 valign="top">
                                                 <div class="bold">
-                                                    <a title="[% attrs.title %]" name='item_title'
+                                                    <a title="[% attrs.title | uri %]" name='item_title'
                                                         href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"
-                                                        class='search_link'>[% attrs.title | html_entity%]</a>
+                                                        class='search_link'>[% attrs.title | html %]</a>
                                                 </div>
                                                 <div style="font-size:11px;">
                                                     <div>
@@ -60,9 +60,9 @@
                                                                 href="[%- 
                                                                     authorquery = attrs.author | replace('[,\.:;]', '');
                                                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
-                                                                    -%]">[% attrs.author | html_entity %]</a></em>
+                                                                    -%]">[% attrs.author | html %]</a></em>
                                                         &nbsp;&nbsp;
-                                                        [% attrs.pubdate %]
+                                                        [% attrs.pubdate | html %]
                                                     </div>
                                                     <table cellpadding="0" cellspacing="0" border="0"
                                                         class="results_info_table">
@@ -70,7 +70,7 @@
                                                             <td valign='top'>
                                                                 <strong>[% l('Call number:') %]</strong>
                                                             </td>
-                                                            <td>[% args.holdings.0 %]</td>
+                                                            <td>[% args.holdings.0 | html %]</td>
                                                         </tr>
 
                                                         [% IF CGI.param('detail_record_view') %]
@@ -79,26 +79,26 @@
                                                             <td valign="top">
                                                                 <strong>[% l('Publisher:') %]</strong>
                                                             </td>
-                                                            <td>[% attrs.publisher; %]</td>
+                                                            <td>[% attrs.publisher | html %]</td>
                                                         </tr>
                                                         <tr name="results_isbn_tr" class="[% attrs.isbns.0 ? '' : 'hide_me' %]">
                                                             <td valign="top">
                                                                 <strong>[% l('ISBN:') %]</strong>
                                                             </td>
-                                                            <td>[% attrs.isbns.0 %]</td>
+                                                            <td>[% attrs.isbns.0 | html %]</td>
                                                         </tr>
                                                         <tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
                                                             <td valign="top">
                                                                 <strong>[% l('Edition:') %]</strong>
                                                             </td>
-                                                            <td>[% attrs.edition %]</td>
+                                                            <td>[% attrs.edition | html %]</td>
                                                         </tr>
                                                         <tr name="results_phys_desc_tr" class="[% attrs.phys_desc ? '' : 'hide_me' %]">
                                                             <td nowrap="nowrap" valign="top">
                                                                 <strong>[% l('Phys. Desc.:') %]</strong>
                                                             </td>
                                                             <td>
-                                                                [% args.phys_desc %]
+                                                                [% args.phys_desc | html %]
                                                             </td>
                                                         </tr>
                                                         [% END %]
@@ -127,7 +127,7 @@
                                             <td name='result_table_format_cell' class='result_table_format_cell' width="1">
 
                                                 [% IF attrs.format_icon %]
-                                                <img title="[% attrs.format_label %]" alt="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
+                                                <img title="[% attrs.format_label | html %]" alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
                                                 [% END %]
 
                                                 <!-- unAPI link -->
@@ -173,13 +173,13 @@
                                         <tr>
                                             <td/>
                                             <td align='center'> <!-- Chilifresh reviews link --> 
-                                                <div class="chili_review" id="isbn_[% attrs.isbn_clean %]"> </div>
+                                                <div class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </div>
                                             </td>
                                         </tr>
                                         <tr>
                                             <td/>
                                             <td colspan='5'> <!-- Chilifresh reviews panel -->
-                                                <div id="chili_review_[% attrs.isbn_clean %]" style="display: none;" align="center" width="100%"></div>
+                                                <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center" width="100%"></div>
                                             </td>
                                         </tr>
                                         <tr><td colspan="5"><div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div></td></tr>

commit 72a2d5b8855d5d22ca6865a539a4552404cd32a6
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Aug 17 15:36:15 2011 -0400

    Escape TPAC "myopac" output to protect against XSS attacks
    
    We're using the Template::Toolkit html and uri filters to ensure that
    the usual suspects are escaped at output time to prevent trivial XSS
    attacks.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/default/opac/myopac/circ_history.tt2 b/Open-ILS/src/templates/default/opac/myopac/circ_history.tt2
index 9d88fe8..d7c7989 100644
--- a/Open-ILS/src/templates/default/opac/myopac/circ_history.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/circ_history.tt2
@@ -71,9 +71,9 @@
                     <tr>
                         <td style="padding-left:5px;padding-bottom:10px;">
                             <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" 
-                                name="[% l('Catalog record') %]">[% attrs.title %]</a>
+                                name="[% l('Catalog record') %]">[% attrs.title | html %]</a>
                             [% IF attrs.author %] /
-                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
                             [% END %]
                         </td>
                         <td style="padding-left:5px;">
@@ -90,8 +90,8 @@
                                 <span style='color:blue;'>*</span><!-- meh -->
                             [% END; %]
                         </td>
-                        <td>[% circ.circ.target_copy.barcode %]</td>
-                        <td>[% circ.circ.target_copy.call_number.label %]</td>
+                        <td>[% circ.circ.target_copy.barcode | html %]</td>
+                        <td>[% circ.circ.target_copy.call_number.label | html %]</td>
                     </tr>
                 [% END %]
             </tbody>
diff --git a/Open-ILS/src/templates/default/opac/myopac/circs.tt2 b/Open-ILS/src/templates/default/opac/myopac/circs.tt2
index 2275aff..c878524 100644
--- a/Open-ILS/src/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/circs.tt2
@@ -106,9 +106,9 @@
                         <td width="40%"
                             style="padding-left:5px;padding-bottom:10px;"
                             name="author">
-                            <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" name="[% l('Catalog record') %]">[% attrs.title %]</a>
+                            <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" name="[% l('Catalog record') %]">[% attrs.title | html %]</a>
                             [% IF attrs.author %] /
-                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
                             [% END %]
                         </td>
                         <td width="8%" name="renewals" align="center">
@@ -119,18 +119,18 @@
                             [% date.format(ctx.parse_datetime(circ.circ.due_date),DATE_FORMAT) %]
                         </td>
                         <td width="16%" name="barcode">
-                            [% circ.circ.target_copy.barcode %]
+                            [% circ.circ.target_copy.barcode | html %]
                         </td>
                         <td width="22%" name="call_number">
-                            [% circ.circ.target_copy.call_number.label %]
+                            [% circ.circ.target_copy.call_number.label | html %]
                         </td>
                     </tr>
                     [%  IF circ.renewal_response AND
                             circ.renewal_response.textcode != 'SUCCESS' %]
                     <tr>
                         <td colspan="6">[%# XXX colspan="0" does not work in IE %]
-                            <span class="failure-text" title="[% circ.renewal_response.textcode %] / [% circ.renewal_response.payload.fail_part %]">
-                                [% circ.renewal_response.desc || circ.renewal_response.payload.fail_part || circ.renewal_response.textcode %]
+                            <span class="failure-text" title="[% circ.renewal_response.textcode | html %] / [% circ.renewal_response.payload.fail_part | html %]">
+                                [% (circ.renewal_response.desc || circ.renewal_response.payload.fail_part || circ.renewal_response.textcode) | html %]
                             </span>
                         </td>
                     </tr>
diff --git a/Open-ILS/src/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/src/templates/default/opac/myopac/hold_history.tt2
index d3453d7..ca0ac59 100644
--- a/Open-ILS/src/templates/default/opac/myopac/hold_history.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/hold_history.tt2
@@ -81,7 +81,7 @@
                         </div>
                     </td>
                     <td width="136">
-                        [% ctx.get_aou(ahr.pickup_lib).name %]
+                        [% ctx.get_aou(ahr.pickup_lib).name | html %]
                     </td>
                     <td width="104">
                         [% IF ahr.frozen == 't' AND ahr.thaw_date;
diff --git a/Open-ILS/src/templates/default/opac/myopac/holds.tt2 b/Open-ILS/src/templates/default/opac/myopac/holds.tt2
index 442a1df..a835223 100644
--- a/Open-ILS/src/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/holds.tt2
@@ -154,7 +154,7 @@
                         </div>
                     </td>
                     <td width="136">
-                        [% ctx.get_aou(ahr.pickup_lib).name %]
+                        [% ctx.get_aou(ahr.pickup_lib).name | html %]
                     </td>
                     <td width="104">
                         <!-- <input
diff --git a/Open-ILS/src/templates/default/opac/myopac/holds/edit.tt2 b/Open-ILS/src/templates/default/opac/myopac/holds/edit.tt2
index 2fda76c..f432697 100644
--- a/Open-ILS/src/templates/default/opac/myopac/holds/edit.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/holds/edit.tt2
@@ -23,14 +23,14 @@
     </div>
     <div id="hold_editor">
         [% IF hold %]
-            <h1>[% attrs.title %]</h1>
-            <h2>[% attrs.author %]</h2>
+            <h1>[% attrs.title | html %]</h1>
+            <h2>[% attrs.author | html %]</h2>
             [% IF attrs.format_icon %]<p>
                 <strong>[% l('Format:') %]</strong>
-                <img src="[% ctx.media_prefix %]/images/[% attrs.format_icon %]" alt="[% attrs.format %]" title="[% attrs.title %]" />
+                <img src="[% ctx.media_prefix %]/images/[% attrs.format_icon %]" alt="[% attrs.format %]" title="[% attrs.title | html %]" />
             </p>[% END %]
             <p>
-                <strong>[% l('Status') %]</strong>: [% hold.human_status %]
+                <strong>[% l('Status') %]</strong>: [% hold.human_status | html %]
             </p>
             <form method="POST">
                 <table id="hold_editor_table">
diff --git a/Open-ILS/src/templates/default/opac/myopac/lists.tt2 b/Open-ILS/src/templates/default/opac/myopac/lists.tt2
index c15a19f..4cef8b0 100644
--- a/Open-ILS/src/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/lists.tt2
@@ -80,9 +80,9 @@
                     <big><strong>
                     [% IF bbag.pub == 't' %]
                         [% url = 'http://' _ ctx.hostname _ '/opac/extras/feed/bookbag/html-full/' _ bbag.id %]
-                        <a target='_blank' href='[% url %]'>[% bbag.name %]</a>
+                        <a target='_blank' href='[% url %]'>[% bbag.name | html %]</a>
                     [% ELSE %]
-                    [% bbag.name %]
+                    [% bbag.name | html %]
                     [% END %]
                     </strong></big>
                 </div>
@@ -132,8 +132,8 @@
                         PROCESS get_marc_attrs args=attrs %]
                     <tr>
                         <td class="item_list_padding" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
-                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.title %]</td>
-                        <td class="item_list_padding">[% attrs.author %]</td>
+                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.title | html %]</td>
+                        <td class="item_list_padding">[% attrs.author | html %]</td>
                     </tr>
                     [% END %]
                 </tbody>
diff --git a/Open-ILS/src/templates/default/opac/myopac/main.tt2 b/Open-ILS/src/templates/default/opac/myopac/main.tt2
index 354b5b0..818d75c 100644
--- a/Open-ILS/src/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/main.tt2
@@ -41,13 +41,13 @@
                     <td>
                         [% recid = f.xact.circulation.target_copy.call_number.record.id || f.xact.reservation.target_resource_type.record.id;
                         IF recid; %]
-                        <a href="[% ctx.opac_root %]/record/[% recid %]">[% attrs.title %]</a>
+                        <a href="[% ctx.opac_root %]/record/[% recid %]">[% attrs.title | html %]</a>
                         [% ELSE %]
-                        [% attrs.title %]
+                        [% attrs.title | html %]
                         [% END %]
                     </td>
                     <td>
-                        <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                        <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
                     </td>
                     <td name='myopac_circ_trans_start'>
                         [% ts = f.xact.circulation.xact_start || f.xact.reservation.start_time || 0;
diff --git a/Open-ILS/src/templates/default/opac/myopac/main_pay.tt2 b/Open-ILS/src/templates/default/opac/myopac/main_pay.tt2
index ac68b6e..e1cfcbd 100644
--- a/Open-ILS/src/templates/default/opac/myopac/main_pay.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/main_pay.tt2
@@ -37,7 +37,7 @@
                     (ctx.printable_receipt.textcode ? ctx.printable_receipt.textcode _ ' / ' _ ctx.printable_receipt.desc : 0) ||
                     ctx.printable_receipt.error_output.data ||
                     l('No receipt data returned from server')
-                ) %]
+                ) | html %]
         </div>
         [% END %]
         <p>[ <a href="[% ctx.opac_root %]/myopac/main">[%
diff --git a/Open-ILS/src/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/src/templates/default/opac/myopac/main_payment_form.tt2
index 52534d2..55cf823 100644
--- a/Open-ILS/src/templates/default/opac/myopac/main_payment_form.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/main_payment_form.tt2
@@ -59,7 +59,7 @@
                                     attrs.title = f.xact.reservation.target_resource_type.name;
                                 END %]
                                 <tr>
-                                    <td>[% attrs.title %]</td>
+                                    <td>[% attrs.title | html %]</td>
                                     <td class="text-right">[% money(f.xact.balance_owed) %]</td>
                                 </tr>
                             [%
@@ -68,7 +68,7 @@
                                 NEXT IF CGI.param('xact_misc').size &&
                                     !CGI.param('xact_misc').grep(f.xact.id).size %]
                                 <tr>
-                                    <td>[% f.xact.last_billing_type %]</td>
+                                    <td>[% f.xact.last_billing_type | html %]</td>
                                     <td class="text-right">[% money(f.xact.balance_owed) %]</td>
                                 </tr>
                             [% END %]
diff --git a/Open-ILS/src/templates/default/opac/myopac/main_payments.tt2 b/Open-ILS/src/templates/default/opac/myopac/main_payments.tt2
index 0a3b192..80755fb 100644
--- a/Open-ILS/src/templates/default/opac/myopac/main_payments.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/main_payments.tt2
@@ -32,7 +32,11 @@
             [% FOR payment IN ctx.payments %]
             <tr>
                 <td>[% date.format(ctx.parse_datetime(payment.mp.payment_ts), DATE_FORMAT) %]</td>
-                <td>[% (payment.xact_type == 'grocery') ? payment.last_billing_type : payment.title %]</td>
+                <td>[% 
+                    btype = payment.last_billing_type | html;
+                    ptitle = payment.title | html;
+                    (payment.xact_type == 'grocery') ? btype : ptitle
+                %]</td>
                 <td>[% money(payment.mp.amount) %]</td>
                 <td>
                     <form action="[% ctx.opac_root %]/myopac/receipt_print" method="POST">
diff --git a/Open-ILS/src/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/src/templates/default/opac/myopac/prefs.tt2
index 8ceeec3..17783b3 100644
--- a/Open-ILS/src/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/prefs.tt2
@@ -198,7 +198,7 @@
             <tr>
                 <td class='color_4 light_border'>
                 [% l("Home Library") %]</td>
-                <td class='light_border'>[% ctx.user.home_ou.name %]</td>
+                <td class='light_border'>[% ctx.user.home_ou.name | html %]</td>
                 <td><a href='#'
                    class="hide_me"
                    style='text-decoration: underline;'>[% l("Change") %]</a></td>
@@ -255,7 +255,7 @@
                                 IF addr.pending == "t";
                                     "<strong>" _ l("*** PENDING ***") _ "</strong> ";
                                 END;
-                                addr.address_type | lower | ucfirst;
+                                addr.address_type | lower | ucfirst | html ;
                             %]</td>
                         </tr>
                         <tr>
diff --git a/Open-ILS/src/templates/default/opac/myopac/prefs_notify.tt2 b/Open-ILS/src/templates/default/opac/myopac/prefs_notify.tt2
index 14a824e..da3d520 100644
--- a/Open-ILS/src/templates/default/opac/myopac/prefs_notify.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/prefs_notify.tt2
@@ -21,10 +21,10 @@
             [% END %]
             [% FOR optin IN ctx.opt_in_settings %]
                 <tr>
-                    <td>[% optin.cust.label %]</td>
+                    <td>[% optin.cust.label | html %]</td>
                     <td>
                         <input type='checkbox' name='setting' 
-                            value='[% optin.cust.name %]' 
+                            value='[% optin.cust.name | uri %]' 
                             [% IF optin.value %] checked='checked' [% END %]/>
                     </td>
                 </tr>
diff --git a/Open-ILS/src/templates/default/opac/myopac/prefs_settings.tt2 b/Open-ILS/src/templates/default/opac/myopac/prefs_settings.tt2
index fda86fe..e664e91 100644
--- a/Open-ILS/src/templates/default/opac/myopac/prefs_settings.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/prefs_settings.tt2
@@ -37,9 +37,9 @@
                         [% setting = 'opac.hits_per_page' %]
                         <select name='[% setting %]'>
                             [%  FOR val IN [5, 8, 10, 15, 20, 25, 50] %]
-                                <option value='[% val %]' 
+                                <option value='[% val | uri %]' 
                                     [% IF ctx.user_setting_map.$setting == val %]
-                                        selected='selected'[% END %]>[% val %]</option>
+                                        selected='selected'[% END %]>[% val | html %]</option>
                             [% END %]
                         </select>
                     </td>
diff --git a/Open-ILS/src/templates/default/opac/myopac/receipt_email.tt2 b/Open-ILS/src/templates/default/opac/myopac/receipt_email.tt2
index 51acccb..3745e5f 100644
--- a/Open-ILS/src/templates/default/opac/myopac/receipt_email.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/receipt_email.tt2
@@ -5,12 +5,14 @@
     [% IF ctx.email_receipt_result; # result should be undef on success %]
     <div class="payment-error">
         [% l('Error preparing receipt:') %]
-        <span title="[% ctx.email_receipt_result.textcode %]">
-            [% ctx.email_receipt_result.desc %]
+        <span title="[% ctx.email_receipt_result.textcode | html %]">
+            [% ctx.email_receipt_result.desc | html %]
         </span>
     </div>
     [% ELSE %]
-    <div>[% l('Your receipt will be emailed to [_1]', ctx.user.email) %]</div>
+    <div>
+        [% l('Your receipt will be emailed to [_1]', ctx.user.email) | html %]
+    </div>
     [% END %]
     <p>
         [ <a href="[% ctx.opac_root %]/myopac/main_payments">[%
diff --git a/Open-ILS/src/templates/default/opac/myopac/receipt_print.tt2 b/Open-ILS/src/templates/default/opac/myopac/receipt_print.tt2
index 766f9b5..fe68495 100644
--- a/Open-ILS/src/templates/default/opac/myopac/receipt_print.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/receipt_print.tt2
@@ -15,7 +15,7 @@
                     (ctx.printable_receipt.textcode ? ctx.printable_receipt.textcode _ ' / ' _ ctx.printable_receipt.desc : 0) ||
                     ctx.printable_receipt.error_output.data ||
                     l('No receipt data returned from server')
-                ) %]
+                ) | html %]
         </div>
         [% END %]
         <hr />
diff --git a/Open-ILS/src/templates/default/opac/myopac/update_email.tt2 b/Open-ILS/src/templates/default/opac/myopac/update_email.tt2
index a6e62ec..6bbedf2 100644
--- a/Open-ILS/src/templates/default/opac/myopac/update_email.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/update_email.tt2
@@ -6,9 +6,7 @@
 
 [% IF ctx.invalid_email %]
     <div id='account-update-email-error'>
-        [% | l(ctx.invalid_email) %]
-        The email address "<b>[_1]</b>" is invalid.  Please try a different email address.
-        [% END %]
+        [% l('The email address "<b>[_1]</b>" is invalid.  Please try a different email address.', ctx.invalid_email) | html %]
     </div>
 [% END %]
 
diff --git a/Open-ILS/src/templates/default/opac/myopac/update_username.tt2 b/Open-ILS/src/templates/default/opac/myopac/update_username.tt2
index 1294917..017d753 100644
--- a/Open-ILS/src/templates/default/opac/myopac/update_username.tt2
+++ b/Open-ILS/src/templates/default/opac/myopac/update_username.tt2
@@ -6,14 +6,13 @@
 
 [% IF ctx.invalid_username %]
     <div id='account-update-email-error'> <!-- borrow css from update-email page -->
-        [% | l(ctx.invalid_username) %]
-        "<b>[_1]</b>" is not a valid username.  Usernames cannot have any spaces.  Please try a different username.
-        [% END %]
+        [% l('"<b>[_1]</b>" is not a valid username.  Usernames cannot have any spaces.  Please try a different username.', ctx.invalid_username) | html %]
     </div>
 
 [% ELSIF ctx.username_exists %]
     <div id='account-update-email-error'>
-        [% | l(ctx.username_exists) %]
+        [% bad_user = ctx.username_exists | html %]
+        [% | l(bad_user) %]
         The username "<b>[_1]</b>" is taken.  Please try a different username.
         [% END %]
     </div>

commit f040584c589d77486c39fbd1c77438c48a282200
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 17 15:28:53 2011 -0400

    TPac: more aggressive dynamic output filtering
    
    Making heavier user of html/uri filters to prevent accidental or
    malicious rendering of html from dynamic data.  More to follow.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/default/opac/parts/anon_list.tt2 b/Open-ILS/src/templates/default/opac/parts/anon_list.tt2
index 7ffa997..f1b7d0b 100644
--- a/Open-ILS/src/templates/default/opac/parts/anon_list.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/anon_list.tt2
@@ -36,7 +36,7 @@
                                 [% IF ctx.user AND ctx.bookbags.size %]
                                 <optgroup label="Move selected items to">
                                     [% FOR bbag IN ctx.bookbags %]]
-                                    <option value="[% bbag.id %]" class="selector_actions_for_list_inner_option">[% bbag.name %]</option>
+                                    <option value="[% bbag.id %]" class="selector_actions_for_list_inner_option">[% bbag.name | html %]</option>
                                     [% END %]
                                 </optgroup>
                                 [% END %]
@@ -53,8 +53,8 @@
                         <td class="item_list_padding" style="padding-left: 10px;">
                             <input type="checkbox" name="record" value="[% item %]" />
                         </td>
-                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.title %]</td>
-                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.author %]</td>
+                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.title | html %]</td>
+                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.author | html %]</td>
                     </tr>
                     [% END %]
                 </tbody>
diff --git a/Open-ILS/src/templates/default/opac/parts/coded_value_selector.tt2 b/Open-ILS/src/templates/default/opac/parts/coded_value_selector.tt2
index ad46d79..33469fe 100644
--- a/Open-ILS/src/templates/default/opac/parts/coded_value_selector.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/coded_value_selector.tt2
@@ -22,7 +22,7 @@
     <option value=''>[% none_label ? none_label : l('-- Any --') %]</option>
 [% END %]
 [% FOR o IN all_values %]
-    <option value='[% o.code %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : '' %]>[% o.value %]</option>
+    <option value='[% o.code | uri %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : '' %]>[% o.value | html %]</option>
 [%  END -%]
 </select>
 
diff --git a/Open-ILS/src/templates/default/opac/parts/org_selector.tt2 b/Open-ILS/src/templates/default/opac/parts/org_selector.tt2
index 52500f0..1485679 100644
--- a/Open-ILS/src/templates/default/opac/parts/org_selector.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/org_selector.tt2
@@ -8,11 +8,11 @@
             selected = 'selected="selected"';
         END;
 %]
-        <option value='[% walker.id %]' [% selected %] [% disabled %]>
+        <option value='[% walker.id | uri %]' [% selected %] [% disabled %]>
             [%
                 pad = walker.ou_type.depth * 2;
                 FOR idx IN [0..pad]; '&nbsp;'; END;
-                walker.name;
+                walker.name | html;
             %]
         </option>
         [%  FOR child IN walker.children;
diff --git a/Open-ILS/src/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/src/templates/default/opac/parts/place_hold.tt2
index 861a987..903cbb6 100644
--- a/Open-ILS/src/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/place_hold.tt2
@@ -15,7 +15,7 @@
             [% ELSIF ctx.hold_failed_event || ctx.hold_local_alert %]
         <div>
             <strong>[% l('Problem:') %]</strong>
-            <span title="[% ctx.hold_failed_event.textcode %]">
+            <span title="[% ctx.hold_failed_event.textcode | html %]">
                 <em>[%
                         fail_part_key = ctx.hold_failed_event.payload.fail_part;
                         event_key = ctx.hold_failed_event.textcode;
@@ -32,8 +32,7 @@
             </span>
 
             [% IF ctx.hold_copy_available %]<p>
-            [% l('Find a copy in the shelving location, "[_1]."',
-                ctx.hold_copy_available.location) %]
+            [%  l('Find a copy in the shelving location, "[_1]."', locname) | html %]
             </p>[% END %]
 
             [% IF ctx.could_override || ctx.hold_local_alert %]
@@ -45,7 +44,7 @@
             <form method="POST">
                 <input type="hidden" type="name" name="override" value="1" />
                 [% FOR k IN ctx.orig_params.keys %]
-                <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | html %]" />
+                <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | uri %]" />
                 [% END %]
                 <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
                     alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
@@ -83,20 +82,20 @@
                 <label for="hold_usr_is_requestor_not">
                     [% l("Place hold for patron by barcode:") %]
                 </label>
-                <input type="text" name="hold_usr" id="hold_usr_input" value="[% ctx.patron_recipient.card.barcode %]" /><br />[%# XXX multi-barcode users? %]
+                <input type="text" name="hold_usr" id="hold_usr_input" value="[% ctx.patron_recipient.card.barcode | html %]" /><br />[%# XXX multi-barcode users? %]
                 <span>
                     <input type="radio" id="hold_usr_is_requestor"
                         onchange="staff_hold_usr_input_disabler(this);"
                         name="hold_usr_is_requestor" value="1" />
                     <label for="hold_usr_is_requestor">
-                        [% l("Place this hold for me ([_1] [_2])",
-                        ctx.user.first_given_name, ctx.user.family_name) %]
+                        [% l("Place this hold for me ([_1] [_2])", ctx.user.first_given_name, ctx.user.family_name) | html %]
                     </label>
                 </span>
             </p>
             [% END %]
             <p>
-                [% | l(attrs.title, ctx.get_aou(ctx.default_pickup_lib).name) %]
+                [%  title = attrs.title | html; libname = ctx.get_aou(ctx.default_pickup_lib).name | html %]
+                [% | l(title, libname) %]
                 You would like to place a hold on <strong><q>[_1]</q></strong>.<br />
                 If this is correct, confirm your pickup location and click <strong>SUBMIT</strong>.
                 [% END %]
diff --git a/Open-ILS/src/templates/default/opac/parts/qtype_selector.tt2 b/Open-ILS/src/templates/default/opac/parts/qtype_selector.tt2
index f79de8a..4b91a47 100644
--- a/Open-ILS/src/templates/default/opac/parts/qtype_selector.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/qtype_selector.tt2
@@ -9,8 +9,8 @@
 <select name="qtype">
     [%  query_type = query_type || CGI.param('qtype');
         FOR qt IN query_types -%]
-    <option value='[% qt.value %]'[%
+    <option value='[% qt.value | uri %]'[%
         query_type == qt.value ? ' selected="selected"' : ''
-    %]>[% qt.label %]</option>
+    %]>[% qt.label | html %]</option>
     [% END -%]
 </select>
diff --git a/Open-ILS/src/templates/default/opac/parts/topnav.tt2 b/Open-ILS/src/templates/default/opac/parts/topnav.tt2
index 5c01e7e..5aaa7b8 100644
--- a/Open-ILS/src/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/topnav.tt2
@@ -22,7 +22,7 @@
                         </td>
                         <td id="dash_corner_mid1a">
                             <span id="dash_user">
-                                [%  l('[_1] [_2]', ctx.user.first_given_name, ctx.user.family_name) %]
+                                [%  l('[_1] [_2]', ctx.user.first_given_name, ctx.user.family_name) | html %]
                             </span>
                         </td>
                         <td id="dash_corner_mid1b">
diff --git a/Open-ILS/src/templates/default/opac/results.tt2 b/Open-ILS/src/templates/default/opac/results.tt2
index 5c0a620..a49b2ec 100644
--- a/Open-ILS/src/templates/default/opac/results.tt2
+++ b/Open-ILS/src/templates/default/opac/results.tt2
@@ -7,10 +7,12 @@
     IF is_advanced || is_special;
         ctx.page_title = l("Search Results");
     ELSE;
-        ctx.page_title = l("Search Results: ") _ CGI.param('query') | html_entity;
+        ctx.page_title = l("Search Results: ") _ CGI.param('query') | html;
     END;
 
-    page = CGI.param('page') || 0;
+    page = CGI.param('page');
+    page = page.match('^\d+$') ? page : 0; # verify page is a sane value
+
     page_count = ctx.page_size == 0 ? 1 : POSIX.ceil(ctx.hit_count / ctx.page_size);
 %]
     <form action="[% ctx.opac_root %]/results" method="GET">
@@ -44,7 +46,7 @@
                 [% END %]
                 <div class="results_header_div"></div>
                 [% UNLESS is_advanced || is_special %]
-                    <div class="results_header_lbl">Sort by</div>
+                    <div class="results_header_lbl">[% l('Sort by') %]</div>
                     [% INCLUDE "default/opac/parts/filtersort.tt2" value=CGI.param('sort') %]
                     <div class="results_header_div"></div>
 

commit f77c3d014fdda5890d7f7ff1d9d14095dc2377ce
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 17 15:28:53 2011 -0400

    TPac: more aggressive dynamic output filtering
    
    Making heavier user of html/uri filters to prevent accidental or
    malicious rendering of html from dynamic data.  More to follow.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2 b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
index 19a7440..6f91af7 100644
--- a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
@@ -36,7 +36,7 @@
                                 [% IF ctx.user AND ctx.bookbags.size %]
                                 <optgroup label="Move selected items to">
                                     [% FOR bbag IN ctx.bookbags %]]
-                                    <option value="[% bbag.id %]" class="opac-auto-179-inner-option">[% bbag.name %]</option>
+                                    <option value="[% bbag.id %]" class="opac-auto-179-inner-option">[% bbag.name | html %]</option>
                                     [% END %]
                                 </optgroup>
                                 [% END %]
@@ -53,8 +53,8 @@
                         <td class="opac-auto-097b" style="padding-left: 10px;">
                             <input type="checkbox" name="record" value="[% item %]" />
                         </td>
-                        <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title %]</td>
-                        <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.author %]</td>
+                        <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title | html %]</td>
+                        <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.author | html %]</td>
                     </tr>
                     [% END %]
                 </tbody>
diff --git a/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
index ad46d79..33469fe 100644
--- a/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
@@ -22,7 +22,7 @@
     <option value=''>[% none_label ? none_label : l('-- Any --') %]</option>
 [% END %]
 [% FOR o IN all_values %]
-    <option value='[% o.code %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : '' %]>[% o.value %]</option>
+    <option value='[% o.code | uri %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : '' %]>[% o.value | html %]</option>
 [%  END -%]
 </select>
 
diff --git a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
index 52500f0..1485679 100644
--- a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
@@ -8,11 +8,11 @@
             selected = 'selected="selected"';
         END;
 %]
-        <option value='[% walker.id %]' [% selected %] [% disabled %]>
+        <option value='[% walker.id | uri %]' [% selected %] [% disabled %]>
             [%
                 pad = walker.ou_type.depth * 2;
                 FOR idx IN [0..pad]; '&nbsp;'; END;
-                walker.name;
+                walker.name | html;
             %]
         </option>
         [%  FOR child IN walker.children;
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index 861a987..903cbb6 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -15,7 +15,7 @@
             [% ELSIF ctx.hold_failed_event || ctx.hold_local_alert %]
         <div>
             <strong>[% l('Problem:') %]</strong>
-            <span title="[% ctx.hold_failed_event.textcode %]">
+            <span title="[% ctx.hold_failed_event.textcode | html %]">
                 <em>[%
                         fail_part_key = ctx.hold_failed_event.payload.fail_part;
                         event_key = ctx.hold_failed_event.textcode;
@@ -32,8 +32,7 @@
             </span>
 
             [% IF ctx.hold_copy_available %]<p>
-            [% l('Find a copy in the shelving location, "[_1]."',
-                ctx.hold_copy_available.location) %]
+            [%  l('Find a copy in the shelving location, "[_1]."', locname) | html %]
             </p>[% END %]
 
             [% IF ctx.could_override || ctx.hold_local_alert %]
@@ -45,7 +44,7 @@
             <form method="POST">
                 <input type="hidden" type="name" name="override" value="1" />
                 [% FOR k IN ctx.orig_params.keys %]
-                <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | html %]" />
+                <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | uri %]" />
                 [% END %]
                 <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
                     alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
@@ -83,20 +82,20 @@
                 <label for="hold_usr_is_requestor_not">
                     [% l("Place hold for patron by barcode:") %]
                 </label>
-                <input type="text" name="hold_usr" id="hold_usr_input" value="[% ctx.patron_recipient.card.barcode %]" /><br />[%# XXX multi-barcode users? %]
+                <input type="text" name="hold_usr" id="hold_usr_input" value="[% ctx.patron_recipient.card.barcode | html %]" /><br />[%# XXX multi-barcode users? %]
                 <span>
                     <input type="radio" id="hold_usr_is_requestor"
                         onchange="staff_hold_usr_input_disabler(this);"
                         name="hold_usr_is_requestor" value="1" />
                     <label for="hold_usr_is_requestor">
-                        [% l("Place this hold for me ([_1] [_2])",
-                        ctx.user.first_given_name, ctx.user.family_name) %]
+                        [% l("Place this hold for me ([_1] [_2])", ctx.user.first_given_name, ctx.user.family_name) | html %]
                     </label>
                 </span>
             </p>
             [% END %]
             <p>
-                [% | l(attrs.title, ctx.get_aou(ctx.default_pickup_lib).name) %]
+                [%  title = attrs.title | html; libname = ctx.get_aou(ctx.default_pickup_lib).name | html %]
+                [% | l(title, libname) %]
                 You would like to place a hold on <strong><q>[_1]</q></strong>.<br />
                 If this is correct, confirm your pickup location and click <strong>SUBMIT</strong>.
                 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2
index f79de8a..4b91a47 100644
--- a/Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2
@@ -9,8 +9,8 @@
 <select name="qtype">
     [%  query_type = query_type || CGI.param('qtype');
         FOR qt IN query_types -%]
-    <option value='[% qt.value %]'[%
+    <option value='[% qt.value | uri %]'[%
         query_type == qt.value ? ' selected="selected"' : ''
-    %]>[% qt.label %]</option>
+    %]>[% qt.label | html %]</option>
     [% END -%]
 </select>
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
index 5c01e7e..5aaa7b8 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@ -22,7 +22,7 @@
                         </td>
                         <td id="dash_corner_mid1a">
                             <span id="dash_user">
-                                [%  l('[_1] [_2]', ctx.user.first_given_name, ctx.user.family_name) %]
+                                [%  l('[_1] [_2]', ctx.user.first_given_name, ctx.user.family_name) | html %]
                             </span>
                         </td>
                         <td id="dash_corner_mid1b">
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 5c0a620..a49b2ec 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -7,10 +7,12 @@
     IF is_advanced || is_special;
         ctx.page_title = l("Search Results");
     ELSE;
-        ctx.page_title = l("Search Results: ") _ CGI.param('query') | html_entity;
+        ctx.page_title = l("Search Results: ") _ CGI.param('query') | html;
     END;
 
-    page = CGI.param('page') || 0;
+    page = CGI.param('page');
+    page = page.match('^\d+$') ? page : 0; # verify page is a sane value
+
     page_count = ctx.page_size == 0 ? 1 : POSIX.ceil(ctx.hit_count / ctx.page_size);
 %]
     <form action="[% ctx.opac_root %]/results" method="GET">
@@ -44,7 +46,7 @@
                 [% END %]
                 <div class="results_header_div"></div>
                 [% UNLESS is_advanced || is_special %]
-                    <div class="results_header_lbl">Sort by</div>
+                    <div class="results_header_lbl">[% l('Sort by') %]</div>
                     [% INCLUDE "default/opac/parts/filtersort.tt2" value=CGI.param('sort') %]
                     <div class="results_header_div"></div>
 

commit ef4e3ea51a57cc8d112b809711023bbb9999f53c
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Aug 17 13:01:08 2011 -0400

    Assume username, not barcode, in TPAC login
    
    In the absence of a barcode regex OU setting (opac.barcode_regex), the
    TPAC was assuming that the entered value was a barcode. However, the
    default JSPAC assumption was that the entered value was a username. This
    commit makes the TPAC continue to function with the same assumptions as
    the default JSPAC in the absence of a barcode regex OU setting.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 6412907..a9d0565 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -288,15 +288,15 @@ sub load_login {
 		'open-ils.auth.authenticate.init', $username);
 
     my $args = {	
-        barcode => $username, 
+        username => $username, 
         password => md5_hex($seed . md5_hex($password)), 
         type => ($persist) ? 'persist' : 'opac' 
     };
 
     my $bc_regex = $ctx->{get_org_setting}->($org_unit, 'opac.barcode_regex');
 
-    $args->{username} = delete $args->{barcode} 
-        if $bc_regex and !($username =~ /$bc_regex/);
+    $args->{barcode} = delete $args->{username} 
+        if $bc_regex and ($username =~ /$bc_regex/);
 
 	my $response = $U->simplereq(
         'open-ils.auth', 'open-ils.auth.authenticate.complete', $args);

commit 06d945794fca67c693c1691e1d38e39643fbe500
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue Aug 16 16:44:16 2011 -0400

    Address ISBN issues in T-PAC
    
    A few problems fixed here:
    
    * Refer to args.isbns (plural) consistently; at times we were referring
      to args.isbn which did not exist
    * Grab the textContent of the SFX ISBN node rather than the raw
      XML::LibXML Element
    * Use an assignment operation when regex'ing the SFX ISBN, as the
      in-place was interpreted as a "print me" stmt and displaying the raw
      SFX ISBN.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/default/opac/parts/misc_util.tt2
index 48eea03..346b32b 100644
--- a/Open-ILS/src/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/misc_util.tt2
@@ -29,7 +29,7 @@
         args.marc_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent;
 
         # clean up the ISBN
-        args.isbn_clean = args.isbn.0.replace('\ .*', '');
+        args.isbn_clean = args.isbns.0.replace('\ .*', '');
 
         args.holdings = [];
         args.uris = [];
@@ -40,8 +40,8 @@
         IF sfx_isbn;
             IF sfx_isbn.textContent == "SFX";
                 my_parent = sfx_isbn.parentNode();
-                sfx_isbn = my_parent.findnodes('./*[@code="a"]');
-                sfx_isbn.replace('-', '');
+                sfx_isbn = my_parent.findnodes('./*[@code="a"]').textContent;
+                sfx_isbn = sfx_isbn.replace('-', '');
                 args.resolver_isbn = sfx_isbn.replace('\ .*', '');
             END;
         END;
diff --git a/Open-ILS/src/templates/default/opac/parts/result/table.tt2 b/Open-ILS/src/templates/default/opac/parts/result/table.tt2
index e6343d4..07fe359 100644
--- a/Open-ILS/src/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/result/table.tt2
@@ -89,7 +89,7 @@
                                                                 <td>[% attrs.publisher; %]</td>
                                                             </tr>
                                                         [% END %]
-                                                        [% IF attrs.isbn.0 %]
+                                                        [% IF attrs.isbns.size > 0 %]
                                                             <tr name="results_isbn_tr">
                                                                 <td valign="top">
                                                                     <strong>[% l('ISBN:') %]</strong>

commit 0d0cc97fa8b58e0044ecc44633e5c109d551be72
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue Aug 16 16:02:17 2011 -0400

    T-PAC: Do not display a call number if we don't have one
    
    Electronic records might not have a call number, so don't try to display
    one if there isn't one (in search results).
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/default/opac/parts/result/table.tt2 b/Open-ILS/src/templates/default/opac/parts/result/table.tt2
index 6593342..e6343d4 100644
--- a/Open-ILS/src/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/result/table.tt2
@@ -69,12 +69,14 @@
                                                     </div>
                                                     <table cellpadding="0" cellspacing="0" border="0"
                                                         class="results_info_table">
+                                                        [% IF args.holdings.size > 0 %]
                                                         <tr name='bib_cn_list' class='result_table_title_cell'>
                                                             <td valign='top'>
                                                                 <strong>[% l('Call number:') %]</strong>
                                                             </td>
-                                                            <td>[% args.holdings.0 %]</td>
+                                                            <td>[% args.holdings.0.label %]</td>
                                                         </tr>
+                                                        [% END %]
 
                                                         [% IF CGI.param('detail_record_view') %]
                                                         <!-- These fields are visible when viewing the results page in 'detailed' mode -->

commit 90eb2afa05b549c11e7ae6cd8c5b805e1749a485
Merge: 87671d4 5a6ee27
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Aug 16 15:33:03 2011 -0400

    Merge branch 'collab/berick/template-toolkit-opac-master-merge' of git.evergreen-ils.org:working/Evergreen into template-toolkit-opac-master-merge


commit 87671d4fc36d64de375e4d4024f817d3c5b09606
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Aug 16 15:32:57 2011 -0400

    TTPac: another merge casulty -> title_extended attribute
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/default/opac/parts/misc_util.tt2
index 457361e..48eea03 100644
--- a/Open-ILS/src/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/misc_util.tt2
@@ -10,6 +10,7 @@
         args.upc = xml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
         args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
         args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
+        args.title_extended = xml.findnodes('//*[@tag="245"]').textContent;
         args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
         args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
         args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;

commit 5a6ee27c30cff2e26916623a7bc9a12053840d33
Merge: abef2d3 110a7fb
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue Aug 16 15:11:49 2011 -0400

    Merge branch 'collab/berick/template-toolkit-opac-master-merge' of git.evergreen-ils.org:working/Evergreen into dbs/ttopac-master-merge


commit abef2d3dd1b3fecc02dd2eaa99da8def00fec1b5
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue Aug 16 15:09:58 2011 -0400

    Delete templates_kcls from core
    
    The KCLS templates, while a useful demonstration of how to skin the
    T-PAC, should be maintained outside of the core repository as they
    contain branding elements, etc, that are specific to KCLS.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates_kcls/default/opac/myopac/main_refund_policy.tt2 b/Open-ILS/src/templates_kcls/default/opac/myopac/main_refund_policy.tt2
deleted file mode 100644
index 9ad8bc0..0000000
--- a/Open-ILS/src/templates_kcls/default/opac/myopac/main_refund_policy.tt2
+++ /dev/null
@@ -1,24 +0,0 @@
-<tr>
-    <td colspan="3">
-        <br />
-        Important! You must have a printed receipt to be
-        eligible for a refund on lost items (regulations allow
-        for no exceptions).
-        <br />
-        <strong>
-            To ensure your necessary receipt information is
-            not lost, enter your email address above and a
-            receipt will be emailed to you. Otherwise, make
-            certain you have a printed receipt in hand before
-            closing the payment receipt screen.
-        </strong>
-        <br />
-        Refunds are not available for parts and pieces, overdue
-        fines, or items that do not display a specific title in
-        My Account. For a full list of refundable and
-        non-refundable items, visit
-        <a href="http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm">http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm</a><br /><br />
-        This site uses VeriSign SSL encryption to ensure your
-        privacy.
-    </td>
-</tr>
diff --git a/Open-ILS/src/templates_kcls/default/opac/parts/footer.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/footer.tt2
deleted file mode 100644
index 9ab3ace..0000000
--- a/Open-ILS/src/templates_kcls/default/opac/parts/footer.tt2
+++ /dev/null
@@ -1,10 +0,0 @@
-<div id="footer">
-    <a href="http://www.kcls.org/usingthelibrary/request/">[% l('Request a Purchase') %]</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/usingthelibrary/request/">[% l('Interlibrary Loan') %]</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/about/contact/">[% l('Contact Us') %]</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/usingthelibrary/catalog_help/">[% l('Site Help') %]</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/usingthelibrary/policies/privacy.cfm">[% l('Privacy Statement') %]</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/about/support/">[% l('Support KCLS') %]</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/employment/">[% l('Employment') %]</a> 
-</div>
-
diff --git a/Open-ILS/src/templates_kcls/default/opac/parts/homesearch.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/homesearch.tt2
deleted file mode 100644
index 2021f16..0000000
--- a/Open-ILS/src/templates_kcls/default/opac/parts/homesearch.tt2
+++ /dev/null
@@ -1,64 +0,0 @@
-<div style='width:664px;height:35px;background:#FFFFFF;'>
-    <strong><center></center></strong>
-</div>
-<div id='hp-banner'>
-    <a href='http://www.kcls.org/newcatalog/'><img
-        src='[% ctx.media_prefix %]/images/golive.jpg'
-        alt='new catalog' title='New Catalog Information' /></a>
-</div>
-<div id='hp-buttons'>
-    <div class="float-left">
-        <img src='[% ctx.media_prefix %]/images/hp-links-left.jpg' />
-    </div>
-    <div class="float-left">
-	    <div id='homesearch_thing'>
-	        <table cellpadding='0' cellspacing='5' border='0' id='hp-ql-table'>
-                <tr>
-                    <td colspan='4'>
-                        <span class="opac-auto-029">
-                            [% l("Browse for") %]:
-                        </span>
-                    </td>
-                </tr>
-                <tr>
-                    <td>
-                        <a href='http://www.kcls.org/booksandreading/'>books</a>
-                    </td>
-                    <td>
-                        <a href='http://www.kcls.org/movies/movies_browse.cfm'>movies</a>
-                    </td>
-                    <td>
-                        <a href='http://www.kcls.org/ecollection/'>downloads</a>
-                    </td>
-                    <td>
-                        <a href='http://www.kcls.org/websites/'>websites</a>
-                    </td>
-                </tr>
-                <tr>
-                    <td>
-                        <a href='http://www.kcls.org/music/'>music</a>
-                    </td>
-                    <td>
-                        <a href='http://www.kcls.org/databases/subject_categories.cfm#17'>magazines</a>
-                    </td>
-                    <td>
-                        <a href='http://www.kcls.org/databases/'>databases</a>
-                    </td>
-                    <td>
-                        <a href='http://www.kcls.org/answers/'>answers</a>
-                    </td>
-                </tr>
-	        </table>
-	    </div>
-	    <div id='hp-ql-bottom'>
-            <a href='http://www.kcls.org/locations'>Locations:
-                Find a Library Near You!
-                <img src='[% ctx.media_prefix %]/images/arrow-right.png' /></a>
-
-	    </div>
-    </div>
-    <div class="float-left">
-        <img src='[% ctx.media_prefix %]/images/hp-links-right.jpg' />
-    </div>
-    <div class="clear-both"></div>
-</div>
diff --git a/Open-ILS/src/templates_kcls/default/opac/parts/login/help.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/login/help.tt2
deleted file mode 100644
index a6d7ebb..0000000
--- a/Open-ILS/src/templates_kcls/default/opac/parts/login/help.tt2
+++ /dev/null
@@ -1,12 +0,0 @@
-<td class="login_boxes right_brain" align="center" valign="top" width="291">
-
-    <a href="http://www.kcls.org/about/contact/"><img 
-        src="[% ctx.media_prefix %]/images/questions.png" alt="[% l('Questions?') %]" style="margin-top:29px;" /></a>
-
-    <div style="width:182px;color:black;padding:5px 25px;">
-        [% l('Visit our FAQs section for answers to common questions about how to use your account.') %]
-    </div>
-
-    <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm#FAQs"><img
-        alt="[% l('FAQs') %]" src="[% ctx.media_prefix %]/images/faqs-btn.png" style="margin-top:13px;" /></a>
-</td>
diff --git a/Open-ILS/src/templates_kcls/default/opac/parts/myopac/prefs_hints.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/myopac/prefs_hints.tt2
deleted file mode 100644
index bb7c642..0000000
--- a/Open-ILS/src/templates_kcls/default/opac/parts/myopac/prefs_hints.tt2
+++ /dev/null
@@ -1,4 +0,0 @@
-<a href=
-        "http://www.kcls.org/usingthelibrary/catalog_help/library_elf.cfm"><u>Try
-        Library Elf-to manage library materials!</u></a>
-
diff --git a/Open-ILS/src/templates_kcls/default/opac/parts/printnav.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/printnav.tt2
deleted file mode 100644
index 13a8f66..0000000
--- a/Open-ILS/src/templates_kcls/default/opac/parts/printnav.tt2
+++ /dev/null
@@ -1,25 +0,0 @@
-<div class="big-block">
-    <div class="float-right">
-        <div class="pos-rel">
-            <img src="[% ctx.media_prefix %]/images/utils-corner-left.png" class="float-left" />
-            <div class="left-corner"> 
-                <a href="javascript:history.go(-1)"
-                    id="util_back_btn"><img alt="[% l('Back') %]"
-                    src="[% ctx.media_prefix %]/images/tool_back.png" /></a>
-                <a href="[% ctx.opac_root %]/home"
-                    id="util_home_btn"><img alt="[% l('Homepage') %]"
-                    src="[% ctx.media_prefix %]/images/tool_home.png" /></a>
-                <a href="javascript:window.print();"
-                    id="util_print_btn"><img alt="[% l('Print Page') %]"
-                    src="[% ctx.media_prefix %]/images/tool_print.png" /></a>
-                <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm"
-                    id="util_help_btn"><img alt="[% l('Help') %]"
-                    src="[% ctx.media_prefix %]/images/tool_help.png" /></a>
-                <a href="javascript:history.go(+1)"
-                    id="util_forw_btn"><img alt="[% l('Forward') %]"
-                    src="[% ctx.media_prefix %]/images/tool_forward.png" /></a>
-            </div>
-            <img src="[% ctx.media_prefix %]/images/utils-corner-right.png" class="float-left" />
-        </div>
-    </div>
-</div>
diff --git a/Open-ILS/src/templates_kcls/default/opac/parts/result/lowhits_purchase.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/result/lowhits_purchase.tt2
deleted file mode 100644
index cdfde46..0000000
--- a/Open-ILS/src/templates_kcls/default/opac/parts/result/lowhits_purchase.tt2
+++ /dev/null
@@ -1,6 +0,0 @@
-<p>
-    <strong>Still not finding what you are looking for?</strong><br />
-    Request that KCLS purchase the material you are looking for by making a
-    <a href="http://www.kcls.org/usingthelibrary/request/">Purchase Request</a><br />
-    <strong>Note:</strong> You must be logged in to make a Purchase Request<br />
-</p>
diff --git a/Open-ILS/src/templates_kcls/default/opac/parts/topnav_links.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/topnav_links.tt2
deleted file mode 100644
index 6ea4b4d..0000000
--- a/Open-ILS/src/templates_kcls/default/opac/parts/topnav_links.tt2
+++ /dev/null
@@ -1,13 +0,0 @@
-<div id="gold-links-holder">
-    <div id="gold-links">
-        <div id="header-links">
-            <a href="http://www.kcls.org/usingthelibrary/index.cfm">Using the Library</a>
-            <a href="http://www.kcls.org/booksandreading/">Books &amp; Reading</a>
-            <a href="http://www.kcls.org/research/index.cfm">Research &amp; Homework</a>
-            <a href="http://www.kcls.org/programs/">Programs &amp; Classes</a>
-            <a href="http://www.kcls.org/events/">Events</a>
-            <a href="/opac/extras/mobile/">Mobile Catalog</a>
-            <a href="http://www.kcls.org/about/">About KCLS</a>
-        </div>
-    </div>
-</div>
diff --git a/Open-ILS/src/templates_kcls/default/opac/parts/topnav_logo.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/topnav_logo.tt2
deleted file mode 100644
index f9d4320..0000000
--- a/Open-ILS/src/templates_kcls/default/opac/parts/topnav_logo.tt2
+++ /dev/null
@@ -1,2 +0,0 @@
-        <a href="http://www.kcls.org"><img alt="[% l('KCLS Logo') %]" 
-            src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /></a>

commit 110a7fb2222833875b50da601539bce210439191
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Aug 16 15:09:50 2011 -0400

    TTPac: move some templates into the right place
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/series.tt2 b/Open-ILS/src/templates/default/opac/parts/record/series.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/record/series.tt2
rename to Open-ILS/src/templates/default/opac/parts/record/series.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/result/paginate.tt2 b/Open-ILS/src/templates/default/opac/parts/result/paginate.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/result/paginate.tt2
rename to Open-ILS/src/templates/default/opac/parts/result/paginate.tt2

commit 4fa33a9e8b20655709bb636c3c1cd22bb6478e41
Merge: b795757 bf6ebc6
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Aug 16 11:34:11 2011 -0400

    Merged esi/template-toolkit-opac and repaired some merge conflicts
    
    Note to self: the simple/detail view options on the results page will
    need some tweaking, particularly since many/most will want to see the
    detail view by default.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --cc Open-ILS/src/templates/default/opac/parts/result/table.tt2
index 0d20b9a,424b952..6593342
--- a/Open-ILS/src/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/result/table.tt2
@@@ -8,51 -6,12 +8,13 @@@
  
      result_count = ctx.result_start;
  %]
 +
  <div style="height: 10px;"></div>
- [% BLOCK results_count_header %]
- <div class="results_header_nav1">
-     <table cellpadding="0" cellspacing="0" border="0" width="100%">
-         <tr>
-             <td class="h1" width="116">[% l('Search Results') %]</td>
-             <td valign="bottom" nowrap="nowrap" class="result_number">
-                 [% |l(ctx.result_start, ctx.result_stop, ctx.hit_count) %]
-                 Results <strong>[_1]</strong> - <strong>[_2]</strong> of <strong>[_3]</strong>
-                 [% END %]
-                 <span style='padding-left: 6px;'>
-                     [% |l(page + 1, page_count) %](page <strong>[_1]</strong> of <strong>[_2]</strong>)[% END %]
-                 </span>
-             </td>
-             <td align="right" valign="bottom">
-                 <span class='start_end_links_span'>
-                     [%  class = 'search_page_nav_link';
-                         href = '#';
-                         IF page > 0;
-                             href = mkurl('', {page => page - 1});
-                         ELSE; class = class _ ' invisible'; END;
-                     %]
-                     <a class='[% class %]' href='[% href %]' 
-                         title='[% l("Previous page") %]'><span class="nav_arrow_fix">&#9668;</span> [% l('Previous') %] </a>
-                     <span class='hide_me'
-                         style='padding-left: 11px; padding-right:11px;'>
-                         <span></span>
-                     </span>
-                     [%  class = 'search_page_nav_link';
-                         href = '#';
-                         IF (page + 1) < page_count;
-                             href = mkurl('', {page => page + 1});
-                         ELSE; class = class _ ' invisible'; END;
-                     %]
-                     <a class='[% class %]' href='[% href %]' 
-                         title='[% l("Next page") %]'> [% l('Next') %] <span class="nav_arrow_fix">&#9658;</span></a>
-                 </span>
-             </td>
-         </tr>
-     </table>
- </div>
- [% END %]
+ 
+ [% PROCESS "default/opac/parts/result/paginate.tt2" %] 
  [% ctx.results_count_header = PROCESS results_count_header;
      ctx.results_count_header %]
+ 
  <div id="result_table_div">
      <table cellpadding="0" cellspacing="0" border="0" width="100%">
          <tr>
@@@ -107,88 -66,43 +69,99 @@@
                                                      </div>
                                                      <table cellpadding="0" cellspacing="0" border="0"
                                                          class="results_info_table">
-                                                     [% IF attrs.publisher %]
-                                                         <tr name="results_pub_tr">
-                                                             <td valign="top">
-                                                                 <strong>[% l('Publisher:') %]</strong>
-                                                             </td>
-                                                             <td>[% attrs.publisher; %]</td>
-                                                         </tr>
-                                                     [% END %]
-                                                     [% IF attrs.isbn.0 %]
-                                                         <tr name="results_isbn_tr">
-                                                             <td valign="top">
-                                                                 <strong>[% l('ISBN:') %]</strong>
+                                                         <tr name='bib_cn_list' class='result_table_title_cell'>
+                                                             <td valign='top'>
+                                                                 <strong>[% l('Call number:') %]</strong>
                                                              </td>
-                                                             <td>[% attrs.isbns.0 %]</td>
+                                                             <td>[% args.holdings.0 %]</td>
                                                          </tr>
-                                                     [% END %]
+ 
+                                                         [% IF CGI.param('detail_record_view') %]
+                                                         <!-- These fields are visible when viewing the results page in 'detailed' mode -->
 -                                                        <tr name="results_pub_tr" class="[% attrs.publisher ? '' : 'hide_me' %]">
 -                                                            <td valign="top">
 -                                                                <strong>[% l('Publisher:') %]</strong>
 -                                                            </td>
 -                                                            <td>[% attrs.publisher; %]</td>
 -                                                        </tr>
 -                                                        <tr name="results_isbn_tr" class="[% attrs.isbns.0 ? '' : 'hide_me' %]">
 -                                                            <td valign="top">
 -                                                                <strong>[% l('ISBN:') %]</strong>
 -                                                            </td>
 -                                                            <td>[% attrs.isbns.0 %]</td>
 -                                                        </tr>
 -                                                        <tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
++
++                                                        [% IF attrs.publisher %]
++                                                            <tr name="results_pub_tr">
++                                                                <td valign="top">
++                                                                    <strong>[% l('Publisher:') %]</strong>
++                                                                </td>
++                                                                <td>[% attrs.publisher; %]</td>
++                                                            </tr>
++                                                        [% END %]
++                                                        [% IF attrs.isbn.0 %]
++                                                            <tr name="results_isbn_tr">
++                                                                <td valign="top">
++                                                                    <strong>[% l('ISBN:') %]</strong>
++                                                                </td>
++                                                                <td>[% attrs.isbns.0 %]</td>
++                                                            </tr>
++                                                        [% END %]
 +                                                        [% IF openurl.enabled == 'true';
 +                                                            FOR issn IN args.issns;
 +                                                                sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl);
 +                                                                FOR res IN sfx;
 +                                                        %]
 +                                                        <tr name="results_issn_tr">
                                                              <td valign="top">
 -                                                                <strong>[% l('Edition:') %]</strong>
 -                                                            </td>
 -                                                            <td>[% attrs.edition %]</td>
 -                                                        </tr>
 -                                                        <tr name="results_phys_desc_tr" class="[% attrs.phys_desc ? '' : 'hide_me' %]">
 -                                                            <td nowrap="nowrap" valign="top">
 -                                                                <strong>[% l('Phys. Desc.:') %]</strong>
 -                                                            </td>
 -                                                            <td>
 -                                                                [% args.phys_desc %]
 +                                                                <strong><a href="[% res.target_url %]">
 +                                                                [% res.public_name %]</a></strong>
                                                              </td>
 +                                                            <td>[% res.target_coverage %]</td>
                                                          </tr>
 +                                                                [% END %]
 +                                                            [% END %]
                                                          [% END %]
  
-                                                     [% IF attrs.edition %]
-                                                         <tr name="results_edition_tr">
-                                                             <td valign="top">
-                                                                 <strong>[% l('Edition:') %]</strong>
-                                                             </td>
-                                                             <td>[% attrs.edition %]</td>
-                                                         </tr>
-                                                     [% END %]
-                                                     [% IF attrs.phys_desc %]
-                                                         <tr name="results_phys_desc_tr">
-                                                             <td nowrap="nowrap" valign="top">
-                                                                 <strong>[% l('Phys. Desc.:') %]</strong>
-                                                             </td>
-                                                             <td>
-                                                                 [% args.phys_desc %]
-                                                             </td>
-                                                         </tr>
-                                                     [% END %]
-                                                         [% FOR uri IN args.uris %]
-                                                         <tr name='bib_uri_list' class='result_table_title_cell'>
-                                                             <td valign='top'>
-                                                                 <strong>[% l('Electronic resource') %]</strong>
-                                                             </td>
-                                                             <td><a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]</td>
-                                                         </tr>
++                                                        [% IF attrs.edition %]
++                                                            <tr name="results_edition_tr">
++                                                                <td valign="top">
++                                                                    <strong>[% l('Edition:') %]</strong>
++                                                                </td>
++                                                                <td>[% attrs.edition %]</td>
++                                                            </tr>
 +                                                        [% END %]
-                                                         [% IF args.holdings.size > 0 %]
-                                                         <tr name='bib_cn_list' class='result_table_title_cell'>
-                                                             <td colspan='2'>
-                                                                 <table class='result_holdings_table'>
-                                                                     <thead><tr>
-                                                                         <th>[% l('Library') %]</th>
-                                                                         <th>[% l('Shelving location') %]</th>
-                                                                         <th>[% l('Call number') %]</th>
-                                                                         <th>[% l('Status') %]</th>
-                                                                     </tr></thead>
-                                                                     <tbody>
-                                                             [% FOR copy IN args.holdings %]
-                                                                     <tr>
-                                                                         <td>[% copy.library %]</td>
-                                                                         <td>[% copy.location %]</td>
-                                                                         <td>[% copy.label %]</td>
-                                                                         <td>[% copy.status %]</td>
-                                                                     </tr>
++                                                        [% IF attrs.phys_desc %]
++                                                            <tr name="results_phys_desc_tr">
++                                                                <td nowrap="nowrap" valign="top">
++                                                                    <strong>[% l('Phys. Desc.:') %]</strong>
++                                                                </td>
++                                                                <td>
++                                                                    [% args.phys_desc %]
++                                                                </td>
++                                                            </tr>
++                                                        [% END %]
++                                                        [% FOR uri IN args.uris %]
++                                                            <tr name='bib_uri_list' class='result_table_title_cell'>
++                                                                <td valign='top'>
++                                                                    <strong>[% l('Electronic resource') %]</strong>
++                                                                </td>
++                                                                <td><a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]</td>
++                                                            </tr>
 +                                                            [% END %]
-                                                                     </tbody>
-                                                                 </table>
-                                                             </td>
-                                                         </tr>
++                                                            [% IF args.holdings.size > 0 %]
++                                                            <tr name='bib_cn_list' class='result_table_title_cell'>
++                                                                <td colspan='2'>
++                                                                    <table class='result_holdings_table'>
++                                                                        <thead><tr>
++                                                                            <th>[% l('Library') %]</th>
++                                                                            <th>[% l('Shelving location') %]</th>
++                                                                            <th>[% l('Call number') %]</th>
++                                                                            <th>[% l('Status') %]</th>
++                                                                        </tr></thead>
++                                                                        <tbody>
++                                                                [% FOR copy IN args.holdings %]
++                                                                        <tr>
++                                                                            <td>[% copy.library %]</td>
++                                                                            <td>[% copy.location %]</td>
++                                                                            <td>[% copy.label %]</td>
++                                                                            <td>[% copy.status %]</td>
++                                                                        </tr>
++                                                                [% END %]
++                                                                        </tbody>
++                                                                    </table>
++                                                                </td>
++                                                            </tr>
 +                                                        [% END %]
++                                                        [% END %] <!-- END detail_record_view -->
                                                      </table>
                                                      <div>
                                                          [% l('[_1] of [quant,_2,copy,copies] available',

commit b795757787c3cd1aa8710eaeccd1c7fde991ac17
Merge: 7627afc 90a7bde
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Aug 16 11:14:41 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge


commit bf6ebc61b5573667d6e8c42d5362c710732bc66d
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Aug 16 08:24:38 2011 -0400

    TTPac: Hide pagination for 1-page hits
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/result/paginate.tt2 b/Open-ILS/web/templates/default/opac/parts/result/paginate.tt2
index 521776e..6582c01 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/paginate.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/paginate.tt2
@@ -27,15 +27,17 @@
                         [%  # show links to 4 previous pages, the current page, and 3 more pages.
                             added = 0;
                             pageitr = page - 5; 
-                            WHILE (pageitr = pageitr + 1) < page_count;
-                                IF pageitr < 0; NEXT; END;
-                                IF pageitr == page; %]
-                                    <span class='results-paginator-selected'>[% pageitr + 1%]</span>
-                                [% ELSE %]
-                                    <a href="[% mkurl('', {page => pageitr}) %]">[% pageitr + 1%]</a>
-                            [%  END;
-                                added = added + 1;
-                                IF added == 8; LAST; END;
+                            IF page_count > 1; # no need to paginate 1 page
+                                WHILE (pageitr = pageitr + 1) < page_count;
+                                    IF pageitr < 0; NEXT; END;
+                                    IF pageitr == page; %]
+                                        <span class='results-paginator-selected'>[% pageitr + 1%]</span>
+                                    [% ELSE %]
+                                        <a href="[% mkurl('', {page => pageitr}) %]">[% pageitr + 1%]</a>
+                                [%  END;
+                                    added = added + 1;
+                                    IF added == 8; LAST; END;
+                                END;
                             END;
                         %]
                     </span>

commit f78e76ca664df88b29d01acc6c4b509c361ad327
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 15 17:38:12 2011 -0400

    TTpac: added simple/detailed record view option to results page
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 955f68c..424b952 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -72,6 +72,9 @@
                                                             </td>
                                                             <td>[% args.holdings.0 %]</td>
                                                         </tr>
+
+                                                        [% IF CGI.param('detail_record_view') %]
+                                                        <!-- These fields are visible when viewing the results page in 'detailed' mode -->
                                                         <tr name="results_pub_tr" class="[% attrs.publisher ? '' : 'hide_me' %]">
                                                             <td valign="top">
                                                                 <strong>[% l('Publisher:') %]</strong>
@@ -98,6 +101,8 @@
                                                                 [% args.phys_desc %]
                                                             </td>
                                                         </tr>
+                                                        [% END %]
+
                                                     </table>
                                                     <div>
                                                         [% l('[_1] of [quant,_2,copy,copies] available',
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 9b2d242..5c0a620 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -47,16 +47,19 @@
                     <div class="results_header_lbl">Sort by</div>
                     [% INCLUDE "default/opac/parts/filtersort.tt2" value=CGI.param('sort') %]
                     <div class="results_header_div"></div>
-                    <!-- XXX still needed?<div class="results_header_lbl">View</div>
-                    <select class="results_header_sel">
-                        <option>Simple</option>
-                        <option>Detailed</option>
-                    </select>
-                    <div class="results_header_div"></div> -->
-                    <input type="checkbox" id="limit_to_available"
-                        name="modifier" value="available"
-                        [% CGI.param('modifier').grep('available').size
-                            ? ' checked="checked"' : '' %] />
+
+                    <div class='results_header_sel' id='simple-detail-view-links'>
+                        [% IF CGI.param('detail_record_view') %]
+                        <a href="[% mkurl('', {detail_record_view => ''}) %]">[% l('Simple View') %]</a>
+                        [% ELSE %]
+                        <a href="[% mkurl('', {detail_record_view => 1}) %]">[% l('Detailed View') %]</a>
+                        [% END %]
+                    </div>
+                    <div class="results_header_div"></div>
+
+                    <input type="checkbox" id="limit_to_available" name="modifier" value="available"
+                        [% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %] />
+
                     <label for="limit_to_available" class="results_header_lbl">
                         [% l('Limit to available items') %]
                     </label>

commit 60af82af2ce56af6210c5daa9acd116b87395a80
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 15 14:56:50 2011 -0400

    TTPac: move results pageing chunk to new template
    
    table.tt2 and paging are complex enough and will likely result in much
    local customization.  Break them up into 2 page to simplify.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/result/paginate.tt2 b/Open-ILS/web/templates/default/opac/parts/result/paginate.tt2
new file mode 100644
index 0000000..521776e
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/result/paginate.tt2
@@ -0,0 +1,57 @@
+[% BLOCK results_count_header %]
+<div class="results_header_nav1">
+    <table cellpadding="0" cellspacing="0" border="0" width="100%">
+        <tr>
+            <td class="h1" width="116">[% l('Search Results') %]</td>
+            <td valign="bottom" nowrap="nowrap" class="result_number">
+                [% |l(ctx.result_start, ctx.result_stop, ctx.hit_count) %]
+                Results <strong>[_1]</strong> - <strong>[_2]</strong> of <strong>[_3]</strong>
+                [% END %]
+                <span style='padding-left: 6px;'>
+                    [% |l(page + 1, page_count) %](page <strong>[_1]</strong> of <strong>[_2]</strong>)[% END %]
+                </span>
+            </td>
+            <td align="right" valign="bottom">
+                <span class='start_end_links_span'>
+
+                    [%  class = 'search_page_nav_link';
+                        href = '#';
+                        IF page > 0;
+                            href = mkurl('', {page => page - 1});
+                        ELSE; class = class _ ' invisible'; END;
+                    %]
+                    <a class='[% class %]' href='[% href %]' 
+                        title='[% l("Previous page") %]'><span class="nav_arrow_fix">&#9668;</span> [% l('Previous') %] </a>
+
+                    <span style='padding-left: 11px; padding-right:11px;'>
+                        [%  # show links to 4 previous pages, the current page, and 3 more pages.
+                            added = 0;
+                            pageitr = page - 5; 
+                            WHILE (pageitr = pageitr + 1) < page_count;
+                                IF pageitr < 0; NEXT; END;
+                                IF pageitr == page; %]
+                                    <span class='results-paginator-selected'>[% pageitr + 1%]</span>
+                                [% ELSE %]
+                                    <a href="[% mkurl('', {page => pageitr}) %]">[% pageitr + 1%]</a>
+                            [%  END;
+                                added = added + 1;
+                                IF added == 8; LAST; END;
+                            END;
+                        %]
+                    </span>
+
+                    [%  class = 'search_page_nav_link';
+                        href = '#';
+                        IF (page + 1) < page_count;
+                            href = mkurl('', {page => page + 1});
+                        ELSE; class = class _ ' invisible'; END;
+                    %]
+                    <a class='[% class %]' href='[% href %]' 
+                        title='[% l("Next page") %]'> [% l('Next') %] <span class="nav_arrow_fix">&#9658;</span></a>
+                </span>
+            </td>
+        </tr>
+    </table>
+</div>
+[% END %]
+
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 6abafab..955f68c 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -7,64 +7,11 @@
     result_count = ctx.result_start;
 %]
 <div style="height: 10px;"></div>
-[% BLOCK results_count_header %]
-<div class="results_header_nav1">
-    <table cellpadding="0" cellspacing="0" border="0" width="100%">
-        <tr>
-            <td class="h1" width="116">[% l('Search Results') %]</td>
-            <td valign="bottom" nowrap="nowrap" class="result_number">
-                [% |l(ctx.result_start, ctx.result_stop, ctx.hit_count) %]
-                Results <strong>[_1]</strong> - <strong>[_2]</strong> of <strong>[_3]</strong>
-                [% END %]
-                <span style='padding-left: 6px;'>
-                    [% |l(page + 1, page_count) %](page <strong>[_1]</strong> of <strong>[_2]</strong>)[% END %]
-                </span>
-            </td>
-            <td align="right" valign="bottom">
-                <span class='start_end_links_span'>
-
-                    [%  class = 'search_page_nav_link';
-                        href = '#';
-                        IF page > 0;
-                            href = mkurl('', {page => page - 1});
-                        ELSE; class = class _ ' invisible'; END;
-                    %]
-                    <a class='[% class %]' href='[% href %]' 
-                        title='[% l("Previous page") %]'><span class="nav_arrow_fix">&#9668;</span> [% l('Previous') %] </a>
-
-                    <span style='padding-left: 11px; padding-right:11px;'>
-                        [%  # show links to 4 previous pages, the current page, and 3 more pages.
-                            added = 0;
-                            pageitr = page - 5; 
-                            WHILE (pageitr = pageitr + 1) < page_count;
-                                IF pageitr < 0; NEXT; END;
-                                IF pageitr == page; %]
-                                    <span class='results-paginator-selected'>[% pageitr + 1%]</span>
-                                [% ELSE %]
-                                    <a href="[% mkurl('', {page => pageitr}) %]">[% pageitr + 1%]</a>
-                            [%  END;
-                                added = added + 1;
-                                IF added == 8; LAST; END;
-                            END;
-                        %]
-                    </span>
 
-                    [%  class = 'search_page_nav_link';
-                        href = '#';
-                        IF (page + 1) < page_count;
-                            href = mkurl('', {page => page + 1});
-                        ELSE; class = class _ ' invisible'; END;
-                    %]
-                    <a class='[% class %]' href='[% href %]' 
-                        title='[% l("Next page") %]'> [% l('Next') %] <span class="nav_arrow_fix">&#9658;</span></a>
-                </span>
-            </td>
-        </tr>
-    </table>
-</div>
-[% END %]
+[% PROCESS "default/opac/parts/result/paginate.tt2" %] 
 [% ctx.results_count_header = PROCESS results_count_header;
     ctx.results_count_header %]
+
 <div id="result_table_div">
     <table cellpadding="0" cellspacing="0" border="0" width="100%">
         <tr>
@@ -226,7 +173,7 @@
                                         </tr>
                                         <tr>
                                             <td/>
-                                            <td colspan='5'> <!-- Chilifrehs reviews panel -->
+                                            <td colspan='5'> <!-- Chilifresh reviews panel -->
                                                 <div id="chili_review_[% attrs.isbn_clean %]" style="display: none;" align="center" width="100%"></div>
                                             </td>
                                         </tr>

commit d9d36ec6b8ab9f5bfffaad4babc6025f93508aca
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 15 14:42:45 2011 -0400

    TTpac: show page range in results paging display
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index a58c132..b166507 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1020,3 +1020,5 @@ a.dash-link:hover { text-decoration: underline !important; }
     padding-bottom: 1ex;
 }
 .cn_browse_item { padding: 2ex; }
+
+.results-paginator-selected { color: red; }
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 78e606e..6abafab 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -22,6 +22,7 @@
             </td>
             <td align="right" valign="bottom">
                 <span class='start_end_links_span'>
+
                     [%  class = 'search_page_nav_link';
                         href = '#';
                         IF page > 0;
@@ -30,10 +31,24 @@
                     %]
                     <a class='[% class %]' href='[% href %]' 
                         title='[% l("Previous page") %]'><span class="nav_arrow_fix">&#9668;</span> [% l('Previous') %] </a>
-                    <span class='hide_me'
-                        style='padding-left: 11px; padding-right:11px;'>
-                        <span></span>
+
+                    <span style='padding-left: 11px; padding-right:11px;'>
+                        [%  # show links to 4 previous pages, the current page, and 3 more pages.
+                            added = 0;
+                            pageitr = page - 5; 
+                            WHILE (pageitr = pageitr + 1) < page_count;
+                                IF pageitr < 0; NEXT; END;
+                                IF pageitr == page; %]
+                                    <span class='results-paginator-selected'>[% pageitr + 1%]</span>
+                                [% ELSE %]
+                                    <a href="[% mkurl('', {page => pageitr}) %]">[% pageitr + 1%]</a>
+                            [%  END;
+                                added = added + 1;
+                                IF added == 8; LAST; END;
+                            END;
+                        %]
                     </span>
+
                     [%  class = 'search_page_nav_link';
                         href = '#';
                         IF (page + 1) < page_count;

commit 67e383b7e3572631230f818cbbcd91fdb2542f08
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 15 11:28:19 2011 -0400

    TTPac: change default any-format to 'All Formats'
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index bf4a26e..ccce432 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -48,7 +48,7 @@
         [% UNLESS is_advanced OR is_special %]
         <tr>
             <td>
-                [% INCLUDE "default/opac/parts/coded_value_selector.tt2" attr=["mattype", "item_type"] none_ok=1 %]
+                [% INCLUDE "default/opac/parts/coded_value_selector.tt2" attr=["mattype", "item_type"] none_ok=1 none_label=l('All Formats') %]
             </td>
             <td>
                 <span id='depth_selector_span'>

commit 9570a35ac858c91de910f6e18d59ac7e58f4af7d
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 15 11:28:01 2011 -0400

    TTpac: option to override no-choice label in coded value selector
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
index 92a96ee..ad46d79 100644
--- a/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
@@ -19,7 +19,7 @@
     multiple ? ' multiple="multiple"' : '';
     size ? (' size="' _ size _ '"') : ''; %]>
 [% IF none_ok %]
-    <option value=''>[% l('-- Any --') %]</option>
+    <option value=''>[% none_label ? none_label : l('-- Any --') %]</option>
 [% END %]
 [% FOR o IN all_values %]
     <option value='[% o.code %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : '' %]>[% o.value %]</option>

commit 335f3c70a675898a0a4a3b0531a1222786ad0993
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 15 11:18:33 2011 -0400

    TTpac: Chilifresh reviews panel occupies the width of the table
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 75732c2..78e606e 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -205,9 +205,13 @@
                                         </tr>
                                         <tr>
                                             <td/>
-                                            <td align='center'>
-                                                <!-- Chilifresh link and reviews panel --> 
+                                            <td align='center'> <!-- Chilifresh reviews link --> 
                                                 <div class="chili_review" id="isbn_[% attrs.isbn_clean %]"> </div>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td/>
+                                            <td colspan='5'> <!-- Chilifrehs reviews panel -->
                                                 <div id="chili_review_[% attrs.isbn_clean %]" style="display: none;" align="center" width="100%"></div>
                                             </td>
                                         </tr>

commit 7627afcb01179a956e7bfd785cd9e79fb46fabcc
Merge: 78ef045 48612c1
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 11 17:50:09 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge


commit 78ef0457cf7c21a148b590291484fb16340bb408
Merge: c186e12 72db882
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 11 17:48:00 2011 -0400

    Merge esi/template-toolkit-opac and repaired some conflicts
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --cc Open-ILS/src/templates/default/opac/parts/misc_util.tt2
index 8bbc57c,0000000..457361e
mode 100644,000000..100644
--- a/Open-ILS/src/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/misc_util.tt2
@@@ -1,156 -1,0 +1,159 @@@
 +[% 
 +    # Extract MARC fields from XML
 +    #   get_marc_attrs( { marc_xml => doc } )
 +    BLOCK get_marc_attrs;
 +        xml = args.marc_xml;
-         args.isbn = xml.findnodes('//*[@tag="020"]/*[@code="a"]').shift.textContent;
++        args.isbns = [];
++        FOR isbn IN xml.findnodes('//*[@tag="020"]/*[@code="a"]');
++            args.isbns.push(isbn.textContent);
++        END;
 +        args.upc = xml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
 +        args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
 +        args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
 +        args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
 +        args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
 +        args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
 +        args.summary = xml.findnodes('//*[@tag="520"]/*[@code="a"]').textContent;
 +        args.edition = xml.findnodes('//*[@tag="250"]/*[@code="a"]').textContent ||
 +            xml.findnodes('//*[@tag="534"]/*[@code="b"]').textContent ||
 +            xml.findnodes('//*[@tag="775"]/*[@code="b"]').textContent;
 +        phys = xml.findnodes(
 +            '//*[@tag="300"]/*[@code="a" or @code="b" or @code="c" or @code="e"]'
 +        );
 +        phys_content = [];
 +        FOR p IN phys; phys_content.push(p.textContent); END;
 +        args.phys_desc = phys_content.join("");
 +
 +        # MARC Callnumber
 +        args.marc_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent;
 +
 +        # clean up the ISBN
-         args.isbn_clean = args.isbn.replace('\ .*', '');
++        args.isbn_clean = args.isbn.0.replace('\ .*', '');
 +
 +        args.holdings = [];
 +        args.uris = [];
 +        args.issns = [];
 +
 +        # we use $9 of ISBN and ISSN as a flag for e-version
 +        sfx_isbn = xml.findnodes('//*[@tag="020"]/*[@code="9"]');
 +        IF sfx_isbn;
 +            IF sfx_isbn.textContent == "SFX";
 +                my_parent = sfx_isbn.parentNode();
 +                sfx_isbn = my_parent.findnodes('./*[@code="a"]');
 +                sfx_isbn.replace('-', '');
 +                args.resolver_isbn = sfx_isbn.replace('\ .*', '');
 +            END;
 +        END;
 +
 +        sfx_issn = xml.findnodes('//*[@tag="022"]/*[@code="9"]');
 +        IF sfx_issn;
 +            IF sfx_issn.textContent == "SFX";
 +                my_parent = sfx_issn.parentNode();
 +                sfx_issn = my_parent.findnodes('./*[@code="a"]');
 +                args.issns.push(
 +                    sfx_issn.textContent.replace('[^\d\-X]', '')
 +                );
 +            END;
 +        END;
 +
 +        # we snag all issns if no SFX available
 +        IF args.issns.size == 0;
 +            FOR rawissn IN xml.findnodes('//*[@tag="022"]/*[@code="a"]');
 +                args.issns.push(
 +                    rawissn.textContent.replace('[^\d\-X]', '')
 +                );
 +            END;
 +        END;
 +
 +        FOR volume IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
 +
 +            # Check volume visibility - could push this into XPath
 +            vol.label = volume.getAttribute('label');
 +            vol.id = volume.getAttribute('id');
 +            NEXT IF volume.getAttribute('opac_visible') == 'false';
 +            NEXT IF volume.getAttribute('deleted') == 'true';
 +
 +            IF vol.label == '##URI##';
 +                FOR uri IN volume.findnodes('./*[local-name()="uris"]/*[local-name()="uri"]');
 +                    res.href = uri.getAttribute('href');
 +                    res.link = uri.getAttribute('label');
 +                    res.note = uri.getAttribute('use_restriction');
 +                    args.uris.push(res);
 +                END;
 +                NEXT;
 +            ELSE;
 +                copies = volume.findnodes('./*[local-name()="copies"]/*[local-name()="copy"]');
 +                FOR copy IN copies;
 +                    # Check copy visibility
 +                    cp.deleted = copy.getAttribute('deleted');    
 +                    cp.visible = copy.getAttribute('opac_visible');
 +                    NEXT IF (cp.deleted == 'true' OR cp.visible == 'false');
 +
 +                    # Iterate through all of the children to determine visibility
 +                    FOR node IN cp.childNodes;
 +                        NEXT IF cp.visible == 'false';
 +                        vis = node.getAttribute('opac_visible');
 +                        del = node.getAttribute('deleted');
 +                        IF vis == 'false' or del == 'true';
 +                            cp.visible = 'false';
 +                        END;
 +                    END;
 +
 +                    NEXT IF cp.visible == 'false';
 +                    
 +                    loc = copy.findnodes('./*[local-name()="location"]');
 +                    circlib = copy.findnodes('./*[local-name()="circlib"]');
 +                    status = copy.findnodes('./*[local-name()="status"]');
 +
 +                    holding = {
 +                        label => vol.label,
 +                        location => loc.textContent,
 +                        library => circlib.textContent,
 +                        status => status.textContent
 +                        barcode => copy.getAttribute('barcode')
 +                    };
 +                    args.holdings.push(holding);
 +                END;
 +            END;
 +        END;
 +
 +        # Extract the copy count summary
 +        count_type = (ctx.is_staff) ? 'staff' : 'public';
 +        xpath = '//*[local-name()="counts"]/*[local-name()="count"][@type="' _ count_type _ '"]';
 +        FOR node IN xml.findnodes(xpath);
 +            args.copy_counts = {};
 +            FOR attr IN ['count', 'available', 'unshadow', 'transcendant']; 
 +                args.copy_counts.$attr = node.getAttribute(attr);
 +            END;
 +        END;
 +
 +        # "mattype" == "custom marc format specifier"
 +        FOR icon_style IN ['mattype', 'item_type']; 
 +            node = xml.findnodes(
 +                '//*[local-name()="attributes"]/*[local-name()="field"][@name="' _ icon_style _ '"]');
 +            IF node AND node.textContent;
 +                args.format_label = node.getAttribute('coded-value')
 +                args.format_icon = ctx.media_prefix _ '/images/format_icons/' _ icon_style _ '/' _ node.textContent _ '.png';
 +                LAST;
 +            END;
 +        END;
 +    END;
 +
 +    BLOCK get_hold_status;
 +        IF hold.hold.status == 4;
 +            l("Available");
 +            IF ahr.shelf_expire_time;
 +                l('<br/>Expires [_1]', 
 +                    date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT));
 +            END;
 +        ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
 +            # estimated wait is delivered as seconds.
 +            SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);
 +            l("Estimated wait: [quant,_1,day,days]", hwait);
 +        ELSIF hold.hold.status == 3;
 +            l("In Transit");
 +        ELSIF hold.hold.status < 3;
 +            l("Waiting for copy");
 +        END;
 +    END;
 +%]
diff --cc Open-ILS/src/templates/default/opac/parts/record/summary.tt2
index d97f0fd,60a9df2..53c22d2
--- a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
@@@ -37,13 -31,12 +39,12 @@@
                              [% END %]
                          </td>
                          <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
 -                            <div style="width:230px;text-align:left;margin-top:3px;">
 +                            <div style="width:280px;text-align:left;margin-top:3px;">
                                  <div style="float:right;">
                                      <div class="rdetail_aux_utils opac-auto-010">
-                                         <a href="[% ctx.opac_root %]/place_hold[%-
-                                             propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% ctx.bre_id %]&amp;hold_type=T" id="rdetail_place_hold" class="no-dec"><img
-                                             src="[% ctx.media_prefix %]/images/green_check.png" alt="" /><span 
-                                                 style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
+                                         <a href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => ctx.bre_id, hold_type => 'T'}) %]" 
+                                             class="no-dec"><img src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
+                                                     style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
                                      </div>
                                      <div class="rdetail_aux_utils opac-auto-121">
                                          [%  
@@@ -77,23 -78,12 +80,27 @@@
                              </td>
                              <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc %]</td>
                          </tr>
 +                        [% IF openurl.enabled == 'true';
 +                            FOR issn IN args.issns;
 +                                sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl);
 +                                FOR res IN sfx;
 +                        %]
 +                            <tr name="results_issn_tr">
 +                                <td valign="top">
 +                                    <strong><a href="[% res.target_url %]">
 +                                        [% res.public_name %]</a></strong>
 +                                </td>
 +                                <td>[% res.target_coverage %]</td>
 +                            </tr>
 +                                [% END %]
 +                            [% END %]
 +                        [% END %]
                          <tr>
                              <td nowrap='nowrap' valign="top">
+                                 <strong>[% IF attrs.marc_cn; l("Call Number"); END %]</strong>
+                             </td>
+                             <td valign="top">[% attrs.marc_cn %]</td>
+                             <td nowrap='nowrap' valign="top">
                                  <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
                              </td>
                              <td valign="top" id='rdetail_edition'>[% attrs.edition %]</td>
diff --cc Open-ILS/src/templates/default/opac/parts/result/table.tt2
index 4c8898f,75732c2..0d20b9a
--- a/Open-ILS/src/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/result/table.tt2
@@@ -113,33 -116,13 +114,33 @@@
                                                              </td>
                                                              <td>[% attrs.publisher; %]</td>
                                                          </tr>
 -                                                        <tr name="results_isbn_tr" class="[% attrs.isbns.0 ? '' : 'hide_me' %]">
 +                                                    [% END %]
-                                                     [% IF attrs.isbn %]
++                                                    [% IF attrs.isbn.0 %]
 +                                                        <tr name="results_isbn_tr">
                                                              <td valign="top">
                                                                  <strong>[% l('ISBN:') %]</strong>
                                                              </td>
-                                                             <td>[% attrs.isbn %]</td>
+                                                             <td>[% attrs.isbns.0 %]</td>
                                                          </tr>
 -                                                        <tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
 +                                                    [% END %]
 +                                                        [% IF openurl.enabled == 'true';
 +                                                            FOR issn IN args.issns;
 +                                                                sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl);
 +                                                                FOR res IN sfx;
 +                                                        %]
 +                                                        <tr name="results_issn_tr">
 +                                                            <td valign="top">
 +                                                                <strong><a href="[% res.target_url %]">
 +                                                                [% res.public_name %]</a></strong>
 +                                                            </td>
 +                                                            <td>[% res.target_coverage %]</td>
 +                                                        </tr>
 +                                                                [% END %]
 +                                                            [% END %]
 +                                                        [% END %]
 +
 +                                                    [% IF attrs.edition %]
 +                                                        <tr name="results_edition_tr">
                                                              <td valign="top">
                                                                  <strong>[% l('Edition:') %]</strong>
                                                              </td>
@@@ -230,28 -178,27 +231,21 @@@
                                                  <div style="width:250px;text-align:left;">
                                                      <div style="float:right;">
                                                          <div class="results_aux_utils opac-auto-010"><a
-                                                                 href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% rec.id %]&amp;hold_type=T" 
+                                                                 href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => rec.id, hold_type => 'T'}) %]" 
                                                                      name="place_hold_link" class="no-dec"><img
                                                                  src="[% ctx.media_prefix %]/images/green_check.png"
 -                                                                alt="[% l('Place hold') %]"/><span style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
 +                                                                alt=""/><span style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
                                                          </div>
                                                          <div class="results_aux_utils opac-auto-011">
 -                                                            [%  operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
 -                                                                label = (operation == "add") ? l("Add to") : l("Remove from"); %]
 -                                                            <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
 -                                                                <input type="hidden" name="record" value="[% rec.id %]" />
 -                                                            <div style="position:absolute;">
 -                                                                <div style="position:relative;top:5px; left: 25px;">
 -                                                                    <input type="submit" title="[% '[_1] my list' | l(label) %]" 
 -                                                                        value="[% '[_1] my list' | l(label) %]" class="subtle-button" />
 -                                                                </div>
 -                                                            </div>
 -                                                                <input type="image"
 -                                                                alt="[% '[_1] my list' | l(label) %]"
 -                                                                src="[% ctx.media_prefix %]/images/clipboard.png" />
 -                                                            </form>
 +                                                            [%  
 +                                                                operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
 +                                                                label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
 +                                                            %]      
-                                                             <a href="[% ctx.opac_root %]/mylist/[% operation %]?record=[% rec.id %]" class="no-dec">
++                                                            <a href="[% mkurl(ctx.opac_root _ '/mylist/' _ operation, {record => rec.id}, 1) %]" class="no-dec">
 +                                                                <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
 +                                                                [% label %]
 +                                                            </a>
                                                          </div>
-                                                         <!-- <div style="padding-top:7px;" class="results_aux_utils">
-                                                             <a title="Reviews and More" target="_blank" class="no-dec"
-                                                                 name="reviews_and_more" href="javascript:;"><img
-                                                                 alt="[% l('Reviews and more') %]"
-                                                                 src="[% ctx.media_prefix %]/images/starz.png" /> <span
-                                                                     style="position:relative;top:-5px;">[% l('Reviews and More') %]</span></a>
-                                                         </div> -->
                                                      </div>
                                                  </div>
                                              </td>

commit 72db8825b3ca72fe29f6fa0b9df838484013fe54
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 11 17:21:03 2011 -0400

    TTpac: minor i18n and other cleanup
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 5686971..75732c2 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -89,7 +89,7 @@
                                                 <div class="bold">
                                                     <a title="[% attrs.title %]" name='item_title'
                                                         href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"
-                                                        class='search_link'>[% attrs.title %]</a>
+                                                        class='search_link'>[% attrs.title | html_entity%]</a>
                                                 </div>
                                                 <div style="font-size:11px;">
                                                     <div>
@@ -190,12 +190,12 @@
                                                                 <input type="hidden" name="record" value="[% rec.id %]" />
                                                             <div style="position:absolute;">
                                                                 <div style="position:relative;top:5px; left: 25px;">
-                                                                    <input type="submit" title="[% l(label _ ' my list') %]" 
-                                                                        value="[% l(label _ ' my list') %]" class="subtle-button" />
+                                                                    <input type="submit" title="[% '[_1] my list' | l(label) %]" 
+                                                                        value="[% '[_1] my list' | l(label) %]" class="subtle-button" />
                                                                 </div>
                                                             </div>
                                                                 <input type="image"
-                                                                alt="[% l(label _ ' my list') %]"
+                                                                alt="[% '[_1] my list' | l(label) %]"
                                                                 src="[% ctx.media_prefix %]/images/clipboard.png" />
                                                             </form>
                                                         </div>
@@ -225,5 +225,4 @@
 </div>
 <div>
     [% ctx.results_count_header %]
-    <!-- ChiliFresh XXX script TODO -->
 </div>

commit a94d9d750e3c75ba642fdfd6da67722f36cf8b92
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 11 17:17:40 2011 -0400

    TTpac: removed last bits of propagator; minor cleanup
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 1298754..66e47ac 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -7,22 +7,11 @@
     # Don't wrap in l() here; do that where this format string is actually used.
     SET HUMAN_NAME_FORMAT = '[_1] [_2] [_3] [_4] [_5]';
 
-    # x and y are artifacts of using <input type="image" /> tags instead of
-    # true submit buttons, and their values are never used. page is used, but
-    # currently none of the use cases for rendering the query_string back
-    # into page output call for propagating the value of the page variable.
-
-    query_string = CGI.query_string |
-        replace(';x=\d+','') | replace(';y=\d+','') | replace(';page=\d*', '') |
-        replace(';', '&') | replace('&', '&amp;');
-
-    propagator = '?' _ query_string;
-
     is_advanced = CGI.param("_adv").size;
     is_special = CGI.param("_special").size;
 
     # -----------------------------------------------------------------------------
-    # mkurl()
+    # mkurl( destination_page, params_to_set, params_to_clear )
     #
     # Current page, updated params:
     # mkurl('', {foo => 'bar', boo => 'baz'});
@@ -33,7 +22,7 @@
     # New page, clear all existing params before applying new ones:
     # mkurl('/fuz/buster', {foo => 'bar', boo => 'baz'}, 1); 
     #
-    # Current page, clear the 'some_param' from the existing params:
+    # Current page, clear 'some_param' from the existing params:
     # mkurl('', {foo => 'bar', boo => 'baz'}, ['some_param']);
     MACRO mkurl(page, params, clear_params) BLOCK;
 
@@ -47,14 +36,15 @@
             cgi.delete_all();
         END;
 
-        # always remove these pesky artifacts
+        # x and y are artifacts of using <input type="image" /> tags 
+        # instead of true submit buttons, and their values are never used.
         cgi.delete('x', 'y'); 
 
         # apply user params
         FOR k IN params.keys;
             encoded = [];
             list = params.$k.0 ? params.$k : [params.$k];
-            # CGI croaks on already-decoded strings.  force-encode to be safe
+            # CGI croaks on already-decoded strings.  force-encode to be safe.
             FOR p IN list; encoded.push(ctx.encode_utf8(p)); END;
             foo = cgi.param("-name", k, "-values", encoded);
         END;
@@ -72,6 +62,7 @@
                 page;
             END;
         ELSE;
+            # staying on the current page
             cgi.url("-path" => 1, "-query" => 1);
         END;
     END;
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index b79a536..5686971 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -25,7 +25,7 @@
                     [%  class = 'search_page_nav_link';
                         href = '#';
                         IF page > 0;
-                            href = propagator _ '&amp;page=' _ (page - 1);
+                            href = mkurl('', {page => page - 1});
                         ELSE; class = class _ ' invisible'; END;
                     %]
                     <a class='[% class %]' href='[% href %]' 
@@ -37,7 +37,7 @@
                     [%  class = 'search_page_nav_link';
                         href = '#';
                         IF (page + 1) < page_count;
-                            href = propagator _ '&amp;page=' _ (page + 1);
+                            href = mkurl('', {page => page + 1});
                         ELSE; class = class _ ' invisible'; END;
                     %]
                     <a class='[% class %]' href='[% href %]' 
@@ -78,7 +78,7 @@
                                             <td class='result_table_pic_header' align='center'
                                                 width="78" nowrap="nowrap" valign="top">
                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
-                                                <a href="[% ctx.opac_root %]/record/[% rec.id _ propagator %]"><img alt="[% l('Image of item') %]"
+                                                <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"><img alt="[% l('Image of item') %]"
                                                         name='item_jacket' class='result_table_pic' width="55"
                                                         src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a><br />
                                                 [% END %]
@@ -88,16 +88,17 @@
                                                 valign="top">
                                                 <div class="bold">
                                                     <a title="[% attrs.title %]" name='item_title'
-                                                        href="[% ctx.opac_root %]/record/[% rec.id _ propagator %]"
+                                                        href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"
                                                         class='search_link'>[% attrs.title %]</a>
                                                 </div>
                                                 <div style="font-size:11px;">
                                                     <div>
                                                         <em><a title="[% l("Perform an Author Search") %]"
                                                                 name='item_author'
-                                                                href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% 
-                                                                    attrs.author | replace('[,\.:;]', '') | uri %]&amp;loc=[% CGI.param('loc') | uri %]"
-                                                                class='search_link'>[% attrs.author %]</a></em>
+                                                                href="[%- 
+                                                                    authorquery = attrs.author | replace('[,\.:;]', '');
+                                                                    mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
+                                                                    -%]">[% attrs.author | html_entity %]</a></em>
                                                         &nbsp;&nbsp;
                                                         [% attrs.pubdate %]
                                                     </div>
@@ -177,7 +178,7 @@
                                                 <div style="width:250px;text-align:left;">
                                                     <div style="float:right;">
                                                         <div class="results_aux_utils opac-auto-010"><a
-                                                                href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% rec.id %]&amp;hold_type=T" 
+                                                                href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => rec.id, hold_type => 'T'}) %]" 
                                                                     name="place_hold_link" class="no-dec"><img
                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
                                                                 alt="[% l('Place hold') %]"/><span style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
@@ -189,21 +190,15 @@
                                                                 <input type="hidden" name="record" value="[% rec.id %]" />
                                                             <div style="position:absolute;">
                                                                 <div style="position:relative;top:5px; left: 25px;">
-                                                                    <input type="submit" title="[% l(label _ ' my list') %]" value="[% l(label _ ' my list') %]" class="subtle-button" />
+                                                                    <input type="submit" title="[% l(label _ ' my list') %]" 
+                                                                        value="[% l(label _ ' my list') %]" class="subtle-button" />
                                                                 </div>
                                                             </div>
                                                                 <input type="image"
                                                                 alt="[% l(label _ ' my list') %]"
                                                                 src="[% ctx.media_prefix %]/images/clipboard.png" />
-                                                        </form>
+                                                            </form>
                                                         </div>
-                                                        <!-- <div style="padding-top:7px;" class="results_aux_utils">
-                                                            <a title="Reviews and More" target="_blank" class="no-dec"
-                                                                name="reviews_and_more" href="javascript:;"><img
-                                                                alt="[% l('Reviews and more') %]"
-                                                                src="[% ctx.media_prefix %]/images/starz.png" /> <span
-                                                                    style="position:relative;top:-5px;">[% l('Reviews and More') %]</span></a>
-                                                        </div> -->
                                                     </div>
                                                 </div>
                                             </td>

commit 2bfb4891c6908e0e3ec34f69e0393c7fc50762b2
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 11 16:59:22 2011 -0400

    TTpac: Added Expand/Collaps all 'extras' tabs in detail page
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index 07cfdf6..b1c91d0 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -57,17 +57,30 @@ sub load_record {
             scalar(@{$ctx->{holding_summaries}->{supplement}});
     }
 
-    # XXX probably should replace the following with a dispatch table
-    for my $expand ($self->cgi->param('expand')) {
-        $ctx->{"expand_$expand"} = 1;
-        if ($expand eq 'marchtml') {
+    my %expandies = (
+        marchtml => sub {
             $ctx->{marchtml} = $self->mk_marc_html($rec_id);
-        } elsif ($expand eq 'issues' and $ctx->{have_holdings_to_show}) {
+        },
+        issues => sub {
             $ctx->{expanded_holdings} =
-                $self->get_expanded_holdings($rec_id, $org, $depth);
-        } elsif ($expand eq 'cnbrowse') {
+                $self->get_expanded_holdings($rec_id, $org, $depth)
+                if $ctx->{have_holdings_to_show};
+        },
+        cnbrowse => sub {
             $self->prepare_browse_call_numbers();
         }
+    );
+
+    my @expand = $self->cgi->param('expand');
+    if (grep {$_ eq 'all'} @expand) {
+        $ctx->{expand_all} = 1;
+        $expandies{$_}->() for keys %expandies;
+
+    } else {
+        for my $exp (@expand) {
+            $ctx->{"expand_$exp"} = 1;
+            $expandies{$exp}->() if exists $expandies{$exp};
+        }
     }
 
     return Apache2::Const::OK;
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index d22377a..a800317 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -45,7 +45,7 @@
         </div>
         <div class='rdetail_extras_div'>
             [%  exp_name = 'expand_' _ name;
-                IF ctx.$exp_name;
+                IF ctx.$exp_name OR ctx.expand_all;
                     IF name == 'marchtml';
                         ctx.marchtml;
                     ELSE;
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 6a833dd..60a9df2 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -217,6 +217,18 @@
                 [% END %]
             </td>
         </tr>
+        <tr>
+            <td>
+                [% IF CGI.param('expand') == 'all' %]
+                    <img src="[% ctx.media_prefix %]/images/minus_sign.png" />
+                    <a href="[% mkurl('', {}, ['expand']) %]">[% l('Collapse all tabs') %]</a>
+                [% ELSE %]
+                    <img src="[% ctx.media_prefix %]/images/plus_sign.png" />
+                    <a href="[% mkurl('', {expand => 'all'}) %]">[% l('Expand all tabs') %]</a>
+                [% END %]
+            </td>
+        </tr>
+
     </tbody>
 </table>
 

commit 50b4a93d3e02d48491bb5b5c95f0a869f01f86d1
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 11 16:30:11 2011 -0400

    TTpac: more use of mkurl() and general cleanup
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
index d44c38d..83621b1 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
@@ -1,9 +1,5 @@
-[%- IF ctx.page == "record";
-    prev_next_root = "/record/" _ ctx.bre_id _ extras_propagator;
-ELSE;
-    cn = CGI.param('cn') | uri;
-    prev_next_root = "/cnbrowse?cn=" _ cn;
-END -%]
+[% cnoffset = CGI.param('cnoffset') || 0; %]
+
 <div id='cn_browse' class='cn_browser'>
     <div id='cn_browse_div'> 
         <div class='color_4'>
@@ -14,15 +10,13 @@ END -%]
             <thead>
                 <tr>
                     <td>
-                        <a id='cn_browse_prev' class='classic_link' href="[% ctx.opac_root _ prev_next_root _ '&amp;cnoffset=' _ ((CGI.param('cnoffset') || 0) - 1) _ '&amp;expand=cnbrowse#cnbrowse' %]"<b>[%
-                            l("&lt;&lt; Previous Page")
-                        %]</b></a>
+                        <a id='cn_browse_prev' class='classic_link' 
+                            href="[% mkurl('', {cnoffset => cnoffset - 1}) %]#cnbrowse"><b>[% l("&lt;&lt; Previous Page") %]</b></a>
                     </td>
                     <td colspan='1' align='center'>[% l("Shelf Browser") %]</td>
                     <td>
-                        <a id='cn_browse_next' class='classic_link' href="[% ctx.opac_root _ prev_next_root _ '&amp;cnoffset=' _ ((CGI.param('cnoffset') || 0) + 1) _ '&amp;expand=cnbrowse#cnbrowse' %]"<b>[%
-                            l("Next Page &gt;&gt;")
-                        %]</b></a>
+                        <a id='cn_browse_next' class='classic_link' 
+                            href="[% mkurl('', {cnoffset => cnoffset + 1}) %]#cnbrowse"><b>[% l("Next Page &gt;&gt;") %]</b></a>
                     </td>
                 </tr>
             </thead>
@@ -36,17 +30,21 @@ END -%]
                             PROCESS get_marc_attrs args=rec_attrs;
                             ident = rec_attrs.isbn_clean || rec_attrs.upc;
                             IF ident %]
-                        <a href="[% ctx.opac_root %]/record/[% cn.record.id _ extras_propagator %]"><img height='60' width='50' 
+                        <a href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {}, 1) %]"><img height='60' width='50' 
                             class='cn_browse_info' name='cn_browse_pic' border='0'
                             src="[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]" /></a>
                         [% END %]
                         <div class='cn_browse_info bold' name='cn_browse_cn'>[% cn.label %]</div>
                         <div class='cn_browse_info'>
-                            <a name='cn_browse_title' class='classic_link' href="[% ctx.opac_root %]/record/[% cn.record.id _ extras_propagator %]">[% rec_attrs.title %]</a>
+                            <a name='cn_browse_title' class='classic_link' 
+                                href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {}, 1) %]">[% rec_attrs.title %]</a>
                         </div>
                         [% IF rec_attrs.author %]<div class='cn_browse_info'>
                             <a name='cn_browse_author' class='classic_link'
-                                href="[% ctx.opac_root %]/results?qtype=author&amp;query=[%- rec_attrs.author | replace('[,\.:;]', '') | uri %]&amp;loc=[% CGI.param('loc') | uri %]">[% rec_attrs.author %]</a>
+                                href="[%-
+                                    authorquery = rec_attrs.author | replace('[,\.:;]', '');
+                                    mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, 1)
+                                    -%]">[% rec_attrs.author | html_entity %]</a>
                         </div>[% END %]
                         <div class='cn_browse_info' name='cn_browse_lib'>[% cn.owning_lib.name %]</div>
                     </td>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index b4ea965..d22377a 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -37,17 +37,7 @@
         <div class="rdetail_extras">
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
-                [%  # extras_propagator should be used in place of propagator
-                    # in opac extras interfaces... it just avoids duplicating
-                    # the expands CGI param and parameters that are specific
-                    # to extras.
-                    # XXX move this off into a helper function
-
-                    extras_propagator = propagator.replace('(&amp;)?expand=.+($|&|;)', '$2');
-                    extras_propagator = extras_propagator.replace('(&amp;)?cnoffset=.+($|&|;)', '$2');
-
-
-                    href = ctx.full_path _ extras_propagator _ '&amp;expand=' _ name _ '#' _ name; %]
+                [%  href = mkurl('', {expand => name}) _ '#' _ name; %]
                 <a name='[% name %]' href='[% href %]'><img
                     alt='[% extra.label %]' src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='[% href %]' class="rdetail_extras_lbl">[% extra.label %]</a>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index bf386c2..6a833dd 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -25,7 +25,7 @@
                             <em><a title='[% l("Perform an author search") %]'
                                     id='rdetail_author'
                                     href="[%- 
-                                        authorquery = attrs.author | replace('[,\.:;]');
+                                        authorquery = attrs.author | replace('[,\.:;]', '');
                                         mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
                                         -%]">[% attrs.author | html_entity %]</a></em>
                             [% END %]
@@ -220,18 +220,6 @@
     </tbody>
 </table>
 
-<div id="rdetail_locs_expand" class="hide_me">
-    <a href="#"><img
-        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
-    <a style="position:relative;top:-3px;" href="#">[% l('Show more locations') %]</a>
-</div>
-
-<div id="rdetail_locs_collapse" class="hide_me">
-    <a href="#"><img
-        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
-    <a style="position:relative;top:-3px;" href="#">[% l('Collapse locations') %]</a>
-</div>
-
 <div id="rdetail_extras_expand" class="hide_me">
     <a href="#"><img
         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
@@ -242,42 +230,3 @@
     <a href="#"><img src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
     <a style="position:relative;top:-3px;" href="#">[% l('Collapse all tabs') %]</a>
 </div>
-
-<div class="hide_me">
-    <table id='' border="0" width="100%">
-        <tbody id='rdetail_details_tbody'>
-            <tr>
-                <td id='' rowspan='2' valign="top" align="center" style="padding-right:10px;">
-                </td>
-                <td class='rdetail_desc' valign="top" colspan="3">
-                    <table border="0" width="100%">
-                        <tr>
-                            <td valign="top">
-                                <div style="padding-bottom:7px;">
-                                    <strong>[% l("Title") %]:</strong>
-                                </div>
-                            </td>
-                            <td width="1" valign="top" align="right" style="white-space:nowrap;">
-                                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% ctx.bre_id %]&amp;hold_type=T"><img alt="[% l('Place Hold') %]"
-                                    src="[% ctx.media_prefix %]/images/place_hold.gif" /></a>
-                                <a href="#" id="rd_reviews_and_more" target="_blank"><img
-                                    alt="[% l('Reviews and More') %]" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>
-                                <a href="#" id=""><img alt="[% l('Add to My List') %]"
-                                    src="[% ctx.media_prefix %]/images/add_mylist.gif" /></a>
-                            </td>
-                        </tr>
-                    </table>
-                </td>        
-            </tr>
-            <tr>
-                <td nowrap='nowrap' colspan="3" valign="bottom" style="padding-bottom:16px;">
-                </td>
-            </tr>
-            <tr>
-                <td><div style="height:20px;"></div></td>
-            </tr>
-        </tbody>
-    </table>
-</div> <!-- details_body -->
-
-<!-- ****************** end: rdetail_summary.xml ***************************** -->

commit f1ed6fa6b514a8e730251b93487bffb9505bd185
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 11 16:25:50 2011 -0400

    Force-encode CGI param values to prevent decode errors
    
    CGI.pm decode()'s parameter values, so if it encounters a value that
    is already decoded, it will croak and kill the page.  Proactively encode
    paramter values so decode() won't fail.
    
    The better solution may be to determine how we get such data, but
    until then, let's allow the t-pac to work on funky data.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index 33a5dbb..8226be7 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -4,6 +4,7 @@ use Template;
 use XML::Simple;
 use XML::LibXML;
 use File::stat;
+use Encode;
 use Apache2::Const -compile => qw(OK DECLINED HTTP_INTERNAL_SERVER_ERROR);
 use Apache2::Log;
 use OpenSRF::EX qw(:try);
@@ -68,6 +69,8 @@ sub handler {
         }
     });
 
+    $ctx->{encode_utf8} = sub {return encode_utf8(shift())};
+
     unless($tt->process($template, {ctx => $ctx, ENV => \%ENV, l => $text_handler})) {
         $r->log->warn('egweb: template error: ' . $tt->error);
         return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 9b9132c..1298754 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -52,7 +52,11 @@
 
         # apply user params
         FOR k IN params.keys;
-            foo = cgi.param("-name", k, "-values", params.$k); 
+            encoded = [];
+            list = params.$k.0 ? params.$k : [params.$k];
+            # CGI croaks on already-decoded strings.  force-encode to be safe
+            FOR p IN list; encoded.push(ctx.encode_utf8(p)); END;
+            foo = cgi.param("-name", k, "-values", encoded);
         END;
 
         # for url brevity, remove any params that have no value
@@ -62,7 +66,11 @@
         END;
 
         IF page;
-            page _ '?' _ cgi.query_string;
+            IF cgi.query_string;
+                page _ '?' _ cgi.query_string;
+            ELSE;
+                page;
+            END;
         ELSE;
             cgi.url("-path" => 1, "-query" => 1);
         END;

commit d9fac3e6133c13a9992bc0af3ef951fdd0cb9ea3
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 11 11:56:41 2011 -0400

    TTpac: start using mkurl();  more todo..
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index c7486d9..bf386c2 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -19,23 +19,24 @@
                 <table border="0" cellpadding="0" cellspacing="0" width="100%">
                     <tr>
                         <td valign="top">
-                            <span id='rdetail_title'>[% attrs.title_extended %]</span><br />
+                            <span id='rdetail_title'>[% attrs.title_extended | html_entity %]</span><br />
                             [% IF attrs.author %]
                             <span class='opac-auto-030'>[% l("Author") %]:</span>
                             <em><a title='[% l("Perform an author search") %]'
                                     id='rdetail_author'
-                                    href="[% ctx.opac_root %]/results?qtype=author&amp;query=[%-
-                                        attrs.author | replace('[,\.:;]', '') | uri %]&amp;loc=[% CGI.param('loc') | uri %]">[% attrs.author %]</a></em>
+                                    href="[%- 
+                                        authorquery = attrs.author | replace('[,\.:;]');
+                                        mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
+                                        -%]">[% attrs.author | html_entity %]</a></em>
                             [% END %]
                         </td>
                         <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
                             <div style="width:230px;text-align:left;margin-top:3px;">
                                 <div style="float:right;">
                                     <div class="rdetail_aux_utils opac-auto-010">
-                                        <a href="[% ctx.opac_root %]/place_hold[%-
-                                            propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% ctx.bre_id %]&amp;hold_type=T" id="rdetail_place_hold" class="no-dec"><img
-                                            src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
-                                                style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
+                                        <a href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => ctx.bre_id, hold_type => 'T'}) %]" 
+                                            class="no-dec"><img src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
+                                                    style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
                                     </div>
                                     <div class="rdetail_aux_utils opac-auto-121">
                                         [%  
@@ -162,11 +163,11 @@
                         copy_info.status_holdable == 't');
                     IF overall_holdable;
                         l("Place on"); %]
-                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% copy_info.id %]&amp;hold_type=C">[% l("copy") %]</a>
+                <a href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => copy_info.id, hold_type => 'C'}) %]">[% l("copy") %]</a>
                 [%      IF copy_info.call_number != last_cn;
                             last_cn = copy_info.call_number;
                             l(" / "); %]
-                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% copy_info.call_number %]&amp;hold_type=V">[% l("volume") %]</a>
+                <a href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => copy_info.call_number, hold_type => 'V'}) %]">[% l("volume") %]</a>
                 [%      END;
                     ELSE;
                         l("No");
@@ -189,16 +190,14 @@
             new_offset = ctx.copy_offset - ctx.copy_limit;
             IF new_offset < 0; new_offset = 0; END %]
             <td>
-                <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% new_offset %]&amp;copy_limit=[% ctx.copy_limit %]">&laquo; [%
-                    l('Previous [_1]', ctx.copy_offset - new_offset)
-                %]</a>
+                <a href="[% mkurl('', {copy_offset => new_offset, copy_limit => ctx.copy_limit}) %]">&laquo; [%
+                    l('Previous [_1]', ctx.copy_offset - new_offset) %]</a>
             </td>
         [% END %]
         [% IF ctx.copies.size >= ctx.copy_limit %]
             <td>
-                <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %]&amp;copy_limit=[% ctx.copy_limit %]">[%
-                    l('Next [_1]', ctx.copy_limit)
-                %] &raquo;</a>
+                <a href="[% mkurl('', {copy_offset => ctx.copy_offset + ctx.copy_limit, copy_limit => ctx.copy_limit}) %]">[%
+                    l('Next [_1]', ctx.copy_limit) %] &raquo;</a>
             </td>
         [% END %]
         </tr>
@@ -208,18 +207,12 @@
                 [% IF  ctx.copy_limit != more_copies_limit AND ctx.copies.size >= ctx.copy_limit %]
                     <div style='margin-top:10px;'>
                         <img src="[% ctx.media_prefix %]/images/plus_sign.png" />
-                        [% cgi = CGI(); 
-                            SET x = cgi.param('copy_limit', more_copies_limit); 
-                            SET x = cgi.param('copy_offset', 0); %]
-                        <a href="[% cgi.url("-path" => 1, "-query" => 1) %]">[% l('Show more copies') %]</a>
+                        <a href="[% mkurl('', {copy_limit => more_copies_limit, copy_offset => 0}) %]">[% l('Show more copies') %]</a>
                     </div>
                 [% ELSIF ctx.copy_limit == more_copies_limit %]
                     <div style='margin-top:10px;'>
                         <img src="[% ctx.media_prefix %]/images/minus_sign.png" />
-                        [% cgi = CGI(); 
-                            SET x = cgi.param('copy_limit', '0'); # 0 == fall back to default 
-                            SET x = cgi.param('copy_offset', '0'); %]
-                        <a href="[% cgi.url("-path" => 1, "-query" => 1) %]">[% l('Show fewer copies') %]</a>
+                        <a href="[% mkurl('', {copy_limit => 0, copy_offset => 0}) %]">[% l('Show fewer copies') %]</a>
                     </div>
                 [% END %]
             </td>

commit 5ffd3a587e31c33a9fe83c91a6f7640cc8cf04b1
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 11 11:56:15 2011 -0400

    TTopac: cgi-based replacement for url 'propagator'
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index f43d115..9b9132c 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -20,4 +20,51 @@
 
     is_advanced = CGI.param("_adv").size;
     is_special = CGI.param("_special").size;
+
+    # -----------------------------------------------------------------------------
+    # mkurl()
+    #
+    # Current page, updated params:
+    # mkurl('', {foo => 'bar', boo => 'baz'});
+    #
+    # New page, one param is a list:
+    # mkurl('http://flarg.baz/squz', {foo => 'bar', boo => ['baz', 'faz']});
+    #
+    # New page, clear all existing params before applying new ones:
+    # mkurl('/fuz/buster', {foo => 'bar', boo => 'baz'}, 1); 
+    #
+    # Current page, clear the 'some_param' from the existing params:
+    # mkurl('', {foo => 'bar', boo => 'baz'}, ['some_param']);
+    MACRO mkurl(page, params, clear_params) BLOCK;
+
+        # clone the query string to avoid clobberation
+        cgi = CGI.new(CGI.query_string);
+
+        # remove requested params
+        IF clear_params.0; # array
+            FOR p IN clear_params; cgi.delete(p); END;
+        ELSIF clear_params;
+            cgi.delete_all();
+        END;
+
+        # always remove these pesky artifacts
+        cgi.delete('x', 'y'); 
+
+        # apply user params
+        FOR k IN params.keys;
+            foo = cgi.param("-name", k, "-values", params.$k); 
+        END;
+
+        # for url brevity, remove any params that have no value
+        FOR p IN cgi.param;
+            val = cgi.param(p);
+            IF val == ''; cgi.delete(p); END;
+        END;
+
+        IF page;
+            page _ '?' _ cgi.query_string;
+        ELSE;
+            cgi.url("-path" => 1, "-query" => 1);
+        END;
+    END;
 %]

commit 2612ec8f20d86e3a3241425a63ab9da6267ec533
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 10 17:21:50 2011 -0400

    TTpac: show MARC callnumber in record detail page
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 5cd6344..c7486d9 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -79,6 +79,10 @@
                         </tr>
                         <tr>
                             <td nowrap='nowrap' valign="top">
+                                <strong>[% IF attrs.marc_cn; l("Call Number"); END %]</strong>
+                            </td>
+                            <td valign="top">[% attrs.marc_cn %]</td>
+                            <td nowrap='nowrap' valign="top">
                                 <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
                             </td>
                             <td valign="top" id='rdetail_edition'>[% attrs.edition %]</td>

commit 802ae56d4115b36704d18e0d7f6b196dda1ecd3b
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 10 17:07:36 2011 -0400

    TTpac: option to view larger sets of copies on record page
    
    On record details page, added a "Show More Copies" option to show more
    (50) copies per page of copies than the default (10).  Also added a
    "Show Fewer Copies" option to return to the default copy page size.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/images/minus_sign.png b/Open-ILS/web/images/minus_sign.png
new file mode 100644
index 0000000..0d612b1
Binary files /dev/null and b/Open-ILS/web/images/minus_sign.png differ
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index dea3461..5cd6344 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -198,6 +198,28 @@
             </td>
         [% END %]
         </tr>
+        <tr>
+            <td>
+                [% more_copies_limit = 50 %] [%# TODO: config %]
+                [% IF  ctx.copy_limit != more_copies_limit AND ctx.copies.size >= ctx.copy_limit %]
+                    <div style='margin-top:10px;'>
+                        <img src="[% ctx.media_prefix %]/images/plus_sign.png" />
+                        [% cgi = CGI(); 
+                            SET x = cgi.param('copy_limit', more_copies_limit); 
+                            SET x = cgi.param('copy_offset', 0); %]
+                        <a href="[% cgi.url("-path" => 1, "-query" => 1) %]">[% l('Show more copies') %]</a>
+                    </div>
+                [% ELSIF ctx.copy_limit == more_copies_limit %]
+                    <div style='margin-top:10px;'>
+                        <img src="[% ctx.media_prefix %]/images/minus_sign.png" />
+                        [% cgi = CGI(); 
+                            SET x = cgi.param('copy_limit', '0'); # 0 == fall back to default 
+                            SET x = cgi.param('copy_offset', '0'); %]
+                        <a href="[% cgi.url("-path" => 1, "-query" => 1) %]">[% l('Show fewer copies') %]</a>
+                    </div>
+                [% END %]
+            </td>
+        </tr>
     </tbody>
 </table>
 

commit 9c85acf6a5fc8e9339c8fc7a608cfce00ef3538f
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 10 15:26:53 2011 -0400

    TTpac: show full 245 for title on record details page
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index 03382de..3b66ec8 100644
--- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -12,6 +12,7 @@
         args.upc = xml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
         args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
         args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
+        args.title_extended = xml.findnodes('//*[@tag="245"]').textContent;
         args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
         args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
         args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 2473bc4..dea3461 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -19,7 +19,7 @@
                 <table border="0" cellpadding="0" cellspacing="0" width="100%">
                     <tr>
                         <td valign="top">
-                            <span id='rdetail_title'>[% attrs.title %]</span><br />
+                            <span id='rdetail_title'>[% attrs.title_extended %]</span><br />
                             [% IF attrs.author %]
                             <span class='opac-auto-030'>[% l("Author") %]:</span>
                             <em><a title='[% l("Perform an author search") %]'

commit 11bb8b7f0c4a9baffbe99c60063d875e6ea9dc29
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 10 15:22:46 2011 -0400

    TTpac: Capture and show all ISBNs on record details page
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index 0a24b28..03382de 100644
--- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -3,7 +3,12 @@
     #   get_marc_attrs( { marc_xml => doc } )
     BLOCK get_marc_attrs;
         xml = args.marc_xml;
-        args.isbn = xml.findnodes('//*[@tag="020"]/*[@code="a"]').shift.textContent;
+
+        args.isbns = [];
+        FOR isbn IN xml.findnodes('//*[@tag="020"]/*[@code="a"]');
+            args.isbns.push(isbn.textContent);
+        END;
+
         args.upc = xml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
         args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
         args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
@@ -30,7 +35,7 @@
         args.marc_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent;
 
         # clean up the ISBN
-        args.isbn_clean = args.isbn.replace('\ .*', '');
+        args.isbn_clean = args.isbns.0.replace('\ .*', '');
 
         args.holdings = [];
         FOR holding IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 96748e4..2473bc4 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -67,9 +67,11 @@
                     <table border="0" cellpadding="0" width="100%">
                         <tr>
                             <td nowrap='nowrap' valign="top">
-                                [% IF attrs.isbn %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
+                                [% IF attrs.isbns.0 %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
+                            </td>
+                            <td valign="top" id='rdetail_isbn'>
+                                [% FOR isbn IN attrs.isbns %][% IF !loop.first; %]<br/>[% END; isbn; END %]
                             </td>
-                            <td valign="top" id='rdetail_isbn'>[% attrs.isbn %]</td>
                             <td nowrap='nowrap' valign="top">
                                 [% IF attrs.phys_desc %]<strong id="rdetail_phys_lbl">[% l("Physical Description") %]</strong>[% END %]
                             </td>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 6fc3b2e..b79a536 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -115,11 +115,11 @@
                                                             </td>
                                                             <td>[% attrs.publisher; %]</td>
                                                         </tr>
-                                                        <tr name="results_isbn_tr" class="[% attrs.isbn ? '' : 'hide_me' %]">
+                                                        <tr name="results_isbn_tr" class="[% attrs.isbns.0 ? '' : 'hide_me' %]">
                                                             <td valign="top">
                                                                 <strong>[% l('ISBN:') %]</strong>
                                                             </td>
-                                                            <td>[% attrs.isbn %]</td>
+                                                            <td>[% attrs.isbns.0 %]</td>
                                                         </tr>
                                                         <tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
                                                             <td valign="top">

commit 9cfa1e71d1463c595e522c0de02d0e8116c78834
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 10 15:07:40 2011 -0400

    Show more subject data in the expanded ttopac subjects display
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2 b/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
index 7819187..3d02231 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
@@ -1,6 +1,9 @@
 [% 
     subjects = [
         {
+            label => l('Subject: '),
+            xpath => '//*[@tag="600" or @tag="610" or @tag="611" or @tag="630" or @tag="650" or @tag="651"]'
+        }, {
             label => l('Genre: '),
             xpath => '//*[@tag="655"]|//*[@tag="659"]'
         }, {

commit 7b6053867f06ea4b38890e20b181006503a37c87
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 10 15:01:58 2011 -0400

    Added support for series display in ttopac record details
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index 95333a1..b4ea965 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -18,7 +18,7 @@
             {name => 'summaryplus',  label => l('Summaries &amp; More'), hide => hide_summary}, 
             {name => 'content',  label => l('Contents'), hide => 1}, # ToC
             {name => 'authors',  label => l('Authors')}, 
-            {name => 'series',   label => l('Series'), hide => 1}, 
+            {name => 'series',   label => l('Series')},
             {name => 'subjects', label => l('Subject')}, 
             {name => 'annotation', label => l('Annotation'), hide => 1}, 
             {name => 'awards',  label => l('Awards, Reviews, & Suggested Reads')}, 
diff --git a/Open-ILS/web/templates/default/opac/parts/record/series.tt2 b/Open-ILS/web/templates/default/opac/parts/record/series.tt2
new file mode 100644
index 0000000..cdfe588
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/record/series.tt2
@@ -0,0 +1,16 @@
+[% 
+    series_tags = ['440', '490', '800', '810', '811', '830', '694']; 
+    loc = CGI.param('loc');
+%]
+
+<div id='rdetail_series_div'>
+    <table cellpadding="0" cellspacing="0" border="0">
+    [%  FOR tag IN series_tags; %]
+        <tr><td style='padding-top:5px;'>
+        [%  FOR node IN ctx.marc_xml.findnodes('//*[@tag="' _ tag _ '"]/*') %]
+            [% IF !loop.first %]<span>&mdash;</span> [% END %]
+            <a href="[% ctx.opac_root %]/results?qtype=series&amp;query=[% node.textContent | uri %]&amp;loc=[% loc %]">[% node.textContent | html %]</a>
+        [% END %]
+    [% END; %]
+    </table>
+</div>

commit 315f5188ed208aa14559aec27980eddf4b49e823
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 10 14:16:13 2011 -0400

    Accommodate multiple 520a's in tt-opac summary display
    
    MARC args.summary is now an array of summary entries.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index f9ebae3..0a24b28 100644
--- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -10,7 +10,6 @@
         args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
         args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
         args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
-        args.summary = xml.findnodes('//*[@tag="520"]/*[@code="a"]').textContent;
         args.edition = xml.findnodes('//*[@tag="250"]/*[@code="a"]').textContent ||
             xml.findnodes('//*[@tag="534"]/*[@code="b"]').textContent ||
             xml.findnodes('//*[@tag="775"]/*[@code="b"]').textContent;
@@ -21,6 +20,12 @@
         FOR p IN phys; phys_content.push(p.textContent); END;
         args.phys_desc = phys_content.join("");
 
+        # capture all of the 520a's
+        args.summary = [];
+        FOR s IN xml.findnodes('//*[@tag="520"]/*[@code="a"]');
+            args.summary.push(s.textContent); 
+        END;
+
         # MARC Callnumber
         args.marc_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent;
 
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index c53ce31..95333a1 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -5,7 +5,7 @@
 
         # Let's see if we should hide the content cafe / simple summary content
         hide_summary = 1;
-        IF attrs.summary; hide_summary = 0; ELSE;
+        IF attrs.summary.0; hide_summary = 0; ELSE;
             # Expose content cafe if it's reasonable to do so.
             # This approach only works when using embedded content cafe.
             IF ENV.OILS_CONTENT_CAFE_USER; 
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2
index 6fb3d53..4b7552f 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2
@@ -1,7 +1,11 @@
 <div class='rdetail_extras_div'> 
     [%  IF attrs.summary %]
     <div class='rdetail-extras-summary'>
-        <strong>[% l('Summary: ') %]</strong>[% attrs.summary %]
+        <strong>[% l('Summary: ') %]</strong>
+        [% FOR sum IN attrs.summary %]
+            [% IF !loop.first; '<br/>'; END %]
+            <span>[% sum %] </span>
+        [% END %]
     </div>
     [% END %]
 

commit b4e782d525ad07ab36635bb7e94090ac6ff8373b
Merge: e1a67be bfceae7
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Wed Aug 10 10:36:27 2011 -0400

    Merge branch 'master' into template-toolkit-opac


commit e1a67be8ef050daebe01c62da5d3f0b81cee2178
Merge: 05cc0b1 04008a5
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Aug 5 14:58:50 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit c186e123539192b23fddc6cd7683fe4a1c80c34c
Merge: 25934ee 04008a5
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Aug 5 14:57:03 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac-master-merge


commit 25934ee7b5d7934ea1d6cfbc3e9365f7bd9dacd3
Merge: 8119e5d 05cc0b1
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Aug 5 14:56:11 2011 -0400

    Merge remote branch 'esi/template-toolkit-opac' into template-toolkit-opac-master-merge


commit 05cc0b107cf5887a8d5537e0c040eb858f7b5a25
Merge: 73d5558 f32d6e3
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Aug 5 13:53:54 2011 -0400

    Merge branch 'template-toolkit-opac' of git.evergreen-ils.org:evergreen/equinox into template-toolkit-opac


commit 73d555806f2597feee62707fcf886a42d8d17c58
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Aug 5 13:52:17 2011 -0400

    Speed up t-pac record details copy retrieval
    
    Using JOIN filters instead of WHERE clauses, drastically speed up
    paged/sorted copy retrieval, particularly for items with many copies, in
    the record details page.
    
    Thanks for the suggestions, Mike.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index 5ec5db9..07cfdf6 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -98,43 +98,25 @@ sub mk_copy_query {
             ],
             circ => ['due_date'],
         },
+
         from => {
             acp => {
-                acn => {},
+                acn => {
+                    join => {bre => {filter => {id => $rec_id }}},
+                    filter => {deleted => 'f'}
+                },
+                circ => { # If the copy is circulating, retrieve the open circ
+                    type => 'left',
+                    filter => {checkin_time => undef}
+                },
                 acpl => {},
                 ccs => {},
-                circ => {type => 'left'},
                 aou => {}
             }
         },
-        where => {
-            '+acp' => {
-                deleted => 'f',
-                call_number => {
-                    in => {
-                        select => {acn => ['id']},
-                        from => 'acn',
-                        where => {record => $rec_id}
-                    }
-                },
-                circ_lib => {
-                    in => {
-                        select => {aou => [{
-                            column => 'id', 
-                            transform => 'actor.org_unit_descendants', 
-                            result_field => 'id', 
-                            params => [$depth]
-                        }]},
-                        from => 'aou',
-                        where => {id => $org}
-                    }
-                }
-            },
-            '+acn' => {deleted => 'f'},
-            '+circ' => {checkin_time => undef}
-        },
 
-        # Order is: copies with circ_lib=org, followed by circ_lib name, followed by call_number label
+        where => {'+acp' => {deleted => 'f' }},
+
         order_by => [
             {class => 'aou', field => 'name'}, 
             {class => 'acn', field => 'label'}
@@ -154,15 +136,36 @@ sub mk_copy_query {
         };
     }
 
+    if($org != $self->ctx->{aou_tree}->()->id) { 
+        # no need to add the org join filter if we're not actually filtering
+        $query->{from}->{acp}->{aou} = {
+            fkey => 'circ_lib',
+            field => 'id',
+            filter => {
+                id => {
+                    in => {
+                        select => {aou => [{
+                            column => 'id', 
+                            transform => 'actor.org_unit_descendants', 
+                            result_field => 'id', 
+                            params => [$depth]
+                        }]},
+                        from => 'aou',
+                        where => {id => $org}
+                    }
+                }
+            }
+        }
+    };
+
     # Filter hidden items if this is the public catalog
     unless($self->ctx->{is_staff}) { 
         $query->{where}->{'+acp'}->{opac_visible} = 't';
-        $query->{where}->{'+acpl'}->{opac_visible} = 't';
-        $query->{where}->{'+ccs'}->{opac_visible} = 't';
+        $query->{from}->{'acp'}->{'acpl'}->{filter} = {opac_visible => 't'};
+        $query->{from}->{'acp'}->{'ccs'}->{filter} = {opac_visible => 't'};
     }
 
     return $query;
-    #return $self->editor->json_query($query);
 }
 
 sub mk_marc_html {

commit f32d6e3a54eb87cba907e614a5c74b338532e34e
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Aug 5 13:32:55 2011 -0400

    This doesn't need to be lying around any more
    
    Its purpose was superceded by another upgrade script in master.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXY.data.config.metabib_field.lccn.sql b/Open-ILS/src/sql/Pg/upgrade/XXXY.data.config.metabib_field.lccn.sql
deleted file mode 100644
index 5e33cf3..0000000
--- a/Open-ILS/src/sql/Pg/upgrade/XXXY.data.config.metabib_field.lccn.sql
+++ /dev/null
@@ -1,14 +0,0 @@
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('XXXY', :eg_version);
-
-INSERT INTO config.metabib_field (
-    id, field_class, name, label, xpath, weight, format,
-    search_field, facet_field
-) VALUES (
-    29, 'identifier', 'lccn', oils_i18n_gettext(29, 'LCCN', 'cmf', 'label'),
-    '//marc:datafield[@tag="010"]/marc:subfield[@code="a"]', 1,
-    'marcxml', TRUE, FALSE
-);
-
-COMMIT;

commit 8119e5df48807336b4ffe0fe6520973dda5e1301
Merge: f577568 39632c0
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 4 15:41:32 2011 -0400

    Merge remote branch 'esi/template-toolkit-opac' into template-toolkit-opac-master-merge


commit 39632c0346c1807eddee54c28675741668d1c264
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 4 15:01:09 2011 -0400

    Speed up holds history retrieval
    
    Consistent w/ circ history retrieval, use the longer column 'transform'
    stored proc invocation to limit retrieval to historical holds IDs
    instead of entire objects, which are later fetched/fleshed anyway.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 26b1d52..9d3fab0 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -755,15 +755,21 @@ sub load_myopac_hold_history {
     $ctx->{hold_history_limit} = $limit;
     $ctx->{hold_history_offset} = $offset;
 
-
-    my $holds = $e->json_query({
-        from => ['action.usr_visible_holds', $e->requestor->id],
-        limit => $limit || 25,
-        offset => $offset || 0
+    my $hold_ids = $e->json_query({
+        select => {
+            au => [{
+                column => 'id', 
+                transform => 'action.usr_visible_holds', 
+                result_field => 'id'
+            }]
+        },
+        from => 'au',
+        where => {id => $e->requestor->id}, 
+        limit => $limit,
+        offset => $offset
     });
 
-    $ctx->{holds} = $self->fetch_user_holds([map { $_->{id} } @$holds], 0, 1, 0, $limit, $offset);
-
+    $ctx->{holds} = $self->fetch_user_holds([map { $_->{id} } @$hold_ids], 0, 1, 0);
     return Apache2::Const::OK;
 }
 

commit d42e656a9f0745e1bb77298fd6598faaa6d4bb69
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 4 14:53:36 2011 -0400

    Faster T-pac circ history retrieval
    
    * Take advantage of the new default sorting behavior of
    action.usr_visible_circs to perform limit/offset within the DB instead
    of fetching the whole circ history in the mod_perl code and sorting
    through it.
    
    * Also use the  more powerful/verbose column transform syntax for
    calling stored procedures to retrieve only the historical circ IDs
    instead of the full circ objects, since we are re-fetching fleshed circ
    objects later in the code.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 58f635b..26b1d52 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -727,26 +727,21 @@ sub load_myopac_circ_history {
     $ctx->{circ_history_limit} = $limit;
     $ctx->{circ_history_offset} = $offset;
 
-    my $circs = $e->json_query({
-        from => ['action.usr_visible_circs', $e->requestor->id],
-        #limit => $limit || 25,
-        #offset => $offset || 0,
+    my $circ_ids = $e->json_query({
+        select => {
+            au => [{
+                column => 'id', 
+                transform => 'action.usr_visible_circs', 
+                result_field => 'id'
+            }]
+        },
+        from => 'au',
+        where => {id => $e->requestor->id}, 
+        limit => $limit,
+        offset => $offset
     });
 
-    # XXX: order-by in the json_query above appears to do nothing, so in-query 
-    # paging is not reallly an option.  do the sorting/paging here
-
-    # sort newest to oldest
-    $circs = [ sort { $b->{xact_start} cmp $a->{xact_start} } @$circs ];
-    my @ids = map { $_->{id} } @$circs;
-
-    # find the selected page and trim cruft
-    @ids = @ids[$offset..($offset + $limit - 1)] if $limit;
-    @ids = grep { defined $_ } @ids;
-
-    $ctx->{circs} = $self->fetch_user_circs(1, \@ids);
-    #$ctx->{circs} = $self->fetch_user_circs(1, [map { $_->{id} } @$circs], $limit, $offset);
-
+    $ctx->{circs} = $self->fetch_user_circs(1, [map { $_->{id} } @$circ_ids]);
     return Apache2::Const::OK;
 }
 

commit 38a258ee235af3ecd5bd1529263d1533acc08e76
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 4 11:47:47 2011 -0400

    Fix title/author sort.  Use SVF 'titlesort'/'authorsort'
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/filtersort.tt2 b/Open-ILS/web/templates/default/opac/parts/filtersort.tt2
index 795b179..428626c 100644
--- a/Open-ILS/web/templates/default/opac/parts/filtersort.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/filtersort.tt2
@@ -1,12 +1,12 @@
 <select class="results_header_sel" id='opac.result.sort' name="sort">
     <option value=''>[% l("Sort by Relevance") %]</option>
     <optgroup label='[% l("Sort by Title") %]'>
-        <option value='title'[% value == 'title' ? ' selected="selected"' : '' %]>[% l("Title: A to Z") %]</option>
-        <option value='title.desc'[% value == 'title.desc' ? ' selected="selected"' : '' %]>[% l("Title: Z to A") %]</option>
+        <option value='titlesort'[% value == 'titlesort' ? ' selected="selected"' : '' %]>[% l("Title: A to Z") %]</option>
+        <option value='titlesort.desc'[% value == 'titlesort.desc' ? ' selected="selected"' : '' %]>[% l("Title: Z to A") %]</option>
     </optgroup>
     <optgroup label='[% l("Sort by Author") %]'>
-        <option value='author'[% value == 'author' ? ' selected="selected"' : '' %]>[% l("Author: A to Z") %]</option>
-        <option value='author.desc'[% value == 'author.desc' ? ' selected="selected"' : '' %]>[% l("Author: Z to A") %]</option>
+        <option value='authorsort'[% value == 'authorsort' ? ' selected="selected"' : '' %]>[% l("Author: A to Z") %]</option>
+        <option value='authorsort.desc'[% value == 'authorsort.desc' ? ' selected="selected"' : '' %]>[% l("Author: Z to A") %]</option>
     </optgroup>
     <optgroup label='[% l("Sort by Publication Date") %]'>
         <option value='pubdate.desc'[% value == 'pubdate.desc' ? ' selected="selected"' : '' %]>[% l("Date: Newest to Oldest") %]</option>

commit 694f31615e4463e6191fb62bdbbc28750320f785
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Aug 4 08:56:46 2011 -0400

    Repaired qtype bug introduced w/ bool searching
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 62ad13c..d97ac96 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -21,12 +21,10 @@ sub _prepare_biblio_search_basics {
     $parts{$_} = [ $cgi->param($_) ] for (@part_names);
 
     my $full_query = '';
-    my @chunks = ();
     for (my $i = 0; $i < scalar @{$parts{'qtype'}}; $i++) {
         my ($qtype, $contains, $query, $bool) = map { $parts{$_}->[$i] } @part_names;
 
         next unless $query =~ /\S/;
-        push(@chunks, $qtype . ':') unless $qtype eq 'keyword' and $i == 0;
 
         # This stuff probably will need refined or rethought to better handle
         # the weird things Real Users will surely type in.
@@ -42,10 +40,10 @@ sub _prepare_biblio_search_basics {
             $query =~ s/[\^\$]//g;
             $query = '^' . $query . '$';
         }
+        $query = "$qtype:$query" unless $qtype eq 'keyword' and $i == 0;
 
         $bool = ($bool and $bool eq 'or') ? '||' : '&&';
         $full_query = $full_query ? "($full_query $bool $query)" : $query;
-        push @chunks, $query;
     }
 
     return $full_query;

commit e6d8b8c5d5a2d7c56239d80bf04e3362823ce068
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 3 16:04:26 2011 -0400

    Speed up hold editing by only fetching hold to edit
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index fbdd904..58f635b 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -309,10 +309,11 @@ sub fetch_user_holds {
 sub handle_hold_update {
     my $self = shift;
     my $action = shift;
+    my $hold_ids = shift;
     my $e = $self->editor;
     my $url;
 
-    my @hold_ids = $self->cgi->param('hold_id'); # for non-_all actions
+    my @hold_ids = ($hold_ids) ? @$hold_ids : $self->cgi->param('hold_id'); # for non-_all actions
     @hold_ids = @{$self->fetch_user_holds(undef, 1)} if $action =~ /_all/;
 
     my $circ = OpenSRF::AppSession->create('open-ils.circ');
@@ -375,16 +376,16 @@ sub load_myopac_holds {
     my $e = $self->editor;
     my $ctx = $self->ctx;
     
-
     my $limit = $self->cgi->param('limit') || 0;
     my $offset = $self->cgi->param('offset') || 0;
     my $action = $self->cgi->param('action') || '';
+    my $hold_id = $self->cgi->param('id');
     my $available = int($self->cgi->param('available') || 0);
 
     my $hold_handle_result;
     $hold_handle_result = $self->handle_hold_update($action) if $action;
 
-    $ctx->{holds} = $self->fetch_user_holds(undef, 0, 1, $available, $limit, $offset);
+    $ctx->{holds} = $self->fetch_user_holds($hold_id ? [$hold_id] : undef, 0, 1, $available, $limit, $offset);
 
     return defined($hold_handle_result) ? $hold_handle_result : Apache2::Const::OK;
 }
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2
index 53e12c9..2fda76c 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2
@@ -5,21 +5,15 @@
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "holds"; # in this case, just for tab coloring.
 
-    hold = 0;
-    FOR h IN ctx.holds;
-        IF h.hold.hold.id == CGI.param('id');
-            hold = h;
-            ahr = hold.hold.hold;
-            attrs = {marc_xml => hold.marc_xml};
-            PROCESS get_marc_attrs args=attrs;
-            hold.human_status = PROCESS get_hold_status hold=hold;
+    hold = ctx.holds.0;
+    ahr = hold.hold.hold;
+    attrs = {marc_xml => hold.marc_xml};
+    PROCESS get_marc_attrs args=attrs;
+    hold.human_status = PROCESS get_hold_status hold=hold;
 
-            # Do this up front to avoid verbosity later
-            expire_time = ahr.expire_time ? date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT) : '';
-            thaw_date = ahr.thaw_date ? date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT) : '';
-            LAST;
-        END;
-    END;
+    # Do this up front to avoid verbosity later
+    expire_time = ahr.expire_time ? date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT) : '';
+    thaw_date = ahr.thaw_date ? date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT) : '';
 %]
 <div class="pad-bottom-five">
     <div class="header_middle">

commit e0f52e9d9fe6bbe0c127e70572027b026c30607f
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 3 15:33:24 2011 -0400

    Repaired bug in t-pac org selector value propagation
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
index 3a203f6..52500f0 100644
--- a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
@@ -2,12 +2,10 @@
     BLOCK build_org_selector_options;
         disabled = '';
         selected = '';
-        IF can_have_vols_only;
-            IF walker.ou_type.can_have_vols != 't';
-                disabled = 'disabled="disabled"';
-            ELSIF walker.id == value;
-                selected = 'selected="selected"';
-            END;
+        IF can_have_vols_only AND walker.ou_type.can_have_vols != 't';
+            disabled = 'disabled="disabled"';
+        ELSIF walker.id == value;
+            selected = 'selected="selected"';
         END;
 %]
         <option value='[% walker.id %]' [% selected %] [% disabled %]>

commit f5775686ac2023ff8502becf86a7b2317599e7b1
Merge: 86e74c4 f98f6d7
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 3 10:51:52 2011 -0400

    Merge remote branch 'working/user/shadowspar/ttopac-altcleanup' into template-toolkit-opac-master-merge

diff --cc Open-ILS/src/templates/default/opac/parts/record/summary.tt2
index 52f5fde,0000000..d97f0fd
mode 100644,000000..100644
--- a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
@@@ -1,294 -1,0 +1,288 @@@
 +[%  PROCESS "default/opac/parts/misc_util.tt2";
 +    USE ResolverResolver;
 +    ctx.page_title = attrs.title | html_entity
 +%]
 +<!-- ****************** rdetail_summary.xml ***************************** -->
 +<abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
 +
 +[% IF ctx.refworks.enable == 'true' %]
 +    [% INCLUDE 'default/opac/parts/record/refworks.tt2' %]
 +[% END %]
 +
 +<!-- This holds the record summary information -->
 +
 +<table width="100%" border="0" cellpadding="0" cellspacing="0" id="rdetail_details_table">
 +    <tbody id="rdetail_details_tbody">
 +        <tr>
 +            <td width="90" valign="top" id="rdetail_image_cell">
 +                [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
 +                <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident %]'><img
 +                    alt="[% l('Image of item') %]" id='rdetail_image'
 +                    src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/[% ident %]' /></a>
 +                [% END %]
 +                <br />
 +            </td>
 +    
 +            <td valign="top">
 +                <table border="0" cellpadding="0" cellspacing="0" width="100%">
 +                    <tr>
 +                        <td valign="top">
 +                            <span id='rdetail_title'>[% attrs.title %]</span><br />
 +                            [% IF attrs.author %]
 +                            <span class='opac-auto-030'>[% l("Author") %]:</span>
 +                            <em><a title='[% l("Perform an author search") %]'
 +                                    id='rdetail_author'
 +                                    href="[% ctx.opac_root %]/results?qtype=author&amp;query=[%-
 +                                        attrs.author | replace('[,\.:;]', '') | uri %]&amp;loc=[% CGI.param('loc') | uri %]">[% attrs.author %]</a></em>
 +                            [% END %]
 +                        </td>
 +                        <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
-                             <div style="width:230px;text-align:left;margin-top:3px;">
++                            <div style="width:280px;text-align:left;margin-top:3px;">
 +                                <div style="float:right;">
 +                                    <div class="rdetail_aux_utils opac-auto-010">
 +                                        <a href="[% ctx.opac_root %]/place_hold[%-
 +                                            propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% ctx.bre_id %]&amp;hold_type=T" id="rdetail_place_hold" class="no-dec"><img
-                                             src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
++                                            src="[% ctx.media_prefix %]/images/green_check.png" alt="" /><span 
 +                                                style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
 +                                    </div>
 +                                    <div class="rdetail_aux_utils opac-auto-121">
 +                                        [%  
 +                                            operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add";
 +                                            label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); 
 +                                        %]
-                                         <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
-                                             <input type="hidden" name="record" value="[% ctx.bre_id %]" />
-                                             <div class="pos-abs">
-                                                 <div class="opac-auto-149">
-                                                     <input type="submit" title="[% label %]" value="[% label %]" class="subtle-button" />
-                                                 </div>
-                                             </div>
-                                             <input type="image" alt="[% label %]"
-                                                 src="[% ctx.media_prefix %]/images/clipboard.png" />
-                                         </form>
++                                        <a href="[% ctx.opac_root %]/mylist/[% operation %]?record=[% ctx.bre_id %]" class="no-dec">
++                                            <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
++                                            [% label %]
++                                        </a>
 +                                    </div>
 +                                </div>
 +                                <div style="float:right;margin-right:17px;">
 +                                    [% IF attrs.format_icon %]
 +                                    <img alt="[% attrs.format_label %]" title="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
 +                                    [% END %]
 +                                </div>
 +                            </div>
 +                        </td>
 +                    </tr>
 +                </table>
 +                <div class='opac-auto-018'>
 +                    <table border="0" cellpadding="0" width="100%">
 +                        <tr>
 +                            <td nowrap='nowrap' valign="top">
 +                                [% IF attrs.isbn %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
 +                            </td>
 +                            <td valign="top" id='rdetail_isbn'>[% attrs.isbn %]</td>
 +                            <td nowrap='nowrap' valign="top">
 +                                [% IF attrs.phys_desc %]<strong id="rdetail_phys_lbl">[% l("Physical Description") %]</strong>[% END %]
 +                            </td>
 +                            <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc %]</td>
 +                        </tr>
 +                        [% IF openurl.enabled == 'true';
 +                            FOR issn IN args.issns;
 +                                sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl);
 +                                FOR res IN sfx;
 +                        %]
 +                            <tr name="results_issn_tr">
 +                                <td valign="top">
 +                                    <strong><a href="[% res.target_url %]">
 +                                        [% res.public_name %]</a></strong>
 +                                </td>
 +                                <td>[% res.target_coverage %]</td>
 +                            </tr>
 +                                [% END %]
 +                            [% END %]
 +                        [% END %]
 +                        <tr>
 +                            <td nowrap='nowrap' valign="top">
 +                                <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
 +                            </td>
 +                            <td valign="top" id='rdetail_edition'>[% attrs.edition %]</td>
 +                        </tr>
 +                        <tr>
 +                            <td nowrap='nowrap' valign="top">
 +                                <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
 +                            </td>
 +                            <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
 +                            <td nowrap='nowrap' valign="top">
 +                                <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
 +                            </td>
 +                            <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
 +                        </tr>
 +                    </table>
 +
 +                    <!-- hold/copy summary -->
 +                    <div style="padding-top:15px;">
 +                        <div>
 +                            [% l("[quant,_1,Hold,Holds] with [quant,_2,total copy,total copies]", 
 +                                ctx.record_hold_count, ctx.copy_summary.0.count) %]
 +                        </div>
 +                        <div>[% l('[quant,_1,Copy,Copies] available', ctx.copy_summary.0.available) %]</div>
 +                    </div>
 +
 +                </div>
 +            </td>
 +        </tr>
 +    </tbody>
 +</table>
 +<br />
 +
 +[% FOR uri IN args.uris %]
 +<div class="rdetail_uri">
 +    <a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]
 +</div>
 +[% END %]
 +
 +<br />
 +
 +<table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
 +    <thead>
 +        <tr id="rdetails_status_head">
 +            <td>[% l("Location") %]</td>
 +            <td>[% l("Call Number") %]</td>
 +            <td>[% l("Barcode") %]</td>
 +            <td>[% l("Shelving Location") %]</td>
 +            [% IF ctx.is_staff %]
 +            <td>[% l("Age Hold Protection") %]</td>
 +            <td>[% l("Create Date") %]</td>
 +            <td>[% l("Holdable?") %]</td>
 +            [% END %]
 +            <td>[% l("Status") %]</td>
 +            <td>[% l("Due Date") %]</td>
 +        </tr>
 +    </thead>
 +    <tbody class="copy_details_table">
 +        [% last_cn = 0;
 +        FOR copy_info IN ctx.copies;
 +            NEXT IF copy_info.call_number_label == '##URI##' %]
 +        <tr>
 +            <td>[%
 +                # XXX KCLS-specific kludging
 +                org_name = ctx.get_aou(copy_info.circ_lib).name;
 +                dir = org_name | lower | replace('[^\w]', '') |
 +                    replace('.+320th', '320th'); %]
 +                <a href="http://www.kcls.org/[% dir %]/"
 +                    class="classic_link">[% org_name %]</a>
 +            </td>
 +            <td>[% copy_info.call_number_label %]</td>
 +            <td>[% copy_info.barcode %]</td>
 +            <td>[% copy_info.copy_location %]</td>
 +            [% IF ctx.is_staff %]
 +            <td>
 +                [% copy_info.age_protect ?
 +                    ctx.get_crahp(copy_info.age_protect).name : l('None') %]
 +            </td>
 +            <td>[% date.format(
 +                ctx.parse_datetime(copy_info.create_date),
 +                DATE_FORMAT
 +            ) %]</td>
 +            <td>[%  # Show copy/volume hold links to staff (without
 +                    # checking whether they have permissions to do those).
 +                    overall_holdable = (copy_info.holdable == 't' AND
 +                        copy_info.location_holdable == 't' AND
 +                        copy_info.status_holdable == 't');
 +                    IF overall_holdable;
 +                        l("Place on"); %]
 +                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% copy_info.id %]&amp;hold_type=C">[% l("copy") %]</a>
 +                [%      IF copy_info.call_number != last_cn;
 +                            last_cn = copy_info.call_number;
 +                            l(" / "); %]
 +                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% copy_info.call_number %]&amp;hold_type=V">[% l("volume") %]</a>
 +                [%      END;
 +                    ELSE;
 +                        l("No");
 +                    END %]</td>
 +            [% END %]
 +            <td>[% copy_info.copy_status %]</td>
 +            <td>[%
 +                IF copy_info.due_date;
 +                    date.format(
 +                        ctx.parse_datetime(copy_info.due_date),
 +                        DATE_FORMAT
 +                    );
 +                ELSE;
 +                    '-';
 +                END %]</td>
 +        </tr>
 +        [% END %]
 +        <tr>
 +        [% IF ctx.copy_offset > 0;
 +            new_offset = ctx.copy_offset - ctx.copy_limit;
 +            IF new_offset < 0; new_offset = 0; END %]
 +            <td>
 +                <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% new_offset %]&amp;copy_limit=[% ctx.copy_limit %]">&laquo; [%
 +                    l('Previous [_1]', ctx.copy_offset - new_offset)
 +                %]</a>
 +            </td>
 +        [% END %]
 +        [% IF ctx.copies.size >= ctx.copy_limit %]
 +            <td>
 +                <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %]&amp;copy_limit=[% ctx.copy_limit %]">[%
 +                    l('Next [_1]', ctx.copy_limit)
 +                %] &raquo;</a>
 +            </td>
 +        [% END %]
 +        </tr>
 +    </tbody>
 +</table>
 +
 +<div id="rdetail_locs_expand" class="hide_me">
 +    <a href="#"><img
 +        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
 +    <a style="position:relative;top:-3px;" href="#">[% l('Show more locations') %]</a>
 +</div>
 +
 +<div id="rdetail_locs_collapse" class="hide_me">
 +    <a href="#"><img
 +        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
 +    <a style="position:relative;top:-3px;" href="#">[% l('Collapse locations') %]</a>
 +</div>
 +
 +<div id="rdetail_extras_expand" class="hide_me">
 +    <a href="#"><img
 +        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
 +    <a style="position:relative;top:-3px;" href="#">[% l('Expand all tabs') %]</a>
 +</div>
 +
 +<div id="rdetail_extras_collapse" class="hide_me">
 +    <a href="#"><img src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
 +    <a style="position:relative;top:-3px;" href="#">[% l('Collapse all tabs') %]</a>
 +</div>
 +
 +<div class="hide_me">
 +    <table id='' border="0" width="100%">
 +        <tbody id='rdetail_details_tbody'>
 +            <tr>
 +                <td id='' rowspan='2' valign="top" align="center" style="padding-right:10px;">
 +                </td>
 +                <td class='rdetail_desc' valign="top" colspan="3">
 +                    <table border="0" width="100%">
 +                        <tr>
 +                            <td valign="top">
 +                                <div style="padding-bottom:7px;">
 +                                    <strong>[% l("Title") %]:</strong>
 +                                </div>
 +                            </td>
 +                            <td width="1" valign="top" align="right" style="white-space:nowrap;">
 +                                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% ctx.bre_id %]&amp;hold_type=T"><img alt="[% l('Place Hold') %]"
 +                                    src="[% ctx.media_prefix %]/images/place_hold.gif" /></a>
 +                                <a href="#" id="rd_reviews_and_more" target="_blank"><img
 +                                    alt="[% l('Reviews and More') %]" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>
 +                                <a href="#" id=""><img alt="[% l('Add to My List') %]"
 +                                    src="[% ctx.media_prefix %]/images/add_mylist.gif" /></a>
 +                            </td>
 +                        </tr>
 +                    </table>
 +                </td>        
 +            </tr>
 +            <tr>
 +                <td nowrap='nowrap' colspan="3" valign="bottom" style="padding-bottom:16px;">
 +                </td>
 +            </tr>
 +            <tr>
 +                <td><div style="height:20px;"></div></td>
 +            </tr>
 +        </tbody>
 +    </table>
 +</div> <!-- details_body -->
 +
 +<!-- ****************** end: rdetail_summary.xml ***************************** -->
diff --cc Open-ILS/src/templates/default/opac/parts/result/table.tt2
index 580fefd,0000000..4c8898f
mode 100644,000000..100644
--- a/Open-ILS/src/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/result/table.tt2
@@@ -1,287 -1,0 +1,282 @@@
 +[%  PROCESS "default/opac/parts/misc_util.tt2";
 +
 +    USE ResolverResolver;
 +
 +    ctx.result_start = 1 + ctx.page_size * page;
 +    ctx.result_stop = ctx.page_size * (page + 1);
 +    IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
 +
 +    result_count = ctx.result_start;
 +%]
 +
 +<div style="height: 10px;"></div>
 +[% BLOCK results_count_header %]
 +<div class="results_header_nav1">
 +    <table cellpadding="0" cellspacing="0" border="0" width="100%">
 +        <tr>
 +            <td class="h1" width="116">[% l('Search Results') %]</td>
 +            <td valign="bottom" nowrap="nowrap" class="result_number">
 +                [% |l(ctx.result_start, ctx.result_stop, ctx.hit_count) %]
 +                Results <strong>[_1]</strong> - <strong>[_2]</strong> of <strong>[_3]</strong>
 +                [% END %]
 +                <span style='padding-left: 6px;'>
 +                    [% |l(page + 1, page_count) %](page <strong>[_1]</strong> of <strong>[_2]</strong>)[% END %]
 +                </span>
 +            </td>
 +            <td align="right" valign="bottom">
 +                <span class='start_end_links_span'>
 +                    [%  class = 'search_page_nav_link';
 +                        href = '#';
 +                        IF page > 0;
 +                            href = propagator _ '&amp;page=' _ (page - 1);
 +                        ELSE; class = class _ ' invisible'; END;
 +                    %]
 +                    <a class='[% class %]' href='[% href %]' 
 +                        title='[% l("Previous page") %]'><span class="nav_arrow_fix">&#9668;</span> [% l('Previous') %] </a>
 +                    <span class='hide_me'
 +                        style='padding-left: 11px; padding-right:11px;'>
 +                        <span></span>
 +                    </span>
 +                    [%  class = 'search_page_nav_link';
 +                        href = '#';
 +                        IF (page + 1) < page_count;
 +                            href = propagator _ '&amp;page=' _ (page + 1);
 +                        ELSE; class = class _ ' invisible'; END;
 +                    %]
 +                    <a class='[% class %]' href='[% href %]' 
 +                        title='[% l("Next page") %]'> [% l('Next') %] <span class="nav_arrow_fix">&#9658;</span></a>
 +                </span>
 +            </td>
 +        </tr>
 +    </table>
 +</div>
 +[% END %]
 +[% ctx.results_count_header = PROCESS results_count_header;
 +    ctx.results_count_header %]
 +<div id="result_table_div">
 +    <table cellpadding="0" cellspacing="0" border="0" width="100%">
 +        <tr>
 +            <td valign="top" width="1" style="padding-right:20px;">
 +                <div style="width:174px;" class="hide_me" id="tehSideBar">SIDEBAR TODO
 +                </div>
 +            </td>
 +            <td class='opac-auto-015' width="1"></td>
 +            <td valign="top">
 +                <table id="res_table" cellpadding="0" cellspacing="0"
 +                    border="0" width="100%" style="margin-top:10px;">
 +                    <tbody id="result_table">
 +                    [%  FOR rec IN ctx.records;
 +                            attrs = {marc_xml => rec.marc_xml};
 +                            PROCESS get_marc_attrs args=attrs %]
 +                        <tr>
 +                            <td class='result_table_row' align='left' width='100%'>
 +                                <table cellpadding="0" cellspacing="0" class='result_table_subtable'>
 +                                    <tbody class='result_table_subtbody'>
 +                                        <tr name='counts_row'>
 +                                            <td width="58" valign="top"
 +                                                style="font-weight:bold;padding-left:10px;"
 +                                                name="results_row_count">[%
 +                                                    result_count; result_count = result_count + 1
 +                                                %].</td>
 +                                            <td class='result_table_pic_header' align='center'
 +                                                width="78" nowrap="nowrap" valign="top">
 +                                                [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
 +                                                <a href="[% ctx.opac_root %]/record/[% rec.id _ propagator %]"><img alt="[% l('Image of item') %]"
 +                                                        name='item_jacket' class='result_table_pic' width="55"
 +                                                        src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a><br />
 +                                                [% END %]
 +                                            </td>
 +                                            <td class='result_table_title_cell'
 +                                                name='result_table_title_cell'
 +                                                valign="top">
 +                                                <div class="bold">
 +                                                    <a title="[% attrs.title %]" name='item_title'
 +                                                        href="[% ctx.opac_root %]/record/[% rec.id _ propagator %]"
 +                                                        class='search_link'>[% attrs.title %]</a>
 +                                                </div>
 +                                                <div style="font-size:11px;">
 +                                                    <div>
 +                                                        <em><a title="[% l("Perform an Author Search") %]"
 +                                                                name='item_author'
 +                                                                href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% 
 +                                                                    attrs.author | replace('[,\.:;]', '') | uri %]&amp;loc=[% CGI.param('loc') | uri %]"
 +                                                                class='search_link'>[% attrs.author %]</a></em>
 +                                                        &nbsp;&nbsp;
 +                                                        [% attrs.pubdate %]
 +                                                    </div>
 +                                                    <table cellpadding="0" cellspacing="0" border="0"
 +                                                        class="results_info_table">
 +                                                    [% IF attrs.publisher %]
 +                                                        <tr name="results_pub_tr">
 +                                                            <td valign="top">
 +                                                                <strong>[% l('Publisher:') %]</strong>
 +                                                            </td>
 +                                                            <td>[% attrs.publisher; %]</td>
 +                                                        </tr>
 +                                                    [% END %]
 +                                                    [% IF attrs.isbn %]
 +                                                        <tr name="results_isbn_tr">
 +                                                            <td valign="top">
 +                                                                <strong>[% l('ISBN:') %]</strong>
 +                                                            </td>
 +                                                            <td>[% attrs.isbn %]</td>
 +                                                        </tr>
 +                                                    [% END %]
 +                                                        [% IF openurl.enabled == 'true';
 +                                                            FOR issn IN args.issns;
 +                                                                sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl);
 +                                                                FOR res IN sfx;
 +                                                        %]
 +                                                        <tr name="results_issn_tr">
 +                                                            <td valign="top">
 +                                                                <strong><a href="[% res.target_url %]">
 +                                                                [% res.public_name %]</a></strong>
 +                                                            </td>
 +                                                            <td>[% res.target_coverage %]</td>
 +                                                        </tr>
 +                                                                [% END %]
 +                                                            [% END %]
 +                                                        [% END %]
 +
 +                                                    [% IF attrs.edition %]
 +                                                        <tr name="results_edition_tr">
 +                                                            <td valign="top">
 +                                                                <strong>[% l('Edition:') %]</strong>
 +                                                            </td>
 +                                                            <td>[% attrs.edition %]</td>
 +                                                        </tr>
 +                                                    [% END %]
 +                                                    [% IF attrs.phys_desc %]
 +                                                        <tr name="results_phys_desc_tr">
 +                                                            <td nowrap="nowrap" valign="top">
 +                                                                <strong>[% l('Phys. Desc.:') %]</strong>
 +                                                            </td>
 +                                                            <td>
 +                                                                [% args.phys_desc %]
 +                                                            </td>
 +                                                        </tr>
 +                                                    [% END %]
 +                                                        [% FOR uri IN args.uris %]
 +                                                        <tr name='bib_uri_list' class='result_table_title_cell'>
 +                                                            <td valign='top'>
 +                                                                <strong>[% l('Electronic resource') %]</strong>
 +                                                            </td>
 +                                                            <td><a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]</td>
 +                                                        </tr>
 +                                                        [% END %]
 +                                                        [% IF args.holdings.size > 0 %]
 +                                                        <tr name='bib_cn_list' class='result_table_title_cell'>
 +                                                            <td colspan='2'>
 +                                                                <table class='result_holdings_table'>
 +                                                                    <thead><tr>
 +                                                                        <th>[% l('Library') %]</th>
 +                                                                        <th>[% l('Shelving location') %]</th>
 +                                                                        <th>[% l('Call number') %]</th>
 +                                                                        <th>[% l('Status') %]</th>
 +                                                                    </tr></thead>
 +                                                                    <tbody>
 +                                                            [% FOR copy IN args.holdings %]
 +                                                                    <tr>
 +                                                                        <td>[% copy.library %]</td>
 +                                                                        <td>[% copy.location %]</td>
 +                                                                        <td>[% copy.label %]</td>
 +                                                                        <td>[% copy.status %]</td>
 +                                                                    </tr>
 +                                                            [% END %]
 +                                                                    </tbody>
 +                                                                </table>
 +                                                            </td>
 +                                                        </tr>
 +                                                        [% END %]
 +                                                    </table>
 +                                                    <div>
 +                                                        [% l('[_1] of [quant,_2,copy,copies] available',
 +                                                            attrs.copy_counts.available, attrs.copy_counts.count) # XXX s/count/nshadow/ ?
 +                                                            #rec.copy_counts.available, rec.copy_counts.visible) 
 +                                                        %]
 +                                                    </div>
 +                                                </div>
 +                                                <div class="hide_me">
 +                                                    <span name='result_table_extra_span' class='hide_me'>
 +                                                        <span name='result_table_pub_box'
 +                                                            style='padding-left: 10px;'>
 +                                                            <span name='result_table_edition_span'
 +                                                                style='padding-left: 10px;'></span> |
 +                                                            <span name='result_table_pub_span'> </span> |
 +                                                            <span name='result_table_phys_span'> </span>
 +                                                        </span>
 +                                                    </span>
 +                                                </div>
 +                                            </td>
 +
 +                                            <td name='result_table_format_cell' class='result_table_format_cell' width="1">
 +
 +                                                [% IF attrs.format_icon %]
 +                                                <img title="[% attrs.format_label %]" alt="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
 +                                                [% END %]
 +
 +                                                <!-- unAPI link -->
 +                                                <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.id %]'></abbr>
 +
 +                                                <!-- Empty span used for creating Google Book Search-->
 +                                                <span name="googleBooksLink" class="hide_me">
 +                                                    <a style='padding-left: 8px;'
 +                                                        class='classic_link hide_me'
 +                                                        name="googleBooks-link">[% l("Browse in Google Books Search") %]</a>
 +                                                </span>
 +
 +                                            </td>
 +                                            <td nowrap='nowrap' width="1" align="right">
 +                                                <div style="width:250px;text-align:left;">
 +                                                    <div style="float:right;">
 +                                                        <div class="results_aux_utils opac-auto-010"><a
 +                                                                href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% rec.id %]&amp;hold_type=T" 
 +                                                                    name="place_hold_link" class="no-dec"><img
 +                                                                src="[% ctx.media_prefix %]/images/green_check.png"
-                                                                 alt="[% l('Place hold') %]"/><span style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
++                                                                alt=""/><span style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
 +                                                        </div>
 +                                                        <div class="results_aux_utils opac-auto-011">
-                                                             [%  operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
-                                                                 label = (operation == "add") ? l("Add to") : l("Remove from"); %]
-                                                             <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
-                                                                 <input type="hidden" name="record" value="[% rec.id %]" />
-                                                             <div style="position:absolute;">
-                                                                 <div style="position:relative;top:5px; left: 25px;">
-                                                                     <input type="submit" title="[% l(label _ ' my list') %]" value="[% l(label _ ' my list') %]" class="subtle-button" />
-                                                                 </div>
-                                                             </div>
-                                                                 <input type="image"
-                                                                 alt="[% l(label _ ' my list') %]"
-                                                                 src="[% ctx.media_prefix %]/images/clipboard.png" />
-                                                         </form>
++                                                            [%  
++                                                                operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
++                                                                label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
++                                                            %]      
++                                                            <a href="[% ctx.opac_root %]/mylist/[% operation %]?record=[% rec.id %]" class="no-dec">
++                                                                <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
++                                                                [% label %]
++                                                            </a>
 +                                                        </div>
 +                                                        <!-- <div style="padding-top:7px;" class="results_aux_utils">
 +                                                            <a title="Reviews and More" target="_blank" class="no-dec"
 +                                                                name="reviews_and_more" href="javascript:;"><img
 +                                                                alt="[% l('Reviews and more') %]"
 +                                                                src="[% ctx.media_prefix %]/images/starz.png" /> <span
 +                                                                    style="position:relative;top:-5px;">[% l('Reviews and More') %]</span></a>
 +                                                        </div> -->
 +                                                    </div>
 +                                                </div>
 +                                            </td>
 +                                        </tr>
 +                                        <tr>
 +                                            <td/>
 +                                            <td align='center'>
 +                                                <!-- Chilifresh link and reviews panel --> 
 +                                                <div class="chili_review" id="isbn_[% attrs.isbn_clean %]"> </div>
 +                                                <div id="chili_review_[% attrs.isbn_clean %]" style="display: none;" align="center" width="100%"></div>
 +                                            </td>
 +                                        </tr>
 +                                        <tr><td colspan="5"><div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div></td></tr>
 +                                    </tbody>
 +                                </table>
 +                            </td>
 +                        </tr>
 +                    [% END %]
 +                    </tbody>
 +                </table>
 +            </td>
 +        </tr>
 +    </table>
 +</div>
 +<div>
 +    [% ctx.results_count_header %]
 +    <!-- ChiliFresh XXX script TODO -->
 +</div>
diff --cc Open-ILS/src/templates/default/opac/parts/searchbar.tt2
index 6f4f01f,0000000..116387f
mode 100644,000000..100644
--- a/Open-ILS/src/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/searchbar.tt2
@@@ -1,78 -1,0 +1,78 @@@
 +[% PROCESS "default/opac/parts/org_selector.tt2" %]
 +<div id="search-box">    
 +    [% UNLESS took_care_of_form -%]
 +    <form action="[% ctx.opac_root %]/results" method="GET">
 +    [%- END %]
 +    <table cellpadding="0" cellspacing="10" border="0">
 +        <tr>
 +            <td colspan="3">
 +                <span class="search_catalog_lbl">[% l('Search the Catalog') %]</span>
 +                <a href="[% ctx.opac_root %]/advanced"
 +                    id="home_adv_search_link"><span
 +                    class="adv_search_font">[% l('Advanced Search') %]</span></a>
 +            </td>
 +        </tr>
 +        <tr>
 +            [% IF is_advanced || is_special %]
 +            <td colspan="2">
 +                <input type="hidden" name="_adv" value="1" />
 +            [% ELSE %]
 +            <td>
 +            [% INCLUDE "default/opac/parts/qtype_selector.tt2" %]
 +            </td>
 +            [% END %]
 +            [% IF ctx.processed_search_query OR (NOT is_advanced AND NOT is_special) %]
 +            <td>
 +                <div id="search_box_wrapper">
 +                    <!-- Note: when common browsers support HTML5 placeholder text, we can remove the JS -->
 +                    <input type="text" id="search_box" name="query" value="[% is_advanced ? ctx.processed_search_query : CGI.param('query') || l("Search Keyword") | html %]"
 +                        [% IF is_advanced %]style="width: 450px"[% END %]
 +                        onfocus="if (this.value=='[% l("Search Keyword") %]'){this.value='';this.style.color='#000';}"
 +                        onblur="if (this.value==''){this.value='[% l("Search Keyword") %]';this.style.color='#999';}"
 +                        x-webkit-speech />
 +                </div>
 +                <input name='page' type='hidden' value="0" />
 +            </td>
 +            <td valign="top">
 +                <div class="pos-abs">
 +                    <div class="opac-auto-143">
 +                        <input id='search-submit-go' type="image" alt="[% l('Search') %]" src="[% ctx.media_prefix %]/images/go-btn.png"
 +                            onmouseover="this.src='[% ctx.media_prefix %]/images/go-btn-hover.png';"
 +                            onmouseout="this.src='[% ctx.media_prefix %]/images/go-btn.png';" 
 +                            onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
-                         <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden'/>
++                        <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden' alt=''/>
 +                    </div>
 +                </div>
 +            </td>
 +            [% END %]
 +        </tr>
 +        [% UNLESS is_advanced OR is_special %]
 +        <tr>
 +            <td>
 +                [% INCLUDE "default/opac/parts/coded_value_selector.tt2" attr=["mattype", "item_type"] none_ok=1 %]
 +            </td>
 +            <td>
 +                <span id='depth_selector_span'>
 +                    [% PROCESS build_org_selector name='loc' value=CGI.param('loc') %]
 +                </span>
 +                <span id='lib_selector_span'>
 +                    <a id='lib_selector_link' class='classic_link'
 +                        href='#'>[% l("Choose a library to search") %]</a>
 +                </span>
 +            </td>
 +        </tr>
 +        [% END %]
 +    </table>
 +    [% UNLESS took_care_of_form %]</form>[% END %]
 +    [% IF (is_advanced AND NOT is_special) AND CGI.param('qtype') %]
 +    <div class="opac-auto-102">
 +        [ <a href="[% ctx.opac_root %]/advanced?[% query_string %]">[%
 +            l('Click to Refine Your Original Search')
 +        %]</a> ]
 +    </div>
 +    [% END %]
 +    <div id="breadcrumb">
 +        <a href="[% ctx.opac_root %]/home">[% l('Catalog Home') %]</a> &gt;
 +    </div>
 +    <div class="clear-both"></div>
 +</div>

commit 86e74c400a76655d90f1625a174851fec690036d
Merge: f8f9b79 ca413e9
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 3 10:50:04 2011 -0400

    Merge remote branch 'working/user/rri/ttopac' into template-toolkit-opac-master-merge
    
    With some minor merge conflict repair
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --cc Open-ILS/src/templates/default/opac/parts/advanced/global_row.tt2
index ddb4260,0000000..e523ec9
mode 100644,000000..100644
--- a/Open-ILS/src/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/advanced/global_row.tt2
@@@ -1,44 -1,0 +1,44 @@@
 +[%
 +    contains_options = [
 +        {value => 'contains', label => l('Contains')},
 +        {value => 'nocontains', label => l('Does not contain')},
 +        {value => 'phrase', label => l('Contains phrase')},
 +        {value => 'exact', label => l('Matches exactly')}
 +    ];
 +    contains = CGI.param('contains');
 +    queries = CGI.param('query');
 +    bools = CGI.param('bool') || ['and' x 3];
 +    qtypes = CGI.param('qtype') || ['keyword' x 3];
 +    FOR qtype IN qtypes;
 +        c = contains.shift;
 +        b = bools.shift;
 +        q = queries.shift; %]
 +
 +<!-- tag the second row so the bool column won't be hidden -->
 +<tr[% IF loop.index == 1 %] id="adv_global_row"[% END %]>
 +    <td align='left' width='100%' nowrap='nowrap'>
 +
 +        <!-- bool selector.  hide for first row.  safe to ignore first bool value in form submission -->
 +        <select name='bool' style='width: auto' [% IF loop.first %] class='invisible' [% END %]>
 +            <option value='and' [% b == 'and' ? 'selected="selected"' : '' %]>[% l('And') %]</option>
 +            <option value='or' [% b == 'or' ? 'selected="selected"' : '' %]>[% l('Or') %]</option>
 +        </select>
 +
 +        <!-- keyword, subject, etc. selector -->
-         <span class="opac-auto-078">
++        <span class="qtype_selector_margin">
 +            [% INCLUDE "default/opac/parts/qtype_selector.tt2"
 +                query_type=qtype %]
 +        </span>
 +
 +        <select name='contains' style='margin-right: 7px;'>
 +            [% FOR o IN contains_options; -%]
 +            <option value="[% o.value %]" [% c == o.value ? ' selected="selected"' : '' %]>[% o.label %]</option>
 +            [% END %]
 +        </select>
 +        <input type='text' size='18' name='query' value="[% q | html %]" x-webkit-speech />
 +        <a href="javascript:;" class="row-remover"
 +            title="[% l('Remove row') %]" alt="[% l('Remove row') %]"
 +            onclick='return killRowIfAtLeast(2, this);'><img src="[% ctx.media_prefix %]/images/adv_row_close_btn.png" /></a>
 +    </td>
 +</tr>
 +[% END %]

commit f8f9b7932135b53931bc040afc8303b11827864e
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 3 10:43:20 2011 -0400

    More template moving from 'web' to 'src'.
    
    These are the templates that have been added since the initial Great
    Migration from Open-ILS/web/templates to Open-ILS/src/templates.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/conify/global/cat/authority/browse_axis.tt2 b/Open-ILS/src/templates/default/conify/global/cat/authority/browse_axis.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/cat/authority/browse_axis.tt2
rename to Open-ILS/src/templates/default/conify/global/cat/authority/browse_axis.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/cat/authority/browse_axis_authority_field_map.tt2 b/Open-ILS/src/templates/default/conify/global/cat/authority/browse_axis_authority_field_map.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/cat/authority/browse_axis_authority_field_map.tt2
rename to Open-ILS/src/templates/default/conify/global/cat/authority/browse_axis_authority_field_map.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/cat/authority/control_set.tt2 b/Open-ILS/src/templates/default/conify/global/cat/authority/control_set.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/cat/authority/control_set.tt2
rename to Open-ILS/src/templates/default/conify/global/cat/authority/control_set.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/cat/authority/control_set_authority_field.tt2 b/Open-ILS/src/templates/default/conify/global/cat/authority/control_set_authority_field.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/cat/authority/control_set_authority_field.tt2
rename to Open-ILS/src/templates/default/conify/global/cat/authority/control_set_authority_field.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/cat/authority/control_set_bib_field.tt2 b/Open-ILS/src/templates/default/conify/global/cat/authority/control_set_bib_field.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/cat/authority/control_set_bib_field.tt2
rename to Open-ILS/src/templates/default/conify/global/cat/authority/control_set_bib_field.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/cat/authority/thesaurus.tt2 b/Open-ILS/src/templates/default/conify/global/cat/authority/thesaurus.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/cat/authority/thesaurus.tt2
rename to Open-ILS/src/templates/default/conify/global/cat/authority/thesaurus.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/vandelay/match_set.tt2 b/Open-ILS/src/templates/default/conify/global/vandelay/match_set.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/vandelay/match_set.tt2
rename to Open-ILS/src/templates/default/conify/global/vandelay/match_set.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/vandelay/match_set_tree.tt2 b/Open-ILS/src/templates/default/conify/global/vandelay/match_set_tree.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/vandelay/match_set_tree.tt2
rename to Open-ILS/src/templates/default/conify/global/vandelay/match_set_tree.tt2
diff --git a/Open-ILS/web/templates/default/opac/cnbrowse.tt2 b/Open-ILS/src/templates/default/opac/cnbrowse.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/cnbrowse.tt2
rename to Open-ILS/src/templates/default/opac/cnbrowse.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2 b/Open-ILS/src/templates/default/opac/parts/advanced/expert.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2
rename to Open-ILS/src/templates/default/opac/parts/advanced/expert.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2 b/Open-ILS/src/templates/default/opac/parts/advanced/numeric.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
rename to Open-ILS/src/templates/default/opac/parts/advanced/numeric.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/hold_error_messages.tt2 b/Open-ILS/src/templates/default/opac/parts/hold_error_messages.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/hold_error_messages.tt2
rename to Open-ILS/src/templates/default/opac/parts/hold_error_messages.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2 b/Open-ILS/src/templates/default/opac/parts/record/cnbrowse.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
rename to Open-ILS/src/templates/default/opac/parts/record/cnbrowse.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2 b/Open-ILS/src/templates/default/opac/parts/record/summaryplus.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2
rename to Open-ILS/src/templates/default/opac/parts/record/summaryplus.tt2
diff --git a/Open-ILS/web/templates/default/vandelay/inc/import_errors.tt2 b/Open-ILS/src/templates/default/vandelay/inc/import_errors.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/vandelay/inc/import_errors.tt2
rename to Open-ILS/src/templates/default/vandelay/inc/import_errors.tt2

commit 14ae716ceff99375347ead1ea7f4d4aadaf2cd8a
Merge: 1553160 720cf41
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 3 10:31:06 2011 -0400

    Repaired merge conflicts resuling from ttopac-move-templates
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --cc Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index 5ec5db9,eba1b74..e5d9b1f
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@@ -24,13 -24,11 +24,13 @@@ sub load_record 
  
      # run copy retrieval in parallel to bib retrieval
      # XXX unapi
 -    my $copy_rec = OpenSRF::AppSession->create('open-ils.cstore')->request(
 +    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
 +    my $copy_rec = $cstore->request(
          'open-ils.cstore.json_query.atomic', 
 -        $self->mk_copy_query($rec_id, $org, $depth, $copy_limit, $copy_offset));
 +        $self->mk_copy_query($rec_id, $org, $depth, $copy_limit, $copy_offset)
 +    );
  
-     my (undef, @rec_data) = $self->get_records_and_facets([$rec_id], undef, {flesh => '{holdings_xml,mra}'});
+     my (undef, @rec_data) = $self->get_records_and_facets([$rec_id], undef, {flesh => '{holdings_xml,mra,acp}'});
      $ctx->{bre_id} = $rec_data[0]->{id};
      $ctx->{marc_xml} = $rec_data[0]->{marc_xml};
  
diff --cc Open-ILS/src/templates/default/opac/parts/advanced/global_row.tt2
index 071ab66,6325c0a..ddb4260
--- a/Open-ILS/src/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/advanced/global_row.tt2
@@@ -29,16 -17,17 +29,16 @@@
              [% INCLUDE "default/opac/parts/qtype_selector.tt2"
                  query_type=qtype %]
          </span>
 +
          <select name='contains' style='margin-right: 7px;'>
 -            [% FOR o IN contains_options;
 -                |l(o.value, o.label) -%]
 -            <option value="[_1]"[% c == o.value ? ' selected="selected"' : '' %]>[_2]</option>
 -            [% END; END %]
 +            [% FOR o IN contains_options; -%]
 +            <option value="[% o.value %]" [% c == o.value ? ' selected="selected"' : '' %]>[% o.label %]</option>
 +            [% END %]
          </select>
-         <input type='text' size='18' name='query' value="[% q | html %]" />
+         <input type='text' size='18' name='query' value="[% q | html %]" x-webkit-speech />
          <a href="javascript:;" class="row-remover"
              title="[% l('Remove row') %]" alt="[% l('Remove row') %]"
 -            onclick='var row = this.parentNode.parentNode;var tbody = row.parentNode; if( tbody.getElementsByTagName("tr").length > 2 ) row.parentNode.removeChild(row);'><img src="[% ctx.media_prefix %]/images/adv_row_close_btn.png" /></a>
 +            onclick='return killRowIfAtLeast(2, this);'><img src="[% ctx.media_prefix %]/images/adv_row_close_btn.png" /></a>
      </td>
  </tr>
 -[%      i = i + 1;
 -    END %]
 +[% END %]
diff --cc Open-ILS/src/templates/default/opac/parts/misc_util.tt2
index 0000000,3bc2fa8..8bbc57c
mode 000000,100644..100644
--- a/Open-ILS/src/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/misc_util.tt2
@@@ -1,0 -1,155 +1,156 @@@
+ [% 
+     # Extract MARC fields from XML
+     #   get_marc_attrs( { marc_xml => doc } )
+     BLOCK get_marc_attrs;
+         xml = args.marc_xml;
+         args.isbn = xml.findnodes('//*[@tag="020"]/*[@code="a"]').shift.textContent;
+         args.upc = xml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
+         args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
+         args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
+         args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
+         args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
+         args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
++        args.summary = xml.findnodes('//*[@tag="520"]/*[@code="a"]').textContent;
+         args.edition = xml.findnodes('//*[@tag="250"]/*[@code="a"]').textContent ||
+             xml.findnodes('//*[@tag="534"]/*[@code="b"]').textContent ||
+             xml.findnodes('//*[@tag="775"]/*[@code="b"]').textContent;
+         phys = xml.findnodes(
+             '//*[@tag="300"]/*[@code="a" or @code="b" or @code="c" or @code="e"]'
+         );
+         phys_content = [];
+         FOR p IN phys; phys_content.push(p.textContent); END;
+         args.phys_desc = phys_content.join("");
+ 
+         # MARC Callnumber
+         args.marc_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent;
+ 
+         # clean up the ISBN
+         args.isbn_clean = args.isbn.replace('\ .*', '');
+ 
+         args.holdings = [];
+         args.uris = [];
+         args.issns = [];
+ 
+         # we use $9 of ISBN and ISSN as a flag for e-version
+         sfx_isbn = xml.findnodes('//*[@tag="020"]/*[@code="9"]');
+         IF sfx_isbn;
+             IF sfx_isbn.textContent == "SFX";
+                 my_parent = sfx_isbn.parentNode();
+                 sfx_isbn = my_parent.findnodes('./*[@code="a"]');
+                 sfx_isbn.replace('-', '');
+                 args.resolver_isbn = sfx_isbn.replace('\ .*', '');
+             END;
+         END;
+ 
+         sfx_issn = xml.findnodes('//*[@tag="022"]/*[@code="9"]');
+         IF sfx_issn;
+             IF sfx_issn.textContent == "SFX";
+                 my_parent = sfx_issn.parentNode();
+                 sfx_issn = my_parent.findnodes('./*[@code="a"]');
+                 args.issns.push(
+                     sfx_issn.textContent.replace('[^\d\-X]', '')
+                 );
+             END;
+         END;
+ 
+         # we snag all issns if no SFX available
+         IF args.issns.size == 0;
+             FOR rawissn IN xml.findnodes('//*[@tag="022"]/*[@code="a"]');
+                 args.issns.push(
+                     rawissn.textContent.replace('[^\d\-X]', '')
+                 );
+             END;
+         END;
+ 
+         FOR volume IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
+ 
+             # Check volume visibility - could push this into XPath
+             vol.label = volume.getAttribute('label');
+             vol.id = volume.getAttribute('id');
+             NEXT IF volume.getAttribute('opac_visible') == 'false';
+             NEXT IF volume.getAttribute('deleted') == 'true';
+ 
+             IF vol.label == '##URI##';
+                 FOR uri IN volume.findnodes('./*[local-name()="uris"]/*[local-name()="uri"]');
+                     res.href = uri.getAttribute('href');
+                     res.link = uri.getAttribute('label');
+                     res.note = uri.getAttribute('use_restriction');
+                     args.uris.push(res);
+                 END;
+                 NEXT;
+             ELSE;
+                 copies = volume.findnodes('./*[local-name()="copies"]/*[local-name()="copy"]');
+                 FOR copy IN copies;
+                     # Check copy visibility
+                     cp.deleted = copy.getAttribute('deleted');    
+                     cp.visible = copy.getAttribute('opac_visible');
+                     NEXT IF (cp.deleted == 'true' OR cp.visible == 'false');
+ 
+                     # Iterate through all of the children to determine visibility
+                     FOR node IN cp.childNodes;
+                         NEXT IF cp.visible == 'false';
+                         vis = node.getAttribute('opac_visible');
+                         del = node.getAttribute('deleted');
+                         IF vis == 'false' or del == 'true';
+                             cp.visible = 'false';
+                         END;
+                     END;
+ 
+                     NEXT IF cp.visible == 'false';
+                     
+                     loc = copy.findnodes('./*[local-name()="location"]');
+                     circlib = copy.findnodes('./*[local-name()="circlib"]');
+                     status = copy.findnodes('./*[local-name()="status"]');
+ 
+                     holding = {
+                         label => vol.label,
+                         location => loc.textContent,
+                         library => circlib.textContent,
+                         status => status.textContent
+                         barcode => copy.getAttribute('barcode')
+                     };
+                     args.holdings.push(holding);
+                 END;
+             END;
+         END;
+ 
+         # Extract the copy count summary
+         count_type = (ctx.is_staff) ? 'staff' : 'public';
+         xpath = '//*[local-name()="counts"]/*[local-name()="count"][@type="' _ count_type _ '"]';
+         FOR node IN xml.findnodes(xpath);
+             args.copy_counts = {};
+             FOR attr IN ['count', 'available', 'unshadow', 'transcendant']; 
+                 args.copy_counts.$attr = node.getAttribute(attr);
+             END;
+         END;
+ 
+         # "mattype" == "custom marc format specifier"
+         FOR icon_style IN ['mattype', 'item_type']; 
+             node = xml.findnodes(
+                 '//*[local-name()="attributes"]/*[local-name()="field"][@name="' _ icon_style _ '"]');
 -            IF node;
++            IF node AND node.textContent;
+                 args.format_label = node.getAttribute('coded-value')
+                 args.format_icon = ctx.media_prefix _ '/images/format_icons/' _ icon_style _ '/' _ node.textContent _ '.png';
+                 LAST;
+             END;
+         END;
+     END;
+ 
+     BLOCK get_hold_status;
+         IF hold.hold.status == 4;
+             l("Available");
+             IF ahr.shelf_expire_time;
+                 l('<br/>Expires [_1]', 
+                     date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT));
+             END;
+         ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
+             # estimated wait is delivered as seconds.
+             SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);
+             l("Estimated wait: [quant,_1,day,days]", hwait);
+         ELSIF hold.hold.status == 3;
+             l("In Transit");
+         ELSIF hold.hold.status < 3;
+             l("Waiting for copy");
+         END;
+     END;
+ %]
diff --cc Open-ILS/src/templates/default/opac/parts/record/summary.tt2
index 96748e4,1de1578..52f5fde
--- a/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
@@@ -126,8 -157,8 +157,9 @@@
          </tr>
      </thead>
      <tbody class="copy_details_table">
 -        [% FOR copy_info IN ctx.copies %]
 -        [% NEXT IF copy_info.call_number_label == '##URI##' %]
 +        [% last_cn = 0;
-         FOR copy_info IN ctx.copies %]
++        FOR copy_info IN ctx.copies;
++            NEXT IF copy_info.call_number_label == '##URI##' %]
          <tr>
              <td>[%
                  # XXX KCLS-specific kludging

commit 15531609b8bd0b96423dbb78fd6d52b301cb18c5
Merge: 5c2de55 fc8e74f
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 3 09:50:19 2011 -0400

    Merge remote branch 'esi/template-toolkit-opac' into template-toolkit-opac-master-merge


commit fc8e74f9e2664739566cc051fc82d0bb7ce84146
Merge: 024c72c 00a8204
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Aug 2 14:39:35 2011 -0400

    Merge branch 'template-toolkit-opac' of git.evergreen-ils.org:evergreen/equinox into template-toolkit-opac


commit 024c72c037287e34550cddeb5d9131cc782e910f
Merge: 9bd8972 e1658e2
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Aug 2 14:39:31 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 00a8204a3d5ce25dc1c68766f885a9eface9cf06
Merge: 7c0f0df e1658e2
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Aug 2 13:04:25 2011 -0400

    Repaired seed data T-pac merge conflict
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --cc Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 366b457,e4e7607..67fdaab
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@@ -2751,13 -2762,25 +2762,31 @@@ INSERT into config.org_unit_setting_typ
  ( 'org.patron_opt_default',
      oils_i18n_gettext( 'org.patron_opt_default', 'Circ: Patron Opt-In Default', 'coust', 'label'),
      oils_i18n_gettext( 'org.patron_opt_default', 'This is the default depth at which a patron is opted in; it is calculated as an org unit relative to the current workstation.', 'coust', 'label'),
 -    'integer')
 -,( 
 +    'integer'),
 +
 +( 'opac.payment_history_age_limit',
 +    oils_i18n_gettext( 'opac.payment_history_age_limit', 'OPAC: Payment History Age Limit', 'coust', 'label'),
 +    oils_i18n_gettext( 'opac.payment_history_age_limit', 'The OPAC should not display payments by patrons that are older than any interval defined here.', 'coust', 'label'),
-     'interval')
++    'interval'),
 +
++( 
+         'ui.circ.billing.uncheck_bills_and_unfocus_payment_box',
+         oils_i18n_gettext(
+             'ui.circ.billing.uncheck_bills_and_unfocus_payment_box',
+             'GUI: Uncheck bills by default in the patron billing interface',
+             'coust',
+             'label'
+         ),
+         oils_i18n_gettext(
+             'ui.circ.billing.uncheck_bills_and_unfocus_payment_box',
+             'Uncheck bills by default in the patron billing interface,'
+             || ' and focus on the Uncheck All button instead of the'
+             || ' Payment Received field.',
+             'coust',
+             'description'
+         ),
+         'bool'
+     )
  ;
  
  UPDATE config.org_unit_setting_type

commit 7c0f0dfa79b91d0e632acd958a04ef83cb4e9f06
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Aug 2 10:38:14 2011 -0400

    Allow advanced search bool selectors to size down
    
    ... to avoid unnecessary horizontal screen gobbling
    
    Tested in Chrome, FF, and IE
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
index 3e5dec5..071ab66 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
@@ -19,7 +19,7 @@
     <td align='left' width='100%' nowrap='nowrap'>
 
         <!-- bool selector.  hide for first row.  safe to ignore first bool value in form submission -->
-        <select name='bool' [% IF loop.first %] class='invisible' [% END %]>
+        <select name='bool' style='width: auto' [% IF loop.first %] class='invisible' [% END %]>
             <option value='and' [% b == 'and' ? 'selected="selected"' : '' %]>[% l('And') %]</option>
             <option value='or' [% b == 'or' ? 'selected="selected"' : '' %]>[% l('Or') %]</option>
         </select>

commit 2b3ff4a63c20d4ab4f47af9c3165b359828c0b27
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 1 17:34:35 2011 -0400

    Support for boolean operators in advanced search
    
    Implements a new column with And/Or selectors.  Terms are grouped from
    top to bottom in the UI as left to right in the compiled query.
    
    A && B || C && D  => ((A && B) || C) && D
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 6397d84..62ad13c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -17,12 +17,13 @@ sub _prepare_biblio_search_basics {
     return $cgi->param('query') unless $cgi->param('qtype');
 
     my %parts;
-    my @part_names = qw/qtype contains query/;
+    my @part_names = qw/qtype contains query bool/;
     $parts{$_} = [ $cgi->param($_) ] for (@part_names);
 
+    my $full_query = '';
     my @chunks = ();
     for (my $i = 0; $i < scalar @{$parts{'qtype'}}; $i++) {
-        my ($qtype, $contains, $query) = map { $parts{$_}->[$i] } @part_names;
+        my ($qtype, $contains, $query, $bool) = map { $parts{$_}->[$i] } @part_names;
 
         next unless $query =~ /\S/;
         push(@chunks, $qtype . ':') unless $qtype eq 'keyword' and $i == 0;
@@ -41,10 +42,13 @@ sub _prepare_biblio_search_basics {
             $query =~ s/[\^\$]//g;
             $query = '^' . $query . '$';
         }
+
+        $bool = ($bool and $bool eq 'or') ? '||' : '&&';
+        $full_query = $full_query ? "($full_query $bool $query)" : $query;
         push @chunks, $query;
     }
 
-    return join(' ', @chunks);
+    return $full_query;
 }
 
 sub _prepare_biblio_search {
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
index f2fbbe6..3e5dec5 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
@@ -7,21 +7,33 @@
     ];
     contains = CGI.param('contains');
     queries = CGI.param('query');
+    bools = CGI.param('bool') || ['and' x 3];
     qtypes = CGI.param('qtype') || ['keyword' x 3];
     FOR qtype IN qtypes;
         c = contains.shift;
+        b = bools.shift;
         q = queries.shift; %]
-<tr[% IF loop.first %] id="adv_global_row"[% END %]>
+
+<!-- tag the second row so the bool column won't be hidden -->
+<tr[% IF loop.index == 1 %] id="adv_global_row"[% END %]>
     <td align='left' width='100%' nowrap='nowrap'>
+
+        <!-- bool selector.  hide for first row.  safe to ignore first bool value in form submission -->
+        <select name='bool' [% IF loop.first %] class='invisible' [% END %]>
+            <option value='and' [% b == 'and' ? 'selected="selected"' : '' %]>[% l('And') %]</option>
+            <option value='or' [% b == 'or' ? 'selected="selected"' : '' %]>[% l('Or') %]</option>
+        </select>
+
+        <!-- keyword, subject, etc. selector -->
         <span class="opac-auto-078">
             [% INCLUDE "default/opac/parts/qtype_selector.tt2"
                 query_type=qtype %]
         </span>
+
         <select name='contains' style='margin-right: 7px;'>
-            [% FOR o IN contains_options;
-                |l(o.value, o.label) -%]
-            <option value="[_1]"[% c == o.value ? ' selected="selected"' : '' %]>[_2]</option>
-            [% END; END %]
+            [% FOR o IN contains_options; -%]
+            <option value="[% o.value %]" [% c == o.value ? ' selected="selected"' : '' %]>[% o.label %]</option>
+            [% END %]
         </select>
         <input type='text' size='18' name='query' value="[% q | html %]" />
         <a href="javascript:;" class="row-remover"

commit 5873e902d6ea484406d2b522b2b7593cd7cf0c36
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 1 18:35:39 2011 -0400

    maketext filter must be registered as a dynamic filter to properly handle arguments
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index d684ad0..33a5dbb 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -57,7 +57,15 @@ sub handler {
             EGI18N => 'OpenILS::WWW::EGWeb::I18NFilter',
             CGI_utf8 => 'OpenILS::WWW::EGWeb::CGI_utf8'
         },
-        FILTERS => {l => $text_handler}
+        FILTERS => {
+            # Register a dynamic filter factory for our locale::maketext generator
+            l => [
+                sub {
+                    my($ctx, @args) = @_;
+                    return sub { $text_handler->(shift(), @args); }
+                }, 1
+            ]
+        }
     });
 
     unless($tt->process($template, {ctx => $ctx, ENV => \%ENV, l => $text_handler})) {

commit 2e8e2f0032bf338253c1e27e2fa4a72054f4f204
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 1 09:08:33 2011 -0400

    Remove KCLS mattype SQL seed data comment
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index f906e56..f43d115 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -21,35 +21,3 @@
     is_advanced = CGI.param("_adv").size;
     is_special = CGI.param("_special").size;
 %]
-
-
-[%# XXX KCLS Note... Remove me soon...
-BEGIN;
-INSERT INTO config.record_attr_definition (name, label, tag, sf_list)
-    VALUES ('mattype', 'Material Type', '998', 'd');
-INSERT INTO config.coded_value_map (ctype, code, value)
-    VALUES
-        ('mattype', 'a', 'Book'),
-        ('mattype', 'i', 'Book on cassette'),
-        ('mattype', 'n', 'Book on CD'),
-        ('mattype', 'x', 'Download music'),
-        ('mattype', 'y', 'Download video'),
-        ('mattype', 'h', 'DVD'),
-        ('mattype', 'w', 'eBook - Audio'),
-        ('mattype', 'v', 'eBook - Text'),
-        ('mattype', 'e', 'Equipment'),
-        ('mattype', 'f', 'Films'),
-        ('mattype', 'o', 'Kit'),
-        ('mattype', 'q', 'Large print'),
-        ('mattype', 'b', 'Magazine'),
-        ('mattype', 'd', 'Microform'),
-        ('mattype', 'k', 'Music cassette'),                                                                                                                                                              ('mattype', 'j', 'Music CD'),
-        ('mattype', 'l', 'Music LP'),                                                                                                                                                                    ('mattype', 'p', 'Newspaper'),
-        ('mattype', 't', 'Online'),                                                                                                                                                                      ('mattype', 'u', 'Player'),
-        ('mattype', 'c', 'Printed music / scores'),                                                                                                                                                      ('mattype', '2', 'Read along with cassette'),
-        ('mattype', '5', 'Read along with CD'),                                                                                                                                                          ('mattype', 'm', 'Software'),
-        ('mattype', 'g', 'Video'),                                                                                                                                                                       ('mattype', 'r', '3-D Object'),
-        ('mattype', 'z', 'Map'),                                                                                                                                                                         ('mattype', 's', 'Slide set');
-COMMIT;
-%]
-

commit efce5923f0817b85848d73a92a5a9495c1bcabf1
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 1 09:00:30 2011 -0400

    Bypass install_filter mem leak via direct insertion
    
    See https://rt.cpan.org/Ticket/Display.html?id=46691
    
    On the one hand we have a memory leak, on the other we have a bug caused
    by the fix to the memory leak.  Bypass this altogether and insert the
    filter manually into the template environment using Template's FILTER
    configuration argument.  This has the added bonus of simplifying the
    i18n filter code.
    
    Since the filter is manually inserted, it's not necessary (and possibly
    counter-productive) to USE the filter directly in the template.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index 922f7e1..d684ad0 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -47,6 +47,8 @@ sub handler {
 
     $template = $ctx->{skin} . "/$template";
 
+    my $text_handler = set_text_handler($ctx, $r);
+
     my $tt = Template->new({
         OUTPUT => ($as_xml) ?  sub { parse_as_xml($r, $ctx, @_); } : $r,
         INCLUDE_PATH => $ctx->{template_paths},
@@ -54,10 +56,11 @@ sub handler {
         PLUGINS => {
             EGI18N => 'OpenILS::WWW::EGWeb::I18NFilter',
             CGI_utf8 => 'OpenILS::WWW::EGWeb::CGI_utf8'
-        }
+        },
+        FILTERS => {l => $text_handler}
     });
 
-    unless($tt->process($template, {ctx => $ctx, ENV => \%ENV, l => set_text_handler($ctx, $r)})) {
+    unless($tt->process($template, {ctx => $ctx, ENV => \%ENV, l => $text_handler})) {
         $r->log->warn('egweb: template error: ' . $tt->error);
         return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
     }
@@ -79,8 +82,7 @@ sub set_text_handler {
         $lh_cache{$locale} = $lh_cache{'en_US'};
     }
 
-    return $OpenILS::WWW::EGWeb::I18NFilter::maketext = 
-        sub { return $lh_cache{$locale}->maketext(@_); };
+    return sub { return $lh_cache{$locale}->maketext(@_); };
 }
 
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/I18NFilter.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/I18NFilter.pm
index cc931fa..6b6c6a8 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/I18NFilter.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/I18NFilter.pm
@@ -2,18 +2,11 @@ package OpenILS::WWW::EGWeb::I18NFilter;
 use Template::Plugin::Filter;
 use base qw(Template::Plugin::Filter);
 our $DYNAMIC = 1;
-our $maketext;
 
 sub filter {
     my ($self, $text, $args) = @_;
     return $maketext->($text, @$args);
 }
 
-sub init {
-    my $self = shift;
-    $self->install_filter('l');
-    return $self;
-}
-
 1;
 
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 581307d..f906e56 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -1,7 +1,6 @@
 [%- USE money = format(l('$%.2f'));
     USE date;
     USE CGI = CGI_utf8;
-    USE EGI18N;
     USE POSIX;
     SET DATE_FORMAT = l('%m/%d/%Y');
 

commit ca413e996425d831fb35ece615e1c869d5831b96
Author: Robin Isard <robin.isard at algomau.ca>
Date:   Sat Jul 30 15:33:44 2011 -0400

    Changed opac-auto-079 in semiauto.css to warning_box in templates/default/opac/myopac/hold_history.tt2, templates/default/opac/myopac/circ_history.tt2, templates/default/opac/myopac/circs.tt2, templates/default/opac/myopac/holds.tt2

diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index 9c44a43..2ec83d5 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -61,7 +61,7 @@
 .opac-auto-076 { margin-right: 3px; }
 .opac-auto-077 { margin-right: 4px; position: relative; top: -10px; }
 .qtype_selector_margin { margin-right: 7px; }
-.opac-auto-079 { margin-top: 10px; }
+.warning_box { margin-top: 10px; }
 .opac-auto-080 { margin-top: 10px; margin-bottom: 10px; }
 .opac-auto-081 { margin-top: 13px; }
 .opac-auto-082 { margin-top: 29px; }
diff --git a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
index a095558..9d88fe8 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
@@ -34,7 +34,7 @@
     <div class="clear-both"></div>
 
     [% IF ctx.circs.size < 1 %]
-    <div class="opac-auto-079">
+    <div class="warning_box">
         <big><strong>[% l('There are no items in your circulation history.') %]</strong></big>
     </div>
     [% ELSE %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index e9a9a8f..2275aff 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -23,7 +23,7 @@
     </div>
     <div class="clear-both"></div>
     [% IF ctx.circs.size < 1 %]
-    <div class="opac-auto-079">
+    <div class="warning_box">
         <big><strong>[% l('You have no items checked out.') %]</strong></big>
     </div>
     [% ELSE %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
index 43f3256..d3453d7 100644
--- a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
@@ -35,7 +35,7 @@
 
     <div id='holds_main'>
         [% IF ctx.holds.size < 1 %]
-        <div class="opac-auto-079">
+        <div class="warning_box">
             <big><strong>[% l('No holds found.') %]</strong></big>
         </div>
         [% ELSE %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index a6bb670..442a1df 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -81,7 +81,7 @@
             </tr>
         </table>
         [% IF ctx.holds.size < 1 %]
-        <div class="opac-auto-079">
+        <div class="warning_box">
             <big><strong>[% l('No holds found.') %]</strong></big>
         </div>
         [% ELSE %]

commit bf7f53b78da2430f786ad3695382b805e1272e49
Author: Robin Isard <robin.isard at algomau.ca>
Date:   Sat Jul 30 15:19:10 2011 -0400

    Changed opac-auto-097b in semiauto to item_list_padding  in templates/default/opac/parts/anon_list.tt2, templates/default/opac/myopac/lists.tt2, templates/default/opac/myopac/circs.tt2

diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index 03cd282..9c44a43 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -80,7 +80,7 @@
 .opac-auto-095 { padding: 5px 7px 0px 0px; white-space: nowrap; }
 .opac-auto-096 { padding: 6px }
 .opac-auto-097 { padding: 8px 0px 6px 0px; width: 100%; border: 0; }
-.opac-auto-097b { padding: 8px 0px 6px 0px; border: 0; }
+.item_list_padding { padding: 8px 0px 6px 0px; border: 0; }
 .opac-auto-098 { padding-bottom: 10px; }
 .opac-auto-099 { padding-bottom: 12px; color: #666; }
 .opac-auto-100 { padding-bottom: 16px; }
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 67f94b8..e9a9a8f 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -40,7 +40,7 @@
     <div id='checked_main'>
         <form method="POST" id="circ-form"
             onsubmit="return confirm('[% l("Are you sure you wish to renew the selected item(s)?") %]');">
-        <table cellpadding='0' cellspacing='0' class="opac-auto-097b">
+        <table cellpadding='0' cellspacing='0' class="item_list_padding">
             <tr>
                 <td>
                     <select name="action">
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index d533236..c15a19f 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -131,9 +131,9 @@
                         attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
                         PROCESS get_marc_attrs args=attrs %]
                     <tr>
-                        <td class="opac-auto-097b" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
-                        <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title %]</td>
-                        <td class="opac-auto-097b">[% attrs.author %]</td>
+                        <td class="item_list_padding" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
+                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.title %]</td>
+                        <td class="item_list_padding">[% attrs.author %]</td>
                     </tr>
                     [% END %]
                 </tbody>
diff --git a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2 b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
index 32081ff..7ffa997 100644
--- a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
@@ -50,11 +50,11 @@
                         attrs = {marc_xml => ctx.mylist_marc_xml.$item};
                         PROCESS get_marc_attrs args=attrs %]
                     <tr>
-                        <td class="opac-auto-097b" style="padding-left: 10px;">
+                        <td class="item_list_padding" style="padding-left: 10px;">
                             <input type="checkbox" name="record" value="[% item %]" />
                         </td>
-                        <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title %]</td>
-                        <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.author %]</td>
+                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.title %]</td>
+                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.author %]</td>
                     </tr>
                     [% END %]
                 </tbody>

commit d17123022c9847cb51e6f3492ebf5151bc152016
Author: Robin Isard <robin.isard at algomau.ca>
Date:   Sat Jul 30 14:42:26 2011 -0400

    Changed opac-auto-179 in semiauto.css to selector_actions_for_list and opac-auto-179-inner-option to selector_actions_for_list_inner_option in templates/default/opac/parts/anon_list.tt2 and templates/default/opac/myopac/lists.tt2

diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index fd09fad..03cd282 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -160,9 +160,9 @@
 .opac-auto-176 { width: 129px; }
 #search_box { width: 162px; }
 .opac-auto-178 { width: 174px; }
-.opac-auto-179 { width: 175px; margin-right: 11px; }
+.selector_actions_for_list { width: 175px; margin-right: 11px; }
 .opac-auto-179 optgroup { margin-left: 1em; font-weight: normal; font-style: italic; }
-.opac-auto-179-inner-option { margin-left: 2em; } /* XXX ".opac-auto-179 optgroup option" doesn't work!? */
+.selector_actions_for_list_inner_option { margin-left: 2em; } /* XXX ".opac-auto-179 optgroup option" doesn't work!? */
 .opac-auto-180 { width: 182px; color: black; padding: 5px 25px; }
 .opac-auto-181 { width: 195px; }
 .opac-auto-182 { width: 230px; text-align: left; margin-top: 3px; }
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index ba8d556..d533236 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -111,7 +111,7 @@
                         <td width="49%" style="padding-left: 5px;">[% l('Title') %]</td>
                         <td width="49%">[% l('Author(s)') %]</td>
                         <td width="1%" class="nowrap">
-                            <select class="opac-auto-179" name="action">
+                            <select class="selector_actions_for_list" name="action">
                                 <option>[% l('-- Actions for this list --') %]</option>
                                 <!-- XXX not ready yet<option value="hold">[% l('Place Hold') %]</option> -->
                                 <option value="del_item">[% l('Remove Items') %]</option>
diff --git a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2 b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
index 19a7440..32081ff 100644
--- a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
@@ -29,14 +29,14 @@
                         <td width="49%" style="padding-left:5px;">[% l('Title') %]</td>
                         <td width="49%" style="padding-left:5px;">[% l('Author(s)') %]</td>
                         <td width="1%" class="nowrap">
-                            <select class="opac-auto-179" name="action">
+                            <select class="selector_actions_for_list" name="action">
                                 <option>[% l('-- Actions for this list --') %]</option>
                                 <!-- XXX not ready <option value="hold">[% l('Place Hold') %]</option> -->
                                 <option value="delete">[% l('Remove Items') %]</option>
                                 [% IF ctx.user AND ctx.bookbags.size %]
                                 <optgroup label="Move selected items to">
                                     [% FOR bbag IN ctx.bookbags %]]
-                                    <option value="[% bbag.id %]" class="opac-auto-179-inner-option">[% bbag.name %]</option>
+                                    <option value="[% bbag.id %]" class="selector_actions_for_list_inner_option">[% bbag.name %]</option>
                                     [% END %]
                                 </optgroup>
                                 [% END %]

commit 0a798ae498e6ef48c2603dce2a91b0f0d024a0b4
Author: Robin Isard <robin.isard at algomau.ca>
Date:   Sat Jul 30 14:12:07 2011 -0400

    Changed opac-auto-017 in semiauto to adv_global_filter_sort in templates/default/opac/parts/advanced/search.tt2

diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index b911ad9..fd09fad 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -8,7 +8,7 @@
 .adv_global_input_container { border-bottom: none; }
 .opac-auto-013 { border-bottom: none; *height: 0px; }
 .opac-auto-015 { border-left: 1px solid #e9ebf3; padding-right: 27px; }
-.opac-auto-017 { border: none; width: 100%; }
+.adv_global_filter_sort { border: none; width: 100%; }
 .opac-auto-018 { border-top: 1px dotted #ccc; padding-top: 17px; }
 .clear-both { clear: both; }
 .common-no-pad { clear: both; height: 0px; margin: 0px; padding: 0px; }
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index 0ef3bff..448eca1 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -62,7 +62,7 @@
             </td>
             <td valign='top'>
             <strong>[% l("Sort Results") %]</strong>
-              <table class='opac-auto-017'>
+              <table class='adv_global_filter_sort'>
                 <tr>
                     <td align='center' width='100%'>
                         [% INCLUDE "default/opac/parts/filtersort.tt2"

commit 9a25bc82329cc3b97f60251c17190d5bd0b57c03
Author: Robin Isard <robin.isard at algomau.ca>
Date:   Sat Jul 30 13:58:33 2011 -0400

    Changed opac-auto-012 in semiauto to adv_global_input_container  in /default/opac/parts/advanced/search.tt2

diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index 377aa26..b911ad9 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -5,7 +5,7 @@
 .opac-auto-009 { border: 3px solid #E0E0E0; }
 .opac-auto-010 { border-bottom: 1px dotted #ccc; padding-top: 10px; }
 .opac-auto-011 { border-bottom: 1px dotted #ccc; padding-top: 6px; }
-.opac-auto-012 { border-bottom: none; }
+.adv_global_input_container { border-bottom: none; }
 .opac-auto-013 { border-bottom: none; *height: 0px; }
 .opac-auto-015 { border-left: 1px solid #e9ebf3; padding-right: 27px; }
 .opac-auto-017 { border: none; width: 100%; }
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index 788b571..0ef3bff 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -2,7 +2,7 @@
 <table id='adv_global_search' class='data_grid data_grid_center' width='100%'>
     <tr style='border-bottom: none;'>
         <!-- Contains the user-addable(?) rows to define search class, containment and text -->
-        <td valign='top' class='opac-auto-012'>
+        <td valign='top' class='adv_global_input_container'>
             <table width='100%' id='adv_global_input_table'>
                 <thead>
                     <tr>

commit 5693659e2d03becf354c0ebe43d691cfd0c560fa
Author: Robin Isard <robin.isard at algomau.ca>
Date:   Sat Jul 30 13:44:48 2011 -0400

    changed opac-auto-078 in semiauto to qtype_selector_margin in /default/opac/parts/advanced/global_row.tt2

diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index cc6df04..377aa26 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -60,7 +60,7 @@
 .opac-auto-075 { margin-right: 20px; }
 .opac-auto-076 { margin-right: 3px; }
 .opac-auto-077 { margin-right: 4px; position: relative; top: -10px; }
-.opac-auto-078 { margin-right: 7px; }
+.qtype_selector_margin { margin-right: 7px; }
 .opac-auto-079 { margin-top: 10px; }
 .opac-auto-080 { margin-top: 10px; margin-bottom: 10px; }
 .opac-auto-081 { margin-top: 13px; }
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
index ae8081e..90c14a5 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
@@ -13,7 +13,7 @@
         q = queries.shift; %]
 <tr[% IF loop.first %] id="adv_global_row"[% END %]>
     <td align='left' width='100%' nowrap='nowrap'>
-        <span class="opac-auto-078">
+        <span class="qtype_selector_margin">
             [% INCLUDE "default/opac/parts/qtype_selector.tt2"
                 query_type=qtype %]
         </span>

commit 933964c5c02332692f8725fb23764ed7e6df6852
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Jul 29 14:08:28 2011 -0400

    Clean up OpenSRF::AppSession objects after use
    
    These things need ->kill_me called on them after we're done using them.
    
    (note to self: check to see if we can just add a DESTROY sub to that
    package)
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index c0d8e64..fbdd904 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -225,15 +225,15 @@ sub fetch_user_holds {
 
     my $e = $self->editor;
 
-    my $circ = OpenSRF::AppSession->create('open-ils.circ');
-
     if(!$hold_ids) {
+        my $circ = OpenSRF::AppSession->create('open-ils.circ');
 
         $hold_ids = $circ->request(
             'open-ils.circ.holds.id_list.retrieve.authoritative', 
             $e->authtoken, 
             $e->requestor->id
         )->gather(1);
+        $circ->kill_me;
     
         $hold_ids = [ grep { defined $_ } @$hold_ids[$offset..($offset + $limit - 1)] ] if $limit or $offset;
     }
@@ -476,7 +476,7 @@ sub load_place_hold {
                 $ctx->{hold_failed} = 1;
                 $ctx->{hold_failed_event} = $usr;
             }
-            # XXX Does $actor need to be explicity disconnected/destroyed?
+            $actor->kill_me;
         }
 
         my $args = {
@@ -611,8 +611,6 @@ sub fetch_user_circs {
 
     return [] unless @circ_ids;
 
-    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
-
     my $qflesh = {
         flesh => 3,
         flesh_fields => {
@@ -980,6 +978,8 @@ sub prepare_fines {
         );
     }
 
+    $cstore->kill_me;
+
     $self->ctx->{"fines"}->{$_} /= 100.0 for (@total_keys);
     return;
 }
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index f7a86b5..5ec5db9 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -24,9 +24,11 @@ sub load_record {
 
     # run copy retrieval in parallel to bib retrieval
     # XXX unapi
-    my $copy_rec = OpenSRF::AppSession->create('open-ils.cstore')->request(
+    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
+    my $copy_rec = $cstore->request(
         'open-ils.cstore.json_query.atomic', 
-        $self->mk_copy_query($rec_id, $org, $depth, $copy_limit, $copy_offset));
+        $self->mk_copy_query($rec_id, $org, $depth, $copy_limit, $copy_offset)
+    );
 
     my (undef, @rec_data) = $self->get_records_and_facets([$rec_id], undef, {flesh => '{holdings_xml,mra}'});
     $ctx->{bre_id} = $rec_data[0]->{id};
@@ -39,6 +41,8 @@ sub load_record {
     $ctx->{have_holdings_to_show} = 0;
     $self->get_hold_copy_summary($rec_id, $org);
 
+    $cstore->kill_me;
+
     # XXX TODO we'll also need conditional logic to show MFHD-based holdings
     if (
         $ctx->{get_org_setting}->
@@ -173,12 +177,14 @@ sub mk_marc_html {
 sub get_holding_summaries {
     my ($self, $rec_id, $org, $depth) = @_;
 
-    return (
-        create OpenSRF::AppSession("open-ils.serial")->request(
-            "open-ils.serial.bib.summary_statements",
-            $rec_id, {"org_id" => $org, "depth" => $depth}
-        )->gather(1)
-    );
+    my $serial = create OpenSRF::AppSession("open-ils.serial");
+    my $result = $serial->request(
+        "open-ils.serial.bib.summary_statements",
+        $rec_id, {"org_id" => $org, "depth" => $depth}
+    )->gather(1);
+
+    $serial->kill_me;
+    return $result;
 }
 
 sub get_expanded_holdings {
@@ -188,7 +194,8 @@ sub get_expanded_holdings {
     my $holding_offset = int($self->cgi->param("holding_offset") || 0);
     my $type = $self->cgi->param("expand_holding_type");
 
-    return create OpenSRF::AppSession("open-ils.serial")->request(
+    my $serial =  create OpenSRF::AppSession("open-ils.serial");
+    my $result = $serial->request(
         "open-ils.serial.received_siss.retrieve.by_bib.atomic",
         $rec_id, {
             "ou" => $org, "depth" => $depth,
@@ -196,6 +203,9 @@ sub get_expanded_holdings {
             "type" => $type
         }
     )->gather(1);
+
+    $serial->kill_me;
+    return $result;
 }
 
 sub any_call_number_label {
@@ -223,6 +233,8 @@ sub prepare_browse_call_numbers {
         $cn, $org_unit->shortname, 9, $self->cgi->param("cnoffset")
     )->gather(1) || [];
 
+    $supercat->kill_me;
+
     $self->ctx->{browsed_call_numbers} = [
         map {
             $_->record->marc(
@@ -237,13 +249,16 @@ sub prepare_browse_call_numbers {
 sub get_hold_copy_summary {
     my ($self, $rec_id, $org) = @_;
     
-    my $req1 = OpenSRF::AppSession->create('open-ils.search')->request(
+    my $search = OpenSRF::AppSession->create('open-ils.search');
+    my $req1 = $search->request(
         'open-ils.search.biblio.record.copy_count', $org, $rec_id); 
 
     $self->ctx->{record_hold_count} = $U->simplereq(
         'open-ils.circ', 'open-ils.circ.bre.holds.count', $rec_id);
 
     $self->ctx->{copy_summary} = $req1->recv->content;
+
+    $search->kill_me;
 }
 
 1;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 96f150e..6397d84 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -237,6 +237,7 @@ sub item_barcode_shortcut {
         my $rec_ids = $search->request(
             $method, $self->cgi->param("query")
         )->gather(1);
+        $search->kill_me;
 
         if (ref $rec_ids ne 'ARRAY') {
 
@@ -304,6 +305,7 @@ sub marc_expert_search {
                 "searches" => $query, "org_unit" => $org_unit
             }, $limit, $offset
         )->gather(1);
+        $search->kill_me;
 
         if (defined $U->event_code($results)) {
             $self->apache->log->warn(
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 1245605..3ab34ff 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -212,6 +212,8 @@ sub get_records_and_facets {
         $facets = undef;
     }
 
+    $search->kill_me;
+
     return ($facets, @data);
 }
 

commit 7be480d13953efbd9b7ee4b91c4e0cf704b6663b
Merge: b8a2dde c5fe526
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Jul 29 12:34:26 2011 -0400

    Merge branch 'template-toolkit-opac' of git://git.evergreen-ils.org/evergreen/equinox into template-toolkit-opac


commit b8a2dde209effe413057e05cb4c616dacb78bd74
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Jul 29 12:33:52 2011 -0400

    Fix incorrect search advice on the no-results page.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2 b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
index 7526f1d..78679fc 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
@@ -22,7 +22,7 @@
             [% INCLUDE "default/opac/parts/result/lowhits_purchase.tt2" %]
             <p>
                 <strong>Keyword Search Tips</strong><br />
-                Change to <strong>Advanced Keyword Search.</strong>
+                Try changing to <strong>Advanced Search</strong>.
             </p>
             <p>
                 <strong>Adjacency</strong><br />
@@ -34,13 +34,17 @@
             <p>
                 <strong>Truncation</strong><br />
                 Words may be right-hand truncated using an asterisk. Use a single asterisk *
-                to truncate from 1-5 characters. Use a double asterisk ** for open-ended truncation.<br />
+                to truncate any number of characters.<br />
                 (example: <strong>environment* agency</strong>)
             </p>
             <p>
-                <strong>Wildcards</strong><br />
-                You may use a question mark to replace a single character anywhere within a word.<br />
-                example: <strong>wom?</strong>)
+                <strong>Anchored Searching</strong><br />
+                You may use ^ and $ to indicate "phrase begins with" and
+                "phrase ends with," respectively, within a search phrase
+                enclosed in quotation marks.<br />
+                (examples: <strong>"^harry"</strong> for phrases that begin with
+                the term <em>harry</em>.
+                <strong>"stone$"</strong> for phrases that end in <em>stone</em>.)
             </p>
         </div>
     </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/lowhits_purchase.tt2 b/Open-ILS/web/templates/default/opac/parts/result/lowhits_purchase.tt2
index 263269a..ff34338 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/lowhits_purchase.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/lowhits_purchase.tt2
@@ -1,6 +1,6 @@
-<p>
+[%# XXX Is this block generally desired? <p>
     <strong>Still not finding what you are looking for?</strong><br />
     Request that your library purchase the material you are looking for by making a
     <a href="javascript:;">Purchase Request</a><br />
     <strong>Note:</strong> You must be logged in to make a Purchase Request<br />
-</p>
+</p> %]
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/result/lowhits_purchase.tt2 b/Open-ILS/web/templates_kcls/default/opac/parts/result/lowhits_purchase.tt2
index a41f658..cdfde46 100644
--- a/Open-ILS/web/templates_kcls/default/opac/parts/result/lowhits_purchase.tt2
+++ b/Open-ILS/web/templates_kcls/default/opac/parts/result/lowhits_purchase.tt2
@@ -1,6 +1,6 @@
 <p>
     <strong>Still not finding what you are looking for?</strong><br />
     Request that KCLS purchase the material you are looking for by making a
-    <a href="javascript:;">Purchase Request</a><br />
+    <a href="http://www.kcls.org/usingthelibrary/request/">Purchase Request</a><br />
     <strong>Note:</strong> You must be logged in to make a Purchase Request<br />
 </p>

commit c5fe526c238637ef767d881c2ca7b93a90dfb9dd
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jul 29 12:24:46 2011 -0400

    advanced/cnbrowse label tweak
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
index c9515a1..f10d4aa 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
@@ -9,7 +9,7 @@
                     <option value="identifier|isbn">[% l('ISBN') %]</option>
                     <option value="identifier|issn">[% l('ISSN') %]</option>
                     <option value="identifier|bib_cn">[% l('Bib Call Number') %]</option>
-                    <option value="cnbrowse">[% l('Shelf Browse') %]</option>
+                    <option value="cnbrowse">[% l('Call Number (Shelf Browse)') %]</option>
                     <option value="identifier|lccn">[% l('LCCN') %]</option>
                     <option value="identifier|tcn">[% l('TCN') %]</option>
                     <option value="item_barcode">[% l('Item Barcode') %]</option>

commit a21deb11cc2c79ff70eab917d283dcf9dcab1e86
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jul 29 12:19:18 2011 -0400

    Prevent undef warnings on org unit lookup
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 8b12453..1245605 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -105,6 +105,7 @@ sub init_ro_object_cache {
     # Add a special handler for the tree-shaped org unit cache
     $ro_object_subs->{get_aou} = sub {
         my $org_id = shift;
+        return undef unless defined $org_id;
         $ro_object_subs->{aou_tree}->(); # force the org tree to load
         return $cache{map}{aou}{$org_id};
     };

commit eed404686d824ca66949833e11e38c84db100ba3
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Jul 29 12:11:22 2011 -0400

    cnbrowse tweaks
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index dd69b49..a58c132 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1019,3 +1019,4 @@ a.dash-link:hover { text-decoration: underline !important; }
     border-bottom: 1px dashed #999;
     padding-bottom: 1ex;
 }
+.cn_browse_item { padding: 2ex; }
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
index d842942..c9515a1 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
@@ -8,8 +8,8 @@
                 <select name="qtype">
                     <option value="identifier|isbn">[% l('ISBN') %]</option>
                     <option value="identifier|issn">[% l('ISSN') %]</option>
-                    <option value="identifier|bib_cn">[% l('Call Number') %]</option>
-                    <option value="cnbrowse">[% l('Call Number (Browse)') %]</option>
+                    <option value="identifier|bib_cn">[% l('Bib Call Number') %]</option>
+                    <option value="cnbrowse">[% l('Shelf Browse') %]</option>
                     <option value="identifier|lccn">[% l('LCCN') %]</option>
                     <option value="identifier|tcn">[% l('TCN') %]</option>
                     <option value="item_barcode">[% l('Item Barcode') %]</option>
diff --git a/Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2
index 8c31f0d..f79de8a 100644
--- a/Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2
@@ -4,7 +4,7 @@
     {value => "author", label => l("Author")},
     {value => "subject", label => l("Subject")},
     {value => "series", label => l("Series")},
-    {value => "id|bibcn", label => l("Call Number")}
+    {value => "id|bibcn", label => l("Bib Call Number")}
 ] %]
 <select name="qtype">
     [%  query_type = query_type || CGI.param('qtype');
diff --git a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
index c3a1cb4..d44c38d 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
@@ -29,9 +29,9 @@ END -%]
             <tbody id='cn_tbody'>
             [% tr_open = 0; FOR cn IN ctx.browsed_call_numbers %]
                 [%- IF loop.index % 3 == 0; tr_open = 1 %]
-                <tr id='cn_browse_row'>
+                <tr class='cn_browse_row'>
                 [% END -%]
-                    <td id='cn_browse_td' class='cn_browse_item' width='25%' valign='top'>
+                    <td class='cn_browse_item' width='25%' valign='top'>
                         [%  rec_attrs = {marc_xml => cn.record.marc};
                             PROCESS get_marc_attrs args=rec_attrs;
                             ident = rec_attrs.isbn_clean || rec_attrs.upc;

commit de5dfd465ccb50d4e3d54b837231e7aba463aef6
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Jul 29 11:51:26 2011 -0400

    Direct entry point into the call number browser
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 6097498..6412907 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -94,6 +94,7 @@ sub load {
 
     return $self->load_rresults if $path =~ m|opac/results|;
     return $self->load_record if $path =~ m|opac/record|;
+    return $self->load_cnbrowse if $path =~ m|opac/cnbrowse|;
 
     return $self->load_mylist_add if $path =~ m|opac/mylist/add|;
     return $self->load_mylist_move if $path =~ m|opac/mylist/move|;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index dbfad54..f7a86b5 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -62,9 +62,8 @@ sub load_record {
             $ctx->{expanded_holdings} =
                 $self->get_expanded_holdings($rec_id, $org, $depth);
         } elsif ($expand eq 'cnbrowse') {
-            $ctx->{browsed_call_numbers} = $self->browse_call_numbers();
+            $self->prepare_browse_call_numbers();
         }
-
     }
 
     return Apache2::Const::OK;
@@ -209,10 +208,10 @@ sub any_call_number_label {
     }
 }
 
-sub browse_call_numbers {
+sub prepare_browse_call_numbers {
     my ($self) = @_;
 
-    my $cn = $self->any_call_number_label or
+    my $cn = ($self->cgi->param("cn") || $self->any_call_number_label) or
         return [];
 
     my $org_unit = $self->ctx->{get_aou}->($self->cgi->param('loc')) ||
@@ -224,7 +223,7 @@ sub browse_call_numbers {
         $cn, $org_unit->shortname, 9, $self->cgi->param("cnoffset")
     )->gather(1) || [];
 
-    return [
+    $self->ctx->{browsed_call_numbers} = [
         map {
             $_->record->marc(
                 (new XML::LibXML)->parse_string($_->record->marc)
@@ -232,6 +231,7 @@ sub browse_call_numbers {
             $_;
         } @$results
     ];
+    $self->ctx->{browsing_ou} = $org_unit;
 }
 
 sub get_hold_copy_summary {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index f597001..96f150e 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -135,11 +135,15 @@ sub load_rresults {
 
     $ctx->{page} = 'rresult';
 
+    # Special alternative searches here.  This could all stand to be cleaner.
     if ($cgi->param("_special")) {
         return $self->marc_expert_search if scalar($cgi->param("tag"));
         return $self->item_barcode_shortcut if (
             $cgi->param("qtype") and ($cgi->param("qtype") eq "item_barcode")
         );
+        return $self->call_number_browse_standalone if (
+            $cgi->param("qtype") and ($cgi->param("qtype") eq "cnbrowse")
+        );
     }
 
     my $page = $cgi->param('page') || 0;
@@ -328,4 +332,29 @@ sub marc_expert_search {
     }
 }
 
+sub call_number_browse_standalone {
+    my ($self) = @_;
+
+    if (my $cnfrag = $self->cgi->param("query")) {
+        my $url = sprintf(
+            'http%s://%s%s/cnbrowse?cn=%s',
+            $self->cgi->https ? "s" : "",
+            $self->apache->hostname,
+            $self->ctx->{opac_root},
+            $cnfrag # XXX some kind of escaping needed here?
+        );
+        return $self->generic_redirect($url);
+    } else {
+        return $self->generic_redirect; # return to search page
+    }
+}
+
+sub load_cnbrowse {
+    my ($self) = @_;
+
+    $self->prepare_browse_call_numbers();
+
+    return Apache2::Const::OK;
+}
+
 1;
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 6a0a19a..dd69b49 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1015,3 +1015,7 @@ a.dash-link:hover { text-decoration: underline !important; }
 .rdetail-extras-summary { margin: 10px; }
 .staff-hold { background-color: #eee; }
 .expert-search tbody tr th { text-align: right; padding-left: 2em; }
+.bookshelf thead tr td {
+    border-bottom: 1px dashed #999;
+    padding-bottom: 1ex;
+}
diff --git a/Open-ILS/web/templates/default/opac/cnbrowse.tt2 b/Open-ILS/web/templates/default/opac/cnbrowse.tt2
new file mode 100644
index 0000000..b9c7453
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/cnbrowse.tt2
@@ -0,0 +1,21 @@
+[%  # This is the stand-alone call-number browser.  This mainly wraps around
+    # the same guts as the "shelf browser" part of a record results page.
+
+    PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
+    WRAPPER "default/opac/parts/base.tt2";
+    INCLUDE "default/opac/parts/topnav.tt2";
+    ctx.page_title = l("Call Number Browse"); %]
+    <div id="search-wrapper">
+        [% INCLUDE "default/opac/parts/printnav.tt2" %]
+        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content">
+            <div class="cnbrowse_div">
+                [% INCLUDE "default/opac/parts/record/cnbrowse.tt2" %]
+            </div>
+            <div class="common-full-pad"></div>	
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
index c2a1d3d..d842942 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
@@ -9,6 +9,7 @@
                     <option value="identifier|isbn">[% l('ISBN') %]</option>
                     <option value="identifier|issn">[% l('ISSN') %]</option>
                     <option value="identifier|bib_cn">[% l('Call Number') %]</option>
+                    <option value="cnbrowse">[% l('Call Number (Browse)') %]</option>
                     <option value="identifier|lccn">[% l('LCCN') %]</option>
                     <option value="identifier|tcn">[% l('TCN') %]</option>
                     <option value="item_barcode">[% l('Item Barcode') %]</option>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
index 88e4fbf..c3a1cb4 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
@@ -1,20 +1,26 @@
+[%- IF ctx.page == "record";
+    prev_next_root = "/record/" _ ctx.bre_id _ extras_propagator;
+ELSE;
+    cn = CGI.param('cn') | uri;
+    prev_next_root = "/cnbrowse?cn=" _ cn;
+END -%]
 <div id='cn_browse' class='cn_browser'>
     <div id='cn_browse_div'> 
         <div class='color_4'>
             <span>[% l("You are now browsing") %]</span>
-            <strong>[% ctx.get_aou(CGI.param('loc')).name %]</strong>
+            <strong>[% ctx.browsing_ou.name %]</strong>
         </div>
         <table class='data_grid bookshelf' width='100%'>
             <thead>
                 <tr>
                     <td>
-                        <a id='cn_browse_prev' class='classic_link' href="[% ctx.opac_root %]/record/[% ctx.bre_id _ extras_propagator _ '&amp;cnoffset=' _ ((CGI.param('cnoffset') || 0) - 1) _ '&amp;expand=cnbrowse#cnbrowse' %]"<b>[%
+                        <a id='cn_browse_prev' class='classic_link' href="[% ctx.opac_root _ prev_next_root _ '&amp;cnoffset=' _ ((CGI.param('cnoffset') || 0) - 1) _ '&amp;expand=cnbrowse#cnbrowse' %]"<b>[%
                             l("&lt;&lt; Previous Page")
                         %]</b></a>
                     </td>
                     <td colspan='1' align='center'>[% l("Shelf Browser") %]</td>
                     <td>
-                        <a id='cn_browse_next' class='classic_link' href="[% ctx.opac_root %]/record/[% ctx.bre_id _ extras_propagator _ '&amp;cnoffset=' _ ((CGI.param('cnoffset') || 0) + 1) _ '&amp;expand=cnbrowse#cnbrowse' %]"<b>[%
+                        <a id='cn_browse_next' class='classic_link' href="[% ctx.opac_root _ prev_next_root _ '&amp;cnoffset=' _ ((CGI.param('cnoffset') || 0) + 1) _ '&amp;expand=cnbrowse#cnbrowse' %]"<b>[%
                             l("Next Page &gt;&gt;")
                         %]</b></a>
                     </td>

commit 1b044475a898838b57bbf92235303e8f2e5c1516
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Thu Jul 28 16:59:59 2011 -0400

    If there's no sort org unit, just fall back to the usual sorting
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index f3391dd..dbfad54 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -78,12 +78,6 @@ sub mk_copy_query {
     my $copy_limit = shift;
     my $copy_offset = shift;
 
-    # XXX In the future, $sort_org should be understood to be an abstration
-    # that refers to something configurable, not necessariyl orig_loc.
-
-    my $sort_org = $self->ctx->{orig_loc} || $org ||
-        $self->ctx->{aou_tree}->()->id;
-
     my $query = {
         select => {
             acp => ['id', 'barcode', 'circ_lib', 'create_date', 'age_protect', 'holdable'],
@@ -139,8 +133,6 @@ sub mk_copy_query {
 
         # Order is: copies with circ_lib=org, followed by circ_lib name, followed by call_number label
         order_by => [
-            {class => 'acp', field => 'circ_lib', transform => 'numeric_eq',
-                params => [$sort_org], direction => 'desc'},
             {class => 'aou', field => 'name'}, 
             {class => 'acn', field => 'label'}
         ],
@@ -149,6 +141,16 @@ sub mk_copy_query {
         offset => $copy_offset
     };
 
+    # XXX In the future, $sort_org should be understood to be an abstration
+    # that refers to something configurable, not necessariyl orig_loc.
+
+    if (my $sort_org = $self->ctx->{orig_loc}) {
+        unshift @{$query->{order_by}}, {
+            class => 'acp', field => 'circ_lib', transform => 'numeric_eq',
+            params => [$sort_org], direction => 'desc'
+        };
+    }
+
     # Filter hidden items if this is the public catalog
     unless($self->ctx->{is_staff}) { 
         $query->{where}->{'+acp'}->{opac_visible} = 't';

commit 49be9ddaaf25b1c8490fdfad1eebd16aca68aa9b
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Thu Jul 28 16:46:12 2011 -0400

    Don't build image tags for non-existing mattype icons
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index b8e3e9c..f9ebae3 100644
--- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -48,7 +48,7 @@
         FOR icon_style IN ['mattype', 'item_type']; 
             node = xml.findnodes(
                 '//*[local-name()="attributes"]/*[local-name()="field"][@name="' _ icon_style _ '"]');
-            IF node;
+            IF node AND node.textContent;
                 args.format_label = node.getAttribute('coded-value')
                 args.format_icon = ctx.media_prefix _ '/images/format_icons/' _ icon_style _ '/' _ node.textContent _ '.png';
                 LAST;

commit d919f613d89962f1b1ac457b16d3e1cc40e40c63
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Thu Jul 28 16:37:19 2011 -0400

    Sort copies on record detail page with copies belonging to "sort org unit" first
    
    "sort org unit" needs to eventually be an abstract concept that could
    either refer to "orig_loc" or to "loc" or perhaps be skipped altogether,
    depending on some future configuration.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index e5743bc..6097498 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -259,7 +259,7 @@ sub get_orig_loc {
         return $orig_loc;
     }
 
-    return $self->cgi->cookie('orig_loc');
+    return $self->cgi->cookie(COOKIE_ORIG_LOC);
 }
 
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index a1f6777..f3391dd 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -78,6 +78,12 @@ sub mk_copy_query {
     my $copy_limit = shift;
     my $copy_offset = shift;
 
+    # XXX In the future, $sort_org should be understood to be an abstration
+    # that refers to something configurable, not necessariyl orig_loc.
+
+    my $sort_org = $self->ctx->{orig_loc} || $org ||
+        $self->ctx->{aou_tree}->()->id;
+
     my $query = {
         select => {
             acp => ['id', 'barcode', 'circ_lib', 'create_date', 'age_protect', 'holdable'],
@@ -133,6 +139,8 @@ sub mk_copy_query {
 
         # Order is: copies with circ_lib=org, followed by circ_lib name, followed by call_number label
         order_by => [
+            {class => 'acp', field => 'circ_lib', transform => 'numeric_eq',
+                params => [$sort_org], direction => 'desc'},
             {class => 'aou', field => 'name'}, 
             {class => 'acn', field => 'label'}
         ],

commit 8e66305213488f6d9c9522304231f9a10af951e9
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Thu Jul 28 15:12:28 2011 -0400

    item_barcode had broken the rest of numeric search
    
    but now it's fixed
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index a1aa2e6..f597001 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -140,10 +140,8 @@ sub load_rresults {
         return $self->item_barcode_shortcut if (
             $cgi->param("qtype") and ($cgi->param("qtype") eq "item_barcode")
         );
-        return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
     }
 
-
     my $page = $cgi->param('page') || 0;
     my $facet = $cgi->param('facet');
     my $limit = $self->_get_search_limit;

commit f1354ab6e51eb65b63b4852c6b700897e0da7f8e
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jul 28 14:32:35 2011 -0400

    Minor code cleanup of unused code; avoids Apache warning
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
index 926504e..f2fbbe6 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
@@ -29,5 +29,4 @@
             onclick='return killRowIfAtLeast(2, this);'><img src="[% ctx.media_prefix %]/images/adv_row_close_btn.png" /></a>
     </td>
 </tr>
-[%      i = i + 1;
-    END %]
+[% END %]

commit a05001a49f341e7440672d7d15b8ff0a9590c42a
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jul 28 14:31:31 2011 -0400

    Avoid server-error on barcode search when barcode not found
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index f9594b3..a1aa2e6 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -237,16 +237,22 @@ sub item_barcode_shortcut {
         )->gather(1);
 
         if (ref $rec_ids ne 'ARRAY') {
-            if (defined $U->event_code($rec_ids)) {
-                $self->apache->log->warn(
-                    "$method returned event: " . $U->event_code($rec_ids)
-                );
+
+            if($U->event_equals($rec_ids, 'ASSET_COPY_NOT_FOUND')) {
+                $rec_ids = [];
+
             } else {
-                $self->apache->log->warn(
-                    "$method returned something unexpected: $rec_ids"
-                );
+                if (defined $U->event_code($rec_ids)) {
+                    $self->apache->log->warn(
+                        "$method returned event: " . $U->event_code($rec_ids)
+                    );
+                } else {
+                    $self->apache->log->warn(
+                        "$method returned something unexpected: $rec_ids"
+                    );
+                }
+                return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
             }
-            return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
         }
 
         my ($facets, @data) = $self->get_records_and_facets(
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 139cf5f..9b2d242 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -11,7 +11,7 @@
     END;
 
     page = CGI.param('page') || 0;
-    page_count = POSIX.ceil(ctx.hit_count / ctx.page_size);
+    page_count = ctx.page_size == 0 ? 1 : POSIX.ceil(ctx.hit_count / ctx.page_size);
 %]
     <form action="[% ctx.opac_root %]/results" method="GET">
     <div id="search-wrapper">

commit 4f6a71d14f7a88fa0b52e141b165508dce891ee2
Merge: 553527a def24ba
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jul 28 11:39:09 2011 -0400

    Merge branch 'template-toolkit-opac' of git.evergreen-ils.org:evergreen/equinox into template-toolkit-opac


commit 553527a256d00c7914e21291634b214add46941d
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jul 28 11:36:23 2011 -0400

    Redirector support for T-pac
    
    Includes new Apache configuration option:
    
    PerlSetVar OILSRedirectTpac "true"
    
    "Original location" is tracked initially as a URL param (orig_loc), but
    is ultimately absorbed into a cookie (eg_orig_loc) since the URL param
    would otherwise have to be propagated to every page.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf
index e0571c8..48a259c 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf
+++ b/Open-ILS/examples/apache/eg_vhost.conf
@@ -20,6 +20,8 @@ RedirectMatch 301 ^/$ /opac/en-US/skin/default/xml/index.xml
 #    # OILSRedirectDepth defaults to the depth of the branch that the OPAC was directed to
 #    #PerlSetVar OILSRedirectDepth "0"
 #    #PerlSetVar OILSRedirectLocale "en-US"
+#    # Use the template-toolkit opac
+#    #PerlSetVar OILSRedirectTpac "true"
 #    allow from all
 #</LocationMatch>
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index fe5074e..e5743bc 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -25,6 +25,7 @@ use OpenILS::WWW::EGCatLoader::Container;
 my $U = 'OpenILS::Application::AppUtils';
 
 use constant COOKIE_SES => 'ses';
+use constant COOKIE_ORIG_LOC => 'eg_orig_loc';
 
 sub new {
     my($class, $apache, $ctx) = @_;
@@ -210,6 +211,7 @@ sub load_common {
     $ctx->{unparsed_uri} = $self->apache->unparsed_uri;
     $ctx->{opac_root} = $ctx->{base_path} . "/opac"; # absolute base url
     $ctx->{is_staff} = ($self->apache->headers_in->get('User-Agent') =~ /oils_xulrunner/);
+    $ctx->{orig_loc} = $self->get_orig_loc;
 
     # capture some commonly accessed pages
     $ctx->{home_page} = 'http://' . $self->apache->hostname . $self->ctx->{opac_root} . "/home";
@@ -240,6 +242,27 @@ sub load_common {
     return Apache2::Const::OK;
 }
 
+# orig_loc (i.e. "original location") passed in as a URL 
+# param will replace any existing orig_loc stored as a cookie.
+sub get_orig_loc {
+    my $self = shift;
+
+    if(my $orig_loc = $self->cgi->param('orig_loc')) {
+        $self->apache->headers_out->add(
+            "Set-Cookie" => $self->cgi->cookie(
+                -name => COOKIE_ORIG_LOC,
+                -path => $self->ctx->{base_path},
+                -value => $orig_loc,
+                -expires => undef
+            )
+        );
+        return $orig_loc;
+    }
+
+    return $self->cgi->cookie('orig_loc');
+}
+
+
 
 # -----------------------------------------------------------------------------
 # Log in and redirect to the redirect_to URL (or home)
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index b6b4ed2..922f7e1 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -9,9 +9,9 @@ use Apache2::Log;
 use OpenSRF::EX qw(:try);
 use OpenILS::Utils::CStoreEditor;
 
-use constant OILS_HTTP_COOKIE_SKIN => 'oils:skin';
-use constant OILS_HTTP_COOKIE_THEME => 'oils:theme';
-use constant OILS_HTTP_COOKIE_LOCALE => 'oils:locale';
+use constant OILS_HTTP_COOKIE_SKIN => 'eg_skin';
+use constant OILS_HTTP_COOKIE_THEME => 'eg_theme';
+use constant OILS_HTTP_COOKIE_LOCALE => 'eg_locale';
 
 my $web_config;
 my $web_config_file;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm
index c76cbf3..99667d0 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm
@@ -51,53 +51,90 @@ sub parse_ips_file {
 }
 
 
+my %org_cache;
 sub handler {
+	my $apache = shift;
 
+	my $cgi = CGI->new( $apache );
+	my $port = $cgi->server_port();
+	my $hostname = $cgi->server_name();
+    my $proto = ($cgi->https) ? 'https' : 'http';
 	my $user_ip = $ENV{REMOTE_ADDR};
-	my $apache_obj = shift;
-	my $cgi = CGI->new( $apache_obj );
 
+    # Apache config values
+	my $skin = $apache->dir_config('OILSRedirectSkin') || 'default';
+	my $depth = $apache->dir_config('OILSRedirectDepth');
+	my $locale = $apache->dir_config('OILSRedirectLocale') || 'en-US';
+    my $use_tt = ($apache->dir_config('OILSRedirectTpac') || '') =~ /true/i;
+    my $orig_loc;
 
-	my $skin = $apache_obj->dir_config('OILSRedirectSkin') || 'default';
-	my $depth = $apache_obj->dir_config('OILSRedirectDepth');
-	my $locale = $apache_obj->dir_config('OILSRedirectLocale') || 'en-US';
+    $apache->log->debug("Redirector sees client frim $user_ip");
 
-	my $hostname = $cgi->server_name();
-	my $port		= $cgi->server_port();
+    # parse the IP file
+	my ($shortname, $nskin, $nhostname) = redirect_libs($user_ip);
 
-	my $proto = "http";
-	if($cgi->https) { $proto = "https"; }
+	if ($shortname) { # we have a config
 
-	my $url = "$proto://$hostname:$port/opac/$locale/skin/$skin/xml/index.xml";
-	my $path = $apache_obj->path_info();
+        # Read any override vars from the ips txt file
+		if ($nskin =~ m/[^\s]/) { $skin = $nskin; }
+		if ($nhostname =~ m/[^\s]/) { $hostname = $nhostname; }
 
-	$logger->debug("Apache client connecting from $user_ip");
+        if($org_cache{$shortname}) {
+            $orig_loc = $org_cache{$shortname};
 
-	my ($shortname, $nskin, $nhostname) = redirect_libs($user_ip);
-	if ($shortname) {
+        } else {
 
-		if ($nskin =~ m/[^\s]/) { $skin = $nskin; }
-		if ($nhostname =~ m/[^\s]/) { $hostname = $nhostname; }
+		    my $session = OpenSRF::AppSession->create("open-ils.actor");
+		    my $org = $session->request(
+                'open-ils.actor.org_unit.retrieve_by_shortname',
+			    $shortname)->gather(1);
+
+            $org_cache{$shortname} = $orig_loc = $org->id if $org;
+        }
+	}
 
-		$logger->info("Apache redirecting $user_ip to $shortname with skin $skin and host $hostname");
-		my $session = OpenSRF::AppSession->create("open-ils.actor");
+    my $url = "$proto://$hostname:$port";
 
-		$url = "$proto://$hostname:$port/opac/$locale/skin/$skin/xml/index.xml";
+    if($use_tt) {
 
-		my $org = $session->request(
-            'open-ils.actor.org_unit.retrieve_by_shortname',
-			 $shortname)->gather(1);
+        $url .= "/eg/opac/home";
+        $url .= "?orig_loc=$orig_loc" if $orig_loc;
 
-		if($org) { 
-            $url .= "?ol=" . $org->id; 
+=head potential locale/skin implementation
+        if($locale ne 'en-US') {
+            $apache->headers_out->add(
+                "Set-Cookie" => $cgi->cookie(
+                    -name => "oils:locale", # see EGWeb.pm
+                    -path => "/eg",
+                    -value => $locale,
+                    -expires => undef
+                )
+            );
+        }
+
+        if($skin ne 'default') {
+            $apache->headers_out->add(
+                "Set-Cookie" => $cgi->cookie(
+                    -name => "oils:skin", # see EGWeb.pm
+                    -path => "/eg",
+                    -value => $skin,
+                    -expires => undef
+                )
+            );
+        }
+=cut
+
+    } else {
+        $url .= "/opac/$locale/skin/$skin/xml/index.xml";
+        if($orig_loc) {
+            $url .= "?ol=" . $orig_loc;
             $url .= "&d=$depth" if defined $depth;
         }
-	}
+    }
 
-	print "Location: $url\n\n"; 
+    $logger->info("Apache redirecting $user_ip to $url");
+    $apache->headers_out->add('Location' => "$url");
 	return Apache2::Const::REDIRECT;
-
-	return print_page($url);
 }
 
 sub redirect_libs {
@@ -113,7 +150,7 @@ sub redirect_libs {
                 my $range = new Net::IP( $block->[0] . ' - ' . $block->[1] );
                 if( $source_ip->overlaps($range)==$IP_A_IN_B_OVERLAP ||
                     $source_ip->overlaps($range)==$IP_IDENTICAL ) {
-                    return ($shortname, $block->[2], $block->[3]);
+                    return ($shortname, $block->[2] || '', $block->[3] || '');
                 }
             }
         }
@@ -121,40 +158,4 @@ sub redirect_libs {
 	return 0;
 }
 
-
-sub print_page {
-
-	my $url = shift;
-
-	print "Content-type: text/html; charset=utf-8\n\n";
-	print <<"	HTML";
-	<html>
-		<head>
-			<meta HTTP-EQUIV='Refresh' CONTENT="0; URL=$url"/> 
-			<style  TYPE="text/css">
-				.loading_div {
-					text-align:center;
-					margin-top:30px;
-				font-weight:bold;
-						background: lightgrey;
-					color:black;
-					width:100%;
-				}
-			</style>
-		</head>
-		<body>
-			<br/><br/>
-			<div class="loading_div">
-				<h4>Loading...</h4>
-			</div>
-			<br/><br/>
-			<center><img src='/opac/images/main_logo.jpg'/></center>
-		</body>
-	</html>
-	HTML
-
-	return Apache2::Const::OK;
-}
-
-
 1;

commit def24badbf3c3074a621efa054bb8b334cd866d7
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Thu Jul 28 11:10:47 2011 -0400

    You can now have multiple rows in your MARC Expert Search
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 2a9e5cd..f9594b3 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -6,6 +6,8 @@ use OpenILS::Utils::CStoreEditor qw/:funcs/;
 use OpenILS::Utils::Fieldmapper;
 use OpenILS::Application::AppUtils;
 use OpenSRF::Utils::JSON;
+use Data::Dumper;
+$Data::Dumper::Indent = 0;
 my $U = 'OpenILS::Application::AppUtils';
 
 
@@ -274,12 +276,14 @@ sub marc_expert_search {
 
     my $query = [];
     for (my $i = 0; $i < scalar @tags; $i++) {
+        next if ($tags[$i] eq "" || $subfields[$i] eq "" || $terms[$i] eq "");
         push @$query, {
             "term" => $terms[$i],
             "restrict" => [{"tag" => $tags[$i], "subfield" => $subfields[$i]}]
         };
     }
 
+    $logger->info("query for expert search: " . Dumper($query));
     # loc, limit and offset
     my $page = $self->cgi->param("page") || 0;
     my $limit = $self->_get_search_limit;
diff --git a/Open-ILS/web/js/ui/default/opac/simple.js b/Open-ILS/web/js/ui/default/opac/simple.js
index d80b108..eaa11e2 100644
--- a/Open-ILS/web/js/ui/default/opac/simple.js
+++ b/Open-ILS/web/js/ui/default/opac/simple.js
@@ -14,7 +14,7 @@ function addClass(node, cls) {
 function unHideMe(node) { removeClass(node, "hide_me"); }
 function hideMe(node) { addClass(node, "hide_me"); }
 
-var _search_row_template;
+var _search_row_template, _expert_row_template;
 function addSearchRow() {
     if (!_search_row_template) {
         t = $("adv_global_row").cloneNode(true);
@@ -27,6 +27,23 @@ function addSearchRow() {
         $("adv_global_addrow")
     );
 }
+function addExpertRow() {
+    if (!_expert_row_template) {
+        t = $("adv_expert_row").cloneNode(true);
+        t.id = null;
+        _expert_row_template = t;
+    }
+
+    $("adv_expert_rows_here").appendChild(
+        _expert_row_template.cloneNode(true)
+    );
+}
+function killRowIfAtLeast(min, link) {
+    var row = link.parentNode.parentNode;
+    if (row.parentNode.getElementsByTagName("tr").length > min)
+        row.parentNode.removeChild(row);
+    return false;
+}
 function print_node(node_id) {
     var iframe = document.createElement("iframe");
     var source_node = document.getElementById(node_id);
@@ -38,7 +55,7 @@ function print_node(node_id) {
      * hurt FF/Chrome. */
     iwin.document.open();
     iwin.document.write(    /* XXX make better/customizable? */
-        "<html><head><title>Recipt</title></head><body></body></html>"
+        "<html><head><title>Receipt</title></head><body></body></html>"
     );
     iwin.document.close();
 
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2
index 640b4f2..935da51 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2
@@ -2,19 +2,24 @@
     <div class="header_middle">[% l("Expert Search") %]</div>
     <input type="hidden" name="_special" value="1" />
     <table class="expert-search">
-        <tbody id="rows_here">
-            <tr id="clone_this">
+        <tbody id="adv_expert_rows_here">
+            <tr id="adv_expert_row">
                 <th>[% l("Tag:") %]</th>
                 <td><input type="text" name="tag" size="3" /></td>
                 <th>[% l("Subfield:") %]</th>
                 <td><input type="text" name="subfield" size="1" /></td>
                 <th>[% l("Value:") %]</th>
                 <td><input type="text" name="term" size="16" /></td>
+                <td>
+                    <a href="javascript:;" class="row-remover"
+                        title="[% l('Remove row') %]" alt="[% l('Remove row') %]"
+                        onclick='return killRowIfAtLeast(1, this);'><img src="[% ctx.media_prefix %]/images/adv_row_close_btn.png" /></a>
+                </td>
             </tr>
         </tbody>
         <tfoot>
             <tr>
-                <td colspan="2"><a href="javascript:alert('XXX coming soon');">[ [% l("Add row") %] ]</a></td>
+                <td colspan="2"><a href="javascript:addExpertRow();">[ [% l("Add row") %] ]</a></td>
                 <td colspan="4">
                     <input type="image" src="[% ctx.media_prefix %]/images/search_btn.gif" alt="[% l('Search') %]" title="[% l('Search') %]" />
                 </td>
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
index ae8081e..926504e 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
@@ -26,7 +26,7 @@
         <input type='text' size='18' name='query' value="[% q | html %]" />
         <a href="javascript:;" class="row-remover"
             title="[% l('Remove row') %]" alt="[% l('Remove row') %]"
-            onclick='var row = this.parentNode.parentNode;var tbody = row.parentNode; if( tbody.getElementsByTagName("tr").length > 2 ) row.parentNode.removeChild(row);'><img src="[% ctx.media_prefix %]/images/adv_row_close_btn.png" /></a>
+            onclick='return killRowIfAtLeast(2, this);'><img src="[% ctx.media_prefix %]/images/adv_row_close_btn.png" /></a>
     </td>
 </tr>
 [%      i = i + 1;
diff --git a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2 b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
index c66b114..7526f1d 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
@@ -2,7 +2,7 @@
     <div id="zero_search_hits">
         <div>
             <p>[% l('Sorry, no entries were found for') %]
-                [% IF is_advanced; l('your search'); ELSE %]
+                [% IF is_advanced OR is_special; l('your search'); ELSE %]
                 <q>[% CGI.param('query') | html %]</q>
                 [% END %]
                 <br />

commit 184d671809b79efc6c8a00e8fcf805c29c676816
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Wed Jul 27 18:21:31 2011 -0400

    MARC expert search working
    
    This just needs the JS row cloning so you can search on multiple terms
    at a time.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index ea33fa0..2a9e5cd 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -133,7 +133,14 @@ sub load_rresults {
 
     $ctx->{page} = 'rresult';
 
-    return $self->item_barcode_shortcut if $cgi->param("qtype") eq "item_barcode";
+    if ($cgi->param("_special")) {
+        return $self->marc_expert_search if scalar($cgi->param("tag"));
+        return $self->item_barcode_shortcut if (
+            $cgi->param("qtype") and ($cgi->param("qtype") eq "item_barcode")
+        );
+        return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+    }
+
 
     my $page = $cgi->param('page') || 0;
     my $facet = $cgi->param('facet');
@@ -255,4 +262,62 @@ sub item_barcode_shortcut {
         return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
     }
 }
+
+# like item_barcode_search, this can't take all the usual search params, but
+# this one will at least do site, limit and page
+sub marc_expert_search {
+    my ($self) = @_;
+
+    my @tags = $self->cgi->param("tag");
+    my @subfields = $self->cgi->param("subfield");
+    my @terms = $self->cgi->param("term");
+
+    my $query = [];
+    for (my $i = 0; $i < scalar @tags; $i++) {
+        push @$query, {
+            "term" => $terms[$i],
+            "restrict" => [{"tag" => $tags[$i], "subfield" => $subfields[$i]}]
+        };
+    }
+
+    # loc, limit and offset
+    my $page = $self->cgi->param("page") || 0;
+    my $limit = $self->_get_search_limit;
+    my $org_unit = $self->cgi->param("loc") || $self->ctx->{aou_tree}->()->id;
+    my $offset = $page * $limit;
+
+    if (my $search = create OpenSRF::AppSession("open-ils.search")) {
+        my $results = $search->request(
+            "open-ils.search.biblio.marc", {
+                "searches" => $query, "org_unit" => $org_unit
+            }, $limit, $offset
+        )->gather(1);
+
+        if (defined $U->event_code($results)) {
+            $self->apache->log->warn(
+                "open-ils.search.biblio.marc returned event: " .
+                $U->event_code($results)
+            );
+            return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+        }
+
+        my ($facets, @data) = $self->get_records_and_facets(
+            # filter out nulls that will turn up here
+            [ grep { $_ } @{$results->{ids}} ],
+            undef, {flesh => "{holdings_xml,mra}"}
+        );
+
+        $self->ctx->{records} = [@data];
+        $self->ctx->{search_facets} = {};
+
+        $self->ctx->{page_size} = $limit;
+        $self->ctx->{hit_count} = $results->{count};
+
+        return Apache2::Const::OK;
+    } else {
+        $self->apache->log->warn("couldn't connect to open-ils.search");
+        return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+    }
+}
+
 1;
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 6ea13c5..6a0a19a 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1014,3 +1014,4 @@ a.dash-link:hover { text-decoration: underline !important; }
 .invisible { visibility: hidden; }
 .rdetail-extras-summary { margin: 10px; }
 .staff-hold { background-color: #eee; }
+.expert-search tbody tr th { text-align: right; padding-left: 2em; }
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2
index 35b11ab..640b4f2 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2
@@ -1,3 +1,24 @@
-<!-- <form id="adv_search_form" action="[% ctx.opac_root %]/results" method="GET"> -->
+<form id="adv_search_form" action="[% ctx.opac_root %]/results" method="GET">
     <div class="header_middle">[% l("Expert Search") %]</div>
-<!-- </form> -->
+    <input type="hidden" name="_special" value="1" />
+    <table class="expert-search">
+        <tbody id="rows_here">
+            <tr id="clone_this">
+                <th>[% l("Tag:") %]</th>
+                <td><input type="text" name="tag" size="3" /></td>
+                <th>[% l("Subfield:") %]</th>
+                <td><input type="text" name="subfield" size="1" /></td>
+                <th>[% l("Value:") %]</th>
+                <td><input type="text" name="term" size="16" /></td>
+            </tr>
+        </tbody>
+        <tfoot>
+            <tr>
+                <td colspan="2"><a href="javascript:alert('XXX coming soon');">[ [% l("Add row") %] ]</a></td>
+                <td colspan="4">
+                    <input type="image" src="[% ctx.media_prefix %]/images/search_btn.gif" alt="[% l('Search') %]" title="[% l('Search') %]" />
+                </td>
+            </tr>
+        </tfoot>
+    </table>
+</form>

commit 51ff52adfad0edd97a51a0fc1cc8ae4f4e1ba315
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Wed Jul 27 17:31:30 2011 -0400

    It's ugly and hacky, but numeric search fully works (item barcode included)
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index d445250..ea33fa0 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -132,6 +132,9 @@ sub load_rresults {
     my $e = $self->editor;
 
     $ctx->{page} = 'rresult';
+
+    return $self->item_barcode_shortcut if $cgi->param("qtype") eq "item_barcode";
+
     my $page = $cgi->param('page') || 0;
     my $facet = $cgi->param('facet');
     my $limit = $self->_get_search_limit;
@@ -213,4 +216,43 @@ sub load_rresults {
     return Apache2::Const::OK;
 }
 
+# Searching by barcode is a special search that does /not/ respect any other
+# of the usual search parameters, not even the ones for sorting and paging!
+sub item_barcode_shortcut {
+    my ($self) = @_;
+
+    my $method = "open-ils.search.multi_home.bib_ids.by_barcode";
+    if (my $search = create OpenSRF::AppSession("open-ils.search")) {
+        my $rec_ids = $search->request(
+            $method, $self->cgi->param("query")
+        )->gather(1);
+
+        if (ref $rec_ids ne 'ARRAY') {
+            if (defined $U->event_code($rec_ids)) {
+                $self->apache->log->warn(
+                    "$method returned event: " . $U->event_code($rec_ids)
+                );
+            } else {
+                $self->apache->log->warn(
+                    "$method returned something unexpected: $rec_ids"
+                );
+            }
+            return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+        }
+
+        my ($facets, @data) = $self->get_records_and_facets(
+            $rec_ids, undef, {flesh => "{holdings_xml,mra}"}
+        );
+
+        $self->ctx->{records} = [@data];
+        $self->ctx->{search_facets} = {};
+        $self->ctx->{hit_count} = scalar @data;
+        $self->ctx->{page_size} = $self->ctx->{hit_count};
+
+        return Apache2::Const::OK;
+    } {
+        $self->apache->log->warn("couldn't connect to open-ils.search");
+        return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+    }
+}
 1;
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
index 8835a5c..c2a1d3d 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
@@ -1,6 +1,7 @@
 <form id="adv_search_form" action="[% ctx.opac_root %]/results" method="GET">
     <div class="header_middle">[% l("Numeric Search") %]</div>
     <input type="hidden" name="contains" value="contains" />
+    <input type="hidden" name="_special" value="1" />
     <table>
         <tr>
             <td>
@@ -10,7 +11,7 @@
                     <option value="identifier|bib_cn">[% l('Call Number') %]</option>
                     <option value="identifier|lccn">[% l('LCCN') %]</option>
                     <option value="identifier|tcn">[% l('TCN') %]</option>
-                    <option disabled="disabled" value="item_barcode">[% l('Item Barcode') %]</option>[%# XXX have to implement special logic for this later %]
+                    <option value="item_barcode">[% l('Item Barcode') %]</option>
                 </select>
             </td>
             <td>
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 114b4c3..581307d 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -20,6 +20,7 @@
     propagator = '?' _ query_string;
 
     is_advanced = CGI.param("_adv").size;
+    is_special = CGI.param("_special").size;
 %]
 
 
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 433ce68..bf4a26e 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -13,7 +13,7 @@
             </td>
         </tr>
         <tr>
-            [% IF is_advanced %]
+            [% IF is_advanced || is_special %]
             <td colspan="2">
                 <input type="hidden" name="_adv" value="1" />
             [% ELSE %]
@@ -21,7 +21,7 @@
             [% INCLUDE "default/opac/parts/qtype_selector.tt2" %]
             </td>
             [% END %]
-            [% IF ctx.processed_search_query OR NOT is_advanced %]
+            [% IF ctx.processed_search_query OR (NOT is_advanced AND NOT is_special) %]
             <td>
                 <div id="search_box_wrapper">
                     <!-- Note: when common browsers support HTML5 placeholder text, we can remove the JS -->
@@ -45,7 +45,7 @@
             </td>
             [% END %]
         </tr>
-        [% UNLESS is_advanced %]
+        [% UNLESS is_advanced OR is_special %]
         <tr>
             <td>
                 [% INCLUDE "default/opac/parts/coded_value_selector.tt2" attr=["mattype", "item_type"] none_ok=1 %]
@@ -63,7 +63,7 @@
         [% END %]
     </table>
     [% UNLESS took_care_of_form %]</form>[% END %]
-    [% IF is_advanced AND CGI.param('qtype') %]
+    [% IF (is_advanced AND NOT is_special) AND CGI.param('qtype') %]
     <div class="opac-auto-102">
         [ <a href="[% ctx.opac_root %]/advanced?[% query_string %]">[%
             l('Click to Refine Your Original Search')
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index d0b6d28..139cf5f 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -4,7 +4,7 @@
     WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
 
-    IF is_advanced;
+    IF is_advanced || is_special;
         ctx.page_title = l("Search Results");
     ELSE;
         ctx.page_title = l("Search Results: ") _ CGI.param('query') | html_entity;
@@ -43,7 +43,7 @@
                 </div>
                 [% END %]
                 <div class="results_header_div"></div>
-                [% UNLESS is_advanced %]
+                [% UNLESS is_advanced || is_special %]
                     <div class="results_header_lbl">Sort by</div>
                     [% INCLUDE "default/opac/parts/filtersort.tt2" value=CGI.param('sort') %]
                     <div class="results_header_div"></div>

commit 9bf1f90902ea31306462f3b4ed36fbaf87f8e29e
Merge: 161a58e 12949f1
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jul 27 14:43:04 2011 -0400

    Merge branch 'template-toolkit-opac' of git.evergreen-ils.org:evergreen/equinox into template-toolkit-opac


commit 161a58e33efb65920782e4be78616e8a8b3a8f33
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jul 27 14:40:46 2011 -0400

    Metarecord list on results page
    
    Added a new ?metarecord=<mrid> param to opac/results page to list
    records associated with a given metarecord ID.  This is used as page 2
    of the (pending) metarecord search process as well 'show in catalog'
    for embedded staff client metarecord holds.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 787228c..d445250 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -48,7 +48,7 @@ sub _prepare_biblio_search_basics {
 sub _prepare_biblio_search {
     my ($cgi, $ctx) = @_;
 
-    my $query = _prepare_biblio_search_basics($cgi);
+    my $query = _prepare_biblio_search_basics($cgi) || '';
 
     $query = ('#' . $_ . ' ' . $query) foreach ($cgi->param('modifier'));
 
@@ -135,37 +135,52 @@ sub load_rresults {
     my $page = $cgi->param('page') || 0;
     my $facet = $cgi->param('facet');
     my $limit = $self->_get_search_limit;
-    my $loc = $cgi->param('loc');
+    my $loc = $cgi->param('loc') || $ctx->{aou_tree}->()->id;
     my $offset = $page * $limit;
+    my $metarecord = $cgi->param('metarecord');
+    my $results; 
 
     my ($query, $site, $depth) = _prepare_biblio_search($cgi, $ctx);
 
-    return $self->generic_redirect unless $query;
+    if ($metarecord) {
 
-    # Limit and offset will stay here. Everything else should be part of
-    # the query string, not special args.
-    my $args = {'limit' => $limit, 'offset' => $offset};
+        # TODO: other limits, like SVF/format, etc.
+        $results = $U->simplereq(
+            'open-ils.search', 
+            'open-ils.search.biblio.metarecord_to_records',
+            $metarecord, {org => $loc, depth => $depth}
+        );
+
+        # force the metarecord result blob to match the format of regular search results
+        $results->{ids} = [map { [$_] } @{$results->{ids}}]; 
+
+    } else {
 
-    # Stuff these into the TT context so that templates can use them in redrawing forms
-    $ctx->{processed_search_query} = $query;
+        return $self->generic_redirect unless $query;
 
-    $query = "$query $facet" if $facet; # TODO
+        # Limit and offset will stay here. Everything else should be part of
+        # the query string, not special args.
+        my $args = {'limit' => $limit, 'offset' => $offset};
 
-    $logger->activity("EGWeb: [search] $query");
+        # Stuff these into the TT context so that templates can use them in redrawing forms
+        $ctx->{processed_search_query} = $query;
 
-    my $results;
+        $query = "$query $facet" if $facet; # TODO
 
-    try {
+        $logger->activity("EGWeb: [search] $query");
 
-        my $method = 'open-ils.search.biblio.multiclass.query';
-        $method .= '.staff' if $ctx->{is_staff};
-        $results = $U->simplereq('open-ils.search', $method, $args, $query, 1);
+        try {
 
-    } catch Error with {
-        my $err = shift;
-        $logger->error("multiclass search error: $err");
-        $results = {count => 0, ids => []};
-    };
+            my $method = 'open-ils.search.biblio.multiclass.query';
+            $method .= '.staff' if $ctx->{is_staff};
+            $results = $U->simplereq('open-ils.search', $method, $args, $query, 1);
+
+        } catch Error with {
+            my $err = shift;
+            $logger->error("multiclass search error: $err");
+            $results = {count => 0, ids => []};
+        };
+    }
 
     my $rec_ids = [map { $_->[0] } @{$results->{ids}}];
 

commit 12949f170b42966cb6d40ef1f41948150334c145
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Wed Jul 27 13:05:02 2011 -0400

    Numeric search mostly works (except for item barcode)
    
    Expert search is next
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index a23cf3d..fe5074e 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -88,7 +88,9 @@ sub load {
         $path =~ /opac\/my(opac\/lists|list)/;
 
     return $self->load_simple("home") if $path =~ m|opac/home|;
-    return $self->load_simple("advanced") if $path =~ m|opac/advanced|;
+    return $self->load_simple("advanced") if
+        $path =~ m:opac/(advanced|numeric|expert):;
+
     return $self->load_rresults if $path =~ m|opac/results|;
     return $self->load_record if $path =~ m|opac/record|;
 
diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 61197f7..366b457 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -96,7 +96,8 @@ INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath )
 INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
     (27, 'identifier', 'bibid', oils_i18n_gettext(27, 'Internal ID', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='901']/marc:subfield[@code='c']$$ );
 INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, search_field, facet_field) VALUES
-    (28, 'identifier', 'authority_id', oils_i18n_gettext(28, 'Authority Record ID', 'cmf', 'label'), 'marcxml', '//marc:datafield/marc:subfield[@code="0"]', FALSE, TRUE);
+    (28, 'identifier', 'authority_id', oils_i18n_gettext(28, 'Authority Record ID', 'cmf', 'label'), 'marcxml', '//marc:datafield/marc:subfield[@code="0"]', FALSE, TRUE),
+    (29, 'identifier', 'lccn', oils_i18n_gettext(29, 'LCCN', 'cmf', 'label'), 'marcxml', '//marc:datafield[@tag="010"]/marc:subfield[@code="a"]', TRUE, FALSE) ;
 
 SELECT SETVAL('config.metabib_field_id_seq'::TEXT, (SELECT MAX(id) FROM config.metabib_field), TRUE);
 
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXY.data.config.metabib_field.lccn.sql b/Open-ILS/src/sql/Pg/upgrade/XXXY.data.config.metabib_field.lccn.sql
new file mode 100644
index 0000000..5e33cf3
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXY.data.config.metabib_field.lccn.sql
@@ -0,0 +1,14 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXY', :eg_version);
+
+INSERT INTO config.metabib_field (
+    id, field_class, name, label, xpath, weight, format,
+    search_field, facet_field
+) VALUES (
+    29, 'identifier', 'lccn', oils_i18n_gettext(29, 'LCCN', 'cmf', 'label'),
+    '//marc:datafield[@tag="010"]/marc:subfield[@code="a"]', 1,
+    'marcxml', TRUE, FALSE
+);
+
+COMMIT;
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index ae2098d..6ea13c5 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -288,18 +288,27 @@ div.select-wrapper:hover {
 
 #adv_search {
 	width:156px;
-	background:url('/images/adv_search_on.gif') no-repeat bottom;
+	background:url('/images/adv_search_off.gif') no-repeat bottom;
+}
+#adv_search.on {
+	background: url('/images/adv_search_on.gif') no-repeat bottom !important;
 }
 
 #num_search {
 	width:156px;
 	background:url('/images/num_search_off.gif') no-repeat bottom;
 }
+#num_search.on {
+	background: url('/images/num_search_on.gif') no-repeat bottom !important;
+}
 
 #expert_search {
 	width:156px;
 	background:url('/images/expert_search_off.gif') no-repeat bottom;
 }
+#expert_search.on {
+	background: url('/images/expert_search_on.gif') no-repeat bottom !important;
+}
 
 #acct_tabs, #acct_fines_tabs {
 	height:33px;
diff --git a/Open-ILS/web/templates/default/opac/advanced.tt2 b/Open-ILS/web/templates/default/opac/advanced.tt2
index 5c953a3..e752636 100644
--- a/Open-ILS/web/templates/default/opac/advanced.tt2
+++ b/Open-ILS/web/templates/default/opac/advanced.tt2
@@ -1,21 +1,28 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
-    ctx.page_title = l("Advanced Search") %]
+    ctx.page_title = l("Advanced Search");
+    pane = CGI.param("pane") || "advanced" %]
     <div id="search-wrapper">
         [% INCLUDE "default/opac/parts/printnav.tt2" %]
         <div id="adv_search_parent">
             <div id="adv_search_tabs">
-                <a href="#" alt="[% l('Advanced Search') %]" id="adv_search"></a>
-<!--                <a href="#" alt="[% l('Numeric Search') %]" id="num_search"></a>
-                    <a href="#" alt="[% l('Expert Search') %]" id="expert_search"></a> -->
+                <a href="?pane=advanced" alt="[% l('Advanced Search') %]" [% IF pane == 'advanced' %]class="on" [% END %]id="adv_search"></a>
+                <a href="?pane=numeric" alt="[% l('Numeric Search') %]" [% IF pane == 'numeric' %]class="on" [% END %]id="num_search"></a>
+                <a href="?pane=expert" alt="[% l('Expert Search') %]" [% IF pane == 'expert' %]class="on" [% END %]id="expert_search"></a>
             </div>
         </div>
     </div>
     <div id="content-wrapper">
         <div id="main-content">
             <div class="advanced_div">
+            [% IF pane == 'advanced' %]
             [% INCLUDE "default/opac/parts/advanced/search.tt2" %]
+            [% ELSIF pane == 'numeric' %]
+            [% INCLUDE "default/opac/parts/advanced/numeric.tt2" %]
+            [% ELSIF pane == 'expert' %]
+            [% INCLUDE "default/opac/parts/advanced/expert.tt2" %]
+            [% END %]
             </div>
             <div class="common-full-pad"></div>	
         </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2
new file mode 100644
index 0000000..35b11ab
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2
@@ -0,0 +1,3 @@
+<!-- <form id="adv_search_form" action="[% ctx.opac_root %]/results" method="GET"> -->
+    <div class="header_middle">[% l("Expert Search") %]</div>
+<!-- </form> -->
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
new file mode 100644
index 0000000..8835a5c
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2
@@ -0,0 +1,26 @@
+<form id="adv_search_form" action="[% ctx.opac_root %]/results" method="GET">
+    <div class="header_middle">[% l("Numeric Search") %]</div>
+    <input type="hidden" name="contains" value="contains" />
+    <table>
+        <tr>
+            <td>
+                <select name="qtype">
+                    <option value="identifier|isbn">[% l('ISBN') %]</option>
+                    <option value="identifier|issn">[% l('ISSN') %]</option>
+                    <option value="identifier|bib_cn">[% l('Call Number') %]</option>
+                    <option value="identifier|lccn">[% l('LCCN') %]</option>
+                    <option value="identifier|tcn">[% l('TCN') %]</option>
+                    <option disabled="disabled" value="item_barcode">[% l('Item Barcode') %]</option>[%# XXX have to implement special logic for this later %]
+                </select>
+            </td>
+            <td>
+                <input type="text" name="query" size="16" />
+            </td>
+        </tr>
+        <tr>
+            <td colspan="2" align="right">
+                <input type="image" alt="[% l('Search') %]"
+                    src="[% ctx.media_prefix %]/images/search_btn.gif" />
+            </td>
+    </table>
+</form>

commit b6f3bc253e5b3e88dc8ab140f84ae34ff6841263
Merge: c15551d efe72c8
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jul 27 11:05:44 2011 -0400

    Merge branch 'template-toolkit-opac' of git.evergreen-ils.org:evergreen/equinox into template-toolkit-opac


commit c15551d3faed8487ebebc955b45135eb44b82fe5
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jul 27 11:05:41 2011 -0400

    minor I18N text wrapping
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index 788b571..5762ead 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -18,7 +18,7 @@
                     <!-- add a new row -->
                     <tr id='adv_global_addrow'>
                         <td align='left' style="padding-top:7px;">
-                            <a href="javascript:;" id="myopac_new_global_row" onclick='addSearchRow();'>Add Search Row</a>
+                            <a href="javascript:;" id="myopac_new_global_row" onclick='addSearchRow();'>[% l('Add Search Row') %]</a>
                         </td>
                     </tr>
                 </tbody>
@@ -27,7 +27,7 @@
     </tr>
     <tr>
         <td align='top'>
-          <div style="width:100%;" class="header_middle">Search Filters</div>
+          <div style="width:100%;" class="header_middle">[% l('Search Filters') %]</div>
           <table cellpadding='10' cellspacing='0' border='0'><tr>
             <td valign='top'>
                 <strong>[% l("Item Type") %]</strong><br />

commit efe72c845ece9ba7d0f32383a0c9d0894f5d0eaa
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Wed Jul 27 09:59:19 2011 -0400

    Don't show users who are already logged in a login form; that's confusing
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index b1d6483..a23cf3d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -102,7 +102,16 @@ sub load {
     # ----------------------------------------------------------------
     if($path =~ m|opac/login|) {
         return $self->redirect_ssl unless $self->cgi->https;
-        return $self->load_login;
+        return $self->load_login unless $self->editor->requestor; # already logged in?
+
+        # This will be less confusing to users than to be shown a login form
+        # when they're already logged in.
+        return $self->generic_redirect(
+            sprintf(
+                "https://%s%s/myopac/main",
+                $self->apache->hostname, $self->ctx->{opac_root}
+            )
+        );
     }
 
     if($path =~ m|opac/logout|) {

commit 52103ef04e091cd05a6049b6657256238889370a
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Tue Jul 26 18:01:52 2011 -0400

    Confirm CC payments with another page load, not confirm() popup
    
    This does something gross. Your CC card number is rendered in a hidden
    field on the last confirmation page.  At least it's all SSL only.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
index 592c42d..52534d2 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
@@ -3,6 +3,9 @@
     WRAPPER "default/opac/parts/myopac/main_base.tt2";
     myopac_page = "main";
     myopac_main_page = "payment_form";
+
+    last_chance = CGI.param("last_chance");
+
 %]
 [% IF ctx.fines.balance_owed <= 0 %]
 <div>
@@ -11,14 +14,26 @@
 </div>
 [% ELSE %]
 <div id="pay_fines_now">
-    <form action="[% ctx.opac_root %]/myopac/main_pay" method="POST"
-        onsubmit="return confirm('[% l("Are you sure you are ready to charge [_1] to your credit card?", money(ctx.fines.balance_owed)) %]');">
+    [% IF last_chance %]
+    <p><big>[% l("Are you sure you are ready to charge [_1] to your credit card?", money(ctx.fines.balance_owed)) %]</big></p>
+    <form action="[% ctx.opac_root %]/myopac/main_pay" method="POST">
+        [% FOR k IN CGI.Vars;
+            NEXT UNLESS k %]
+        <input type="hidden" name="[% k | html %]" value="[% CGI.param(k) | html %]" />
+        [% END %]
+        <input type="submit" value="[% l('Submit Payment') %]" />
+        <input type="reset" value="[% l('Cancel') %]"
+            onclick="history.go(-1);" />
+    [% ELSE %]
+    <form method="POST">
+        <input type="hidden" name="last_chance" value="1" />
         [% FOR xact IN CGI.param('xact') %]
         <input type="hidden" name="xact" value="[% xact | html %]" />
         [% END %]
         [% FOR xact IN CGI.param('xact_misc') %]
         <input type="hidden" name="xact_misc" value="[% xact | html %]" />
         [% END %]
+
         <table>
             <tbody>
                 <tr>
@@ -157,7 +172,7 @@
                 </tr>
                 <tr>
                     <td colspan='2' align="center">
-                        <input type="submit" value="[% l('Submit Payment') %]" />
+                        <input type="submit" value="[% l('Next') %]" />
                         <input type="reset" value="[% l('Cancel') %]"
                             onclick="history.go(-1);" />
                     </td>
@@ -165,6 +180,7 @@
                 [% INCLUDE "default/opac/parts/myopac/main_refund_policy.tt2" %]
             </tbody>
         </table>
+    [% END %]
     </form>
 </div>
 [% END %]

commit c7104b9147325b77d7966c4160a83a2eb74259c3
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Tue Jul 26 17:31:32 2011 -0400

    Show most up-to-date email address in update-email interface
    
    plus cosmetic change to payment mini table
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 0001958..c0d8e64 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -1013,6 +1013,9 @@ sub load_myopac_update_email {
     my $ctx = $self->ctx;
     my $email = $self->cgi->param('email') || '';
 
+    # needed for most up-to-date email address
+    if (my $r = $self->prepare_extended_user_info) { return $r };
+
     return Apache2::Const::OK 
         unless $self->cgi->request_method eq 'POST';
 
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index f3078fe..ae2098d 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -878,6 +878,7 @@ div.select-wrapper:hover {
 
 .myopac_payments_table th { text-align: left; }
 .myopac_payments_table thead th { border-bottom: 1px dashed #333; }
+.myopac_payments_table thead th:first-child { width: 8em; }
 .myopac_payments_table tbody tr:nth-child(odd) { background-color: #ddd; }
 .myopac_payments_table form { display: inline; }
 .myopac_payments_table input[type="submit"] { padding: 1px; }

commit 29646f2ba7cb02e100fb0c7c3ed420079a330d90
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Tue Jul 26 17:05:48 2011 -0400

    CC payment improvements:
    
    Link from receipt after payment back to account summary.
    
    Error reporting
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
index 7dc00fa..ac68b6e 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
@@ -9,6 +9,7 @@
             <span title="[% ctx.payment_response.textcode %]">
                 [% ctx.payment_response.desc || ctx.payment_response.textcode %]
             </span><br />
+            [% ctx.payment_response.note %]
             [% ctx.payment_response.payload.error_message %]
         </div>
         <p>
@@ -39,6 +40,8 @@
                 ) %]
         </div>
         [% END %]
+        <p>[ <a href="[% ctx.opac_root %]/myopac/main">[%
+            l("Back to Account Summary") %]</a> ]</p>
     [% END %]
 </div>
 [% END %]

commit b175867cbba18c6c37528499f911ab72a949654c
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Tue Jul 26 15:52:59 2011 -0400

    Better to tell the user something rather than nothing
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
index 1992181..7dc00fa 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
@@ -7,7 +7,7 @@
     [% IF ctx.payment_response.textcode %]
         <div class="payment-error">
             <span title="[% ctx.payment_response.textcode %]">
-                [% ctx.payment_response.desc %]
+                [% ctx.payment_response.desc || ctx.payment_response.textcode %]
             </span><br />
             [% ctx.payment_response.payload.error_message %]
         </div>

commit d3d615f252f5353201919e3607638ac9c083abb2
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Tue Jul 26 15:01:53 2011 -0400

    Remove ? icon by "Security Code" in payment form
    
    It can go back in later if we want to make it actually do something.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
index edc012e..592c42d 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
@@ -119,15 +119,7 @@
                     <td><input type="text" name="number" maxlength="16" /></td>
                 </tr>
                 <tr>
-                    <td>
-                        <div style="position:absolute;">
-                            <div style="position:relative;left:80px;">
-                                <a href="#"><img
-                                    src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
-                            </div>
-                        </div>
-                        [% l('Security Code') %]
-                    </td>
+                    <td>[% l('Security Code') %]</td>
                     <td>
                         <input type="text" size="4" maxlength="5" name="cvv2" />
                     </td>

commit c907f04e8c0af7700c681b673242cb88b0938393
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Tue Jul 26 14:46:18 2011 -0400

    Give the patrons the opportunity to see and change their e-mail address...
    
    ... before they submit fine payments.  This way they have a better
    chance of getting a receipt e-mailed to them.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index d1c1658..0001958 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -1026,10 +1026,14 @@ sub load_myopac_update_email {
         'open-ils.actor.user.email.update', 
         $e->authtoken, $email);
 
-    my $url = $self->apache->unparsed_uri;
-    $url =~ s/update_email/prefs/;
+    unless ($self->cgi->param("redirect_to")) {
+        my $url = $self->apache->unparsed_uri;
+        $url =~ s/update_email/prefs/;
 
-    return $self->generic_redirect($url);
+        return $self->generic_redirect($url);
+    }
+
+    return $self->generic_redirect;
 }
 
 sub load_myopac_update_username {
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index cf2088b..f3078fe 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -876,10 +876,11 @@ div.select-wrapper:hover {
     padding-right: 5px;
 }
 
-#myopac_payments_table th { text-align: left; }
-#myopac_payments_table tbody tr:nth-child(odd) { background-color: #ddd; }
-#myopac_payments_table form { display: inline; }
-#myopac_payments_table input[type="submit"] { padding: 1px; }
+.myopac_payments_table th { text-align: left; }
+.myopac_payments_table thead th { border-bottom: 1px dashed #333; }
+.myopac_payments_table tbody tr:nth-child(odd) { background-color: #ddd; }
+.myopac_payments_table form { display: inline; }
+.myopac_payments_table input[type="submit"] { padding: 1px; }
 
 .payment-error {
     font-weight: bold; color: red;
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
index f5345d5..edc012e 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
@@ -24,8 +24,8 @@
                 <tr>
                     <td colspan='2'><strong>[% l('Billing Information') %]</strong></td>
                     <td rowspan='13' valign='top'>
-                        [% l('Selected fines you are paying for:') %]
-                        <table cellpadding="0" cellspacing="5" border="0">
+                        <p>[% l('Selected fines you are paying for:') %]</p>
+                        <table cellpadding="0" cellspacing="0" border="0" class="myopac_payments_table">
                             <thead>
                                 <tr>
                                     <th>[% l('Name') %]</th>
@@ -77,6 +77,13 @@
                     <td><input type="text" name="billing_last" value="[% ctx.user.family_name | html %]" /></td>
                 </tr>
                 <tr>
+                    <td>[% l('Email Address') %]</td>
+                    <td>
+                        <input type="text" disabled="disabled" readonly="readonly" value="[% ctx.user.email | html %]" />
+                        <a href="[% ctx.opac_root %]/myopac/update_email?return_to_referer=1">[% l("Update") %]</a>
+                    </td>
+                </tr>
+                <tr>
                     <td>[% l('Street Address') %]</td>
                     <td><input type="text" name="billing_address" value="[% ctx.user.billing_address.street1 _ ctx.user.billing_address.street2 | html %]" /></td>
                 </tr>
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
index 7e1e44b..0a3b192 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
@@ -21,7 +21,7 @@
     <div class="clear-both"></div>
 
     [% IF ctx.payments.size %]
-    <table id='myopac_payments_table' width='100%' class='data_grid'>
+    <table class='myopac_payments_table data_grid' width='100%'>
         <thead><tr>
             <th>[% l('Payment Date') %]</th>
             <th>[% l('Payment For') %]</th>
diff --git a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2 b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
index 2261c29..a6e62ec 100644
--- a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
@@ -13,6 +13,9 @@
 [% END %]
 
 <form method='POST' id='account-update-email'>
+    [% IF CGI.param("return_to_referer") %]
+    <input type="hidden" name="redirect_to" value="[% ctx.referer | html %]" />
+    [% END %]
     <table> 
         <tr><td>[% l('Current Email') %]</td><td>[% ctx.user.email | html %]</td></tr>
         <tr><td>[% l('New Email') %]</td><td><input type='text' name='email' value='[% ctx.invalid_email | html %]'/></td></tr>

commit 052b2eea78c8e579e2bb1c94dc94111f9504b966
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Tue Jul 26 11:04:24 2011 -0400

    Persistent logins are more of a "stay logged in" feature than a "remember me"
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/login/form.tt2 b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
index b30d47f..15814ba 100644
--- a/Open-ILS/web/templates/default/opac/parts/login/form.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
@@ -133,7 +133,7 @@
                                         redirect = redirect  | replace('^http:', 'https:');
                                     %]
                                     <input type='hidden' name='redirect_to' value='[% redirect %]'/>
-                                    <input type="checkbox" name="persist" /> [% l('Remember Me?') %]
+                                    <input type="checkbox" name="persist" id="login_persist" /><label for="login_persist"> [% l('Stay logged in?') %]</label>
                                 </div>
                                 <div style="padding-top:14px;">
                                     <input type='image' alt="[% l('Log in') %]" src="[% ctx.media_prefix %]/images/login-btn2.png" />

commit aa08a44a3f70715e4788f2382b38cdef236a2d57
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Tue Jul 26 10:49:34 2011 -0400

    Links to return to payment history from receipt print/email pages
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/myopac/receipt_email.tt2 b/Open-ILS/web/templates/default/opac/myopac/receipt_email.tt2
index 371f7df..51acccb 100644
--- a/Open-ILS/web/templates/default/opac/myopac/receipt_email.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/receipt_email.tt2
@@ -12,4 +12,8 @@
     [% ELSE %]
     <div>[% l('Your receipt will be emailed to [_1]', ctx.user.email) %]</div>
     [% END %]
+    <p>
+        [ <a href="[% ctx.opac_root %]/myopac/main_payments">[%
+            l("Back to Payments History") %]</a> ]
+    </p>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2 b/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2
index 0ee7b12..766f9b5 100644
--- a/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2
@@ -18,5 +18,8 @@
                 ) %]
         </div>
         [% END %]
+        <hr />
+        <p>[ <a href="[% ctx.opac_root %]/myopac/main_payments">[%
+            l("Back to Payments History") %]</a> ]</p>
     </body>
 </html>

commit fb2a495c47c1ae3bebce846488d9c43ae16bd4be
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Mon Jul 25 17:55:58 2011 -0400

    Select-all checkboxes for fine payment
    
    In the process, had to change the checkbox/cgi param name of the misc
    fees to xact_misc and tell the middle layer to lump xact together with
    xact_misc.  Should test carefully.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 213965d..d1c1658 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -777,7 +777,7 @@ sub load_myopac_payment_form {
     my $self = shift;
     my $r;
 
-    $r = $self->prepare_fines(undef, undef, [$self->cgi->param('xact')]) and return $r;
+    $r = $self->prepare_fines(undef, undef, [$self->cgi->param('xact'), $self->cgi->param('xact_misc')]) and return $r;
     $r = $self->prepare_extended_user_info and return $r;
 
     return Apache2::Const::OK;
@@ -820,7 +820,7 @@ sub load_myopac_pay {
     my $self = shift;
     my $r;
 
-    $r = $self->prepare_fines(undef, undef, [$self->cgi->param('xact')]) and
+    $r = $self->prepare_fines(undef, undef, [$self->cgi->param('xact'), $self->cgi->param('xact_misc')]) and
         return $r;
 
     # balance_owed is computed specifically from the fines we're trying
@@ -828,7 +828,7 @@ sub load_myopac_pay {
     if ($self->ctx->{fines}->{balance_owed} <= 0) {
         $self->apache->log->info(
             sprintf("Can't pay non-positive balance. xacts selected: (%s)",
-                join(", ", map(int, $self->cgi->param("xact"))))
+                join(", ", map(int, $self->cgi->param("xact"), $self->cgi->param('xact_misc'))))
         );
         return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
     }
diff --git a/Open-ILS/web/js/ui/default/opac/simple.js b/Open-ILS/web/js/ui/default/opac/simple.js
index d71c98a..d80b108 100644
--- a/Open-ILS/web/js/ui/default/opac/simple.js
+++ b/Open-ILS/web/js/ui/default/opac/simple.js
@@ -48,3 +48,11 @@ function print_node(node_id) {
     try { iframe.print(); } catch (e) { iwin.print(); }
     setTimeout(function() { iframe.style.display = "none"; }, 3500);
 }
+function select_all_checkboxes(name, checked) {
+    var all = document.getElementsByTagName("input");
+    for (var i = 0; i < all.length; i++) {
+        if (all[i].type == "checkbox" && all[i].name == name) {
+            all[i].checked = checked;
+        }
+    }
+}
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 674e097..354b5b0 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -22,8 +22,9 @@
                     <td>[% l("Date Returned") %]</td>
                     <td>[% l("Balance Owed") %]</td>
                     <td nowrap="nowrap" style="white-space:nowrap;">
-                        <!-- XXX TODO select all js --><input id="pay_fines_box1" checked="checked"
-                            type="checkbox" title="[% l('Click to (un)select all fines') %]" />
+                        <input id="pay_fines_box1" checked="checked"
+                            type="checkbox" onchange="select_all_checkboxes('xact', this.checked)"
+                            title="[% l('Click to (un)select all fines') %]" />
                         <label for="pay_fines_box1">[% l('Pay Fines') %]</label>
                     </td>
                 </tr>
@@ -78,7 +79,8 @@
                     </td>
                     <td>
                         <input type="checkbox" checked="checked" 
-                            title="[% l('Pay this fine') %]" name="xact" value="[% f.xact.id %]" />
+                            title="[% l('Pay this fine') %]" name="xact"
+                            value="[% f.xact.id %]" />
                     </td>
                 </tr>
                 [% END %]
@@ -111,7 +113,7 @@
                     <td width='4%' align="center" nowrap="nowrap"
                         style="white-space:nowrap;">
                         <input id="pay_fines_box2" checked="checked"
-                            type="checkbox"
+                            type="checkbox" onchange="select_all_checkboxes('xact_misc', this.checked)"
                             title="[% l('Click to (un)select all fines') %]" />
                         <label for="pay_fines_box2">[% l("Pay Fines") %]</label>
                     </td>
@@ -143,7 +145,8 @@
                     <td>[% f.xact.last_billing_type %]</td>
                     <td>
                         <input type="checkbox" title='[% l("Pay this fine") %]'
-                            name="xact" value="[% f.xact.id %]" />
+                            name="xact_misc" value="[% f.xact.id %]"
+                            checked="checked" />
                     </td>
                 </tr>
                 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
index c10d5a2..f5345d5 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
@@ -16,6 +16,9 @@
         [% FOR xact IN CGI.param('xact') %]
         <input type="hidden" name="xact" value="[% xact | html %]" />
         [% END %]
+        [% FOR xact IN CGI.param('xact_misc') %]
+        <input type="hidden" name="xact_misc" value="[% xact | html %]" />
+        [% END %]
         <table>
             <tbody>
                 <tr>
@@ -47,8 +50,8 @@
                             [%
                             END;
                             FOR f IN ctx.fines.grocery;
-                                NEXT IF CGI.param('xact').size &&
-                                    !CGI.param('xact').grep(f.xact.id).size %]
+                                NEXT IF CGI.param('xact_misc').size &&
+                                    !CGI.param('xact_misc').grep(f.xact.id).size %]
                                 <tr>
                                     <td>[% f.xact.last_billing_type %]</td>
                                     <td class="text-right">[% money(f.xact.balance_owed) %]</td>

commit c7f887df3702eb2f8177da4b5f582c42ef8bddf8
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Mon Jul 25 17:06:47 2011 -0400

    Empty case for payment history
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
index 83e25f3..7e1e44b 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
@@ -20,6 +20,7 @@
     </div>
     <div class="clear-both"></div>
 
+    [% IF ctx.payments.size %]
     <table id='myopac_payments_table' width='100%' class='data_grid'>
         <thead><tr>
             <th>[% l('Payment Date') %]</th>
@@ -47,5 +48,8 @@
             [% END %]
         </tbody>
     </table>
+    [% ELSE %]
+    <div>[% l('You have no historical payments to display.') %]</div>
+    [% END %]
 </div>
 [% END %]

commit f864b8b0fbb8033de67c4d402303c927a57745e0
Author: Robin Isard <robin.isard at algomau.ca>
Date:   Mon Jul 25 16:25:12 2011 -0400

    Changed opac-auto-004 to rdetail_print_details_cn_spacer in file cn_details.tt2

diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index e4e9eb7..cc6df04 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -1,7 +1,7 @@
 /* once done renaming and everything, combine with style.css */
 
 /* Verfied in-use classes --------------------------- */
-.opac-auto-004 { background: #E0F0E0; }
+.rdetail_print_details_cn_spacer { background: #E0F0E0; }
 .opac-auto-009 { border: 3px solid #E0E0E0; }
 .opac-auto-010 { border-bottom: 1px dotted #ccc; padding-top: 10px; }
 .opac-auto-011 { border-bottom: 1px dotted #ccc; padding-top: 6px; }
diff --git a/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
index 2865026..ea48f3e 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
@@ -78,7 +78,7 @@
                     <tr><td>[% l("Publisher") %]</td><td colspan='2' name='publisher'></td></tr>
                     <tr><td>[% l("Physical Description") %]</td><td colspan='2' name='phys'></td></tr>
                     <tr>
-                        <td colspan='3' class='opac-auto-004'> </td>
+                        <td colspan='3' class='rdetail_print_details_cn_spacer'> </td>
                     </tr>
                     <tr name='cnrow'>
                         <td><b>[% l("Call Number") %]</b></td>

commit 3a577a48975fd39b64baaff6a78e49fb24652df7
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Mon Jul 25 16:21:48 2011 -0400

    YAOUS to limit OPAC payment history display to configured interval
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index a715ab3..213965d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -797,6 +797,17 @@ sub load_myopac_payments {
     $args->{limit} = $limit if $limit;
     $args->{offset} = $offset if $offset;
 
+    if (my $max_age = $self->ctx->{get_org_setting}->(
+        $e->requestor->home_ou, "opac.payment_history_age_limit"
+    )) {
+        my $min_ts = DateTime->now(
+            "time_zone" => DateTime::TimeZone->new("name" => "local"),
+        )->subtract("seconds" => interval_to_seconds($max_age))->iso8601();
+        
+        $logger->info("XXX min_ts: $min_ts");
+        $args->{"where"} = {"payment_ts" => {">=" => $min_ts}};
+    }
+
     $self->ctx->{payments} = $U->simplereq(
         'open-ils.actor',
         'open-ils.actor.user.payments.retrieve.atomic',
diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 9cf3bbc..61197f7 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -2750,7 +2750,12 @@ INSERT into config.org_unit_setting_type
 ( 'org.patron_opt_default',
     oils_i18n_gettext( 'org.patron_opt_default', 'Circ: Patron Opt-In Default', 'coust', 'label'),
     oils_i18n_gettext( 'org.patron_opt_default', 'This is the default depth at which a patron is opted in; it is calculated as an org unit relative to the current workstation.', 'coust', 'label'),
-    'integer')
+    'integer'),
+
+( 'opac.payment_history_age_limit',
+    oils_i18n_gettext( 'opac.payment_history_age_limit', 'OPAC: Payment History Age Limit', 'coust', 'label'),
+    oils_i18n_gettext( 'opac.payment_history_age_limit', 'The OPAC should not display payments by patrons that are older than any interval defined here.', 'coust', 'label'),
+    'interval')
 
 ;
 
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.opac_payment_history_age_limit.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.opac_payment_history_age_limit.sql
new file mode 100644
index 0000000..f8790ef
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.opac_payment_history_age_limit.sql
@@ -0,0 +1,17 @@
+-- Evergreen DB patch XXXX.data.opac_payment_history_age_limit.sql
+
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT into config.org_unit_setting_type (name, label, description, datatype)
+VALUES (
+    'opac.payment_history_age_limit',
+    oils_i18n_gettext('opac.payment_history_age_limit',
+        'OPAC: Payment History Age Limit', 'coust', 'label'),
+    oils_i18n_gettext('opac.payment_history_age_limit',
+        'The OPAC should not display payments by patrons that are older than any interval defined here.', 'coust', 'label'),
+    'interval'
+);
+
+COMMIT;

commit 9bd8972e5ac8fa0d56345170723ee270565a98e2
Merge: c0b13ed e0dbfda
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sun Jul 24 11:14:19 2011 -0400

    Merge branch 'template-toolkit-opac' of git.evergreen-ils.org:evergreen/equinox into template-toolkit-opac


commit c0b13ededa3340f6f2085abf76a87e4f162a1c60
Merge: b621481 b82f698
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sun Jul 24 11:14:15 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit e0dbfda521e537748dc532f471fb9adf85d8dcf4
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Jul 22 13:04:37 2011 -0400

    More better call number browser, uses supercat directly, doesn't use mvr
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index 235cb6a..a1f6777 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -202,14 +202,26 @@ sub any_call_number_label {
 sub browse_call_numbers {
     my ($self) = @_;
 
-    my $cn = $self->any_call_number_label or return [];
-
-    my $search = create OpenSRF::AppSession("open-ils.search");
-
-    return $search->request(
-        "open-ils.search.callnumber.browse", 
-        $cn, $self->cgi->param("loc"), 9, $self->cgi->param("cnoffset")
-    )->gather(1);
+    my $cn = $self->any_call_number_label or
+        return [];
+
+    my $org_unit = $self->ctx->{get_aou}->($self->cgi->param('loc')) ||
+        $self->ctx->{aou_tree}->();
+
+    my $supercat = create OpenSRF::AppSession("open-ils.supercat");
+    my $results = $supercat->request(
+        "open-ils.supercat.call_number.browse", 
+        $cn, $org_unit->shortname, 9, $self->cgi->param("cnoffset")
+    )->gather(1) || [];
+
+    return [
+        map {
+            $_->record->marc(
+                (new XML::LibXML)->parse_string($_->record->marc)
+            );
+            $_;
+        } @$results
+    ];
 }
 
 sub get_hold_copy_summary {
diff --git a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
index 1ee18c7..88e4fbf 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
@@ -8,7 +8,7 @@
             <thead>
                 <tr>
                     <td>
-                        <a id='cn_browse_prev' class='classic_link' href=">[% ctx.opac_root %]/record/[% ctx.bre_id _ extras_propagator _ '&amp;cnoffset=' _ ((CGI.param('cnoffset') || 0) - 1) _ '&amp;expand=cnbrowse#cnbrowse' %]"<b>[%
+                        <a id='cn_browse_prev' class='classic_link' href="[% ctx.opac_root %]/record/[% ctx.bre_id _ extras_propagator _ '&amp;cnoffset=' _ ((CGI.param('cnoffset') || 0) - 1) _ '&amp;expand=cnbrowse#cnbrowse' %]"<b>[%
                             l("&lt;&lt; Previous Page")
                         %]</b></a>
                     </td>
@@ -21,27 +21,28 @@
                 </tr>
             </thead>
             <tbody id='cn_tbody'>
-            [% tr_open = 0; FOR ent IN ctx.browsed_call_numbers %]
+            [% tr_open = 0; FOR cn IN ctx.browsed_call_numbers %]
                 [%- IF loop.index % 3 == 0; tr_open = 1 %]
                 <tr id='cn_browse_row'>
                 [% END -%]
                     <td id='cn_browse_td' class='cn_browse_item' width='25%' valign='top'>
-                        [%  # Not to extend to life of the mvr fieldmapper class,
-                            # but should we add a upc field to it to make this better?
-                            IF ent.mods.isbn %]
-                        <a href="[% ctx.opac_root %]/record/[% ent.cn.record _ extras_propagator %]"><img height='60' width='50' 
+                        [%  rec_attrs = {marc_xml => cn.record.marc};
+                            PROCESS get_marc_attrs args=rec_attrs;
+                            ident = rec_attrs.isbn_clean || rec_attrs.upc;
+                            IF ident %]
+                        <a href="[% ctx.opac_root %]/record/[% cn.record.id _ extras_propagator %]"><img height='60' width='50' 
                             class='cn_browse_info' name='cn_browse_pic' border='0'
-                            src="[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ent.mods.isbn %]" /></a>
+                            src="[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]" /></a>
                         [% END %]
-                        <div class='cn_browse_info bold' name='cn_browse_cn'>[% ent.cn.label %]</div>
+                        <div class='cn_browse_info bold' name='cn_browse_cn'>[% cn.label %]</div>
                         <div class='cn_browse_info'>
-                            <a name='cn_browse_title' class='classic_link' href="[% ctx.opac_root %]/record/[% ent.cn.record _ extras_propagator %]">[% ent.mods.title %]</a>
+                            <a name='cn_browse_title' class='classic_link' href="[% ctx.opac_root %]/record/[% cn.record.id _ extras_propagator %]">[% rec_attrs.title %]</a>
                         </div>
-                        [% IF ent.mods.author %]<div class='cn_browse_info'>
+                        [% IF rec_attrs.author %]<div class='cn_browse_info'>
                             <a name='cn_browse_author' class='classic_link'
-                                href="[% ctx.opac_root %]/results?qtype=author&amp;query=[%- ent.mods.author | replace('[,\.:;]', '') | uri %]&amp;loc=[% CGI.param('loc') | uri %]">[% ent.mods.author %]</a>
+                                href="[% ctx.opac_root %]/results?qtype=author&amp;query=[%- rec_attrs.author | replace('[,\.:;]', '') | uri %]&amp;loc=[% CGI.param('loc') | uri %]">[% rec_attrs.author %]</a>
                         </div>[% END %]
-                        <div class='cn_browse_info' name='cn_browse_lib'>[% ctx.get_aou(ent.cn.owning_lib).name %]</div>
+                        <div class='cn_browse_info' name='cn_browse_lib'>[% cn.owning_lib.name %]</div>
                     </td>
                 [% IF loop.index % 3 == 2; tr_open = 0 %]
                 </tr>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index 2bfa8be..c53ce31 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -43,8 +43,8 @@
                     # to extras.
                     # XXX move this off into a helper function
 
-                    extras_propagator = propagator.replace('&amp;expand=.+($|&|;)', '$1');
-                    extras_propagator = extras_propagator.replace('&amp;cnoffset=.+($|&|;)', '$1');
+                    extras_propagator = propagator.replace('(&amp;)?expand=.+($|&|;)', '$2');
+                    extras_propagator = extras_propagator.replace('(&amp;)?cnoffset=.+($|&|;)', '$2');
 
 
                     href = ctx.full_path _ extras_propagator _ '&amp;expand=' _ name _ '#' _ name; %]

commit 4cc810719fa755510a5de12b3b354a4101c7042c
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Jul 22 10:28:04 2011 -0400

    Also was missing the author search link
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
index 42311a1..1ee18c7 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
@@ -37,9 +37,10 @@
                         <div class='cn_browse_info'>
                             <a name='cn_browse_title' class='classic_link' href="[% ctx.opac_root %]/record/[% ent.cn.record _ extras_propagator %]">[% ent.mods.title %]</a>
                         </div>
-                        <div class='cn_browse_info'>
-                            <a name='cn_browse_author' class='classic_link'>[% ent.mods.author %]</a>
-                        </div>
+                        [% IF ent.mods.author %]<div class='cn_browse_info'>
+                            <a name='cn_browse_author' class='classic_link'
+                                href="[% ctx.opac_root %]/results?qtype=author&amp;query=[%- ent.mods.author | replace('[,\.:;]', '') | uri %]&amp;loc=[% CGI.param('loc') | uri %]">[% ent.mods.author %]</a>
+                        </div>[% END %]
                         <div class='cn_browse_info' name='cn_browse_lib'>[% ctx.get_aou(ent.cn.owning_lib).name %]</div>
                     </td>
                 [% IF loop.index % 3 == 2; tr_open = 0 %]

commit 5503d5b731868c77160d74b1b48b9246fb1c48d5
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Jul 22 10:22:08 2011 -0400

    Call number shelf browser: fix prev/next links, wrong argument order in...
    
    ... call to open-ils.search.callnumber.browse (count and offset mixed
    up)
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index 021ae62..235cb6a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -208,7 +208,7 @@ sub browse_call_numbers {
 
     return $search->request(
         "open-ils.search.callnumber.browse", 
-        $cn, map { $self->cgi->param($_) } qw/loc cnoffset/, 9
+        $cn, $self->cgi->param("loc"), 9, $self->cgi->param("cnoffset")
     )->gather(1);
 }
 
diff --git a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
index 64a0e1f..42311a1 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
@@ -7,17 +7,17 @@
         <table class='data_grid bookshelf' width='100%'>
             <thead>
                 <tr>
-                    <td>[% IF CGI.param("cnoffset") > 0 %]
+                    <td>
                         <a id='cn_browse_prev' class='classic_link' href=">[% ctx.opac_root %]/record/[% ctx.bre_id _ extras_propagator _ '&amp;cnoffset=' _ ((CGI.param('cnoffset') || 0) - 1) _ '&amp;expand=cnbrowse#cnbrowse' %]"<b>[%
                             l("&lt;&lt; Previous Page")
                         %]</b></a>
-                        [% END %]</td>
+                    </td>
                     <td colspan='1' align='center'>[% l("Shelf Browser") %]</td>
-                    <td>[% IF ctx.browsed_call_numbers.size == 9 %]
+                    <td>
                         <a id='cn_browse_next' class='classic_link' href="[% ctx.opac_root %]/record/[% ctx.bre_id _ extras_propagator _ '&amp;cnoffset=' _ ((CGI.param('cnoffset') || 0) + 1) _ '&amp;expand=cnbrowse#cnbrowse' %]"<b>[%
                             l("Next Page &gt;&gt;")
                         %]</b></a>
-                        [% END %]</td>
+                    </td>
                 </tr>
             </thead>
             <tbody id='cn_tbody'>

commit b3094c0a915a690ae1e590bad318e699d767206e
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Jul 22 09:59:57 2011 -0400

    Shelf browser!
    
    Needs improvements: can't find jacket images by UPC yet
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index 02fd651..021ae62 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -53,6 +53,7 @@ sub load_record {
             scalar(@{$ctx->{holding_summaries}->{supplement}});
     }
 
+    # XXX probably should replace the following with a dispatch table
     for my $expand ($self->cgi->param('expand')) {
         $ctx->{"expand_$expand"} = 1;
         if ($expand eq 'marchtml') {
@@ -60,7 +61,10 @@ sub load_record {
         } elsif ($expand eq 'issues' and $ctx->{have_holdings_to_show}) {
             $ctx->{expanded_holdings} =
                 $self->get_expanded_holdings($rec_id, $org, $depth);
+        } elsif ($expand eq 'cnbrowse') {
+            $ctx->{browsed_call_numbers} = $self->browse_call_numbers();
         }
+
     }
 
     return Apache2::Const::OK;
@@ -185,6 +189,28 @@ sub get_expanded_holdings {
     )->gather(1);
 }
 
+sub any_call_number_label {
+    my ($self) = @_;
+
+    if ($self->ctx->{copies} and @{$self->ctx->{copies}}) {
+        return $self->ctx->{copies}->[0]->{call_number_label};
+    } else {
+        return;
+    }
+}
+
+sub browse_call_numbers {
+    my ($self) = @_;
+
+    my $cn = $self->any_call_number_label or return [];
+
+    my $search = create OpenSRF::AppSession("open-ils.search");
+
+    return $search->request(
+        "open-ils.search.callnumber.browse", 
+        $cn, map { $self->cgi->param($_) } qw/loc cnoffset/, 9
+    )->gather(1);
+}
 
 sub get_hold_copy_summary {
     my ($self, $rec_id, $org) = @_;
diff --git a/Open-ILS/web/templates/default/opac/parts/cn_browse.tt2 b/Open-ILS/web/templates/default/opac/parts/cn_browse.tt2
deleted file mode 100644
index 282bfd9..0000000
--- a/Open-ILS/web/templates/default/opac/parts/cn_browse.tt2
+++ /dev/null
@@ -1,44 +0,0 @@
-<!-- ****************** cn_browse.xml ***************************** -->
-<div id='cn_browse' class='cn_browser'>
-    <div id='cn_browse_loading' class='cn_browse_loading hide_me'>
-        [% l("Loading Callnumber Page...") %]
-    </div>
-    <div id='cn_browse_div'> 
-        <div class='color_4'>
-            <span>[% l("You are now browsing") %]</span>
-            <b id='cn_browse_where'> </b>
-        </div>
-        <table class='data_grid bookshelf' width='100%'>
-            <thead>
-                <tr>
-                    <td>
-                        <a id='cn_browse_next' class='classic_link' 
-                        href='javascript:cnBrowsePrev();'><b>[% l("&lt;&lt; Previous Page") %]</b></a>
-                    </td>
-                    <td colspan='1' align='center'>[% l("Shelf Browser") %]</td>
-                    <td>
-                        <a id='cn_browse_prev' class='classic_link' 
-                            href='javascript:cnBrowseNext();'><b>[% l("Next Page &gt;&gt;") %]</b></a>
-                    </td>
-                </tr>
-            </thead>
-            <tbody id='cn_tbody'>
-                <tr id='cn_browse_row'>
-                    <td id='cn_browse_td' class='cn_browse_item' width='25%' valign='top'>
-                        <a><img height='60' width='50' 
-                            class='cn_browse_info' name='cn_browse_pic' border='0' /></a>
-                        <div class='cn_browse_info bold' name='cn_browse_cn'></div>
-                        <div class='cn_browse_info'>
-                            <a name='cn_browse_title' class='classic_link'></a>
-                        </div>
-                        <div class='cn_browse_info'>
-                            <a name='cn_browse_author' class='classic_link'>  </a>
-                        </div>
-                        <div class='cn_browse_info' name='cn_browse_lib'>  </div>
-                    </td>
-                </tr>
-            </tbody>
-        </table>
-    </div>
-</div>
-<!-- ****************** end: cn_browse.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
new file mode 100644
index 0000000..64a0e1f
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
@@ -0,0 +1,52 @@
+<div id='cn_browse' class='cn_browser'>
+    <div id='cn_browse_div'> 
+        <div class='color_4'>
+            <span>[% l("You are now browsing") %]</span>
+            <strong>[% ctx.get_aou(CGI.param('loc')).name %]</strong>
+        </div>
+        <table class='data_grid bookshelf' width='100%'>
+            <thead>
+                <tr>
+                    <td>[% IF CGI.param("cnoffset") > 0 %]
+                        <a id='cn_browse_prev' class='classic_link' href=">[% ctx.opac_root %]/record/[% ctx.bre_id _ extras_propagator _ '&amp;cnoffset=' _ ((CGI.param('cnoffset') || 0) - 1) _ '&amp;expand=cnbrowse#cnbrowse' %]"<b>[%
+                            l("&lt;&lt; Previous Page")
+                        %]</b></a>
+                        [% END %]</td>
+                    <td colspan='1' align='center'>[% l("Shelf Browser") %]</td>
+                    <td>[% IF ctx.browsed_call_numbers.size == 9 %]
+                        <a id='cn_browse_next' class='classic_link' href="[% ctx.opac_root %]/record/[% ctx.bre_id _ extras_propagator _ '&amp;cnoffset=' _ ((CGI.param('cnoffset') || 0) + 1) _ '&amp;expand=cnbrowse#cnbrowse' %]"<b>[%
+                            l("Next Page &gt;&gt;")
+                        %]</b></a>
+                        [% END %]</td>
+                </tr>
+            </thead>
+            <tbody id='cn_tbody'>
+            [% tr_open = 0; FOR ent IN ctx.browsed_call_numbers %]
+                [%- IF loop.index % 3 == 0; tr_open = 1 %]
+                <tr id='cn_browse_row'>
+                [% END -%]
+                    <td id='cn_browse_td' class='cn_browse_item' width='25%' valign='top'>
+                        [%  # Not to extend to life of the mvr fieldmapper class,
+                            # but should we add a upc field to it to make this better?
+                            IF ent.mods.isbn %]
+                        <a href="[% ctx.opac_root %]/record/[% ent.cn.record _ extras_propagator %]"><img height='60' width='50' 
+                            class='cn_browse_info' name='cn_browse_pic' border='0'
+                            src="[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ent.mods.isbn %]" /></a>
+                        [% END %]
+                        <div class='cn_browse_info bold' name='cn_browse_cn'>[% ent.cn.label %]</div>
+                        <div class='cn_browse_info'>
+                            <a name='cn_browse_title' class='classic_link' href="[% ctx.opac_root %]/record/[% ent.cn.record _ extras_propagator %]">[% ent.mods.title %]</a>
+                        </div>
+                        <div class='cn_browse_info'>
+                            <a name='cn_browse_author' class='classic_link'>[% ent.mods.author %]</a>
+                        </div>
+                        <div class='cn_browse_info' name='cn_browse_lib'>[% ctx.get_aou(ent.cn.owning_lib).name %]</div>
+                    </td>
+                [% IF loop.index % 3 == 2; tr_open = 0 %]
+                </tr>
+                [% END %]
+            [% END; IF tr_open %]</tr>[% END %]
+            </tbody>
+        </table>
+    </div>
+</div>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index 918cdcd..2bfa8be 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -25,7 +25,7 @@
             {name => 'excerpt',  label => l('Excerpt'), hide => 1},
             {name => 'issues',   label => l('Issues Held'), hide => !ctx.have_holdings_to_show},
             {name => 'preview',  label => l('Preview'), hide => 1}, 
-            {name => 'cnbrowse', label => l('Shelf Browser'), hide => 1},
+            {name => 'cnbrowse', label => l('Shelf Browser')},
             {name => 'copyinfo', label => l('Copy Summary'), hide => 1}, 
             {name => 'marchtml', label => l('MARC Record')}
         ];
@@ -37,7 +37,17 @@
         <div class="rdetail_extras">
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
-                [% href = ctx.full_path _ '?expand=' _ name _ '#' _ name; %]
+                [%  # extras_propagator should be used in place of propagator
+                    # in opac extras interfaces... it just avoids duplicating
+                    # the expands CGI param and parameters that are specific
+                    # to extras.
+                    # XXX move this off into a helper function
+
+                    extras_propagator = propagator.replace('&amp;expand=.+($|&|;)', '$1');
+                    extras_propagator = extras_propagator.replace('&amp;cnoffset=.+($|&|;)', '$1');
+
+
+                    href = ctx.full_path _ extras_propagator _ '&amp;expand=' _ name _ '#' _ name; %]
                 <a name='[% name %]' href='[% href %]'><img
                     alt='[% extra.label %]' src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='[% href %]' class="rdetail_extras_lbl">[% extra.label %]</a>

commit c88264fda8405914a735c7ca7b77e3397b53e5c9
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Wed Jul 20 18:02:47 2011 -0400

    More power to present friendly messages when hold placement fails
    
    This area could use a little cleanup, elegance, but it can give end
    users better messages for a diverse set of reasons why hold placement
    failed.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/hold_error_messages.tt2 b/Open-ILS/web/templates/default/opac/parts/hold_error_messages.tt2
new file mode 100644
index 0000000..9ba6f0e
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/hold_error_messages.tt2
@@ -0,0 +1,38 @@
+[%
+    # XXX It might be cleaner to move this into its own file or something.
+    #
+    # The following hash should have fail_parts as keys and user/patron-friendly
+    # strings as values.  If the system returns an event with a fail_part when
+    # you attempt to place a hold and the fail part matches something in this
+    # hash, this is the message that will be displayed to the user. Wait until
+    # these are used to pass them through l() for i18n.
+
+    FAIL_PART_MSG_MAP = {
+        "actor.usr.barred" => "The patron is barred",
+        "asset.copy.circulate" => "The item does not circulate",
+        "asset.copy_location.circulate" => "Items from this shelving location do not circulate",
+        "asset.copy.status" => "The item cannot circulate at this time",
+        "circ.holds.target_skip_me" => "The item's circulation library does not fulfill holds",
+        "config.circ_matrix_circ_mod_test" => "The patron has too many items of this type checked out",
+        "config.circ_matrix_test.available_copy_hold_ratio" => "The available item-to-hold ratio is too low",
+        "config.circ_matrix_test.circulate" => "Circulation rules reject this item as non-circulatable",
+        "config.circ_matrix_test.total_copy_hold_ratio" => "The total item-to-hold ratio is too low",
+        "config.hold_matrix_test.holdable" => "Hold rules reject this item as unholdable",
+        "config.hold_matrix_test.max_holds" => "The patron has reached the maximum number of holds",
+        "config.rule_age_hold_protect.prox" => "The item is too new to transit this far",
+        "no_item" => "The system could not find this item",
+        "no_ultimate_items" => "The system could not find any items to match this hold request",
+        "no_matchpoint" => "System rules do not define how to handle this item",
+        "no_user" => "The system could not find this patron",
+        "transit_range" => "The item cannot transit this far"
+    };
+
+
+    # This works like the above has, but instead of fail_parts for keys, use
+    # the textcode of the event.  This will only be consulted for events
+    # that do not have a fail_part matching something in the above hash.
+    # Wait until these are used to pass them through l() for i18n.
+
+    EVENT_MSG_MAP = {
+    };
+%]
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index 8ca6075..861a987 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -1,6 +1,8 @@
 [%  PROCESS "default/opac/parts/misc_util.tt2";
     attrs = {marc_xml => ctx.marc_xml};
     PROCESS get_marc_attrs args=attrs;
+
+    PROCESS "default/opac/parts/hold_error_messages.tt2";
 %]
 <div>
     <div id='holds_box' class='canvas' style='margin-top: 6px;'>
@@ -14,7 +16,14 @@
         <div>
             <strong>[% l('Problem:') %]</strong>
             <span title="[% ctx.hold_failed_event.textcode %]">
-                <em>[% ctx.hold_failed_event.desc ||
+                <em>[%
+                        fail_part_key = ctx.hold_failed_event.payload.fail_part;
+                        event_key = ctx.hold_failed_event.textcode;
+
+                        # display:
+                        l(FAIL_PART_MSG_MAP.$fail_part_key) ||
+                        l(EVENT_MSG_MAP.$event_key) ||
+                        l(ctx.hold_failed_event.desc) ||
                         ctx.hold_failed_event.payload.fail_part ||
                         ctx.hold_failed_event.textcode ||
                         (ctx.hold_local_alert ?

commit 4885d3ae21cda410e61a6841eea4614819acb116
Merge: b77da9e b82f698
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jul 20 14:19:41 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 90d3fe9923dfa0a477893cf3ec91b6f7092abf49
Author: evergreen <evergreen at squeeze.debian>
Date:   Wed Jul 20 11:38:14 2011 -0400

    according to git i've made changes to 950.data.seed-values.sql

diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 0082b83..6efa24c 100644
Binary files a/Open-ILS/src/sql/Pg/950.data.seed-values.sql and b/Open-ILS/src/sql/Pg/950.data.seed-values.sql differ

commit b77da9ed21b7602c5758472bce76755674135d6a
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Mon Jul 18 18:49:01 2011 -0400

    Fix the wrongish way we were doing staff-assisted holds
    
    Now the patron that a staff user wants to place a hold for is passed
    around as a cookie
    
    It's a little unclear when is best from a workflow perspective to kill
    said cookie... hrmmm....
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 72fbf59..b1d6483 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -168,6 +168,19 @@ sub redirect_auth {
 sub load_simple {
     my ($self, $page) = @_;
     $self->ctx->{page} = $page;
+
+    if (my $patron_barcode = $self->cgi->param("patron_barcode")) {
+        # Special CGI variable from staff client; propagate henceforth as cookie
+        $self->apache->headers_out->add(
+            "Set-Cookie" => $self->cgi->cookie(
+                -name => "patron_barcode",
+                -path => "/",
+                -secure => 1,
+                -value => $patron_barcode,
+                -expires => undef
+            )
+        );
+    }
     return Apache2::Const::OK;
 }
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 410d06a..a715ab3 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -400,12 +400,19 @@ sub load_place_hold {
     $ctx->{hold_target} = $cgi->param('hold_target');
     $ctx->{hold_type} = $cgi->param('hold_type');
 
-    # Although in the context of staff placing holds for other users, this
-    # does not yield the appropriate pickup lib, that situation is addressed
-    # in the client with javascript when possible.
-    $ctx->{default_pickup_lib} = $e->requestor->home_ou;
+    $ctx->{default_pickup_lib} = $e->requestor->home_ou; # unless changed below
 
-    my $request_lib = $e->requestor->ws_ou || $e->requestor->home_ou;
+    if (my $bc = $self->cgi->cookie("patron_barcode")) {
+        # passed in from staff client
+        $ctx->{patron_recipient} = $U->simplereq(
+            "open-ils.actor", "open-ils.actor.user.fleshed.retrieve_by_barcode",
+            $self->editor->authtoken, $bc
+        ) or return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+
+        $ctx->{default_pickup_lib} = $ctx->{patron_recipient}->home_ou;
+    }
+
+    my $request_lib = $e->requestor->ws_ou;
 
     # XXX check for failure of the retrieve_* methods called below, and
     # possibly replace all the if,elsif with a dispatch table (meh, elegance)
@@ -527,7 +534,21 @@ sub load_place_hold {
                 $self->apache->log->info(
                     "Redirecting back to " . $cgi->param('redirect_to')
                 );
-                return $self->generic_redirect;
+
+                # We also clear the patron_barcode (from the staff client)
+                # cookie at this point (otherwise it haunts the staff user
+                # later). XXX todo make sure this is best; also see that
+                # template when staff mode calls xulG.opac_hold_placed()
+                return $self->generic_redirect(
+                    undef,
+                    $self->cgi->cookie(
+                        -name => "patron_barcode",
+                        -path => "/",
+                        -secure => 1,
+                        -value => "",
+                        -expires => "-1h"
+                    )
+                );
 
             } else {
                 $ctx->{hold_failed} = 1;
diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
index 16234b5..c170198 100644
--- a/Open-ILS/web/js/ui/default/opac/staff.js
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -18,31 +18,9 @@ function staff_hold_usr_input_disabler(input) {
     document.getElementById("hold_usr_input").disabled =
         Boolean(Number(input.value));
 }
-function staff_hold_usr_prepop() {
-    if (xulG && xulG.patron_barcode) {
-        var sel = document.getElementById("pickup_lib");
-        for (var i = 0; i < sel.options.length; i++) {
-            if (sel.options[i].value == xulG.patron_home_ou) {
-                sel.selectedIndex = i;
-                break;
-            }
-        }
-        document.getElementById("hold_usr_input").value = xulG.patron_barcode;
-        document.getElementById("hold_usr_input").disabled = false;
-        document.getElementById("hold_usr_is_requestor_not").checked = true;
-
-        var kill_this =
-            document.getElementById("hold_usr_is_requestor").parentNode;
-        kill_this.parentNode.removeChild(kill_this);
-    }
-}
 window.onload = function() {
     // record details page events
     var rec = location.href.match(/\/opac\/record\/(\d+)/);
     if(rec && rec[1]) { runEvt('rdetail', 'recordRetrieved', rec[1]); }
-
-    if (document.getElementById("hold_usr_input"))
-        staff_hold_usr_prepop();
-
     // fire other events the staff client is expecting...
 }
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index 4dcd278..8ca6075 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -68,11 +68,13 @@
             <p class="staff-hold">
                 <input type="radio" id="hold_usr_is_requestor_not"
                     onchange="staff_hold_usr_input_disabler(this);"
-                    name="hold_usr_is_requestor" value="0" />
+                    name="hold_usr_is_requestor" value="0"
+                    [% IF ctx.patron_recipient; ' checked="checked"'; END %]
+                    />
                 <label for="hold_usr_is_requestor_not">
                     [% l("Place hold for patron by barcode:") %]
                 </label>
-                <input type="text" name="hold_usr" id="hold_usr_input" /><br />
+                <input type="text" name="hold_usr" id="hold_usr_input" value="[% ctx.patron_recipient.card.barcode %]" /><br />[%# XXX multi-barcode users? %]
                 <span>
                     <input type="radio" id="hold_usr_is_requestor"
                         onchange="staff_hold_usr_input_disabler(this);"
diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js
index 5dd912a..dc86318 100644
--- a/Open-ILS/xul/staff_client/server/patron/holds.js
+++ b/Open-ILS/xul/staff_client/server/patron/holds.js
@@ -1309,6 +1309,9 @@ patron.holds.prototype = {
                         ['command'],
                         function(ev) {
                             try {
+                                var use_url = urls.browser;
+                                use_url += use_url.match(/\?/) ? "&" : "?";
+                                use_url += "patron_barcode=" + obj.patron_barcode;
                                 var content_params = {
                                     'show_nav_buttons' : false,
                                     'show_print_button' : true,
@@ -1341,11 +1344,10 @@ patron.holds.prototype = {
                                                 obj.error.standard_unexpected_error_alert('holds.js, opac_hold_placed(): ',E);
                                             }
                                         },
-                                        'patron_barcode' : obj.patron_barcode,
-                                        'patron_home_ou': patron.util.retrieve_au_via_id(ses(),obj.patron_id).home_ou()
+                                        'patron_barcode' : obj.patron_barcode
                                     },
                                     'url_prefix' : xulG.url_prefix,
-                                    'url' : xulG.url_prefix( urls.browser )
+                                    'url' : xulG.url_prefix(use_url)
                                 };
                                 xulG.display_window.g.patron.right_deck.set_iframe( urls.XUL_REMOTE_BROWSER + '?patron_hold=1', {}, content_params);
                             } catch(E) {

commit 00f61c6a03b0cf1ad67713cb0705f3d5e2adf961
Merge: 777679e 8de304a
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Mon Jul 18 13:56:38 2011 -0400

    Merge branch 'master' of git://git.evergreen-ils.org/Evergreen into template-toolkit-opac


commit 777679e17299dcdcc135d493a2a9987c9357d9ff
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Mon Jul 18 13:40:17 2011 -0400

    Alert or block holds on available copy at same pickup lib
    
    This improves upon the earlier commit that attempted to deal with what
    to do when either of these org_unit settings are true:
    
         circ.holds.hold_has_copy_at.alert
         circ.holds.hold_has_copy_at.block
    
    The correct use of these settings are that when /any/ type of hold is
    attempted at a given pickup lib, if either of those settings are true in
    the context of said pickup lib, and there are copies in an available
    status at the pickup lib already, inform the user before placing the
    hold.  In the alert case, the user can place the hold anyway with
    another click.  In the block case, there's an end on't.
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
index 48abee94..26b57f0 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -3353,15 +3353,15 @@ __PACKAGE__->register_method(
                 'available at the library where the user is placing the hold (or, alternatively, '.
                 'at the pickup library) to encourage bypassing the hold placement and just '      .
                 'checking out the item.' ,
-        params => {
+        params => [
             { desc => 'Authentication Token', type => 'string' },
             { desc => 'Method Arguments.  Options include: hold_type, hold_target, org_unit.  ' 
                     . 'hold_type is the hold type code (T, V, C, M, ...).  '
                     . 'hold_target is the identifier of the hold target object.  ' 
                     . 'org_unit is org unit ID.', 
               type => 'object' 
-            },
-        },
+            }
+        ],
         return => { 
             desc => q/Result hash like { "copy" : copy_id, "location" : location_name }, empty hash on misses, event on error./,
             type => 'object' 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index a1f7178..410d06a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -7,6 +7,8 @@ use OpenILS::Utils::Fieldmapper;
 use OpenILS::Application::AppUtils;
 use OpenILS::Event;
 use OpenSRF::Utils::JSON;
+use Data::Dumper;
+$Data::Dumper::Indent = 0;
 use DateTime;
 my $U = 'OpenILS::Application::AppUtils';
 
@@ -44,19 +46,37 @@ sub test_could_override {
 
 # Find out whether we care that local copies are available
 sub local_avail_concern {
-    my ($self, $allowed, $request_lib) = @_;
-
-    my ($block, $alert);
-    if ($allowed->{"success"} and $allowed->{"local_avail"}) {
-        $block = $self->ctx->{get_org_setting}->
-            ($request_lib, "circ.holds.hold_has_copy_at.block");
-        $alert = (
-            $self->ctx->{get_org_setting}->
-                ($request_lib, "circ.holds.hold_has_copy_at.alert")
-                and not $self->cgi->param("override")
+    my ($self, $allowed, $hold_target, $hold_type, $pickup_lib) = @_;
+
+    my $would_block = $self->ctx->{get_org_setting}->
+        ($pickup_lib, "circ.holds.hold_has_copy_at.block");
+    my $would_alert = (
+        $self->ctx->{get_org_setting}->
+            ($pickup_lib, "circ.holds.hold_has_copy_at.alert") and
+                not $self->cgi->param("override")
+    ) unless $would_block;
+
+    if ($allowed->{"success"} and ($would_block or $would_alert)) {
+        my $args = {
+            "hold_target" => $hold_target,
+            "hold_type" => $hold_type,
+            "org_unit" => $pickup_lib
+        };
+        my $local_avail = $U->simplereq(
+            "open-ils.circ",
+            "open-ils.circ.hold.has_copy_at", $self->editor->authtoken, $args
+        );
+        $logger->info(
+            "copy availability information for " . Dumper($args) .
+            " is " . Dumper($local_avail)
         );
+        if (%$local_avail) { # if hash not empty
+            $self->ctx->{hold_copy_available} = $local_avail;
+            return ($would_block, $would_alert);
+        }
     }
-    return ($block, $alert);
+
+    return (0, 0);
 }
 
 # context additions: 
@@ -468,8 +488,13 @@ sub load_place_hold {
 
         $logger->info('hold permit result ' . OpenSRF::Utils::JSON->perl2JSON($allowed));
 
-        my ($local_block, $local_alert) =
-            $self->local_avail_concern($allowed, $request_lib);
+        my ($local_block, $local_alert) = $self->local_avail_concern(
+            $allowed, $args->{$target_field}, $args->{hold_type}, $pickup_lib
+        );
+
+        # Give the original CGI params back to the user in case they
+        # want to try to override something.
+        $ctx->{orig_params} = $cgi->Vars;
 
         if ($local_block) {
             $ctx->{hold_failed} = 1;
@@ -507,9 +532,6 @@ sub load_place_hold {
             } else {
                 $ctx->{hold_failed} = 1;
 
-                # Give the original CGI params back to the user in case they
-                # want to try to override something.
-                $ctx->{orig_params} = $cgi->Vars;
                 delete $ctx->{orig_params}{submit};
 
                 if (ref $stat eq 'ARRAY') {
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index e4304bd..4dcd278 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -8,7 +8,9 @@
         <div><big><strong>[% l("Hold was successfully placed"); %]</strong></big></div>
         [% ELSIF ctx.hold_failed %]
         <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
-            [% IF ctx.hold_failed_event || ctx.hold_local_alert %]
+            [% IF ctx.hold_local_block %]
+            <div>[% l("There is already a copy available at your local library.") %]</div>
+            [% ELSIF ctx.hold_failed_event || ctx.hold_local_alert %]
         <div>
             <strong>[% l('Problem:') %]</strong>
             <span title="[% ctx.hold_failed_event.textcode %]">
@@ -16,10 +18,16 @@
                         ctx.hold_failed_event.payload.fail_part ||
                         ctx.hold_failed_event.textcode ||
                         (ctx.hold_local_alert ?
-                            l("There is already a copy available at your local library") :
-                            l("Unknown problem")) %]
+                            l("There is already a copy available at your local library.") :
+                            l("Unknown problem")) %]</em>
             </span>
-            [% IF ctx.could_override %]
+
+            [% IF ctx.hold_copy_available %]<p>
+            [% l('Find a copy in the shelving location, "[_1]."',
+                ctx.hold_copy_available.location) %]
+            </p>[% END %]
+
+            [% IF ctx.could_override || ctx.hold_local_alert %]
             <p>
                 <big>[% l("You have permission to place this hold anyway.") %]</big>
                 <br />
@@ -276,8 +284,6 @@
                 </tr>
             </tbody>
         </table>
-        <div class='hide_me' id='holds_success'>[% l("Hold was successfully placed") %]</div>
-        <div class='hide_me' id='holds_failure'>[% l("Hold was not successfully placed") %]</div>
         <span class='hide_me' id='holds_bad_phone'>
             [% l("The phone number does not have the correct format. The expected format is XXX-YYY-ZZZZ") %]
         </span>

commit d2f3229ab5d031b125d9f6dc5320806bbb4db914
Merge: bb3e2a2 73ef5cf
Author: evergreen <evergreen at squeeze.debian>
Date:   Fri Jul 15 19:49:55 2011 -0400

    Merge branch 'master' of git://git.evergreen-ils.org/Evergreen into ttopac


commit 80719637f3bb1e61c24ddc0f2f6001dd9fa4392e
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Jul 15 18:27:30 2011 -0400

    Allow overriding some hold events when permissions apply
    
    Works fine now for HOLD_EXISTS and HOLD_ITEM_CHECKOUT_OUT, at least
    
    But this was also supposed to work with these org settings:
     circ.holds.hold_has_copy_at.alert
     circ.holds.hold_has_copy_at.block
    which are supposed to define behavior when the user wants to place a
    (copy- or volume-level only?) hold on an item at a branch that's not his
    home_ou but his home_ou has an available copy.
    
    Anyway, the open-ils.circ.title_hold.is_possible method is supposed to
    return information about whether local copies are available to support
    such a function, but it doesn't seem to do so.  I think.  Will revisit.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 9e762e9..a1f7178 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -28,6 +28,37 @@ sub prepare_extended_user_info {
     return;
 }
 
+# Given an event returned by a failed attempt to create a hold, do we have
+# permission to override?  XXX Should the permission check be scoped to a
+# given org_unit context?
+sub test_could_override {
+    my ($self) = @_;
+    my $event = $self->ctx->{"hold_failed_event"};
+
+    return 0 unless $event;
+    return 1 if $self->editor->allowed($event . ".override");
+    return 1 if $event->{"fail_part"} and
+        $self->editor->allowed($event->{"fail_part"} . ".override");
+    return 0;
+}
+
+# Find out whether we care that local copies are available
+sub local_avail_concern {
+    my ($self, $allowed, $request_lib) = @_;
+
+    my ($block, $alert);
+    if ($allowed->{"success"} and $allowed->{"local_avail"}) {
+        $block = $self->ctx->{get_org_setting}->
+            ($request_lib, "circ.holds.hold_has_copy_at.block");
+        $alert = (
+            $self->ctx->{get_org_setting}->
+                ($request_lib, "circ.holds.hold_has_copy_at.alert")
+                and not $self->cgi->param("override")
+        );
+    }
+    return ($block, $alert);
+}
+
 # context additions: 
 #   user : au object, fleshed
 sub load_myopac_prefs {
@@ -341,13 +372,20 @@ sub load_myopac_holds {
 sub load_place_hold {
     my $self = shift;
     my $ctx = $self->ctx;
+    my $gos = $ctx->{get_org_setting};
     my $e = $self->editor;
     my $cgi = $self->cgi;
     $self->ctx->{page} = 'place_hold';
 
     $ctx->{hold_target} = $cgi->param('hold_target');
     $ctx->{hold_type} = $cgi->param('hold_type');
-    $ctx->{default_pickup_lib} = $e->requestor->home_ou; # XXX staff
+
+    # Although in the context of staff placing holds for other users, this
+    # does not yield the appropriate pickup lib, that situation is addressed
+    # in the client with javascript when possible.
+    $ctx->{default_pickup_lib} = $e->requestor->home_ou;
+
+    my $request_lib = $e->requestor->ws_ou || $e->requestor->home_ou;
 
     # XXX check for failure of the retrieve_* methods called below, and
     # possibly replace all the if,elsif with a dispatch table (meh, elegance)
@@ -411,6 +449,7 @@ sub load_place_hold {
                 $ctx->{hold_failed} = 1;
                 $ctx->{hold_failed_event} = $usr;
             }
+            # XXX Does $actor need to be explicity disconnected/destroyed?
         }
 
         my $args = {
@@ -427,7 +466,18 @@ sub load_place_hold {
             $e->authtoken, $args
         );
 
-        if($allowed->{success} == 1) {
+        $logger->info('hold permit result ' . OpenSRF::Utils::JSON->perl2JSON($allowed));
+
+        my ($local_block, $local_alert) =
+            $self->local_avail_concern($allowed, $request_lib);
+
+        if ($local_block) {
+            $ctx->{hold_failed} = 1;
+            $ctx->{hold_local_block} = 1;
+        } elsif ($local_alert) {
+            $ctx->{hold_failed} = 1;
+            $ctx->{hold_local_alert} = 1;
+        } elsif ($allowed->{success}) {
             my $hold = Fieldmapper::action::hold_request->new;
 
             $hold->pickup_lib($pickup_lib);
@@ -437,19 +487,42 @@ sub load_place_hold {
             $hold->hold_type($ctx->{hold_type});
             # frozen, expired, etc..
 
+            my $method =  "open-ils.circ.holds.create";
+            $method .= ".override" if $cgi->param("override");
+
             my $stat = $U->simplereq(
-                'open-ils.circ',
-                'open-ils.circ.holds.create',
-                $e->authtoken, $hold
+                "open-ils.circ", $method, $e->authtoken, $hold
             );
 
-            if($stat and $stat > 0) {
+            # The following did not cover all the possible return values of
+            # open-ils.circ.holds.create
+            #if($stat and $stat > 0) {
+            if ($stat and (not ref $stat) and $stat > 0) {
                 # if successful, return the user to the requesting page
-                $self->apache->log->info("Redirecting back to " . $cgi->param('redirect_to'));
+                $self->apache->log->info(
+                    "Redirecting back to " . $cgi->param('redirect_to')
+                );
                 return $self->generic_redirect;
 
             } else {
                 $ctx->{hold_failed} = 1;
+
+                # Give the original CGI params back to the user in case they
+                # want to try to override something.
+                $ctx->{orig_params} = $cgi->Vars;
+                delete $ctx->{orig_params}{submit};
+
+                if (ref $stat eq 'ARRAY') {
+                    $ctx->{hold_failed_event} = shift @$stat;
+                } elsif (defined $U->event_code($stat)) {
+                    $ctx->{hold_failed_event} = $stat;
+                } else {
+                    $self->apache->log->info(
+                        "attempt to create hold returned $stat"
+                    );
+                }
+
+                $ctx->{could_override} = $self->test_could_override;
             }
         } else { # hold *check* failed
             $ctx->{hold_failed} = 1; # XXX process the events, etc
@@ -457,7 +530,6 @@ sub load_place_hold {
         }
 
         # hold permit failed
-        $logger->info('hold permit result ' . OpenSRF::Utils::JSON->perl2JSON($allowed));
     }
 
     return Apache2::Const::OK;
diff --git a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
index d8d3fc7..3a203f6 100644
--- a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
@@ -1,13 +1,16 @@
 [%
     BLOCK build_org_selector_options;
         disabled = '';
+        selected = '';
         IF can_have_vols_only;
-            UNLESS walker.ou_type.can_have_vols == 't';
+            IF walker.ou_type.can_have_vols != 't';
                 disabled = 'disabled="disabled"';
+            ELSIF walker.id == value;
+                selected = 'selected="selected"';
             END;
         END;
 %]
-        <option value='[% walker.id %]' [% IF walker.id == value %] selected='selected' [% END %][% disabled %]>
+        <option value='[% walker.id %]' [% selected %] [% disabled %]>
             [%
                 pad = walker.ou_type.depth * 2;
                 FOR idx IN [0..pad]; '&nbsp;'; END;
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index 69c469a..e4304bd 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -8,16 +8,36 @@
         <div><big><strong>[% l("Hold was successfully placed"); %]</strong></big></div>
         [% ELSIF ctx.hold_failed %]
         <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
-            [% IF ctx.hold_failed_event %]
+            [% IF ctx.hold_failed_event || ctx.hold_local_alert %]
         <div>
             <strong>[% l('Problem:') %]</strong>
             <span title="[% ctx.hold_failed_event.textcode %]">
                 <em>[% ctx.hold_failed_event.desc ||
                         ctx.hold_failed_event.payload.fail_part ||
-                        ctx.hold_failed_event.textcode %]</em>
+                        ctx.hold_failed_event.textcode ||
+                        (ctx.hold_local_alert ?
+                            l("There is already a copy available at your local library") :
+                            l("Unknown problem")) %]
             </span>
+            [% IF ctx.could_override %]
+            <p>
+                <big>[% l("You have permission to place this hold anyway.") %]</big>
+                <br />
+                [% l("Click submit below to override the system's objection and place your hold.") %]
+            </p>
+            <form method="POST">
+                <input type="hidden" type="name" name="override" value="1" />
+                [% FOR k IN ctx.orig_params.keys %]
+                <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | html %]" />
+                [% END %]
+                <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
+                    alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
+            </form>
+            [% END %]
         </div>
             [% END;
+        ELSIF ctx.hold_local_block;
+            l("There is already a copy available at your local library");
         ELSE %]
         <form method="POST">
             <br/>

commit 56005d6684b42d6b15ec982c48e9d77a96d1858d
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Wed Jul 13 12:24:38 2011 -0400

    Preset correct default pickup lib for staff placing holds for patrons
    
    Also, for hold placement, only enable org unit selection where
    can_have_vols is true.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
index b5ef7f5..16234b5 100644
--- a/Open-ILS/web/js/ui/default/opac/staff.js
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -20,6 +20,13 @@ function staff_hold_usr_input_disabler(input) {
 }
 function staff_hold_usr_prepop() {
     if (xulG && xulG.patron_barcode) {
+        var sel = document.getElementById("pickup_lib");
+        for (var i = 0; i < sel.options.length; i++) {
+            if (sel.options[i].value == xulG.patron_home_ou) {
+                sel.selectedIndex = i;
+                break;
+            }
+        }
         document.getElementById("hold_usr_input").value = xulG.patron_barcode;
         document.getElementById("hold_usr_input").disabled = false;
         document.getElementById("hold_usr_is_requestor_not").checked = true;
diff --git a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
index 2daf63a..d8d3fc7 100644
--- a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
@@ -1,6 +1,13 @@
 [%
-    BLOCK build_org_selector_options; %]
-        <option value='[% walker.id %]' [% IF walker.id == value %] selected='selected' [% END %]>
+    BLOCK build_org_selector_options;
+        disabled = '';
+        IF can_have_vols_only;
+            UNLESS walker.ou_type.can_have_vols == 't';
+                disabled = 'disabled="disabled"';
+            END;
+        END;
+%]
+        <option value='[% walker.id %]' [% IF walker.id == value %] selected='selected' [% END %][% disabled %]>
             [%
                 pad = walker.ou_type.depth * 2;
                 FOR idx IN [0..pad]; '&nbsp;'; END;
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index 9e90c7a..69c469a 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -58,15 +58,14 @@
             [% END %]
             <p>
                 [% | l(attrs.title, ctx.get_aou(ctx.default_pickup_lib).name) %]
-                You would like to place a hold on <strong><q>[_1]</q></strong> to be picked up at [_2].
-                If this is correct, press <strong>SUBMIT</strong>.
+                You would like to place a hold on <strong><q>[_1]</q></strong>.<br />
+                If this is correct, confirm your pickup location and click <strong>SUBMIT</strong>.
                 [% END %]
             </p>
             <p>
-                [% l('If you would like to change the library pick up location, select from the location dropdown menu.') %]
-                <br class="clear-both" />
+                [% l('Pickup location:') %]
                 [% PROCESS "default/opac/parts/org_selector.tt2";
-                    PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib %]
+                    PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib id='pickup_lib' can_have_vols_only=1 %]
             </p>
             <p>
                 [% |l %]If you use the Traveling Library Center (TLC) and ABC Express
diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js
index 234b2b6..5dd912a 100644
--- a/Open-ILS/xul/staff_client/server/patron/holds.js
+++ b/Open-ILS/xul/staff_client/server/patron/holds.js
@@ -1341,7 +1341,8 @@ patron.holds.prototype = {
                                                 obj.error.standard_unexpected_error_alert('holds.js, opac_hold_placed(): ',E);
                                             }
                                         },
-                                        'patron_barcode' : obj.patron_barcode
+                                        'patron_barcode' : obj.patron_barcode,
+                                        'patron_home_ou': patron.util.retrieve_au_via_id(ses(),obj.patron_id).home_ou()
                                     },
                                     'url_prefix' : xulG.url_prefix,
                                     'url' : xulG.url_prefix( urls.browser )

commit d08b459f20e5774bda060f3d49e67e6ce334a579
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Tue Jul 12 17:24:16 2011 -0400

    copy and volume level holds for staff
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 371ce14..9e762e9 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -349,9 +349,36 @@ sub load_place_hold {
     $ctx->{hold_type} = $cgi->param('hold_type');
     $ctx->{default_pickup_lib} = $e->requestor->home_ou; # XXX staff
 
+    # XXX check for failure of the retrieve_* methods called below, and
+    # possibly replace all the if,elsif with a dispatch table (meh, elegance)
+
+    my $target_field;
     if ($ctx->{hold_type} eq 'T') {
+        $target_field = "titleid";
         $ctx->{record} = $e->retrieve_biblio_record_entry($ctx->{hold_target});
+    } elsif ($ctx->{hold_type} eq 'V') {
+        $target_field = "volume_id";
+        my $vol = $e->retrieve_asset_call_number([
+            $ctx->{hold_target}, {
+                "flesh" => 1,
+                "flesh_fields" => {"acn" => ["record"]}
+            }
+        ]);
+        $ctx->{record} = $vol->record;
+    } elsif ($ctx->{hold_type} eq 'C') {
+        $target_field = "copy_id";
+        my $copy = $e->retrieve_asset_copy([
+            $ctx->{hold_target}, {
+                "flesh" => 2,
+                "flesh_fields" => {
+                    "acn" => ["record"],
+                    "acp" => ["call_number"]
+                }
+            }
+        ]);
+        $ctx->{record} = $copy->call_number->record;
     } elsif ($ctx->{hold_type} eq 'I') {
+        $target_field = "issuanceid";
         my $iss = $e->retrieve_serial_issuance([
             $ctx->{hold_target}, {
                 "flesh" => 2,
@@ -388,8 +415,9 @@ sub load_place_hold {
 
         my $args = {
             patronid => $usr,
-            titleid => $ctx->{hold_target}, # XXX
+            $target_field => $ctx->{"hold_target"},
             pickup_lib => $pickup_lib,
+            hold_type => $ctx->{"hold_type"},
             depth => 0, # XXX
         };
 
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 4dbfadc..96748e4 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -119,14 +119,15 @@
             [% IF ctx.is_staff %]
             <td>[% l("Age Hold Protection") %]</td>
             <td>[% l("Create Date") %]</td>
-            <td>[% l("Holdable") %]</td>
+            <td>[% l("Holdable?") %]</td>
             [% END %]
             <td>[% l("Status") %]</td>
             <td>[% l("Due Date") %]</td>
         </tr>
     </thead>
     <tbody class="copy_details_table">
-        [% FOR copy_info IN ctx.copies %]
+        [% last_cn = 0;
+        FOR copy_info IN ctx.copies %]
         <tr>
             <td>[%
                 # XXX KCLS-specific kludging
@@ -148,9 +149,22 @@
                 ctx.parse_datetime(copy_info.create_date),
                 DATE_FORMAT
             ) %]</td>
-            <td>[% (copy_info.holdable == 't' AND
-                    copy_info.location_holdable == 't' AND
-                    copy_info.status_holdable == 't') ? l('Yes') : l('No') %]</td>
+            <td>[%  # Show copy/volume hold links to staff (without
+                    # checking whether they have permissions to do those).
+                    overall_holdable = (copy_info.holdable == 't' AND
+                        copy_info.location_holdable == 't' AND
+                        copy_info.status_holdable == 't');
+                    IF overall_holdable;
+                        l("Place on"); %]
+                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% copy_info.id %]&amp;hold_type=C">[% l("copy") %]</a>
+                [%      IF copy_info.call_number != last_cn;
+                            last_cn = copy_info.call_number;
+                            l(" / "); %]
+                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% copy_info.call_number %]&amp;hold_type=V">[% l("volume") %]</a>
+                [%      END;
+                    ELSE;
+                        l("No");
+                    END %]</td>
             [% END %]
             <td>[% copy_info.copy_status %]</td>
             <td>[%

commit 936ab552ec7f46ed491fe1761532358d5a0d9512
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Mon Jul 11 18:17:13 2011 -0400

    When coming from staff client patron interface,
    
    pre-populate the patron barcode text box by which staff places a hold
    for a patron.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
index 533258c..b5ef7f5 100644
--- a/Open-ILS/web/js/ui/default/opac/staff.js
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -14,13 +14,28 @@ function runEvt(scope, name) {
         for(var i in evt) {evt[i].apply(evt[i], args);}
     } 
 }
-function staff_hold_nicety(thing) {
+function staff_hold_usr_input_disabler(input) {
     document.getElementById("hold_usr_input").disabled =
-        Boolean(Number(thing.value));
+        Boolean(Number(input.value));
+}
+function staff_hold_usr_prepop() {
+    if (xulG && xulG.patron_barcode) {
+        document.getElementById("hold_usr_input").value = xulG.patron_barcode;
+        document.getElementById("hold_usr_input").disabled = false;
+        document.getElementById("hold_usr_is_requestor_not").checked = true;
+
+        var kill_this =
+            document.getElementById("hold_usr_is_requestor").parentNode;
+        kill_this.parentNode.removeChild(kill_this);
+    }
 }
 window.onload = function() {
     // record details page events
     var rec = location.href.match(/\/opac\/record\/(\d+)/);
     if(rec && rec[1]) { runEvt('rdetail', 'recordRetrieved', rec[1]); }
+
+    if (document.getElementById("hold_usr_input"))
+        staff_hold_usr_prepop();
+
     // fire other events the staff client is expecting...
 }
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index 3e37244..9e90c7a 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -39,20 +39,21 @@
             [% IF ctx.is_staff %]
             <p class="staff-hold">
                 <input type="radio" id="hold_usr_is_requestor_not"
-                    onchange="staff_hold_nicety(this);"
+                    onchange="staff_hold_usr_input_disabler(this);"
                     name="hold_usr_is_requestor" value="0" />
                 <label for="hold_usr_is_requestor_not">
                     [% l("Place hold for patron by barcode:") %]
                 </label>
                 <input type="text" name="hold_usr" id="hold_usr_input" /><br />
-
-                <input type="radio" id="hold_usr_is_requestor"
-                    onchange="staff_hold_nicety(this);"
-                    name="hold_usr_is_requestor" value="1" />
-                <label for="hold_usr_is_requestor">
-                    [% l("Place this hold for me ([_1] [_2])",
-                    ctx.user.first_given_name, ctx.user.family_name) %]
-                </label>
+                <span>
+                    <input type="radio" id="hold_usr_is_requestor"
+                        onchange="staff_hold_usr_input_disabler(this);"
+                        name="hold_usr_is_requestor" value="1" />
+                    <label for="hold_usr_is_requestor">
+                        [% l("Place this hold for me ([_1] [_2])",
+                        ctx.user.first_given_name, ctx.user.family_name) %]
+                    </label>
+                </span>
             </p>
             [% END %]
             <p>

commit cc95a8f360af2a2f03f4fe48e253fce0ff77e2cb
Merge: a473e68 b621481
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Mon Jul 11 17:46:20 2011 -0400

    Merge branch 'template-toolkit-opac' of git://git.evergreen-ils.org/evergreen/equinox into template-toolkit-opac


commit a473e68540e532916eda31d35635bbba2dc54137
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Mon Jul 11 17:43:51 2011 -0400

    Staff can now place title-type holds for patrons
    
    Still need to put in copy, volume and issuance (and parts? maybe later) -type
    holds.  Still need to deal with overridable events.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index efaeb28..371ce14 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -366,10 +366,28 @@ sub load_place_hold {
 
     $ctx->{marc_xml} = XML::LibXML->new->parse_string($ctx->{record}->marc);
 
-    if(my $pickup_lib = $cgi->param('pickup_lib')) {
+    if (my $pickup_lib = $cgi->param('pickup_lib')) {
+        my $requestor = $e->requestor->id;
+        my $usr; 
+
+        if ((not $ctx->{"is_staff"}) or
+            ($cgi->param("hold_usr_is_requestor"))) {
+            $usr = $requestor;
+        } else {
+            my $actor = create OpenSRF::AppSession("open-ils.actor");
+            $usr = $actor->request(
+                "open-ils.actor.user.retrieve_id_by_barcode_or_username",
+                $e->authtoken, $cgi->param("hold_usr")
+            )->gather(1);
+
+            if (defined $U->event_code($usr)) {
+                $ctx->{hold_failed} = 1;
+                $ctx->{hold_failed_event} = $usr;
+            }
+        }
 
         my $args = {
-            patronid => $e->requestor->id,
+            patronid => $usr,
             titleid => $ctx->{hold_target}, # XXX
             pickup_lib => $pickup_lib,
             depth => 0, # XXX
@@ -385,8 +403,8 @@ sub load_place_hold {
             my $hold = Fieldmapper::action::hold_request->new;
 
             $hold->pickup_lib($pickup_lib);
-            $hold->requestor($e->requestor->id);
-            $hold->usr($e->requestor->id); # XXX staff
+            $hold->requestor($requestor);
+            $hold->usr($usr);
             $hold->target($ctx->{hold_target});
             $hold->hold_type($ctx->{hold_type});
             # frozen, expired, etc..
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 0e7ffda..cf2088b 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1002,3 +1002,4 @@ a.dash-link:hover { text-decoration: underline !important; }
 
 .invisible { visibility: hidden; }
 .rdetail-extras-summary { margin: 10px; }
+.staff-hold { background-color: #eee; }
diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
index abb8ce8..533258c 100644
--- a/Open-ILS/web/js/ui/default/opac/staff.js
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -14,6 +14,10 @@ function runEvt(scope, name) {
         for(var i in evt) {evt[i].apply(evt[i], args);}
     } 
 }
+function staff_hold_nicety(thing) {
+    document.getElementById("hold_usr_input").disabled =
+        Boolean(Number(thing.value));
+}
 window.onload = function() {
     // record details page events
     var rec = location.href.match(/\/opac\/record\/(\d+)/);
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index 8f56aa5..3e37244 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -3,39 +3,6 @@
     PROCESS get_marc_attrs args=attrs;
 %]
 <div>
-    <div id='xulholds_box' class='hide_me canvas' style='margin-top: 6px;'>
-        <!-- XXX TODO staff will need this to work ("advanced" hold placement)
-        later -->
-        <center>
-            <table class='data_grid' style='margin-top: 20px;'>
-                <tbody>
-                    <tr>
-                        <td>[% l("Enter recipient barcode") %]:</td>
-                        <td>
-                            <input type='text' id='xul_recipient_barcode' />
-                        </td>
-                        <td>
-                            <input type='submit' value='[% l("Submit") %]'
-                                id='xul_recipient_barcode_submit' />
-                        </td>
-                        <td>
-                            <input type='submit' value='[% l("Cancel") %]' />
-                        </td>
-                        <td>
-                            <input type='submit'
-                                value='[% l("Place hold for my account") %]'
-                                id='xul_recipient_me' />
-                        </td>
-                    </tr>
-                </tbody>
-            </table>
-        </center>
-    </div>
-    <div id='check_holds_box' class='hide_me canvas' 
-        style='margin-top: 6px; width: 100%; text-align: center'>
-        <br/><br/><br/>
-        <b>[% l("Checking for possibility of hold fulfillment...") %]</b>
-    </div>
     <div id='holds_box' class='canvas' style='margin-top: 6px;'>
         [% IF ctx.hold_success %]
         <div><big><strong>[% l("Hold was successfully placed"); %]</strong></big></div>
@@ -69,6 +36,25 @@
             <input type="hidden" name="redirect_to"
                 value="[% new_redirect_to | html %]" />
             <h1>Place Hold</h1>
+            [% IF ctx.is_staff %]
+            <p class="staff-hold">
+                <input type="radio" id="hold_usr_is_requestor_not"
+                    onchange="staff_hold_nicety(this);"
+                    name="hold_usr_is_requestor" value="0" />
+                <label for="hold_usr_is_requestor_not">
+                    [% l("Place hold for patron by barcode:") %]
+                </label>
+                <input type="text" name="hold_usr" id="hold_usr_input" /><br />
+
+                <input type="radio" id="hold_usr_is_requestor"
+                    onchange="staff_hold_nicety(this);"
+                    name="hold_usr_is_requestor" value="1" />
+                <label for="hold_usr_is_requestor">
+                    [% l("Place this hold for me ([_1] [_2])",
+                    ctx.user.first_given_name, ctx.user.family_name) %]
+                </label>
+            </p>
+            [% END %]
             <p>
                 [% | l(attrs.title, ctx.get_aou(ctx.default_pickup_lib).name) %]
                 You would like to place a hold on <strong><q>[_1]</q></strong> to be picked up at [_2].

commit b621481cd10a5a2d177976f97565d3b143035299
Merge: 01eca7f bded11d
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Jul 11 16:16:22 2011 -0400

    Merge branch 'template-toolkit-opac' of git.evergreen-ils.org:evergreen/equinox into template-toolkit-opac


commit 01eca7f7ef95d687064270f1cab88bbd8fbb139e
Merge: 3f35fdb 16c32ec
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Jul 11 16:16:21 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit bded11d22c5f1f094189746dde97adaa945eab25
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jul 8 15:13:25 2011 -0400

    Wrapped up Novelist integration support
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/js.tt2 b/Open-ILS/web/templates/default/opac/parts/js.tt2
index 4f7771d..b69c90b 100644
--- a/Open-ILS/web/templates/default/opac/parts/js.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/js.tt2
@@ -6,6 +6,12 @@
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/opac/staff.js"></script>
 [% END %]
 
+[% IF ENV.OILS_NOVELIST_URL AND ctx.page == 'record';
+    url = ENV.OILS_NOVELIST_URL;
+    IF CGI.https; url = url.replace('^http:', 'https:'); END; %]
+<script type='text/javascript' id='EIT' src='[% url %]'></script>
+[% END %]
+
 <!-- Google Analytics -->
 <script type="text/javascript">
 /* uncomment when ready */ /*
diff --git a/Open-ILS/web/templates/default/opac/parts/record/awards.tt2 b/Open-ILS/web/templates/default/opac/parts/record/awards.tt2
index dda3949..57f1003 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/awards.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/awards.tt2
@@ -15,15 +15,16 @@
         [% END %]
 
         <!-- Novelist suggestions-->
-        [% IF 0 %] 
+        [% IF ENV.OILS_NOVELIST_URL %] 
         <strong>[% l('Similar Books:') %]</strong>
-        <div id='rdetail_novelist_div' class='rdetail_extras_div'>
-        <div id="NoveListSelect" class="NoveListSelect">
-            <div id="NoveListAnchor" class="NoveListSelect"></div>
-            <div id="novsuggestions"></div>
-            <div id="nextreads"></div>
-            <div id="novrelatedauthors"></div>
-            <div id="novrelateditems"></div>
+        <div class='rdetail_extras_div'>
+            <div id="NoveListSelect" class="NoveListSelect">
+                <div id="NoveListAnchor" class="NoveListSelect"></div>
+                <div id="novsuggestions"></div>
+                <div id="nextreads"></div>
+                <div id="novrelatedauthors"></div>
+                <div id="novrelateditems"></div>
+            </div>
         </div>
         [% END %]
     </div>

commit bc6e33e0c0f6e6edf9cb62a3463c634bd54cc50f
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jul 8 14:17:38 2011 -0400

    Load Chilifresh content after page load
    
    Execute the CF JS after other inline JS has run.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/chilifresh.tt2 b/Open-ILS/web/templates/default/opac/parts/chilifresh.tt2
index 9c64e55..d58b3f5 100644
--- a/Open-ILS/web/templates/default/opac/parts/chilifresh.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/chilifresh.tt2
@@ -15,6 +15,6 @@
     <input type="hidden" id="chilifresh_version" name="chilifresh_version" value="onsite_v1" />
     <input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
     <script type="text/javascript" src="[% chili_url %]"></script>
-    <script>try { chili_init(); } catch(E) {}</script>
+    <script>try { setTimeout(chili_init, 0); } catch(E) {}</script>
 [% END %]
 

commit 12ca45468d394133e70555b18ca3e10029602389
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jul 8 14:17:16 2011 -0400

    Removed duplicate 'extras' tab
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index 2a86d0e..918cdcd 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -19,7 +19,6 @@
             {name => 'content',  label => l('Contents'), hide => 1}, # ToC
             {name => 'authors',  label => l('Authors')}, 
             {name => 'series',   label => l('Series'), hide => 1}, 
-            {name => 'awards',   label => l('Series'), hide => 1}, 
             {name => 'subjects', label => l('Subject')}, 
             {name => 'annotation', label => l('Annotation'), hide => 1}, 
             {name => 'awards',  label => l('Awards, Reviews, & Suggested Reads')}, 

commit e56472f0c88aed78f23c5abf6f3e460d0dc63774
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jul 8 12:32:14 2011 -0400

    Avoid mixed content warnings on embedded content cafe
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2
index 32af899..6fb3d53 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2
@@ -8,7 +8,7 @@
     <!-- Embedded content cafe iframe -->
     [% ident = attrs.isbn_clean || attrs.upc %]
     <iframe width="100%" height="400" frameborder="0" 
-        src="http://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
+        src="http[% CGI.https ? 's' : '' %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
             ENV.OILS_CONTENT_CAFE_USER %]&Password=[% ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident %]&Options=Y" >
     </iframe>
 </div>

commit d698321e9f96c2d75dab4cfe9a68a91e061cda68
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jul 8 12:22:24 2011 -0400

    Support for embedded Content Cafe on details page
    
    Added support for two new Apache environment variables
    OILS_CONTENT_CAFE_USER and OILS_CONTENT_CAFE_PASS.  If set, a Content
    Cafe pane will be loaded (via iframe) directly into a new "Summaries &
    More" section on the record details page of the TT-pac, when the
    section is expanded.  In addition to the C. Cafe content, we also show
    the 520 bib summary in the same pane.
    
    "Summaries & More" is only visible if either there is 520 data or there
    is a suitable identifier (isbn or upc) and the content cafe
    configuration is in place.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf
index e8ca3ec..e0571c8 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf
+++ b/Open-ILS/examples/apache/eg_vhost.conf
@@ -118,13 +118,12 @@ RewriteRule . - [E=locale:%1]
 
     # Specify the initial script URL for Novelist (containing account credentials, etc.)
     #SetEnv OILS_NOVELIST_URL
-    
+    #
 
     # Uncomment to force SSL any time a patron is logged in.  This protects 
     # authentication tokens.  Left commented out for backwards compat for now.
     #SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
 
-
     # If set, the skin uses the combined JS file at $SKINDIR/js/combined.js
     #SetEnv OILS_OPAC_COMBINED_JS 1
 
@@ -566,6 +565,13 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
     # Expire the HTML quickly since we're loading dynamic data for each page
     ExpiresActive On
     ExpiresByType text/html "access plus 5 seconds"
+    
+    # For use with embedded Content Cafe content
+    #SetEnv OILS_CONTENT_CAFE_USER 123
+    #SetEnv OILS_CONTENT_CAFE_PASS 456
+    # Consider copying/moving other added content configs 
+    # (e.g. NOVELIST) into here or to an outer container shared by
+    # both /opac and /eg/opac since some are used in both places
 </Location>
 
 
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index caba3e0..0e7ffda 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1001,3 +1001,4 @@ a.dash-link:hover { text-decoration: underline !important; }
 .rdetail-author-div { padding-bottom: 10px; }
 
 .invisible { visibility: hidden; }
+.rdetail-extras-summary { margin: 10px; }
diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index 0e7cd2c..b8e3e9c 100644
--- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -10,6 +10,7 @@
         args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
         args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
         args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
+        args.summary = xml.findnodes('//*[@tag="520"]/*[@code="a"]').textContent;
         args.edition = xml.findnodes('//*[@tag="250"]/*[@code="a"]').textContent ||
             xml.findnodes('//*[@tag="534"]/*[@code="b"]').textContent ||
             xml.findnodes('//*[@tag="775"]/*[@code="b"]').textContent;
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index 66b4917..2a86d0e 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -2,8 +2,20 @@
     <div id='rdetail_extras_div' style='width: 100%;'> 
 
         [%  # Hidden extras are not yet implemented.  Some may require JS
+
+        # Let's see if we should hide the content cafe / simple summary content
+        hide_summary = 1;
+        IF attrs.summary; hide_summary = 0; ELSE;
+            # Expose content cafe if it's reasonable to do so.
+            # This approach only works when using embedded content cafe.
+            IF ENV.OILS_CONTENT_CAFE_USER; 
+                ident = attrs.isbn_clean || attrs.upc; 
+                IF ident; hide_summary = 0; END;
+            END;
+        END;
+
         extras = [
-            {name => 'summary',  label => l('Summaries &amp; More'), hide => 1}, # Content Cafe
+            {name => 'summaryplus',  label => l('Summaries &amp; More'), hide => hide_summary}, 
             {name => 'content',  label => l('Contents'), hide => 1}, # ToC
             {name => 'authors',  label => l('Authors')}, 
             {name => 'series',   label => l('Series'), hide => 1}, 
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2
new file mode 100644
index 0000000..32af899
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/record/summaryplus.tt2
@@ -0,0 +1,15 @@
+<div class='rdetail_extras_div'> 
+    [%  IF attrs.summary %]
+    <div class='rdetail-extras-summary'>
+        <strong>[% l('Summary: ') %]</strong>[% attrs.summary %]
+    </div>
+    [% END %]
+
+    <!-- Embedded content cafe iframe -->
+    [% ident = attrs.isbn_clean || attrs.upc %]
+    <iframe width="100%" height="400" frameborder="0" 
+        src="http://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
+            ENV.OILS_CONTENT_CAFE_USER %]&Password=[% ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident %]&Options=Y" >
+    </iframe>
+</div>
+

commit 28e75a88450a736f5ad4fc62b5e4e546b159e423
Merge: 3f35fdb df467c8
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jul 8 10:00:23 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 3f35fdbcc872c9733ace9dc07343bab7985f674b
Merge: d9f76a4 6227dcd
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu Jul 7 10:13:04 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit d9f76a4005169639a6e2d0f39b36ca2c0bba4a15
Merge: df8b487 b17e3b1
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Jul 6 13:58:57 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit df8b487d183c3955c960640035a60358d843f63d
Merge: 5c02c79 a6ccd35
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Jul 5 21:09:39 2011 -0400

    Merge branch 'template-toolkit-opac' of git.evergreen-ils.org:evergreen/equinox into template-toolkit-opac


commit 5c02c79bba48a5e876b088eadf9bc4201a353b81
Merge: b519857 47ab015
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Jul 5 21:09:37 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit a6ccd35604c9c90b873d78b5ce83cb727f90bab2
Merge: b519857 47ab015
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Jul 5 16:38:21 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit b51985771dfb34c06cb889d2fa954103789d4ea3
Merge: 874a4f1 8b98ff9
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Jul 4 20:04:31 2011 -0400

    Merge branch 'template-toolkit-opac' of git.evergreen-ils.org:evergreen/equinox into template-toolkit-opac


commit 874a4f15e83418774623109e520b712c405ae373
Merge: 328c8b2 52402b4
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Jul 4 20:04:29 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 720cf416cf0f30f4bf8e42ff5ec08ee356fe47c8
Merge: 5394562 4fc8fa2
Author: Dan Scott <dan at coffeecode.net>
Date:   Thu Jun 30 14:51:25 2011 -0400

    Merge branch 'dbs/ttopac-move-templates' into dbs/template-toolkit-integration-on-master


commit 4fc8fa24f1b6eb67a8aa8adec46d5570f8589d80
Author: Dan Scott <dan at coffeecode.net>
Date:   Thu Jun 30 13:57:59 2011 -0400

    Move templates out of a web-served directory
    
    It has always been dicey to keep templates in the web-served
    /openils/var/web directory; with the rise of config.tt2 it is past time
    to get the templates out of there.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/examples/oils_web.xml.example b/Open-ILS/examples/oils_web.xml.example
index 0728082..9961490 100644
--- a/Open-ILS/examples/oils_web.xml.example
+++ b/Open-ILS/examples/oils_web.xml.example
@@ -51,8 +51,7 @@
          It's possible to override individual or sets of templates by putting them into
          a path in front of the default template path -->
     <template_paths>
-        <!-- XXX we should really move these out of the default web root -->
-        <path>/openils/var/web/templates</path>
+        <path>/openils/var/templates</path>
     </template_paths>
 
     <handlers>
diff --git a/Open-ILS/src/Makefile.am b/Open-ILS/src/Makefile.am
index e14f4c2..1ef6c9e 100644
--- a/Open-ILS/src/Makefile.am
+++ b/Open-ILS/src/Makefile.am
@@ -168,6 +168,9 @@ uninstall-hook:
 ilscore-install:
 	@echo $@
 	$(MKDIR_P) $(DESTDIR)$(TEMPLATEDIR)
+	cp -r @srcdir@/templates/base.tt2 $(DESTDIR)$(TEMPLATEDIR)
+	cp -r @srcdir@/templates/login.tt2 $(DESTDIR)$(TEMPLATEDIR)
+	cp -r @srcdir@/templates/default $(DESTDIR)$(TEMPLATEDIR)
 	cp -r @srcdir@/templates/marc $(DESTDIR)$(TEMPLATEDIR)
 	cp -r @srcdir@/templates/password-reset $(DESTDIR)$(TEMPLATEDIR)
 	@echo "Installing string templates to $(DESTDIR)$(TEMPLATEDIR)"
diff --git a/Open-ILS/web/templates/base.tt2 b/Open-ILS/src/templates/base.tt2
similarity index 100%
rename from Open-ILS/web/templates/base.tt2
rename to Open-ILS/src/templates/base.tt2
diff --git a/Open-ILS/web/templates/default/acq/common/claim_dialog.tt2 b/Open-ILS/src/templates/default/acq/common/claim_dialog.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/common/claim_dialog.tt2
rename to Open-ILS/src/templates/default/acq/common/claim_dialog.tt2
diff --git a/Open-ILS/web/templates/default/acq/common/final_claim_dialog.tt2 b/Open-ILS/src/templates/default/acq/common/final_claim_dialog.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/common/final_claim_dialog.tt2
rename to Open-ILS/src/templates/default/acq/common/final_claim_dialog.tt2
diff --git a/Open-ILS/web/templates/default/acq/common/info.tt2 b/Open-ILS/src/templates/default/acq/common/info.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/common/info.tt2
rename to Open-ILS/src/templates/default/acq/common/info.tt2
diff --git a/Open-ILS/web/templates/default/acq/common/inv_dialog.tt2 b/Open-ILS/src/templates/default/acq/common/inv_dialog.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/common/inv_dialog.tt2
rename to Open-ILS/src/templates/default/acq/common/inv_dialog.tt2
diff --git a/Open-ILS/web/templates/default/acq/common/jubgrid.tt2 b/Open-ILS/src/templates/default/acq/common/jubgrid.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/common/jubgrid.tt2
rename to Open-ILS/src/templates/default/acq/common/jubgrid.tt2
diff --git a/Open-ILS/web/templates/default/acq/common/li_table.tt2 b/Open-ILS/src/templates/default/acq/common/li_table.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/common/li_table.tt2
rename to Open-ILS/src/templates/default/acq/common/li_table.tt2
diff --git a/Open-ILS/web/templates/default/acq/common/li_table_pager.tt2 b/Open-ILS/src/templates/default/acq/common/li_table_pager.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/common/li_table_pager.tt2
rename to Open-ILS/src/templates/default/acq/common/li_table_pager.tt2
diff --git a/Open-ILS/web/templates/default/acq/common/notes.tt2 b/Open-ILS/src/templates/default/acq/common/notes.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/common/notes.tt2
rename to Open-ILS/src/templates/default/acq/common/notes.tt2
diff --git a/Open-ILS/web/templates/default/acq/financial/claim_eligible.tt2 b/Open-ILS/src/templates/default/acq/financial/claim_eligible.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/financial/claim_eligible.tt2
rename to Open-ILS/src/templates/default/acq/financial/claim_eligible.tt2
diff --git a/Open-ILS/web/templates/default/acq/financial/list_currency_types.tt2 b/Open-ILS/src/templates/default/acq/financial/list_currency_types.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/financial/list_currency_types.tt2
rename to Open-ILS/src/templates/default/acq/financial/list_currency_types.tt2
diff --git a/Open-ILS/web/templates/default/acq/financial/list_funding_sources.tt2 b/Open-ILS/src/templates/default/acq/financial/list_funding_sources.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/financial/list_funding_sources.tt2
rename to Open-ILS/src/templates/default/acq/financial/list_funding_sources.tt2
diff --git a/Open-ILS/web/templates/default/acq/financial/list_funds.tt2 b/Open-ILS/src/templates/default/acq/financial/list_funds.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/financial/list_funds.tt2
rename to Open-ILS/src/templates/default/acq/financial/list_funds.tt2
diff --git a/Open-ILS/web/templates/default/acq/financial/view_fund.tt2 b/Open-ILS/src/templates/default/acq/financial/view_fund.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/financial/view_fund.tt2
rename to Open-ILS/src/templates/default/acq/financial/view_fund.tt2
diff --git a/Open-ILS/web/templates/default/acq/financial/view_funding_source.tt2 b/Open-ILS/src/templates/default/acq/financial/view_funding_source.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/financial/view_funding_source.tt2
rename to Open-ILS/src/templates/default/acq/financial/view_funding_source.tt2
diff --git a/Open-ILS/web/templates/default/acq/financial/view_provider.tt2 b/Open-ILS/src/templates/default/acq/financial/view_provider.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/financial/view_provider.tt2
rename to Open-ILS/src/templates/default/acq/financial/view_provider.tt2
diff --git a/Open-ILS/web/templates/default/acq/invoice/view.tt2 b/Open-ILS/src/templates/default/acq/invoice/view.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/invoice/view.tt2
rename to Open-ILS/src/templates/default/acq/invoice/view.tt2
diff --git a/Open-ILS/web/templates/default/acq/lineitem/findbib.tt2 b/Open-ILS/src/templates/default/acq/lineitem/findbib.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/lineitem/findbib.tt2
rename to Open-ILS/src/templates/default/acq/lineitem/findbib.tt2
diff --git a/Open-ILS/web/templates/default/acq/lineitem/history.tt2 b/Open-ILS/src/templates/default/acq/lineitem/history.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/lineitem/history.tt2
rename to Open-ILS/src/templates/default/acq/lineitem/history.tt2
diff --git a/Open-ILS/web/templates/default/acq/lineitem/related.tt2 b/Open-ILS/src/templates/default/acq/lineitem/related.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/lineitem/related.tt2
rename to Open-ILS/src/templates/default/acq/lineitem/related.tt2
diff --git a/Open-ILS/web/templates/default/acq/lineitem/search.tt2 b/Open-ILS/src/templates/default/acq/lineitem/search.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/lineitem/search.tt2
rename to Open-ILS/src/templates/default/acq/lineitem/search.tt2
diff --git a/Open-ILS/web/templates/default/acq/lineitem/worksheet.tt2 b/Open-ILS/src/templates/default/acq/lineitem/worksheet.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/lineitem/worksheet.tt2
rename to Open-ILS/src/templates/default/acq/lineitem/worksheet.tt2
diff --git a/Open-ILS/web/templates/default/acq/picklist/bib_search.tt2 b/Open-ILS/src/templates/default/acq/picklist/bib_search.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/picklist/bib_search.tt2
rename to Open-ILS/src/templates/default/acq/picklist/bib_search.tt2
diff --git a/Open-ILS/web/templates/default/acq/picklist/brief_record.tt2 b/Open-ILS/src/templates/default/acq/picklist/brief_record.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/picklist/brief_record.tt2
rename to Open-ILS/src/templates/default/acq/picklist/brief_record.tt2
diff --git a/Open-ILS/web/templates/default/acq/picklist/from_bib.tt2 b/Open-ILS/src/templates/default/acq/picklist/from_bib.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/picklist/from_bib.tt2
rename to Open-ILS/src/templates/default/acq/picklist/from_bib.tt2
diff --git a/Open-ILS/web/templates/default/acq/picklist/list.tt2 b/Open-ILS/src/templates/default/acq/picklist/list.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/picklist/list.tt2
rename to Open-ILS/src/templates/default/acq/picklist/list.tt2
diff --git a/Open-ILS/web/templates/default/acq/picklist/upload.tt2 b/Open-ILS/src/templates/default/acq/picklist/upload.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/picklist/upload.tt2
rename to Open-ILS/src/templates/default/acq/picklist/upload.tt2
diff --git a/Open-ILS/web/templates/default/acq/picklist/user_request.tt2 b/Open-ILS/src/templates/default/acq/picklist/user_request.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/picklist/user_request.tt2
rename to Open-ILS/src/templates/default/acq/picklist/user_request.tt2
diff --git a/Open-ILS/web/templates/default/acq/picklist/view.tt2 b/Open-ILS/src/templates/default/acq/picklist/view.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/picklist/view.tt2
rename to Open-ILS/src/templates/default/acq/picklist/view.tt2
diff --git a/Open-ILS/web/templates/default/acq/po/create.tt2 b/Open-ILS/src/templates/default/acq/po/create.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/po/create.tt2
rename to Open-ILS/src/templates/default/acq/po/create.tt2
diff --git a/Open-ILS/web/templates/default/acq/po/edi_messages.tt2 b/Open-ILS/src/templates/default/acq/po/edi_messages.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/po/edi_messages.tt2
rename to Open-ILS/src/templates/default/acq/po/edi_messages.tt2
diff --git a/Open-ILS/web/templates/default/acq/po/events.tt2 b/Open-ILS/src/templates/default/acq/po/events.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/po/events.tt2
rename to Open-ILS/src/templates/default/acq/po/events.tt2
diff --git a/Open-ILS/web/templates/default/acq/po/history.tt2 b/Open-ILS/src/templates/default/acq/po/history.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/po/history.tt2
rename to Open-ILS/src/templates/default/acq/po/history.tt2
diff --git a/Open-ILS/web/templates/default/acq/po/item_table.tt2 b/Open-ILS/src/templates/default/acq/po/item_table.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/po/item_table.tt2
rename to Open-ILS/src/templates/default/acq/po/item_table.tt2
diff --git a/Open-ILS/web/templates/default/acq/po/search.tt2 b/Open-ILS/src/templates/default/acq/po/search.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/po/search.tt2
rename to Open-ILS/src/templates/default/acq/po/search.tt2
diff --git a/Open-ILS/web/templates/default/acq/po/view.tt2 b/Open-ILS/src/templates/default/acq/po/view.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/po/view.tt2
rename to Open-ILS/src/templates/default/acq/po/view.tt2
diff --git a/Open-ILS/web/templates/default/acq/receiving/process.tt2 b/Open-ILS/src/templates/default/acq/receiving/process.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/receiving/process.tt2
rename to Open-ILS/src/templates/default/acq/receiving/process.tt2
diff --git a/Open-ILS/web/templates/default/acq/search/unified.tt2 b/Open-ILS/src/templates/default/acq/search/unified.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/search/unified.tt2
rename to Open-ILS/src/templates/default/acq/search/unified.tt2
diff --git a/Open-ILS/web/templates/default/acq/settings/li_attr.tt2 b/Open-ILS/src/templates/default/acq/settings/li_attr.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/acq/settings/li_attr.tt2
rename to Open-ILS/src/templates/default/acq/settings/li_attr.tt2
diff --git a/Open-ILS/web/templates/default/actor/user/register.tt2 b/Open-ILS/src/templates/default/actor/user/register.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/actor/user/register.tt2
rename to Open-ILS/src/templates/default/actor/user/register.tt2
diff --git a/Open-ILS/web/templates/default/actor/user/register_table.tt2 b/Open-ILS/src/templates/default/actor/user/register_table.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/actor/user/register_table.tt2
rename to Open-ILS/src/templates/default/actor/user/register_table.tt2
diff --git a/Open-ILS/web/templates/default/actor/user/trigger_events.tt2 b/Open-ILS/src/templates/default/actor/user/trigger_events.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/actor/user/trigger_events.tt2
rename to Open-ILS/src/templates/default/actor/user/trigger_events.tt2
diff --git a/Open-ILS/web/templates/default/base.tt2 b/Open-ILS/src/templates/default/base.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/base.tt2
rename to Open-ILS/src/templates/default/base.tt2
diff --git a/Open-ILS/web/templates/default/booking/capture.tt2 b/Open-ILS/src/templates/default/booking/capture.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/booking/capture.tt2
rename to Open-ILS/src/templates/default/booking/capture.tt2
diff --git a/Open-ILS/web/templates/default/booking/pickup.tt2 b/Open-ILS/src/templates/default/booking/pickup.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/booking/pickup.tt2
rename to Open-ILS/src/templates/default/booking/pickup.tt2
diff --git a/Open-ILS/web/templates/default/booking/pull_list.tt2 b/Open-ILS/src/templates/default/booking/pull_list.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/booking/pull_list.tt2
rename to Open-ILS/src/templates/default/booking/pull_list.tt2
diff --git a/Open-ILS/web/templates/default/booking/reservation.tt2 b/Open-ILS/src/templates/default/booking/reservation.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/booking/reservation.tt2
rename to Open-ILS/src/templates/default/booking/reservation.tt2
diff --git a/Open-ILS/web/templates/default/booking/return.tt2 b/Open-ILS/src/templates/default/booking/return.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/booking/return.tt2
rename to Open-ILS/src/templates/default/booking/return.tt2
diff --git a/Open-ILS/web/templates/default/cat/authority/list.tt2 b/Open-ILS/src/templates/default/cat/authority/list.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/cat/authority/list.tt2
rename to Open-ILS/src/templates/default/cat/authority/list.tt2
diff --git a/Open-ILS/web/templates/default/circ/selfcheck/audio_config.tt2 b/Open-ILS/src/templates/default/circ/selfcheck/audio_config.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/circ/selfcheck/audio_config.tt2
rename to Open-ILS/src/templates/default/circ/selfcheck/audio_config.tt2
diff --git a/Open-ILS/web/templates/default/circ/selfcheck/banner.tt2 b/Open-ILS/src/templates/default/circ/selfcheck/banner.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/circ/selfcheck/banner.tt2
rename to Open-ILS/src/templates/default/circ/selfcheck/banner.tt2
diff --git a/Open-ILS/web/templates/default/circ/selfcheck/circ_page.tt2 b/Open-ILS/src/templates/default/circ/selfcheck/circ_page.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/circ/selfcheck/circ_page.tt2
rename to Open-ILS/src/templates/default/circ/selfcheck/circ_page.tt2
diff --git a/Open-ILS/web/templates/default/circ/selfcheck/fines.tt2 b/Open-ILS/src/templates/default/circ/selfcheck/fines.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/circ/selfcheck/fines.tt2
rename to Open-ILS/src/templates/default/circ/selfcheck/fines.tt2
diff --git a/Open-ILS/web/templates/default/circ/selfcheck/holds_page.tt2 b/Open-ILS/src/templates/default/circ/selfcheck/holds_page.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/circ/selfcheck/holds_page.tt2
rename to Open-ILS/src/templates/default/circ/selfcheck/holds_page.tt2
diff --git a/Open-ILS/web/templates/default/circ/selfcheck/main.tt2 b/Open-ILS/src/templates/default/circ/selfcheck/main.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/circ/selfcheck/main.tt2
rename to Open-ILS/src/templates/default/circ/selfcheck/main.tt2
diff --git a/Open-ILS/web/templates/default/circ/selfcheck/patron_login.tt2 b/Open-ILS/src/templates/default/circ/selfcheck/patron_login.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/circ/selfcheck/patron_login.tt2
rename to Open-ILS/src/templates/default/circ/selfcheck/patron_login.tt2
diff --git a/Open-ILS/web/templates/default/circ/selfcheck/payment.tt2 b/Open-ILS/src/templates/default/circ/selfcheck/payment.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/circ/selfcheck/payment.tt2
rename to Open-ILS/src/templates/default/circ/selfcheck/payment.tt2
diff --git a/Open-ILS/web/templates/default/circ/selfcheck/summary.tt2 b/Open-ILS/src/templates/default/circ/selfcheck/summary.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/circ/selfcheck/summary.tt2
rename to Open-ILS/src/templates/default/circ/selfcheck/summary.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/acq/cancel_reason.tt2 b/Open-ILS/src/templates/default/conify/global/acq/cancel_reason.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/acq/cancel_reason.tt2
rename to Open-ILS/src/templates/default/conify/global/acq/cancel_reason.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/acq/claim_event_type.tt2 b/Open-ILS/src/templates/default/conify/global/acq/claim_event_type.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/acq/claim_event_type.tt2
rename to Open-ILS/src/templates/default/conify/global/acq/claim_event_type.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/acq/claim_policy.tt2 b/Open-ILS/src/templates/default/conify/global/acq/claim_policy.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/acq/claim_policy.tt2
rename to Open-ILS/src/templates/default/conify/global/acq/claim_policy.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/acq/claim_policy_action.tt2 b/Open-ILS/src/templates/default/conify/global/acq/claim_policy_action.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/acq/claim_policy_action.tt2
rename to Open-ILS/src/templates/default/conify/global/acq/claim_policy_action.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/acq/claim_type.tt2 b/Open-ILS/src/templates/default/conify/global/acq/claim_type.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/acq/claim_type.tt2
rename to Open-ILS/src/templates/default/conify/global/acq/claim_type.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/acq/distribution_formula.tt2 b/Open-ILS/src/templates/default/conify/global/acq/distribution_formula.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/acq/distribution_formula.tt2
rename to Open-ILS/src/templates/default/conify/global/acq/distribution_formula.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/acq/edi_account.tt2 b/Open-ILS/src/templates/default/conify/global/acq/edi_account.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/acq/edi_account.tt2
rename to Open-ILS/src/templates/default/conify/global/acq/edi_account.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2 b/Open-ILS/src/templates/default/conify/global/acq/exchange_rate.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2
rename to Open-ILS/src/templates/default/conify/global/acq/exchange_rate.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/acq/fund_tag.tt2 b/Open-ILS/src/templates/default/conify/global/acq/fund_tag.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/acq/fund_tag.tt2
rename to Open-ILS/src/templates/default/conify/global/acq/fund_tag.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/acq/invoice_item_type.tt2 b/Open-ILS/src/templates/default/conify/global/acq/invoice_item_type.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/acq/invoice_item_type.tt2
rename to Open-ILS/src/templates/default/conify/global/acq/invoice_item_type.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/acq/invoice_payment_method.tt2 b/Open-ILS/src/templates/default/conify/global/acq/invoice_payment_method.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/acq/invoice_payment_method.tt2
rename to Open-ILS/src/templates/default/conify/global/acq/invoice_payment_method.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/acq/lineitem_alert.tt2 b/Open-ILS/src/templates/default/conify/global/acq/lineitem_alert.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/acq/lineitem_alert.tt2
rename to Open-ILS/src/templates/default/conify/global/acq/lineitem_alert.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/acq/lineitem_marc_attr_def.tt2 b/Open-ILS/src/templates/default/conify/global/acq/lineitem_marc_attr_def.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/acq/lineitem_marc_attr_def.tt2
rename to Open-ILS/src/templates/default/conify/global/acq/lineitem_marc_attr_def.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/acq/provider.tt2 b/Open-ILS/src/templates/default/conify/global/acq/provider.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/acq/provider.tt2
rename to Open-ILS/src/templates/default/conify/global/acq/provider.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/action/survey.tt2 b/Open-ILS/src/templates/default/conify/global/action/survey.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/action/survey.tt2
rename to Open-ILS/src/templates/default/conify/global/action/survey.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/action/survey/edit.tt2 b/Open-ILS/src/templates/default/conify/global/action/survey/edit.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/action/survey/edit.tt2
rename to Open-ILS/src/templates/default/conify/global/action/survey/edit.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/action_trigger/event_definition.tt2 b/Open-ILS/src/templates/default/conify/global/action_trigger/event_definition.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/action_trigger/event_definition.tt2
rename to Open-ILS/src/templates/default/conify/global/action_trigger/event_definition.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/action_trigger/event_definition_data.tt2 b/Open-ILS/src/templates/default/conify/global/action_trigger/event_definition_data.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/action_trigger/event_definition_data.tt2
rename to Open-ILS/src/templates/default/conify/global/action_trigger/event_definition_data.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/asset/copy_location_order.tt2 b/Open-ILS/src/templates/default/conify/global/asset/copy_location_order.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/asset/copy_location_order.tt2
rename to Open-ILS/src/templates/default/conify/global/asset/copy_location_order.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/asset/copy_template.tt2 b/Open-ILS/src/templates/default/conify/global/asset/copy_template.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/asset/copy_template.tt2
rename to Open-ILS/src/templates/default/conify/global/asset/copy_template.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/biblio/monograph_part.tt2 b/Open-ILS/src/templates/default/conify/global/biblio/monograph_part.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/biblio/monograph_part.tt2
rename to Open-ILS/src/templates/default/conify/global/biblio/monograph_part.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/booking/resource.tt2 b/Open-ILS/src/templates/default/conify/global/booking/resource.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/booking/resource.tt2
rename to Open-ILS/src/templates/default/conify/global/booking/resource.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/booking/resource_attr.tt2 b/Open-ILS/src/templates/default/conify/global/booking/resource_attr.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/booking/resource_attr.tt2
rename to Open-ILS/src/templates/default/conify/global/booking/resource_attr.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/booking/resource_attr_map.tt2 b/Open-ILS/src/templates/default/conify/global/booking/resource_attr_map.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/booking/resource_attr_map.tt2
rename to Open-ILS/src/templates/default/conify/global/booking/resource_attr_map.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/booking/resource_attr_value.tt2 b/Open-ILS/src/templates/default/conify/global/booking/resource_attr_value.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/booking/resource_attr_value.tt2
rename to Open-ILS/src/templates/default/conify/global/booking/resource_attr_value.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/booking/resource_type.tt2 b/Open-ILS/src/templates/default/conify/global/booking/resource_type.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/booking/resource_type.tt2
rename to Open-ILS/src/templates/default/conify/global/booking/resource_type.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/acn_prefix.tt2 b/Open-ILS/src/templates/default/conify/global/config/acn_prefix.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/acn_prefix.tt2
rename to Open-ILS/src/templates/default/conify/global/config/acn_prefix.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/acn_suffix.tt2 b/Open-ILS/src/templates/default/conify/global/config/acn_suffix.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/acn_suffix.tt2
rename to Open-ILS/src/templates/default/conify/global/config/acn_suffix.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/actor_sip_fields.tt2 b/Open-ILS/src/templates/default/conify/global/config/actor_sip_fields.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/actor_sip_fields.tt2
rename to Open-ILS/src/templates/default/conify/global/config/actor_sip_fields.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/asset_sip_fields.tt2 b/Open-ILS/src/templates/default/conify/global/config/asset_sip_fields.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/asset_sip_fields.tt2
rename to Open-ILS/src/templates/default/conify/global/config/asset_sip_fields.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/barcode_completion.tt2 b/Open-ILS/src/templates/default/conify/global/config/barcode_completion.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/barcode_completion.tt2
rename to Open-ILS/src/templates/default/conify/global/config/barcode_completion.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/billing_type.tt2 b/Open-ILS/src/templates/default/conify/global/config/billing_type.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/billing_type.tt2
rename to Open-ILS/src/templates/default/conify/global/config/billing_type.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/circ_matrix_matchpoint.tt2 b/Open-ILS/src/templates/default/conify/global/config/circ_matrix_matchpoint.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/circ_matrix_matchpoint.tt2
rename to Open-ILS/src/templates/default/conify/global/config/circ_matrix_matchpoint.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/circ_matrix_weights.tt2 b/Open-ILS/src/templates/default/conify/global/config/circ_matrix_weights.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/circ_matrix_weights.tt2
rename to Open-ILS/src/templates/default/conify/global/config/circ_matrix_weights.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/circ_modifier.tt2 b/Open-ILS/src/templates/default/conify/global/config/circ_modifier.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/circ_modifier.tt2
rename to Open-ILS/src/templates/default/conify/global/config/circ_modifier.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/coded_value_map.tt2 b/Open-ILS/src/templates/default/conify/global/config/coded_value_map.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/coded_value_map.tt2
rename to Open-ILS/src/templates/default/conify/global/config/coded_value_map.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/global_flag.tt2 b/Open-ILS/src/templates/default/conify/global/config/global_flag.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/global_flag.tt2
rename to Open-ILS/src/templates/default/conify/global/config/global_flag.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/hard_due_date.tt2 b/Open-ILS/src/templates/default/conify/global/config/hard_due_date.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/hard_due_date.tt2
rename to Open-ILS/src/templates/default/conify/global/config/hard_due_date.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/hard_due_date_values.tt2 b/Open-ILS/src/templates/default/conify/global/config/hard_due_date_values.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/hard_due_date_values.tt2
rename to Open-ILS/src/templates/default/conify/global/config/hard_due_date_values.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/hold_matrix_matchpoint.tt2 b/Open-ILS/src/templates/default/conify/global/config/hold_matrix_matchpoint.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/hold_matrix_matchpoint.tt2
rename to Open-ILS/src/templates/default/conify/global/config/hold_matrix_matchpoint.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/hold_matrix_weights.tt2 b/Open-ILS/src/templates/default/conify/global/config/hold_matrix_weights.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/hold_matrix_weights.tt2
rename to Open-ILS/src/templates/default/conify/global/config/hold_matrix_weights.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/idl_field_doc.tt2 b/Open-ILS/src/templates/default/conify/global/config/idl_field_doc.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/idl_field_doc.tt2
rename to Open-ILS/src/templates/default/conify/global/config/idl_field_doc.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/metabib_field.tt2 b/Open-ILS/src/templates/default/conify/global/config/metabib_field.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/metabib_field.tt2
rename to Open-ILS/src/templates/default/conify/global/config/metabib_field.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/org_unit_setting_type.tt2 b/Open-ILS/src/templates/default/conify/global/config/org_unit_setting_type.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/org_unit_setting_type.tt2
rename to Open-ILS/src/templates/default/conify/global/config/org_unit_setting_type.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/record_attr_definition.tt2 b/Open-ILS/src/templates/default/conify/global/config/record_attr_definition.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/record_attr_definition.tt2
rename to Open-ILS/src/templates/default/conify/global/config/record_attr_definition.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/rule_age_hold_protect.tt2 b/Open-ILS/src/templates/default/conify/global/config/rule_age_hold_protect.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/rule_age_hold_protect.tt2
rename to Open-ILS/src/templates/default/conify/global/config/rule_age_hold_protect.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/rule_circ_duration.tt2 b/Open-ILS/src/templates/default/conify/global/config/rule_circ_duration.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/rule_circ_duration.tt2
rename to Open-ILS/src/templates/default/conify/global/config/rule_circ_duration.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/rule_max_fine.tt2 b/Open-ILS/src/templates/default/conify/global/config/rule_max_fine.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/rule_max_fine.tt2
rename to Open-ILS/src/templates/default/conify/global/config/rule_max_fine.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/rule_recurring_fine.tt2 b/Open-ILS/src/templates/default/conify/global/config/rule_recurring_fine.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/rule_recurring_fine.tt2
rename to Open-ILS/src/templates/default/conify/global/config/rule_recurring_fine.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/standing_penalty.tt2 b/Open-ILS/src/templates/default/conify/global/config/standing_penalty.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/standing_penalty.tt2
rename to Open-ILS/src/templates/default/conify/global/config/standing_penalty.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/usr_setting_type.tt2 b/Open-ILS/src/templates/default/conify/global/config/usr_setting_type.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/usr_setting_type.tt2
rename to Open-ILS/src/templates/default/conify/global/config/usr_setting_type.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/weight_assoc.tt2 b/Open-ILS/src/templates/default/conify/global/config/weight_assoc.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/weight_assoc.tt2
rename to Open-ILS/src/templates/default/conify/global/config/weight_assoc.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/config/z3950_source.tt2 b/Open-ILS/src/templates/default/conify/global/config/z3950_source.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/config/z3950_source.tt2
rename to Open-ILS/src/templates/default/conify/global/config/z3950_source.tt2
diff --git a/Open-ILS/web/templates/default/conify/global/permission/grp_penalty_threshold.tt2 b/Open-ILS/src/templates/default/conify/global/permission/grp_penalty_threshold.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/conify/global/permission/grp_penalty_threshold.tt2
rename to Open-ILS/src/templates/default/conify/global/permission/grp_penalty_threshold.tt2
diff --git a/Open-ILS/web/templates/default/footer.tt2 b/Open-ILS/src/templates/default/footer.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/footer.tt2
rename to Open-ILS/src/templates/default/footer.tt2
diff --git a/Open-ILS/web/templates/default/header.tt2 b/Open-ILS/src/templates/default/header.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/header.tt2
rename to Open-ILS/src/templates/default/header.tt2
diff --git a/Open-ILS/web/templates/default/menu.tt2 b/Open-ILS/src/templates/default/menu.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/menu.tt2
rename to Open-ILS/src/templates/default/menu.tt2
diff --git a/Open-ILS/web/templates/default/opac/advanced.tt2 b/Open-ILS/src/templates/default/opac/advanced.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/advanced.tt2
rename to Open-ILS/src/templates/default/opac/advanced.tt2
diff --git a/Open-ILS/web/templates/default/opac/home.tt2 b/Open-ILS/src/templates/default/opac/home.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/home.tt2
rename to Open-ILS/src/templates/default/opac/home.tt2
diff --git a/Open-ILS/web/templates/default/opac/login.tt2 b/Open-ILS/src/templates/default/opac/login.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/login.tt2
rename to Open-ILS/src/templates/default/opac/login.tt2
diff --git a/Open-ILS/web/templates/default/opac/mylist.tt2 b/Open-ILS/src/templates/default/opac/mylist.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/mylist.tt2
rename to Open-ILS/src/templates/default/opac/mylist.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2 b/Open-ILS/src/templates/default/opac/myopac/circ_history.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
rename to Open-ILS/src/templates/default/opac/myopac/circ_history.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/src/templates/default/opac/myopac/circs.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/circs.tt2
rename to Open-ILS/src/templates/default/opac/myopac/circs.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/src/templates/default/opac/myopac/hold_history.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
rename to Open-ILS/src/templates/default/opac/myopac/hold_history.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/src/templates/default/opac/myopac/holds.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/holds.tt2
rename to Open-ILS/src/templates/default/opac/myopac/holds.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2 b/Open-ILS/src/templates/default/opac/myopac/holds/edit.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2
rename to Open-ILS/src/templates/default/opac/myopac/holds/edit.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/src/templates/default/opac/myopac/lists.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/lists.tt2
rename to Open-ILS/src/templates/default/opac/myopac/lists.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/src/templates/default/opac/myopac/main.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/main.tt2
rename to Open-ILS/src/templates/default/opac/myopac/main.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2 b/Open-ILS/src/templates/default/opac/myopac/main_pay.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
rename to Open-ILS/src/templates/default/opac/myopac/main_pay.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/src/templates/default/opac/myopac/main_payment_form.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
rename to Open-ILS/src/templates/default/opac/myopac/main_payment_form.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2 b/Open-ILS/src/templates/default/opac/myopac/main_payments.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
rename to Open-ILS/src/templates/default/opac/myopac/main_payments.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/src/templates/default/opac/myopac/prefs.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/prefs.tt2
rename to Open-ILS/src/templates/default/opac/myopac/prefs.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs_notify.tt2 b/Open-ILS/src/templates/default/opac/myopac/prefs_notify.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/prefs_notify.tt2
rename to Open-ILS/src/templates/default/opac/myopac/prefs_notify.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2 b/Open-ILS/src/templates/default/opac/myopac/prefs_settings.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
rename to Open-ILS/src/templates/default/opac/myopac/prefs_settings.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/receipt_email.tt2 b/Open-ILS/src/templates/default/opac/myopac/receipt_email.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/receipt_email.tt2
rename to Open-ILS/src/templates/default/opac/myopac/receipt_email.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2 b/Open-ILS/src/templates/default/opac/myopac/receipt_print.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2
rename to Open-ILS/src/templates/default/opac/myopac/receipt_print.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2 b/Open-ILS/src/templates/default/opac/myopac/update_email.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/update_email.tt2
rename to Open-ILS/src/templates/default/opac/myopac/update_email.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/update_password.tt2 b/Open-ILS/src/templates/default/opac/myopac/update_password.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/update_password.tt2
rename to Open-ILS/src/templates/default/opac/myopac/update_password.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/update_username.tt2 b/Open-ILS/src/templates/default/opac/myopac/update_username.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/update_username.tt2
rename to Open-ILS/src/templates/default/opac/myopac/update_username.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/src/templates/default/opac/parts/advanced/global_row.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
rename to Open-ILS/src/templates/default/opac/parts/advanced/global_row.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/default/opac/parts/advanced/search.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
rename to Open-ILS/src/templates/default/opac/parts/advanced/search.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2 b/Open-ILS/src/templates/default/opac/parts/anon_list.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/anon_list.tt2
rename to Open-ILS/src/templates/default/opac/parts/anon_list.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/base.tt2 b/Open-ILS/src/templates/default/opac/parts/base.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/base.tt2
rename to Open-ILS/src/templates/default/opac/parts/base.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/chilifresh.tt2 b/Open-ILS/src/templates/default/opac/parts/chilifresh.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/chilifresh.tt2
rename to Open-ILS/src/templates/default/opac/parts/chilifresh.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/cn_browse.tt2 b/Open-ILS/src/templates/default/opac/parts/cn_browse.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/cn_browse.tt2
rename to Open-ILS/src/templates/default/opac/parts/cn_browse.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2 b/Open-ILS/src/templates/default/opac/parts/coded_value_selector.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
rename to Open-ILS/src/templates/default/opac/parts/coded_value_selector.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/config.tt2 b/Open-ILS/src/templates/default/opac/parts/config.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/config.tt2
rename to Open-ILS/src/templates/default/opac/parts/config.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/filtersort.tt2 b/Open-ILS/src/templates/default/opac/parts/filtersort.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/filtersort.tt2
rename to Open-ILS/src/templates/default/opac/parts/filtersort.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/footer.tt2 b/Open-ILS/src/templates/default/opac/parts/footer.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/footer.tt2
rename to Open-ILS/src/templates/default/opac/parts/footer.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/src/templates/default/opac/parts/header.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/header.tt2
rename to Open-ILS/src/templates/default/opac/parts/header.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/homesearch.tt2 b/Open-ILS/src/templates/default/opac/parts/homesearch.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/homesearch.tt2
rename to Open-ILS/src/templates/default/opac/parts/homesearch.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/js.tt2 b/Open-ILS/src/templates/default/opac/parts/js.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/js.tt2
rename to Open-ILS/src/templates/default/opac/parts/js.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/login/form.tt2 b/Open-ILS/src/templates/default/opac/parts/login/form.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/login/form.tt2
rename to Open-ILS/src/templates/default/opac/parts/login/form.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/login/help.tt2 b/Open-ILS/src/templates/default/opac/parts/login/help.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/login/help.tt2
rename to Open-ILS/src/templates/default/opac/parts/login/help.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/login/password_hint.tt2 b/Open-ILS/src/templates/default/opac/parts/login/password_hint.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/login/password_hint.tt2
rename to Open-ILS/src/templates/default/opac/parts/login/password_hint.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/default/opac/parts/misc_util.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/misc_util.tt2
rename to Open-ILS/src/templates/default/opac/parts/misc_util.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2 b/Open-ILS/src/templates/default/opac/parts/myopac/base.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
rename to Open-ILS/src/templates/default/opac/parts/myopac/base.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2 b/Open-ILS/src/templates/default/opac/parts/myopac/main_base.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
rename to Open-ILS/src/templates/default/opac/parts/myopac/main_base.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/main_refund_policy.tt2 b/Open-ILS/src/templates/default/opac/parts/myopac/main_refund_policy.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/myopac/main_refund_policy.tt2
rename to Open-ILS/src/templates/default/opac/parts/myopac/main_refund_policy.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/prefs_base.tt2 b/Open-ILS/src/templates/default/opac/parts/myopac/prefs_base.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/myopac/prefs_base.tt2
rename to Open-ILS/src/templates/default/opac/parts/myopac/prefs_base.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/prefs_hints.tt2 b/Open-ILS/src/templates/default/opac/parts/myopac/prefs_hints.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/myopac/prefs_hints.tt2
rename to Open-ILS/src/templates/default/opac/parts/myopac/prefs_hints.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2 b/Open-ILS/src/templates/default/opac/parts/org_selector.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/org_selector.tt2
rename to Open-ILS/src/templates/default/opac/parts/org_selector.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/src/templates/default/opac/parts/place_hold.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/place_hold.tt2
rename to Open-ILS/src/templates/default/opac/parts/place_hold.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/printnav.tt2 b/Open-ILS/src/templates/default/opac/parts/printnav.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/printnav.tt2
rename to Open-ILS/src/templates/default/opac/parts/printnav.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2 b/Open-ILS/src/templates/default/opac/parts/qtype_selector.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2
rename to Open-ILS/src/templates/default/opac/parts/qtype_selector.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/record/authors.tt2 b/Open-ILS/src/templates/default/opac/parts/record/authors.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/record/authors.tt2
rename to Open-ILS/src/templates/default/opac/parts/record/authors.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/record/awards.tt2 b/Open-ILS/src/templates/default/opac/parts/record/awards.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/record/awards.tt2
rename to Open-ILS/src/templates/default/opac/parts/record/awards.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/record/body.tt2 b/Open-ILS/src/templates/default/opac/parts/record/body.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/record/body.tt2
rename to Open-ILS/src/templates/default/opac/parts/record/body.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2 b/Open-ILS/src/templates/default/opac/parts/record/cn_details.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
rename to Open-ILS/src/templates/default/opac/parts/record/cn_details.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/record/copyinfo.tt2 b/Open-ILS/src/templates/default/opac/parts/record/copyinfo.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/record/copyinfo.tt2
rename to Open-ILS/src/templates/default/opac/parts/record/copyinfo.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/src/templates/default/opac/parts/record/extras.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/record/extras.tt2
rename to Open-ILS/src/templates/default/opac/parts/record/extras.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/record/issues.tt2 b/Open-ILS/src/templates/default/opac/parts/record/issues.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/record/issues.tt2
rename to Open-ILS/src/templates/default/opac/parts/record/issues.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/record/refworks.tt2 b/Open-ILS/src/templates/default/opac/parts/record/refworks.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/record/refworks.tt2
rename to Open-ILS/src/templates/default/opac/parts/record/refworks.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2 b/Open-ILS/src/templates/default/opac/parts/record/subjects.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
rename to Open-ILS/src/templates/default/opac/parts/record/subjects.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/default/opac/parts/record/summary.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/record/summary.tt2
rename to Open-ILS/src/templates/default/opac/parts/record/summary.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2 b/Open-ILS/src/templates/default/opac/parts/result/lowhits.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
rename to Open-ILS/src/templates/default/opac/parts/result/lowhits.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/result/lowhits_purchase.tt2 b/Open-ILS/src/templates/default/opac/parts/result/lowhits_purchase.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/result/lowhits_purchase.tt2
rename to Open-ILS/src/templates/default/opac/parts/result/lowhits_purchase.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/src/templates/default/opac/parts/result/table.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/result/table.tt2
rename to Open-ILS/src/templates/default/opac/parts/result/table.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/default/opac/parts/searchbar.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/searchbar.tt2
rename to Open-ILS/src/templates/default/opac/parts/searchbar.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/tips.tt2 b/Open-ILS/src/templates/default/opac/parts/tips.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/tips.tt2
rename to Open-ILS/src/templates/default/opac/parts/tips.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/src/templates/default/opac/parts/topnav.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/topnav.tt2
rename to Open-ILS/src/templates/default/opac/parts/topnav.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav_links.tt2 b/Open-ILS/src/templates/default/opac/parts/topnav_links.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/topnav_links.tt2
rename to Open-ILS/src/templates/default/opac/parts/topnav_links.tt2
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav_logo.tt2 b/Open-ILS/src/templates/default/opac/parts/topnav_logo.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/parts/topnav_logo.tt2
rename to Open-ILS/src/templates/default/opac/parts/topnav_logo.tt2
diff --git a/Open-ILS/web/templates/default/opac/place_hold.tt2 b/Open-ILS/src/templates/default/opac/place_hold.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/place_hold.tt2
rename to Open-ILS/src/templates/default/opac/place_hold.tt2
diff --git a/Open-ILS/web/templates/default/opac/record.tt2 b/Open-ILS/src/templates/default/opac/record.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/record.tt2
rename to Open-ILS/src/templates/default/opac/record.tt2
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/src/templates/default/opac/results.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/results.tt2
rename to Open-ILS/src/templates/default/opac/results.tt2
diff --git a/Open-ILS/web/templates/default/serial/list_item.tt2 b/Open-ILS/src/templates/default/serial/list_item.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/serial/list_item.tt2
rename to Open-ILS/src/templates/default/serial/list_item.tt2
diff --git a/Open-ILS/web/templates/default/serial/list_stream.tt2 b/Open-ILS/src/templates/default/serial/list_stream.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/serial/list_stream.tt2
rename to Open-ILS/src/templates/default/serial/list_stream.tt2
diff --git a/Open-ILS/web/templates/default/serial/list_subscription.tt2 b/Open-ILS/src/templates/default/serial/list_subscription.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/serial/list_subscription.tt2
rename to Open-ILS/src/templates/default/serial/list_subscription.tt2
diff --git a/Open-ILS/web/templates/default/serial/print_routing_list_users.tt2 b/Open-ILS/src/templates/default/serial/print_routing_list_users.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/serial/print_routing_list_users.tt2
rename to Open-ILS/src/templates/default/serial/print_routing_list_users.tt2
diff --git a/Open-ILS/web/templates/default/serial/subscription.tt2 b/Open-ILS/src/templates/default/serial/subscription.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/serial/subscription.tt2
rename to Open-ILS/src/templates/default/serial/subscription.tt2
diff --git a/Open-ILS/web/templates/default/serial/subscription/caption_and_pattern.tt2 b/Open-ILS/src/templates/default/serial/subscription/caption_and_pattern.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/serial/subscription/caption_and_pattern.tt2
rename to Open-ILS/src/templates/default/serial/subscription/caption_and_pattern.tt2
diff --git a/Open-ILS/web/templates/default/serial/subscription/distribution.tt2 b/Open-ILS/src/templates/default/serial/subscription/distribution.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/serial/subscription/distribution.tt2
rename to Open-ILS/src/templates/default/serial/subscription/distribution.tt2
diff --git a/Open-ILS/web/templates/default/serial/subscription/issuance.tt2 b/Open-ILS/src/templates/default/serial/subscription/issuance.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/serial/subscription/issuance.tt2
rename to Open-ILS/src/templates/default/serial/subscription/issuance.tt2
diff --git a/Open-ILS/web/templates/default/vandelay/inc/attrs.tt2 b/Open-ILS/src/templates/default/vandelay/inc/attrs.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/vandelay/inc/attrs.tt2
rename to Open-ILS/src/templates/default/vandelay/inc/attrs.tt2
diff --git a/Open-ILS/web/templates/default/vandelay/inc/export.tt2 b/Open-ILS/src/templates/default/vandelay/inc/export.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/vandelay/inc/export.tt2
rename to Open-ILS/src/templates/default/vandelay/inc/export.tt2
diff --git a/Open-ILS/web/templates/default/vandelay/inc/item_attrs.tt2 b/Open-ILS/src/templates/default/vandelay/inc/item_attrs.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/vandelay/inc/item_attrs.tt2
rename to Open-ILS/src/templates/default/vandelay/inc/item_attrs.tt2
diff --git a/Open-ILS/web/templates/default/vandelay/inc/marchtml.tt2 b/Open-ILS/src/templates/default/vandelay/inc/marchtml.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/vandelay/inc/marchtml.tt2
rename to Open-ILS/src/templates/default/vandelay/inc/marchtml.tt2
diff --git a/Open-ILS/web/templates/default/vandelay/inc/matches.tt2 b/Open-ILS/src/templates/default/vandelay/inc/matches.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/vandelay/inc/matches.tt2
rename to Open-ILS/src/templates/default/vandelay/inc/matches.tt2
diff --git a/Open-ILS/web/templates/default/vandelay/inc/profiles.tt2 b/Open-ILS/src/templates/default/vandelay/inc/profiles.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/vandelay/inc/profiles.tt2
rename to Open-ILS/src/templates/default/vandelay/inc/profiles.tt2
diff --git a/Open-ILS/web/templates/default/vandelay/inc/progress.tt2 b/Open-ILS/src/templates/default/vandelay/inc/progress.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/vandelay/inc/progress.tt2
rename to Open-ILS/src/templates/default/vandelay/inc/progress.tt2
diff --git a/Open-ILS/web/templates/default/vandelay/inc/queue.tt2 b/Open-ILS/src/templates/default/vandelay/inc/queue.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/vandelay/inc/queue.tt2
rename to Open-ILS/src/templates/default/vandelay/inc/queue.tt2
diff --git a/Open-ILS/web/templates/default/vandelay/inc/queueselect.tt2 b/Open-ILS/src/templates/default/vandelay/inc/queueselect.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/vandelay/inc/queueselect.tt2
rename to Open-ILS/src/templates/default/vandelay/inc/queueselect.tt2
diff --git a/Open-ILS/web/templates/default/vandelay/inc/toolbar.tt2 b/Open-ILS/src/templates/default/vandelay/inc/toolbar.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/vandelay/inc/toolbar.tt2
rename to Open-ILS/src/templates/default/vandelay/inc/toolbar.tt2
diff --git a/Open-ILS/web/templates/default/vandelay/inc/upload.tt2 b/Open-ILS/src/templates/default/vandelay/inc/upload.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/vandelay/inc/upload.tt2
rename to Open-ILS/src/templates/default/vandelay/inc/upload.tt2
diff --git a/Open-ILS/web/templates/default/vandelay/vandelay.tt2 b/Open-ILS/src/templates/default/vandelay/vandelay.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/vandelay/vandelay.tt2
rename to Open-ILS/src/templates/default/vandelay/vandelay.tt2
diff --git a/Open-ILS/web/templates/login.tt2 b/Open-ILS/src/templates/login.tt2
similarity index 100%
rename from Open-ILS/web/templates/login.tt2
rename to Open-ILS/src/templates/login.tt2
diff --git a/Open-ILS/web/templates_kcls/default/opac/myopac/main_refund_policy.tt2 b/Open-ILS/src/templates_kcls/default/opac/myopac/main_refund_policy.tt2
similarity index 100%
rename from Open-ILS/web/templates_kcls/default/opac/myopac/main_refund_policy.tt2
rename to Open-ILS/src/templates_kcls/default/opac/myopac/main_refund_policy.tt2
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/footer.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/footer.tt2
similarity index 100%
rename from Open-ILS/web/templates_kcls/default/opac/parts/footer.tt2
rename to Open-ILS/src/templates_kcls/default/opac/parts/footer.tt2
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/homesearch.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/homesearch.tt2
similarity index 100%
rename from Open-ILS/web/templates_kcls/default/opac/parts/homesearch.tt2
rename to Open-ILS/src/templates_kcls/default/opac/parts/homesearch.tt2
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/login/help.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/login/help.tt2
similarity index 100%
rename from Open-ILS/web/templates_kcls/default/opac/parts/login/help.tt2
rename to Open-ILS/src/templates_kcls/default/opac/parts/login/help.tt2
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/myopac/prefs_hints.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/myopac/prefs_hints.tt2
similarity index 100%
rename from Open-ILS/web/templates_kcls/default/opac/parts/myopac/prefs_hints.tt2
rename to Open-ILS/src/templates_kcls/default/opac/parts/myopac/prefs_hints.tt2
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/printnav.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/printnav.tt2
similarity index 100%
rename from Open-ILS/web/templates_kcls/default/opac/parts/printnav.tt2
rename to Open-ILS/src/templates_kcls/default/opac/parts/printnav.tt2
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/result/lowhits_purchase.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/result/lowhits_purchase.tt2
similarity index 100%
rename from Open-ILS/web/templates_kcls/default/opac/parts/result/lowhits_purchase.tt2
rename to Open-ILS/src/templates_kcls/default/opac/parts/result/lowhits_purchase.tt2
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/topnav_links.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/topnav_links.tt2
similarity index 100%
rename from Open-ILS/web/templates_kcls/default/opac/parts/topnav_links.tt2
rename to Open-ILS/src/templates_kcls/default/opac/parts/topnav_links.tt2
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/topnav_logo.tt2 b/Open-ILS/src/templates_kcls/default/opac/parts/topnav_logo.tt2
similarity index 100%
rename from Open-ILS/web/templates_kcls/default/opac/parts/topnav_logo.tt2
rename to Open-ILS/src/templates_kcls/default/opac/parts/topnav_logo.tt2

commit 539456282b5cc2dfe363305f481aaa815c2913cc
Merge: a1dcc6e 1feb47d
Author: Dan Scott <dan at coffeecode.net>
Date:   Thu Jun 30 12:48:03 2011 -0400

    Merge branch 'dbs/ttopac-more-resolver-docs' into dbs/template-toolkit-integration-on-master


commit 1feb47d85f731af3bf591268aabda0b2f807872e
Author: Dan Scott <dan at coffeecode.net>
Date:   Thu Jun 30 12:44:57 2011 -0400

    More config docs for SFX resolver TTOPAC bits
    
    Helpful to let people know that they need to enable open-ils.resolver
    in opensrf.xml as it is the one service that is not enabled by default.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/templates/default/opac/parts/config.tt2 b/Open-ILS/web/templates/default/opac/parts/config.tt2
index 74fa111..4c26301 100644
--- a/Open-ILS/web/templates/default/opac/parts/config.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/config.tt2
@@ -1,7 +1,9 @@
 [% 
 
+##############################################################################
 # This file contains skin-level configuration settings.
 # Many of these settings will probably migrate into actor.org_unit_settings.
+##############################################################################
 
 ##############################################################################
 # RefWorks configuration
@@ -22,6 +24,9 @@ ctx.refworks.url = 'http://www.refworks.com';
 # Evergreen provides the ability to point at an OpenURL resolver to find
 # electronic resources for a given ISSN or ISBN. Currently, only the SFX
 # resolver is supported.
+#
+# You must enable the open-ils.resolver instance in opensrf.xml to use
+# this feature.
 ##############################################################################
 
 openurl.enabled = 'false';

commit a1dcc6e518d43a920ece602dc5623941d0a82cd0
Merge: 9049c7d 4a1488b
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 18:56:29 2011 -0400

    Merge remote-tracking branch 'remotes/working/user/dbs/ttopac-kill-dont-hide' into dbs/template-toolkit-integration-on-master


commit 9049c7dd8cdf3e4ef9562bfaff30bce88b71b78d
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 18:48:38 2011 -0400

    Current master creates XPath of volumes/volume/uris/uri
    
    In the master integration template-toolkit branch, we can correct the
    XPath to match reality.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index 752ce57..3bc2fa8 100644
--- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -61,7 +61,6 @@
             END;
         END;
 
-        # URI info is in volumes/volume/uris/volume, instead of uri element
         FOR volume IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
 
             # Check volume visibility - could push this into XPath
@@ -71,7 +70,7 @@
             NEXT IF volume.getAttribute('deleted') == 'true';
 
             IF vol.label == '##URI##';
-                FOR uri IN volume.findnodes('./*[local-name()="uris"]/*[local-name()="volume"]');
+                FOR uri IN volume.findnodes('./*[local-name()="uris"]/*[local-name()="uri"]');
                     res.href = uri.getAttribute('href');
                     res.link = uri.getAttribute('label');
                     res.note = uri.getAttribute('use_restriction');

commit 4a1488b028da074dc8c88a2cfa1a089e23891dd1
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 17:05:46 2011 -0400

    Don't include non-existent elements in search results
    
    It does not make sense to clutter HTML output with table rows that are
    destined to remain hidden and empty of any data; therefore, instead of
    setting the class to "hide_me" when there is no value to display, just
    do not display the row at all.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 6ab1b2b..580fefd 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -106,18 +106,22 @@
                                                     </div>
                                                     <table cellpadding="0" cellspacing="0" border="0"
                                                         class="results_info_table">
-                                                        <tr name="results_pub_tr" class="[% attrs.publisher ? '' : 'hide_me' %]">
+                                                    [% IF attrs.publisher %]
+                                                        <tr name="results_pub_tr">
                                                             <td valign="top">
                                                                 <strong>[% l('Publisher:') %]</strong>
                                                             </td>
                                                             <td>[% attrs.publisher; %]</td>
                                                         </tr>
-                                                        <tr name="results_isbn_tr" class="[% attrs.isbn ? '' : 'hide_me' %]">
+                                                    [% END %]
+                                                    [% IF attrs.isbn %]
+                                                        <tr name="results_isbn_tr">
                                                             <td valign="top">
                                                                 <strong>[% l('ISBN:') %]</strong>
                                                             </td>
                                                             <td>[% attrs.isbn %]</td>
                                                         </tr>
+                                                    [% END %]
                                                         [% IF openurl.enabled == 'true';
                                                             FOR issn IN args.issns;
                                                                 sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl);
@@ -134,13 +138,16 @@
                                                             [% END %]
                                                         [% END %]
 
-                                                        <tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
+                                                    [% IF attrs.edition %]
+                                                        <tr name="results_edition_tr">
                                                             <td valign="top">
                                                                 <strong>[% l('Edition:') %]</strong>
                                                             </td>
                                                             <td>[% attrs.edition %]</td>
                                                         </tr>
-                                                        <tr name="results_phys_desc_tr" class="[% attrs.phys_desc ? '' : 'hide_me' %]">
+                                                    [% END %]
+                                                    [% IF attrs.phys_desc %]
+                                                        <tr name="results_phys_desc_tr">
                                                             <td nowrap="nowrap" valign="top">
                                                                 <strong>[% l('Phys. Desc.:') %]</strong>
                                                             </td>
@@ -148,7 +155,8 @@
                                                                 [% args.phys_desc %]
                                                             </td>
                                                         </tr>
-                                                        [% FOR uri IN args.uris%]
+                                                    [% END %]
+                                                        [% FOR uri IN args.uris %]
                                                         <tr name='bib_uri_list' class='result_table_title_cell'>
                                                             <td valign='top'>
                                                                 <strong>[% l('Electronic resource') %]</strong>

commit 92ba8fa026d782c7eb2c6419f84876dca7c0b0b9
Merge: 317a5c8 b6b4902
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 14:46:10 2011 -0400

    Merge branch 'dbs/template-toolkit-integration' into dbs/template-toolkit-integration-on-master


commit b6b49024f57a19a84e62d6b1730ba5d467340a4f
Merge: 2477dcc c9801ec
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 14:44:43 2011 -0400

    Merge branch 'dbs/ttopac-sfx-integration' into dbs/template-toolkit-integration


commit 2477dcc961563239cab2fa9e4d15bd57b371002e
Merge: b13ca3e 8b98ff9
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 14:44:28 2011 -0400

    Merge branch 'template-toolkit-opac' of git://git.evergreen-ils.org/evergreen/equinox into dbs/template-toolkit-integration


commit f98f6d72d0ad2d8bfcb30492df55bff738f9cac1
Author: Rick Scott <rick at shadowspar.dyndns.org>
Date:   Wed Jun 29 14:31:28 2011 -0400

    Clean up unneeded alt txt; rework "Add to my list"
    
    1: Set blank alt text attrib on non-functional images; also remove
    alt text on images that's duplicated by adjacent link text.
    This reduces clutter text browser and screen reader users.  More:
    http://universalusability.com/access_by_design/images/irrelevant.html
    
    2: Make "Add to my list" use a styled link instead of an image & button,
    like the "Place Hold" link next to it.  This lets us remove the duplicate
    alt text, makes the two items operate in the same way, and makes the
    presentation code more similar between table.tt2 & record/summary.tt2.

diff --git a/Open-ILS/web/templates/default/opac/parts/printnav.tt2 b/Open-ILS/web/templates/default/opac/parts/printnav.tt2
index 580c0d6..d0f0a41 100644
--- a/Open-ILS/web/templates/default/opac/parts/printnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/printnav.tt2
@@ -1,7 +1,7 @@
 <div class="big-block">
     <div class="float-right">
         <div class="pos-rel">
-            <img src="[% ctx.media_prefix %]/images/utils-corner-left.png" class="float-left" />
+            <img src="[% ctx.media_prefix %]/images/utils-corner-left.png" class="float-left" alt="" />
             <div class="left-corner"> 
                 <a href="javascript:history.go(-1)"
                     id="util_back_btn"><img alt="[% l('Back') %]"
@@ -19,7 +19,7 @@
                     id="util_forw_btn"><img alt="[% l('Forward') %]"
                     src="[% ctx.media_prefix %]/images/tool_forward.png" /></a>
             </div>
-            <img src="[% ctx.media_prefix %]/images/utils-corner-right.png" class="float-left" />
+            <img src="[% ctx.media_prefix %]/images/utils-corner-right.png" class="float-left" alt="" />
         </div>
     </div>
 </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 4dbfadc..2fdd9fd 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -29,12 +29,12 @@
                             [% END %]
                         </td>
                         <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
-                            <div style="width:230px;text-align:left;margin-top:3px;">
+                            <div style="width:280px;text-align:left;margin-top:3px;">
                                 <div style="float:right;">
                                     <div class="rdetail_aux_utils opac-auto-010">
                                         <a href="[% ctx.opac_root %]/place_hold[%-
                                             propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% ctx.bre_id %]&amp;hold_type=T" id="rdetail_place_hold" class="no-dec"><img
-                                            src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
+                                            src="[% ctx.media_prefix %]/images/green_check.png" alt="" /><span 
                                                 style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
                                     </div>
                                     <div class="rdetail_aux_utils opac-auto-121">
@@ -42,16 +42,10 @@
                                             operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add";
                                             label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); 
                                         %]
-                                        <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
-                                            <input type="hidden" name="record" value="[% ctx.bre_id %]" />
-                                            <div class="pos-abs">
-                                                <div class="opac-auto-149">
-                                                    <input type="submit" title="[% label %]" value="[% label %]" class="subtle-button" />
-                                                </div>
-                                            </div>
-                                            <input type="image" alt="[% label %]"
-                                                src="[% ctx.media_prefix %]/images/clipboard.png" />
-                                        </form>
+                                        <a href="[% ctx.opac_root %]/mylist/[% operation %]?record=[% ctx.bre_id %]" class="no-dec">
+                                            <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
+                                            [% label %]
+                                        </a>
                                     </div>
                                 </div>
                                 <div style="float:right;margin-right:17px;">
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 6fc3b2e..3b8dbb7 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -180,22 +180,17 @@
                                                                 href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% rec.id %]&amp;hold_type=T" 
                                                                     name="place_hold_link" class="no-dec"><img
                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
-                                                                alt="[% l('Place hold') %]"/><span style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
+                                                                alt=""/><span style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
                                                         </div>
                                                         <div class="results_aux_utils opac-auto-011">
-                                                            [%  operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
-                                                                label = (operation == "add") ? l("Add to") : l("Remove from"); %]
-                                                            <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
-                                                                <input type="hidden" name="record" value="[% rec.id %]" />
-                                                            <div style="position:absolute;">
-                                                                <div style="position:relative;top:5px; left: 25px;">
-                                                                    <input type="submit" title="[% l(label _ ' my list') %]" value="[% l(label _ ' my list') %]" class="subtle-button" />
-                                                                </div>
-                                                            </div>
-                                                                <input type="image"
-                                                                alt="[% l(label _ ' my list') %]"
-                                                                src="[% ctx.media_prefix %]/images/clipboard.png" />
-                                                        </form>
+                                                            [%  
+                                                                operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
+                                                                label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
+                                                            %]      
+                                                            <a href="[% ctx.opac_root %]/mylist/[% operation %]?record=[% rec.id %]" class="no-dec">
+                                                                <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
+                                                                [% label %]
+                                                            </a>
                                                         </div>
                                                         <!-- <div style="padding-top:7px;" class="results_aux_utils">
                                                             <a title="Reviews and More" target="_blank" class="no-dec"
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 433ce68..d6c4eb3 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -39,7 +39,7 @@
                             onmouseover="this.src='[% ctx.media_prefix %]/images/go-btn-hover.png';"
                             onmouseout="this.src='[% ctx.media_prefix %]/images/go-btn.png';" 
                             onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
-                        <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden'/>
+                        <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden' alt=''/>
                     </div>
                 </div>
             </td>

commit c9801ec327d28c4c2a6c0d3d811019538fdaeacb
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 13:20:05 2011 -0400

    Merge in the TT Resolver plugin code
    
    Add the plugin to the MANIFEST to ensure that it gets installed
    appropriately, and pull in the appropriate changes to the record summary
    and search results pages.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Art Rhyno <artrhyno at uwindsor.ca>

diff --git a/Open-ILS/src/perlmods/MANIFEST b/Open-ILS/src/perlmods/MANIFEST
index 3641b6f..3ffc27b 100644
--- a/Open-ILS/src/perlmods/MANIFEST
+++ b/Open-ILS/src/perlmods/MANIFEST
@@ -126,6 +126,7 @@ lib/OpenILS/SIP/Transaction.pm
 lib/OpenILS/SIP/Transaction/Checkin.pm
 lib/OpenILS/SIP/Transaction/Checkout.pm
 lib/OpenILS/SIP/Transaction/Renew.pm
+lib/Template/Plugin/ResolverResolver.pm
 lib/OpenILS/Template/Plugin/Unicode.pm
 lib/OpenILS/Template/Plugin/WebSession.pm
 lib/OpenILS/Template/Plugin/WebUtils.pm
diff --git a/Open-ILS/src/perlmods/lib/Template/Plugin/ResolverResolver.pm b/Open-ILS/src/perlmods/lib/Template/Plugin/ResolverResolver.pm
new file mode 100644
index 0000000..88109c2
--- /dev/null
+++ b/Open-ILS/src/perlmods/lib/Template/Plugin/ResolverResolver.pm
@@ -0,0 +1,98 @@
+#
+# OpenILS::Template::Plugin::ResolverResolver
+#
+# DESCRIPTION
+#
+#   Simple Template Toolkit Plugin which hooks into Dan Scott's Resolver
+#
+# AUTHOR
+#   Art Rhyno <http://projectconifer.ca>
+#
+# COPYRIGHT
+#   Copyright (C) 2011
+#
+# LICENSE
+# GNU General Public License v2 or later
+#
+#============================================================================
+
+package Template::Plugin::ResolverResolver;
+
+use strict;
+use warnings;
+use base 'Template::Plugin';
+use OpenILS::Application::ResolverResolver;
+use OpenILS::Application;
+use base qw/OpenILS::Application/;
+use OpenSRF::AppSession;
+
+
+our $VERSION = 0.9;
+
+sub load {
+    my ( $class, $context ) = @_;
+    return $class;
+}   
+
+sub new { 
+    my ( $class, $context, @params ) = @_;
+
+    bless { _CONTEXT => $context, }, $class;   
+} 
+
+# monkeypatch ResolverResolver::params() method to Do The Right Thing in TT land
+
+sub ResolverResolver::params {
+    my $self = shift;
+    local $" = ', ';
+
+    return $self->{ _TT_PARAMS } ||= do {
+        # must call Vars() in a list context to receive
+        # plain list of key/vals rather than a tied hash
+        my $params = { $self->Vars() };
+
+        # convert any null separated values into lists
+        @$params{ keys %$params } = map { 
+            /\0/ ? [ split /\0/ ] : $_ 
+        } values %$params;
+
+        $params;
+    };
+}
+
+sub resolve_issn
+{
+    my ($class, $c, $baseurl) = @_;
+
+    if (length($c) <= 9) {
+           my $session = OpenSRF::AppSession->create("open-ils.resolver");
+	
+           my $request = $session->request("open-ils.resolver.resolve_holdings.raw", "issn", $c, $baseurl)->gather();
+           if ($request) {
+                 return $request;
+           }
+           $session->disconnect();
+    }
+    	
+    return "";
+}
+
+sub resolve_isbn
+{
+    my ($class, $c, $baseurl) = @_;
+
+    my $session = OpenSRF::AppSession->create("open-ils.resolver");
+	
+    my $request = $session->request("open-ils.resolver.resolve_holdings.raw", "isbn", $c, $baseurl)->gather();
+	
+    if ($request) {
+            return $request;
+    }
+    $session->disconnect();
+    	
+    return "";
+}
+
+
+1;
+
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 74569c5..1de1578 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -83,9 +83,11 @@
                             </td>
                             <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc %]</td>
                         </tr>
-                        [% IF openurl.enabled == 'true'; FOR issn IN args.issns %]
-                            [% sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl)%]
-                            [% FOR res IN sfx %]
+                        [% IF openurl.enabled == 'true';
+                            FOR issn IN args.issns;
+                                sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl);
+                                FOR res IN sfx;
+                        %]
                             <tr name="results_issn_tr">
                                 <td valign="top">
                                     <strong><a href="[% res.target_url %]">
@@ -93,6 +95,7 @@
                                 </td>
                                 <td>[% res.target_coverage %]</td>
                             </tr>
+                                [% END %]
                             [% END %]
                         [% END %]
                         <tr>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 6b5db2f..6ab1b2b 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -1,8 +1,6 @@
 [%  PROCESS "default/opac/parts/misc_util.tt2";
 
-    IF openurl.enabled == 'true';
-        USE ResolverResolver;
-    END;
+    USE ResolverResolver;
 
     ctx.result_start = 1 + ctx.page_size * page;
     ctx.result_stop = ctx.page_size * (page + 1);
@@ -120,9 +118,11 @@
                                                             </td>
                                                             <td>[% attrs.isbn %]</td>
                                                         </tr>
-                                                        [% IF openurl.enabled == 'true'; FOR issn IN args.issns %]
-                                                            [% sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl)%]
-                                                            [% FOR res IN sfx %]
+                                                        [% IF openurl.enabled == 'true';
+                                                            FOR issn IN args.issns;
+                                                                sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl);
+                                                                FOR res IN sfx;
+                                                        %]
                                                         <tr name="results_issn_tr">
                                                             <td valign="top">
                                                                 <strong><a href="[% res.target_url %]">
@@ -130,6 +130,7 @@
                                                             </td>
                                                             <td>[% res.target_coverage %]</td>
                                                         </tr>
+                                                                [% END %]
                                                             [% END %]
                                                         [% END %]
 

commit 8b98ff9732ce921a68a28a25efe65096c2be788b
Merge: 328c8b2 08c539b
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jun 29 13:37:42 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit be32ff5da0fbcb5e84a357e7cdd93e8eb699f2a2
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 13:05:43 2011 -0400

    Add SFX integration into base TT OPAC, with config.tt2 entries
    
    If openurl.enabled is true, then resolve ISBNs and ISSNs and display the
    corresponding electronic resources that we have available. Note that if
    there is a subfield 9 with SFX in either the ISBN or ISSN, then that is
    the preferred ISSN to use; otherwise we fall back to resolving all of
    the ISSNs in the record.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/templates/default/opac/parts/config.tt2 b/Open-ILS/web/templates/default/opac/parts/config.tt2
index fd1c3e9..74fa111 100644
--- a/Open-ILS/web/templates/default/opac/parts/config.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/config.tt2
@@ -16,4 +16,15 @@ ctx.refworks.url = 'http://www.refworks.com';
 # in addition, you might want to proxy access to RefWorks - for example:
 # ctx.refworks.url = 'http://librweb.laurentian.ca/login?url=http://refworks.scholarsportal.info';
 
+##############################################################################
+# OpenURL resolution
+##############################################################################
+# Evergreen provides the ability to point at an OpenURL resolver to find
+# electronic resources for a given ISSN or ISBN. Currently, only the SFX
+# resolver is supported.
+##############################################################################
+
+openurl.enabled = 'false';
+openurl.baseurl = 'http://sfx.example.com/instance';
+
 %]
diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index 5d4249e..752ce57 100644
--- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -28,6 +28,38 @@
 
         args.holdings = [];
         args.uris = [];
+        args.issns = [];
+
+        # we use $9 of ISBN and ISSN as a flag for e-version
+        sfx_isbn = xml.findnodes('//*[@tag="020"]/*[@code="9"]');
+        IF sfx_isbn;
+            IF sfx_isbn.textContent == "SFX";
+                my_parent = sfx_isbn.parentNode();
+                sfx_isbn = my_parent.findnodes('./*[@code="a"]');
+                sfx_isbn.replace('-', '');
+                args.resolver_isbn = sfx_isbn.replace('\ .*', '');
+            END;
+        END;
+
+        sfx_issn = xml.findnodes('//*[@tag="022"]/*[@code="9"]');
+        IF sfx_issn;
+            IF sfx_issn.textContent == "SFX";
+                my_parent = sfx_issn.parentNode();
+                sfx_issn = my_parent.findnodes('./*[@code="a"]');
+                args.issns.push(
+                    sfx_issn.textContent.replace('[^\d\-X]', '')
+                );
+            END;
+        END;
+
+        # we snag all issns if no SFX available
+        IF args.issns.size == 0;
+            FOR rawissn IN xml.findnodes('//*[@tag="022"]/*[@code="a"]');
+                args.issns.push(
+                    rawissn.textContent.replace('[^\d\-X]', '')
+                );
+            END;
+        END;
 
         # URI info is in volumes/volume/uris/volume, instead of uri element
         FOR volume IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 63db6ed..74569c5 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -1,4 +1,7 @@
-[% ctx.page_title = attrs.title | html_entity %]
+[%  PROCESS "default/opac/parts/misc_util.tt2";
+    USE ResolverResolver;
+    ctx.page_title = attrs.title | html_entity
+%]
 <!-- ****************** rdetail_summary.xml ***************************** -->
 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
 
@@ -80,6 +83,18 @@
                             </td>
                             <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc %]</td>
                         </tr>
+                        [% IF openurl.enabled == 'true'; FOR issn IN args.issns %]
+                            [% sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl)%]
+                            [% FOR res IN sfx %]
+                            <tr name="results_issn_tr">
+                                <td valign="top">
+                                    <strong><a href="[% res.target_url %]">
+                                        [% res.public_name %]</a></strong>
+                                </td>
+                                <td>[% res.target_coverage %]</td>
+                            </tr>
+                            [% END %]
+                        [% END %]
                         <tr>
                             <td nowrap='nowrap' valign="top">
                                 <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 964312a..6b5db2f 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -1,5 +1,9 @@
 [%  PROCESS "default/opac/parts/misc_util.tt2";
 
+    IF openurl.enabled == 'true';
+        USE ResolverResolver;
+    END;
+
     ctx.result_start = 1 + ctx.page_size * page;
     ctx.result_stop = ctx.page_size * (page + 1);
     IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
@@ -116,6 +120,19 @@
                                                             </td>
                                                             <td>[% attrs.isbn %]</td>
                                                         </tr>
+                                                        [% IF openurl.enabled == 'true'; FOR issn IN args.issns %]
+                                                            [% sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl)%]
+                                                            [% FOR res IN sfx %]
+                                                        <tr name="results_issn_tr">
+                                                            <td valign="top">
+                                                                <strong><a href="[% res.target_url %]">
+                                                                [% res.public_name %]</a></strong>
+                                                            </td>
+                                                            <td>[% res.target_coverage %]</td>
+                                                        </tr>
+                                                            [% END %]
+                                                        [% END %]
+
                                                         <tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
                                                             <td valign="top">
                                                                 <strong>[% l('Edition:') %]</strong>

commit 317a5c8b46c299f12431370630c72dc2ab721ed0
Merge: 08c539b b13ca3e
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 10:00:59 2011 -0400

    Merge branch 'dbs/template-toolkit-integration' into dbs/template-toolkit-integration-on-master


commit b13ca3e8e572d893e954d308a9181a32a78e7eba
Merge: 80797f7 2cc3997
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 09:55:00 2011 -0400

    Merge remote-tracking branch 'remotes/working/user/dbs/ttopac-titles' into dbs/template-toolkit-integration


commit 80797f724a5d2c6c84fbd18fd23c1d7b84836a35
Merge: 2474b08 4f23db6
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 09:54:53 2011 -0400

    Merge remote-tracking branch 'remotes/working/user/dbs/ttopac-speech-input' into dbs/template-toolkit-integration


commit 2474b08473f4e53e263103f327c17ae3eadd5f8f
Merge: 39d85af b05b2f2
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 09:54:42 2011 -0400

    Merge remote-tracking branch 'remotes/working/user/dbs/ttopac-refworks' into dbs/template-toolkit-integration


commit 39d85afae9ec34d45eeeece8252e2b7daa65d747
Merge: 574149d 956da09
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 09:53:59 2011 -0400

    Merge remote-tracking branch 'remotes/working/user/dbs/ttopac-display-uris-and-cps' into dbs/template-toolkit-integration


commit 574149d2e12daf67893d607f417ec6102cbd7ece
Merge: 328c8b2 4da568a
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 09:53:40 2011 -0400

    Merge remote-tracking branch 'remotes/working/user/dbs/tt-opac-delete-poc' into dbs/template-toolkit-integration


commit 956da091dc8cafd2b4fac0a65ffaf0b91a786170
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 29 00:01:10 2011 -0400

    Don't display located URIs in record details copy table
    
    The more correct approach would be to modify the JSON query to exclude
    copies from volumes where label = '##URI##', or to cut over to the in-db
    unapi-based xml_holdings + acp approach - but for now this is a quick
    and dirty fix that can't possibly hurt.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index ff1a757..9dacc8d 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -135,6 +135,7 @@
     </thead>
     <tbody class="copy_details_table">
         [% FOR copy_info IN ctx.copies %]
+        [% NEXT IF copy_info.call_number_label == '##URI##' %]
         <tr>
             <td>[%
                 # XXX KCLS-specific kludging

commit e51477e408b1c5f818b967f809f1fc328201d2cb
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue Jun 28 23:15:52 2011 -0400

    Improve copy display in search results
    
    Even though we were trying to root our findnodes() call at a specific
    point in the DOM, the XPath was retrieving all volume elements in the
    entire DOM and we were therefore getting duplicate items listed in the
    search results. Accordingly, use the volume ID to root the search to the
    specific volume.
    
    Also, offer designers a bit more of an opportunity to style the holdings
    by placing them in a table as well. Bonus points for using thead/th, eh?
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index 04add44..5d4249e 100644
--- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -30,17 +30,16 @@
         args.uris = [];
 
         # URI info is in volumes/volume/uris/volume, instead of uri element
-        i = 0;
         FOR volume IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
-            i = i + 1;
 
             # Check volume visibility - could push this into XPath
             vol.label = volume.getAttribute('label');
+            vol.id = volume.getAttribute('id');
             NEXT IF volume.getAttribute('opac_visible') == 'false';
             NEXT IF volume.getAttribute('deleted') == 'true';
 
             IF vol.label == '##URI##';
-                FOR uri IN xml.findnodes('//*[local-name()="uris"]/*[local-name()="volume"]', volume);
+                FOR uri IN volume.findnodes('./*[local-name()="uris"]/*[local-name()="volume"]');
                     res.href = uri.getAttribute('href');
                     res.link = uri.getAttribute('label');
                     res.note = uri.getAttribute('use_restriction');
@@ -48,7 +47,7 @@
                 END;
                 NEXT;
             ELSE;
-                copies = xml.findnodes('//*[local-name()="copies"]/*[local-name()="copy"]', volume);
+                copies = volume.findnodes('./*[local-name()="copies"]/*[local-name()="copy"]');
                 FOR copy IN copies;
                     # Check copy visibility
                     cp.deleted = copy.getAttribute('deleted');    
@@ -67,15 +66,16 @@
 
                     NEXT IF cp.visible == 'false';
                     
-                    loc = xml.findnodes('//*[local-name()="location"]', copy);
-                    circlib = xml.findnodes('//*[local-name()="circlib"]', copy);
-                    status = xml.findnodes('//*[local-name()="status"]', copy);
+                    loc = copy.findnodes('./*[local-name()="location"]');
+                    circlib = copy.findnodes('./*[local-name()="circlib"]');
+                    status = copy.findnodes('./*[local-name()="status"]');
 
                     holding = {
                         label => vol.label,
-                        location => loc.0.textContent,
-                        library => circlib.0.textContent,
-                        status => status.0.textContent
+                        location => loc.textContent,
+                        library => circlib.textContent,
+                        status => status.textContent
+                        barcode => copy.getAttribute('barcode')
                     };
                     args.holdings.push(holding);
                 END;
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index efb50f7..964312a 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -6,6 +6,7 @@
 
     result_count = ctx.result_start;
 %]
+
 <div style="height: 10px;"></div>
 [% BLOCK results_count_header %]
 <div class="results_header_nav1">
@@ -129,16 +130,6 @@
                                                                 [% args.phys_desc %]
                                                             </td>
                                                         </tr>
-
-                                                        [% FOR copy IN args.holdings %]
-                                                        <tr name='bib_cn_list' class='result_table_title_cell'>
-                                                            <td valign='top'>
-                                                                <strong>[% l('Call number:') %]</strong>
-                                                            </td>
-                                                            <td>[% copy.label _ ' ' _ copy.location _ ' ' _ copy.library _ ' ' _ copy.status %]</td>
-                                                        </tr>
-                                                        [% END %]
-
                                                         [% FOR uri IN args.uris%]
                                                         <tr name='bib_uri_list' class='result_table_title_cell'>
                                                             <td valign='top'>
@@ -147,8 +138,30 @@
                                                             <td><a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]</td>
                                                         </tr>
                                                         [% END %]
-
-
+                                                        [% IF args.holdings.size > 0 %]
+                                                        <tr name='bib_cn_list' class='result_table_title_cell'>
+                                                            <td colspan='2'>
+                                                                <table class='result_holdings_table'>
+                                                                    <thead><tr>
+                                                                        <th>[% l('Library') %]</th>
+                                                                        <th>[% l('Shelving location') %]</th>
+                                                                        <th>[% l('Call number') %]</th>
+                                                                        <th>[% l('Status') %]</th>
+                                                                    </tr></thead>
+                                                                    <tbody>
+                                                            [% FOR copy IN args.holdings %]
+                                                                    <tr>
+                                                                        <td>[% copy.library %]</td>
+                                                                        <td>[% copy.location %]</td>
+                                                                        <td>[% copy.label %]</td>
+                                                                        <td>[% copy.status %]</td>
+                                                                    </tr>
+                                                            [% END %]
+                                                                    </tbody>
+                                                                </table>
+                                                            </td>
+                                                        </tr>
+                                                        [% END %]
                                                     </table>
                                                     <div>
                                                         [% l('[_1] of [quant,_2,copy,copies] available',

commit b05b2f2649a14f6fba24281e354b8ad7614dd572
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue Jun 28 17:04:08 2011 -0400

    Add RefWorks export support for a record details page
    
    This marks the addition of a config.tt2 file in parts that can be a
    consolidation point for skin-specific settings, such as enabling
    particular behaviour, setting proxy information, specific URLs, etc.
    
    RefWorks support is currently driven by the marctxt format in supercat;
    TBD if we can easily point at an in-db unapi variation of this. Also,
    yet to be done is addition of RefWorks export for lists and search
    results.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/config.tt2 b/Open-ILS/web/templates/default/opac/parts/config.tt2
new file mode 100644
index 0000000..fd1c3e9
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/config.tt2
@@ -0,0 +1,19 @@
+[% 
+
+# This file contains skin-level configuration settings.
+# Many of these settings will probably migrate into actor.org_unit_settings.
+
+##############################################################################
+# RefWorks configuration
+##############################################################################
+# RefWorks is a Web-based citation manager
+ctx.refworks.enable = 'false';
+
+# Base URL for RefWorks
+ctx.refworks.url = 'http://www.refworks.com';
+
+# Some sites have a hosted RefWorks instance at a different URL;
+# in addition, you might want to proxy access to RefWorks - for example:
+# ctx.refworks.url = 'http://librweb.laurentian.ca/login?url=http://refworks.scholarsportal.info';
+
+%]
diff --git a/Open-ILS/web/templates/default/opac/parts/record/refworks.tt2 b/Open-ILS/web/templates/default/opac/parts/record/refworks.tt2
new file mode 100644
index 0000000..23af9a3
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/record/refworks.tt2
@@ -0,0 +1,23 @@
+[%
+    # Default to aou.id = 1 in the absence of a specific library
+    loc = 1;
+    IF CGI.param('loc');
+        loc = CGI.param('loc');
+    END;
+
+    # Get the full name of the library
+    ou_name = ctx.get_aou(loc).name | uri;
+
+    # Generate the gross RefWorks URL, based on parameters from config.tt2
+    rw_uri = ctx.refworks.url _ 
+        '/express/expressimport.asp?vendor=' _
+        ou_name _
+        '&filter=MARC+Format&database=All+MARC+Formats&' _
+        'encoding=65001&url=http%3A%2F%2F' _
+        CGI.server_name _ 
+        '/opac/extras/supercat/marctxt/record/' _ 
+        ctx.bre_id;
+%]
+<div class="rdetail_refworks">
+    <a href="[% rw_uri %]">[% l('Export to RefWorks') %]</a>
+</div>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 4dbfadc..7cdfbc9 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -1,6 +1,11 @@
 [% ctx.page_title = attrs.title | html_entity %]
 <!-- ****************** rdetail_summary.xml ***************************** -->
 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
+
+[% IF ctx.refworks.enable == 'true' %]
+    [% INCLUDE 'default/opac/parts/record/refworks.tt2' %]
+[% END %]
+
 <!-- This holds the record summary information -->
 
 <table width="100%" border="0" cellpadding="0" cellspacing="0" id="rdetail_details_table">
diff --git a/Open-ILS/web/templates/default/opac/record.tt2 b/Open-ILS/web/templates/default/opac/record.tt2
index 0149bf1..bc5275c 100644
--- a/Open-ILS/web/templates/default/opac/record.tt2
+++ b/Open-ILS/web/templates/default/opac/record.tt2
@@ -1,4 +1,5 @@
 [%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/config.tt2";
     WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = l("Record Detail") %]

commit 4f23db651c2cf5aab73de5fbcb7f556d2a13101b
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue Jun 28 14:19:13 2011 -0400

    Take advantage of Wekbit speech input
    
    The x-webkit-speech attribute enables speech input on current versions
    of Chrome. It's a frill, and I'm not sure we really want entire
    libraries of patrons mumbling to themselves more than we already have,
    but it's a low-cost frill so let's take advantage of it.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
index ae8081e..6325c0a 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
@@ -23,7 +23,7 @@
             <option value="[_1]"[% c == o.value ? ' selected="selected"' : '' %]>[_2]</option>
             [% END; END %]
         </select>
-        <input type='text' size='18' name='query' value="[% q | html %]" />
+        <input type='text' size='18' name='query' value="[% q | html %]" x-webkit-speech />
         <a href="javascript:;" class="row-remover"
             title="[% l('Remove row') %]" alt="[% l('Remove row') %]"
             onclick='var row = this.parentNode.parentNode;var tbody = row.parentNode; if( tbody.getElementsByTagName("tr").length > 2 ) row.parentNode.removeChild(row);'><img src="[% ctx.media_prefix %]/images/adv_row_close_btn.png" /></a>
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 433ce68..383c1d2 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -28,7 +28,8 @@
                     <input type="text" id="search_box" name="query" value="[% is_advanced ? ctx.processed_search_query : CGI.param('query') || l("Search Keyword") | html %]"
                         [% IF is_advanced %]style="width: 450px"[% END %]
                         onfocus="if (this.value=='[% l("Search Keyword") %]'){this.value='';this.style.color='#000';}"
-                        onblur="if (this.value==''){this.value='[% l("Search Keyword") %]';this.style.color='#999';}" />
+                        onblur="if (this.value==''){this.value='[% l("Search Keyword") %]';this.style.color='#999';}"
+                        x-webkit-speech />
                 </div>
                 <input name='page' type='hidden' value="0" />
             </td>

commit 2f5ddb2e6a90b627551a80209d2123f47e70f75b
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue Jun 28 14:09:26 2011 -0400

    Display located URIs in record details page
    
    We can reuse the work put into misc_util.tt2 to generate args.uris in
    the display within the record details page. In the absence of good
    design, we add a basic class and matching CSS to style.css in the hopes
    that a design-oriented person can come along behind us and make the URIs
    stand out appropriately.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index caba3e0..7833530 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -389,6 +389,11 @@ div.select-wrapper:hover {
 	padding-right: 10px;
 }
 
+.rdetail_uri {
+    border: thin black solid;
+    padding: 3px;
+}
+
 .rdetail_aux_utils {
 	border-left:1px dotted #ccc;
 	padding-left: 17px;
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 4dbfadc..ff1a757 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -107,7 +107,15 @@
         </tr>
     </tbody>
 </table>
-<br /><br />
+<br />
+
+[% FOR uri IN args.uris %]
+<div class="rdetail_uri">
+    <a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]
+</div>
+[% END %]
+
+<br />
 
 <table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
     <thead>

commit 52adf7fd7a556451e3637c0849f8da4cca2875fc
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue Jun 28 13:24:37 2011 -0400

    Display multiple copies and URIs per record in search results
    
    By building up a list of hashes in args.holding instead of a single
    result, we can display multiple copies in search results.
    
    Similarly, adding args.uri to misc_util.tt2 gives us the list of located
    URIs to display in search results. Note that the XPath for holdings_xml
    in in-db unapi will change slightly.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index 02fd651..eba1b74 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -28,7 +28,7 @@ sub load_record {
         'open-ils.cstore.json_query.atomic', 
         $self->mk_copy_query($rec_id, $org, $depth, $copy_limit, $copy_offset));
 
-    my (undef, @rec_data) = $self->get_records_and_facets([$rec_id], undef, {flesh => '{holdings_xml,mra}'});
+    my (undef, @rec_data) = $self->get_records_and_facets([$rec_id], undef, {flesh => '{holdings_xml,mra,acp}'});
     $ctx->{bre_id} = $rec_data[0]->{id};
     $ctx->{marc_xml} = $rec_data[0]->{marc_xml};
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 787228c..82b8865 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -179,7 +179,7 @@ sub load_rresults {
     my ($facets, @data) = $self->get_records_and_facets(
         $rec_ids, $results->{facet_key}, 
         {
-            flesh => '{holdings_xml,mra}',
+            flesh => '{holdings_xml,mra,acp}',
             site => $site,
             depth => $depth
         }
diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index 0e7cd2c..04add44 100644
--- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -27,10 +27,59 @@
         args.isbn_clean = args.isbn.replace('\ .*', '');
 
         args.holdings = [];
-        FOR holding IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
-            args.holdings.push(
-                holding.getAttribute('label')
-            );
+        args.uris = [];
+
+        # URI info is in volumes/volume/uris/volume, instead of uri element
+        i = 0;
+        FOR volume IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
+            i = i + 1;
+
+            # Check volume visibility - could push this into XPath
+            vol.label = volume.getAttribute('label');
+            NEXT IF volume.getAttribute('opac_visible') == 'false';
+            NEXT IF volume.getAttribute('deleted') == 'true';
+
+            IF vol.label == '##URI##';
+                FOR uri IN xml.findnodes('//*[local-name()="uris"]/*[local-name()="volume"]', volume);
+                    res.href = uri.getAttribute('href');
+                    res.link = uri.getAttribute('label');
+                    res.note = uri.getAttribute('use_restriction');
+                    args.uris.push(res);
+                END;
+                NEXT;
+            ELSE;
+                copies = xml.findnodes('//*[local-name()="copies"]/*[local-name()="copy"]', volume);
+                FOR copy IN copies;
+                    # Check copy visibility
+                    cp.deleted = copy.getAttribute('deleted');    
+                    cp.visible = copy.getAttribute('opac_visible');
+                    NEXT IF (cp.deleted == 'true' OR cp.visible == 'false');
+
+                    # Iterate through all of the children to determine visibility
+                    FOR node IN cp.childNodes;
+                        NEXT IF cp.visible == 'false';
+                        vis = node.getAttribute('opac_visible');
+                        del = node.getAttribute('deleted');
+                        IF vis == 'false' or del == 'true';
+                            cp.visible = 'false';
+                        END;
+                    END;
+
+                    NEXT IF cp.visible == 'false';
+                    
+                    loc = xml.findnodes('//*[local-name()="location"]', copy);
+                    circlib = xml.findnodes('//*[local-name()="circlib"]', copy);
+                    status = xml.findnodes('//*[local-name()="status"]', copy);
+
+                    holding = {
+                        label => vol.label,
+                        location => loc.0.textContent,
+                        library => circlib.0.textContent,
+                        status => status.0.textContent
+                    };
+                    args.holdings.push(holding);
+                END;
+            END;
         END;
 
         # Extract the copy count summary
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 6fc3b2e..efb50f7 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -103,12 +103,6 @@
                                                     </div>
                                                     <table cellpadding="0" cellspacing="0" border="0"
                                                         class="results_info_table">
-                                                        <tr name='bib_cn_list' class='result_table_title_cell'>
-                                                            <td valign='top'>
-                                                                <strong>[% l('Call number:') %]</strong>
-                                                            </td>
-                                                            <td>[% args.holdings.0 %]</td>
-                                                        </tr>
                                                         <tr name="results_pub_tr" class="[% attrs.publisher ? '' : 'hide_me' %]">
                                                             <td valign="top">
                                                                 <strong>[% l('Publisher:') %]</strong>
@@ -135,6 +129,26 @@
                                                                 [% args.phys_desc %]
                                                             </td>
                                                         </tr>
+
+                                                        [% FOR copy IN args.holdings %]
+                                                        <tr name='bib_cn_list' class='result_table_title_cell'>
+                                                            <td valign='top'>
+                                                                <strong>[% l('Call number:') %]</strong>
+                                                            </td>
+                                                            <td>[% copy.label _ ' ' _ copy.location _ ' ' _ copy.library _ ' ' _ copy.status %]</td>
+                                                        </tr>
+                                                        [% END %]
+
+                                                        [% FOR uri IN args.uris%]
+                                                        <tr name='bib_uri_list' class='result_table_title_cell'>
+                                                            <td valign='top'>
+                                                                <strong>[% l('Electronic resource') %]</strong>
+                                                            </td>
+                                                            <td><a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]</td>
+                                                        </tr>
+                                                        [% END %]
+
+
                                                     </table>
                                                     <div>
                                                         [% l('[_1] of [quant,_2,copy,copies] available',

commit bb3e2a24c7cbbd633484527e0a7e886e152acf6d
Merge: 96da048 08b13c6
Author: evergreen <evergreen at squeeze.debian>
Date:   Tue Jun 28 11:08:51 2011 -0400

    Merge branch 'master' of git://git.evergreen-ils.org/Evergreen into ttopac


commit 328c8b2cf041b5619346b888a6f6da124cedf1b8
Merge: 38c0795 f762b75
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Jun 27 18:59:40 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 2dd0564af5513865e1dd8da2ce03173acac7a924
Merge: 96da048 38c0795
Author: evergreen <evergreen at squeeze.debian>
Date:   Mon Jun 27 15:56:22 2011 -0400

    Merge branch 'template-toolkit-opac' of git://git.evergreen-ils.org/evergreen/equinox into ttopac


commit 38c0795a42c17d41657deccc8df93b562044ed17
Author: Dan Scott <dan at coffeecode.net>
Date:   Mon Jun 27 14:18:39 2011 -0400

    Meaningful title elements for record details and search results
    
    Rather than the generic "Record Details" and "Search Results", populate
    the <title> element with the actual title of the record or the search
    query, respectively.
    
    We punt on advanced search results for now, until we can parse the array
    into something usable.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Dan Scott <dan at coffeecode.net>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 582b98b..4dbfadc 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -1,3 +1,4 @@
+[% ctx.page_title = attrs.title | html_entity %]
 <!-- ****************** rdetail_summary.xml ***************************** -->
 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
 <!-- This holds the record summary information -->
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 0fb4c31..d0b6d28 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -3,7 +3,12 @@
 
     WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
-    ctx.page_title = l("Search Results");
+
+    IF is_advanced;
+        ctx.page_title = l("Search Results");
+    ELSE;
+        ctx.page_title = l("Search Results: ") _ CGI.param('query') | html_entity;
+    END;
 
     page = CGI.param('page') || 0;
     page_count = POSIX.ceil(ctx.hit_count / ctx.page_size);

commit 0ecc6ce9f936c0153b0ef714e464ad8a0ac62c65
Merge: 89c0897 a78a07a
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Jun 27 14:26:37 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 2cc3997a195b2e73cb98254f0528730c30a06115
Author: Dan Scott <dan at coffeecode.net>
Date:   Mon Jun 27 14:18:39 2011 -0400

    Meaningful title elements for record details and search results
    
    Rather than the generic "Record Details" and "Search Results", populate
    the <title> element with the actual title of the record or the search
    query, respectively.
    
    We punt on advanced search results for now, until we can parse the array
    into something usable.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 582b98b..4dbfadc 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -1,3 +1,4 @@
+[% ctx.page_title = attrs.title | html_entity %]
 <!-- ****************** rdetail_summary.xml ***************************** -->
 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
 <!-- This holds the record summary information -->
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 0fb4c31..d0b6d28 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -3,7 +3,12 @@
 
     WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
-    ctx.page_title = l("Search Results");
+
+    IF is_advanced;
+        ctx.page_title = l("Search Results");
+    ELSE;
+        ctx.page_title = l("Search Results: ") _ CGI.param('query') | html_entity;
+    END;
 
     page = CGI.param('page') || 0;
     page_count = POSIX.ceil(ctx.hit_count / ctx.page_size);

commit 4da568ab439edbfd3b230d79997b9b97821f31a2
Author: Dan Scott <dan at coffeecode.net>
Date:   Mon Jun 27 12:32:11 2011 -0400

    The TT OPAC proof of concept is dead code - remove it
    
    Leading up to the TT OPAC dev fest, some people were confused by the
    opac-poc directory. It hasn't been touched since February 14th and we
    can always retrieve the old code from history if absolutely necessary.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac-poc/base.tt2 b/Open-ILS/web/templates/default/opac-poc/base.tt2
deleted file mode 100644
index 6d54607..0000000
--- a/Open-ILS/web/templates/default/opac-poc/base.tt2
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.locale %]' xml:lang='[% ctx.locale %]'>
-    <head>
-        <title>[% ctx.page_title %]</title>
-        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-        [% BLOCK html_head; END; # provide a default that can be overridden %]
-        [% PROCESS html_head %]
-    </head>
-    <body>
-        [% content %] 
-    </body>
-</html>
diff --git a/Open-ILS/web/templates/default/opac-poc/common.tt2 b/Open-ILS/web/templates/default/opac-poc/common.tt2
deleted file mode 100644
index c4caa0e..0000000
--- a/Open-ILS/web/templates/default/opac-poc/common.tt2
+++ /dev/null
@@ -1,58 +0,0 @@
-[% 
-    # Org Unit Selector Widget : 
-    #   PROCESS build_org_selector id='selector-id' name='selector-name'
-    BLOCK build_org_selector;
-        first_run = 0;
-        IF !org_unit;
-            org_unit = ctx.aou_tree;
-            first_run = 1;
-%]
-    <select id='[% id %]' name='[% name %]'>
-    [% END %]
-        <option value='[% org_unit.id %]' [% IF org_unit.id == value %] selected='selected' [% END %]>
-            [% 
-                pad = org_unit.ou_type.depth * 2;
-                FOR idx IN [0..pad]; '&nbsp;'; END;
-                org_unit.name;
-            %]
-        </option>
-        [% FOR child IN org_unit.children; PROCESS build_org_selector org_unit = child; END %]
-    [% IF first_run %]
-    </select>
-    [% END %]
-[% END %]
-
-[% PROCESS 'default/opac/marc_attrs.tt2' %]
-[%  USE date;
-    USE money = format('$%.2f');
-    icon_by_mattype = {     # XXX KCLS-specific
-        "a" => "media_book.jpg",
-        "b" => "media_magazines.jpg",
-        "c" => "media_printedmusic.jpg",
-        "d" => "media_microform.jpg",
-        "e" => "media_equipment.jpg",
-        "f" => "media_films.jpg",
-        "g" => "",
-        "h" => "media_dvd.jpg",
-        "i" => "media_bookoncassette.jpg",
-        "j" => "media_musiccd.jpg",
-        "k" => "media_musiccassette.jpg",
-        "l" => "media_musicrecord.jpg",
-        "m" => "media_software.jpg",
-        "n" => "media_bookoncd.jpg",
-        "o" => "media_kit.jpg",
-        "p" => "media_newspaper.jpg",
-        "q" => "media_largeprint.jpg",
-        "r" => "media_3dobject.jpg",
-        "s" => "media_slide.jpg",
-        "t" => "media_online.jpg",
-        "u" => "media_eaudio.jpg",
-        "v" => "media_ebooktext.jpg",
-        "w" => "media_eaudio.jpg",
-        "x" => "media_downloadmusic.jpg",
-        "y" => "media_downloadvideo.jpg",
-        "z" => "media_map.jpg",
-        "2" => "media_cassettewithbook.jpg",
-        "5" => "media_cdwithbook.jpg"
-    };
-%]
diff --git a/Open-ILS/web/templates/default/opac-poc/home.tt2 b/Open-ILS/web/templates/default/opac-poc/home.tt2
deleted file mode 100644
index 03b2ad1..0000000
--- a/Open-ILS/web/templates/default/opac-poc/home.tt2
+++ /dev/null
@@ -1,24 +0,0 @@
-[% ctx.page_title = "Home" %]
-
-[% BLOCK html_head %]
-<style>
-    #home_div { text-align: center; width: 100%; margin-top: 30px;}
-</style>
-[% END %]
-
-[% WRAPPER "default/opac/base.tt2" %]
-[% PROCESS "default/opac/common.tt2" %]
-
-<div id='home_div'>
-    <img src='/images/eg_logo.jpg'/>
-    <br/><br/>
-    <form action='./results' method='GET'>
-        <input type='text' name='query' size='50' value='[% query %]'/>
-        [% PROCESS build_org_selector name='loc' %]
-        <input type='submit' value='[% l('Go!') %]'/>
-        <input type='hidden' name='page' value='0'/>
-    </form>
-</div>
-
-
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac-poc/login.tt2 b/Open-ILS/web/templates/default/opac-poc/login.tt2
deleted file mode 100644
index 1bae958..0000000
--- a/Open-ILS/web/templates/default/opac-poc/login.tt2
+++ /dev/null
@@ -1,32 +0,0 @@
-[% BLOCK html_head %]
-<style>
-</style>
-[% END %]
-
-[% 
-    USE CGI;
-    WRAPPER "default/opac/base.tt2"; 
-    ctx.page_title = "Login";
-%]
-
-<div style='width:400px; text-align:center; border: 1px solid #888'>
-    <form method='POST'>
-        <table>
-            <tr>
-                <td>Username or Barcode</td>
-                <td><input name='username' type='text'/></td>
-            </tr>
-            <tr>
-                <td>Password</td>
-                <td><input name='password' type='password'/></td>
-            </tr>
-            <tr>
-                <td colspan='2' style='text-align:center'>
-                    <input type='submit'/>
-                </td>
-            </tr>
-        </table>
-        <input type='hidden' name='redirect_to' value='[% CGI.param('redirect_to') || ctx.referer | replace('^http:', 'https:') %]'/>
-    </form>
-</div>
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac-poc/marc_attrs.tt2 b/Open-ILS/web/templates/default/opac-poc/marc_attrs.tt2
deleted file mode 100644
index 73f12c3..0000000
--- a/Open-ILS/web/templates/default/opac-poc/marc_attrs.tt2
+++ /dev/null
@@ -1,18 +0,0 @@
-[% 
-    # Extract MARC fields from XML
-    #   get_marc_attrs( { marc_xml => doc } )
-    BLOCK get_marc_attrs;
-        xml = args.marc_xml;
-        args.isbn = xml.findnodes('//*[@tag="020"]/*[@code="a"]').textContent;
-        args.upc = xml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
-        args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
-        args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
-        args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
-        args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
-        args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
-        args.mattype = xml.findnodes('//*[@tag="998"]/*[@code="d"]').textContent; # XXX this is KCLS-specific and will need to change
-
-        # clean up the ISBN
-        args.isbn_clean = args.isbn.replace('\ .*', '');
-    END;
-%]
diff --git a/Open-ILS/web/templates/default/opac-poc/myopac/_links.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/_links.tt2
deleted file mode 100644
index b034198..0000000
--- a/Open-ILS/web/templates/default/opac-poc/myopac/_links.tt2
+++ /dev/null
@@ -1,20 +0,0 @@
-<div>[%
-pages = [
-    {url => "main", name => "My Account"},
-    {url => "circs", name => "Items Out"},
-    {url => "holds", name => "Items on Hold"},
-    {url => "fines", name => "Fines"},
-    {url => "prefs", name => "Account Preferences"},
-    {url => "bookbags", name => "My Bookbags"}
-];
-FOREACH page IN pages %]
-    <span style="margin: 0 0.5em;">
-    [% IF page.url != myopac_page %]<a href="[% page.url %]">[% END;
-        page.name;
-        IF page.url != myopac_page %]</a>
-    [% ELSE; ctx.page_title = page.name; END %]</span>
-[% END %]</div>
-<ul>
-    <li><a href="../home">Home</a></li>
-    <li><a href="../logout">Logout</a></li>
-</ul>
diff --git a/Open-ILS/web/templates/default/opac-poc/myopac/bookbags.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/bookbags.tt2
deleted file mode 100644
index 0ac2dc0..0000000
--- a/Open-ILS/web/templates/default/opac-poc/myopac/bookbags.tt2
+++ /dev/null
@@ -1,52 +0,0 @@
-[% BLOCK html_head %]
-<style>
-    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
-    table { border-collapse: collapse; }
-    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
-    table tr:nth-child(odd) { background-color:#ded; }
-    #action_div { width: 95%; }
-    #action-buttons { float:right; }
-</style>
-[% END %]
-
-[% WRAPPER "default/opac/base.tt2" %]
-[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "bookbags" %]
-
-[% IF ctx.bookbags.size == 0 %]
-<b>No Bookbags</b>
-[% STOP; END %]
-
-<form method='POST' id='bbag-form'>
-    <div id='action_div'>
-        <div id='action-buttons'>
-            <select name='action'>
-                <option value='delete'>Delete Selected</option>
-                <option value='delete_all'>Delete All</option>
-            </select>
-            <input type='submit' value='Go'/>
-        </div>
-    </div>
-    <table>
-        <thead>
-            <tr>
-                <th>Name</th>
-                <th>Public</th>
-                <th>Created On</th>
-                <th>Items</th>
-            </tr>
-        </thead>
-        <tbody>
-            [% FOR bbag IN ctx.bookbags %]
-                <tr [% IF loop.count % 2 == 1 %] class='bbag-table-odd' [% END %]>
-                    <td>[% bbag.name %]</td>
-                    <td>[% bbag.pub == 't' ? 'Yes' : 'No' %]</td>
-                    <td>[% date.format(ctx.parse_datetime(bbag.create_time),'%Y-%m-%d') %]</td>
-                    <td>XXX</td>
-                </tr>
-            [% END %]
-        </tbody>
-    </table>
-</form>
-
-
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac-poc/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/circs.tt2
deleted file mode 100644
index 5f08d2e..0000000
--- a/Open-ILS/web/templates/default/opac-poc/myopac/circs.tt2
+++ /dev/null
@@ -1,77 +0,0 @@
-[% BLOCK html_head %]
-<style>
-    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
-    table { border-collapse: collapse; }
-    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
-    #action_div { width: 95%; }
-    .renew-summary { float:left; padding-right: 10px;}
-    #action-buttons { float:right; }
-    .circ-table-odd { background-color:#ded; }
-    .failure-text { font-weight: bold; color: red; }
-    #circ-form { margin-top: 20px; }
-</style>
-[% END %]
-
-[% PROCESS "default/opac/common.tt2" %]
-[% WRAPPER "default/opac/base.tt2" %]
-[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "circs" %]
-
-[% IF ctx.circs.size == 0 %]
-<b>No Items Checked Out</b>
-[% STOP; END %]
-
-<form method='POST' id='circ-form'>
-    <div id='action_div'>
-        [% IF ctx.success_renewals > 0 %]
-            <div class='renew-summary'><b>Successfully renewed [% ctx.success_renewals %] items.</b></div>
-        [% END %]
-        [% IF ctx.failed_renewals > 0 %]
-            <div class='renew-summary'><b>Failed to renew [% ctx.failed_renewals %] items.</b></div>
-        [% END %]
-        <div id='action-buttons'>
-            <button type='submit' value='renew' name='action'>Renew Selected</button>
-            <button type='submit' value='renew_all' name='action'>Renew All</button>
-        </div>
-    </div>
-    <table>
-        <thead>
-            <tr>
-                <th>Title</th>
-                <th>Author</th>
-                <th>Due Date</th>
-                <th>Renewals Remaining</th>
-                <th>Select</th>
-            </tr>
-        </thead>
-        <tbody>
-            [% FOR circ IN ctx.circs %]
-                [% attrs = {marc_xml => circ.marc_xml}; %]
-                [% PROCESS get_marc_attrs args=attrs; %]
-
-                <tr [% IF loop.count % 2 == 1 %] class='circ-table-odd' [% END %]>
-                    <td><a href='../record/[% circ.circ.target_copy.call_number.record.id %]'>[% attrs.title %]</a></td>
-                    <td><a href='../results?query=au:[% attrs.author | url %]'>[% attrs.author %]</a></td>
-                    <td>[% date.format(ctx.parse_datetime(circ.circ.due_date),'%Y-%m-%d') %]</td>
-                    <td><em>[% circ.circ.renewal_remaining %]</em></td>
-                    <td><input name='circ' value='[% circ.circ.id %]' type='checkbox' 
-                        [% IF circ.circ.renewal_remaining < 1 %] disabled='disabled' [% END %]/></td>
-                </tr>
-
-                [% IF circ.renewal_response and circ.renewal_response.textcode != 'SUCCESS' %]
-                <tr [% IF loop.count % 2 == 1 %] class='circ-table-odd' [% END %]>
-                    <td colspan='0'>
-                        <div class='failure-text'>
-                            [% circ.renewal_response.textcode %] 
-                            [% IF circ.renewal_response.payload.fail_part and circ.renewal_response.payload.fail_part != circ.renewal_response.textcode %]
-                                [% circ.renewal_response.payload.fail_part %]
-                            [% END %]
-                        </div>
-                    </td>
-                </tr>
-                [% END %]
-            [% END %]
-        </tbody>
-    </table>
-</form>
-
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac-poc/myopac/fines.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/fines.tt2
deleted file mode 100644
index 727322f..0000000
--- a/Open-ILS/web/templates/default/opac-poc/myopac/fines.tt2
+++ /dev/null
@@ -1,107 +0,0 @@
-[% BLOCK html_head %]
-<style>
-    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
-    table { border-collapse: collapse; }
-    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
-    table tr:nth-child(odd) { background-color:#ded; }
-    h2 { margin-bottom: 0; }
-</style>
-[% END %]
-
-[% PROCESS "default/opac/common.tt2" %]
-[% WRAPPER "default/opac/base.tt2" %]
-[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "fines" %]
-<h2>Summary</h2>
-<table>
-    <thead>
-        <tr>
-            <th>Total Owed</th>
-            <th>Total Paid</th>
-            <th>Balance Owed</th>
-        </tr>
-    </thead>
-    <tbody>
-        <tr>
-            <td>[% money(ctx.fines.total_owed) %]</td>
-            <td>[% money(ctx.fines.total_paid) %]</td>
-            <td>[% money(ctx.fines.balance_owed) %]</td>
-        </tr>
-    </tbody>
-</table>
-
-[% IF ctx.fines.circulation.size > 0 %]
-<h2>Overdue materials</h2>
-<table>
-    <thead>
-        <tr>
-            <th>Title</th>
-            <th>Author</th>
-            <th>Checkout Date</th>
-            <th>Due Date</th>
-            <th>Date Returned</th>
-            <th>Balance Owed</th>
-        </tr>
-    </thead>
-    <tbody>
-    [% FOR f IN ctx.fines.circulation %]
-        [% attrs = {marc_xml => f.marc_xml}; %]
-        [% PROCESS get_marc_attrs args=attrs; %]
-        <tr>
-            <td>[% attrs.title %]</td>
-            <td>[% attrs.author %]</td>
-            <td>[% date.format(
-                ctx.parse_datetime(f.xact.circulation.xact_start), "%Y-%m-%d"
-            ) %]</td>
-            <td>[% date.format(
-                ctx.parse_datetime(f.xact.circulation.due_date), "%Y-%m-%d"
-            ) %]</td>
-            <td>[%
-                IF f.xact.circulation.checkin_time;
-                    date.format(
-                        ctx.parse_datetime(f.xact.circulation.checkin_time),
-                        "%Y-%m-%d"
-                    );
-                END %]</td><!-- XXX TODO display stop_fines_time if set? Display something instead of blank like "fines accruing" ? -->
-            <td>[% money(f.xact.balance_owed) %]</td>
-        </tr>
-    [% END %]
-    </tbody>
-</table>
-[% END %]
-
-[% IF ctx.fines.grocery.size > 0 %]
-<h2>Other Fees</h2>
-<table>
-    <thead>
-        <tr>
-            <th>Transaction Start Time</th>
-            <th>Last Payment Time</th>
-            <th>Initial Amount Owed</th>
-            <th>Total Amount Paid</th>
-            <th>Balance Owed</th>
-            <th>Billing Type</th>
-        </tr>
-    </thead>
-    <tbody>
-    [% FOR f IN ctx.fines.grocery %]
-        <tr>
-            <td>[%
-                date.format(
-                    ctx.parse_datetime(f.xact.xact_start), "%Y-%m-%d"
-                ) %]</td>
-            <td>[% IF f.xact.last_payment_ts;
-                    date.format(
-                        ctx.parse_datetime(f.xact.last_payment_ts), "%Y-%m-%d"
-                        );
-                    END %]</td>
-            <td>[% money(f.xact.total_owed) %]</td>
-            <td>[% money(f.xact.total_paid) %]</td>
-            <td>[% money(f.xact.balance_owed) %]</td>
-            <td>[% f.xact.last_billing_type %]</td>
-        </tr>
-    [% END %]
-    </tbody>
-</table>
-[% END %]
-
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac-poc/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/holds.tt2
deleted file mode 100644
index ce09725..0000000
--- a/Open-ILS/web/templates/default/opac-poc/myopac/holds.tt2
+++ /dev/null
@@ -1,94 +0,0 @@
-[% BLOCK html_head %]
-<style>
-    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
-    table { border-collapse: collapse; }
-    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
-    table tr:nth-child(odd) { background-color:#ded; }
-    #action_div { width: 95%; }
-    #action-buttons { float:right; }
-</style>
-[% END %]
-
-[%  PROCESS "default/opac/common.tt2";
-    WRAPPER "default/opac/base.tt2";
-    INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "holds" %]
-
-[% IF ctx.holds.size == 0 %]
-<b>No Items On Hold</b>
-[% STOP; END %]
-
-<form method='POST'>
-
-    <div id='action_div'>
-        <div id='action-buttons'>
-            <select name='action'>
-                <option value='cancel'>Cancel Selected</option>
-                <option value='cancel_all'>Cancel All</option>
-                <option value='suspend'>Suspend Selected</option>
-                <option value='suspend_all'>Suspend All</option>
-                <option value='activate'>Activate Selected</option>
-                <option value='activate_all'>Activate All</option>
-            </select>
-            <input type='Submit' value='Go'/>
-        </div>
-    </div>
-    <table>
-        <thead>
-            <tr>
-                <th>Title</th>
-                <th>Author</th>
-                <th>Formats</th>
-                <th>Pickup Location</th>
-                <th>Status</th>
-                <th>Active</th>
-                <th>Activate on...</th>
-                <th>Expiration Date</th>
-                <th>Select</th>
-            </tr>
-        </thead>
-        <tbody>
-            [% FOR hold IN ctx.holds %]
-                [% attrs = {marc_xml => hold.marc_xml}; %]
-                [% PROCESS get_marc_attrs args=attrs; %]
-            <tr>
-                <td><a href='../record/[% hold.hold.bre.id %]'>[% attrs.title %]</a></td>
-                <td><a href='../results?query=au:[% attrs.author | url %]'>[% attrs.author %]</a></td>
-                <td>
-                    [%
-                        key = attrs.mattype;
-                        format_desc = ctx.find_citm(key).value;
-                        icon_filename = icon_by_mattype.$key;
-                        IF icon_filename;
-                    %]<!-- XXX in situations where we might show M-type holds, this won't be good enough -->
-                    <img alt="[% format_desc %]" title="[% format_desc %]"
-                        src="/images/mattype/[% icon_filename %]" />
-                    [%  END %]
-                </td>
-                <td>[% ctx.find_aou(hold.hold.hold.pickup_lib).name %]</td>
-                <td>[%
-                    IF hold.hold.status == 4;
-                        "Available";
-                    ELSIF hold.hold.estimated_wait;
-                        "Estimated wait (days): "; hold.hold.estimated_wait;
-                    ELSIF hold.hold.status == 3;
-                        "In Transit";
-                    ELSIF hold.hold.status < 3;
-                        "Waiting for copy";
-                    END;
-                %]</td>
-                <td>[% IF hold.hold.hold.frozen == 't' %] No [% ELSE %] Yes [% END %]</td>
-                <td>[% 
-                    IF hold.hold.hold.frozen == 't' AND hold.hold.hold.thaw_date;
-                        date.format(ctx.parse_datetime(hold.hold.hold.thaw_date),'%Y-%m-%d'); 
-                    ELSE;
-                        '-';
-                    END 
-                %]</td>
-                <td>[% hold.hold.hold.expire_time ? hold.hold.hold.expire_time : '-' %]</td>
-                <td><input type='checkbox' name='hold_id' value='[% hold.hold.hold.id %]'/></td>
-            </tr>
-            [% END %]
-        </tbody>
-    </table>
-</form> 
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac-poc/myopac/main.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/main.tt2
deleted file mode 100644
index 33a533e..0000000
--- a/Open-ILS/web/templates/default/opac-poc/myopac/main.tt2
+++ /dev/null
@@ -1,39 +0,0 @@
-[% BLOCK html_head %]
-<style>
-    table { text-align: center; padding: 20px; margin-top: 30px; border-collapse: collapse; }
-    table td { padding: 5px 15px 5px 15px; border-bottom: 1px solid #ddd; text-align: left;}
-    table tr:nth-child(odd) { background-color:#ded; }
-</style>
-[% END %]
-
-[% WRAPPER "default/opac/base.tt2" %]
-[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "main" %]
-<table>
-    <tr>
-        <td>First Name</td>
-        <td>[% ctx.user.first_given_name %]</td>
-    </tr>
-    <tr>
-        <td>Middle Name</td>
-        <td>[% ctx.user.second_given_name %]</td>
-    </tr>
-    <tr>
-        <td>Last Name</td>
-        <td>[% ctx.user.family_name %]</td>
-    </tr>
-    <tr>
-        <td>Library Card</td>
-        <td>[% ctx.user.card.barcode %]</td>
-    </tr>
-    <tr>
-        <td>Email Address</td>
-        <td>[% ctx.user.email %]</td>
-        <td><a href='update_email'>Change</a></td>
-    </tr>
-    <tr>
-        <td>Phone</td>
-        <td>[% ctx.user.day_phone %]</td>
-    </tr>
-</table>
-
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac-poc/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/prefs.tt2
deleted file mode 100644
index d9a60ba..0000000
--- a/Open-ILS/web/templates/default/opac-poc/myopac/prefs.tt2
+++ /dev/null
@@ -1,15 +0,0 @@
-[% BLOCK html_head %]
-<style>
-    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
-    table { border-collapse: collapse; }
-    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
-    table tr:nth-child(odd) { background-color:#ded; }
-</style>
-[% END %]
-
-[% WRAPPER "default/opac/base.tt2" %]
-[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "prefs" %]
-<p><em>XXX TODO Need to find out whether the list of pref fields can/should be generated
-    from db entries or something.</em></p>
-
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac-poc/myopac/update_email.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/update_email.tt2
deleted file mode 100644
index 7666c8f..0000000
--- a/Open-ILS/web/templates/default/opac-poc/myopac/update_email.tt2
+++ /dev/null
@@ -1,20 +0,0 @@
-[% BLOCK html_head %]
-<style>
-    table { text-align: center; padding: 20px; margin-top: 30px; border-collapse: collapse; }
-    table td { padding: 5px 15px 5px 15px; border-bottom: 1px solid #ddd; text-align: left;}
-    table tr:nth-child(odd) { background-color:#ded; }
-</style>
-[% END %]
-
-[% WRAPPER "default/opac/base.tt2" %]
-[% INCLUDE "default/opac/myopac/_links.tt2" %]
-
-<form method='POST'>
-    <table> 
-        <tr><td>Current Email</td><td>[% ctx.user.email %]</td></tr>
-        <tr><td>New Email</td><td><input type='text' name='email'/></td></tr>
-    </table>
-    <input type='submit'/>
-</form>
-
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac-poc/place_hold.tt2 b/Open-ILS/web/templates/default/opac-poc/place_hold.tt2
deleted file mode 100644
index bfbee07..0000000
--- a/Open-ILS/web/templates/default/opac-poc/place_hold.tt2
+++ /dev/null
@@ -1,33 +0,0 @@
-[% BLOCK html_head %]
-<style>
-</style>
-[% END %]
-
-[% 
-    USE CGI;
-    PROCESS "default/opac/common.tt2";
-    WRAPPER "default/opac/base.tt2"; 
-    ctx.page_title = "Place Hold";
-    attrs = {marc_xml => ctx.marc_xml};
-    PROCESS get_marc_attrs args=attrs;
-%]
-
-
-<div>
-    <div>Placing hold on [% attrs.title %], by [% attrs.author %]</div>
-    [% IF ctx.hold_success %] 
-        <div>Succeeded</div>
-    [% ELSIF ctx.hold_failed %]
-        <div>Failed...</div>
-    [% ELSE %]
-    <form action='place_hold' method='POST'>
-        Choose a pickup Library [% PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib %]
-        <input type='Submit'/>
-        <input type='hidden' name='hold_target' value='[% CGI.param('hold_target') | html %]'/>
-        <input type='hidden' name='hold_type' value='[% CGI.param('hold_type') | html %]'/>
-        <input type='hidden' name='redirect_to' value='[% ctx.referer | html %]'/>
-    </form>
-    [% END %]
-</div>
-
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac-poc/record.tt2 b/Open-ILS/web/templates/default/opac-poc/record.tt2
deleted file mode 100644
index 24f1203..0000000
--- a/Open-ILS/web/templates/default/opac-poc/record.tt2
+++ /dev/null
@@ -1,82 +0,0 @@
-[% BLOCK html_head %]
-<style>
-    table { width: 100%; padding: 20px; margin-top: 30px; }
-    table { border-collapse: collapse; }
-    table td { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
-    table th { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
-    table tr:nth-child(even) { background-color:#ded; }
-    #record_table td { padding-left: 15px; padding-right: 15px; }
-</style>
-[% END %]
-
-[% 
-    WRAPPER "default/opac/base.tt2"; 
-    PROCESS "default/opac/common.tt2";
-    ctx.page_title = "Details";
-    record = ctx.record;
-    attrs = {marc_xml => ctx.marc_xml};
-    PROCESS get_marc_attrs args=attrs;
-%]
-
-<div id='detail_div'>
-    <table id='record_table' style='width:auto'>
-        <tr>
-            <td rowspan='10' style='width:55px; vertical-align:top; padding-right:4px;'>
-                [% IF attrs.isbn_clean || attrs.upc %]
-                <img width='50' height='70' src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% attrs.isbn_clean || attrs.upc %]'/>
-                [% END %]
-            </td>
-        </tr>
-        [% IF attrs.title %]<tr><td>Title</td><td>[% attrs.title %]</td></tr>[% END %]
-        [% IF attrs.author %]<tr><td>Author</td><td><a href='../results?query=au:[% attrs.author | uri %]'>[% attrs.author %]</a></td></tr>[% END %]
-        [% IF attrs.isbn %]<tr><td>ISBN</td><td>[% attrs.isbn %]</td></tr>[% END %]
-        [% IF attrs.issn %]<tr><td>ISSN</td><td>[% attrs.issn %]</td></tr>[% END %]
-        [% IF attrs.upc %]<tr><td>UPC</td><td>[% attrs.upc %]</td></tr>[% END %]
-        [% IF attrs.pubdate %]<tr><td>Publication Date</td><td>[% attrs.pubdate %]</td></tr>[% END %]
-        [% IF attrs.publisher %]<tr><td>Publishere</td><td>[% attrs.publisher %]</td></tr>[% END %]
-        <tr>
-            <td>Subjects</td>
-            <td>
-            [% FOR node IN ctx.marc_xml.findnodes('//*[@tag="650"]') %]
-                [% 
-                    s0 = node.childNodes.0.textContent;
-                    s1 = node.childNodes.1.textContent;
-                %]
-                [% IF s0 %]
-                    <a href='../results?query=su:[% s0 | url %]'>[% s0 %]</a>
-                    [% IF s1 %]
-                    <span>--</span>
-                    <a href='../results?query=su:[% s1 | url %]'>[% s1 %]</a>
-                    [% END %]
-                    <br/>
-                [% END %]
-            [% END %]
-            </td>
-        </tr>
-    </table>
-    <table id='copy_table'>
-        <thead>
-            <tr>
-                <th>Owning Lib</th>
-                <th>Call Number</th>
-                <th>Barcode</th>
-                <th>Status</th>
-            </tr>
-        </thead>
-        <tbody>
-        [% FOR acn IN record.call_numbers %]
-            [% FOR acp IN acn.copies %]
-                <tr>
-                    <td>[% ctx.find_aou(acn.owning_lib).shortname %]</td>
-                    <td>[% acn.label %]</td>
-                    <td>[% acp.barcode %]</td>
-                    <td>[% ctx.find_ccs(acp.status).name %]</td>
-                </tr>
-            [% END %]
-        [% END %]
-        </tbody>
-    </table>
-</div>
-
-
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac-poc/results.tt2 b/Open-ILS/web/templates/default/opac-poc/results.tt2
deleted file mode 100644
index 9ecead4..0000000
--- a/Open-ILS/web/templates/default/opac-poc/results.tt2
+++ /dev/null
@@ -1,117 +0,0 @@
-[% BLOCK html_head %]
-<style>
-    #body_table { width: 100%; margin-top: 20px; }
-    #left_block { width: 15%; vertical-align: top; }
-    #right_block { width: auto; vertical-align: top;}
-    #record_table { border-collapse: collapse; width:100%; }
-    #record_table td { padding: 3px; border-bottom: 1px solid #ddd; }
-    #record_table tr:nth-child(odd) { background-color:#ded; }
-    .record-table-odd { background-color:#ded; }
-    #form_div { text-align: center; width: 100%; margin-top: 10px;}
-    #links_div { margin-bottom: 10px; padding: 5px;}
-</style>
-[% END %]
-
-[% 
-    USE CGI;
-    USE POSIX;
-    WRAPPER "default/opac/base.tt2"; 
-    PROCESS "default/opac/common.tt2";
-    ctx.page_title = "Results";
-    page = CGI.param('page') || 0; 
-    query = CGI.param('query');
-    page_count = POSIX.ceil(ctx.hit_count / ctx.page_size);
-    loc = CGI.param('loc');
-%]
-
-<div id='form_div'>
-    <form action='./results' method='GET'>
-        <input type='text' name='query' size='50' value='[% query %]'/>
-        [% PROCESS build_org_selector name='loc' value=loc %]
-        <input type='submit'/>
-        <input type='hidden' name='page' value='0'/>
-    </form>
-</div>
-
-<table id='body_table'>
-    <tr>
-        <td id='left_block'>
-                [% IF ctx.user; %]
-                    <div id='links_div'>
-                        <div><a href='home'>Home</a></div>
-                        <div><a href='myopac/main'>Account</a></div>
-                        <div><a href='logout'>Logout</a></div>
-                    </div>
-                    <hr/>
-                    <table>
-                        <tr><td colspan='2' style='border-bottom:1px solid #9A9'>Signed in as [% ctx.user.usrname %]</td></tr>
-                        <tr><td>Total Holds</td><td>[% ctx.user_stats.holds.total %]</td></tr>
-                        <tr><td>Ready Holds</td><td>[% ctx.user_stats.holds.ready %]</td></tr>
-                        <tr><td>Items Out</td><td>[% ctx.user_stats.checkouts.out %]</td></tr>
-                        <tr><td>Fines</td><td>$[% ctx.user_stats.fines.balance_owed %]</td></tr>
-                    </table>
-                [% ELSE %]
-                    [% 
-                        login = CGI.url("-path" => 1).replace('^http:', 'https:').replace('/results','/login');
-                    %]
-                    <a href='[% login %]'>Login</a>
-                [% END %]
-            </div>
-            <div>
-                [% FOR facet_type IN ctx.search_facets.keys %]
-                    [% cmf = ctx.search_facets.$facet_type.cmf %]
-                    <b>[% cmf.label %]</b>
-                    <ul>
-                        [% FOR facet IN ctx.search_facets.$facet_type.data.keys %]
-                            [% facet_count = ctx.search_facets.$facet_type.data.$facet %]
-                            <li><a href='results?query=[% query | url %]&facet=[% cmf.field_class %]|[% cmf.name %][[% facet | url %]]'>[% facet_count %] / [% facet %]</a></li>
-                        [% END %]
-                    </ul>
-                [% END %]
-            </div>
-        </td>
-        <td id='right_block'>
-            <div>
-                <span>[% l('Hits: [_1] / Page [_2] of [_3]', ctx.hit_count, page + 1, page_count) %]</span>
-                [% 
-                    q = query | url;
-                    np_link = '?query=' _ q;
-                    IF loc; np_link = np_link _ "&loc=" _ loc; END;
-                    IF depth or depth == 0; np_link = np_link _ "&depth=" _ depth; END;
-                %]
-                <a [% IF page > 0 %] href='[% np_link %]&page=[% page - 1 %]' [% END %]>Prev</a>  
-                <a [% IF (page + 1) < page_count %] href='[% np_link %]&page=[% page + 1 %]' [% END %]>Next</a>
-            </div>
-            <table id='record_table'>
-                [%
-                FOR rec IN ctx.records;
-                    attrs = {marc_xml => rec.marc_xml};
-                    PROCESS get_marc_attrs args=attrs;
-                %]
-                <tr [% IF loop.count % 2 == 1 %] class='record-table-odd' [% END %]>
-                    <td style='width:52px;height:72px'>
-                        [% IF attrs.isbn %]
-                        <img width='50' height='70' src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% attrs.isbn_clean || attrs.upc %]'/>
-                        [% END %]
-                    </td>
-                    <td width='auto'>
-                        <div width='99%'>
-                            <div style='float:left'>
-                                <a href='record/[% rec.bre.id %]'>[% attrs.title %]</a>
-                            </div>
-                            <div style='float:right'>
-                                <span>[% rec.copy_counts.available %] / [% rec.copy_counts.visible %]</span>
-                                <span style='padding-left:10px;'><a href='place_hold?hold_target=[% rec.bre.id %]&hold_type=T'>Hold</a></span>
-                            </div>
-                        </div><br/>
-                        <div>[% attrs.author %]</div>
-                        <div>[% attrs.isbn || attrs.issn || attrs.upc %] [% attrs.publisher %] [% attrs.pubdate %]</div>
-                    </td>
-                </tr>
-                [% END %]
-            </table>
-        </td>
-    </tr>
-
-</table>
-[% END %]

commit 89c08972bf83c0f06dc37c568cba6d7bcc2bf8c8
Merge: ec897ae f0b408b
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Jun 24 15:47:01 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit ec897aefe0b16bf5340d2788e5e23a6dd1481aca
Merge: ec2621a ad0bbbb
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Jun 24 12:24:38 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit ec2621a2e0cd9f20d6389de8eb806bffec9600ef
Merge: 9251514 581fec9
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Jun 24 12:00:29 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 92515141688f96c0a8848f239e7bb117a6e99a42
Merge: 5e4ebfb 1dbba20
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu Jun 23 13:57:57 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 5e4ebfb4c89552edc30c5813dfbffd871797b71a
Merge: 1847c54 9544ad0
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Jun 22 11:19:49 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 1847c54562c0e6c57cbdce2d19aaf90c12e959b7
Merge: 5750246 4c21518
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Jun 21 16:23:02 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 57502460e776f40315c4126f93402c5b99b98f18
Merge: a9c6b61 aa155d6
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Jun 21 13:25:25 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit a9c6b612b29a8d30d3f66bc1736685af386822bc
Merge: 703fd89 804ce37
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Jun 21 11:31:07 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 703fd891db1bcb409474fda7a0d4d510b05ee8f1
Merge: 7ca0a42 b066d2c
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Jun 20 11:52:10 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 7ca0a42853740d4d531b87fb274089c1ecf163b1
Merge: 73533f9 4f51810
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sat Jun 18 21:39:15 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 96da048a6c8518006618eae44800cf3302be2728
Merge: 69b9866 38332f0
Author: evergreen <evergreen at squeeze.debian>
Date:   Thu Jun 16 14:07:17 2011 -0400

    Merge branch 'master' of git://git.evergreen-ils.org/Evergreen into ttopac


commit 73533f980e2133e0afa41cb293acd2bd728b9350
Merge: eeb7eb0 b426820
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Jun 15 09:28:27 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit eeb7eb0b221206355213c7a958683642fb4f39b5
Merge: 4f1eeb2 0c2d1a7
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Jun 14 18:12:24 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 4f1eeb2d0e97980931a2d2e7529282b8483d3b58
Merge: 69b9866 c1b1d40
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Jun 14 11:29:02 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 69b98663d7a3497ac97794004a54575a75a315e2
Merge: e52c687 a66e257
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Jun 13 15:09:20 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit e52c687f79902042793bf3e4d0b30abe7ee7fd74
Merge: 00d0a00 b1ee9ad
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Jun 13 10:17:09 2011 -0400

    Merge branch 'template-toolkit-opac' of git.evergreen-ils.org:evergreen/equinox into template-toolkit-opac


commit 00d0a00744d3ede693572acec2ef342cc299295a
Merge: 9c760ed ec98041
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Jun 13 10:17:08 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit b1ee9ad4ef91240de7110d1748a5a3c57043da39
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jun 10 16:16:21 2011 -0400

    Showing hold/copy summary in details page
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index 7b56ee4..02fd651 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -37,6 +37,7 @@ sub load_record {
     $ctx->{copy_offset} = $copy_offset;
 
     $ctx->{have_holdings_to_show} = 0;
+    $self->get_hold_copy_summary($rec_id, $org);
 
     # XXX TODO we'll also need conditional logic to show MFHD-based holdings
     if (
@@ -185,4 +186,16 @@ sub get_expanded_holdings {
 }
 
 
+sub get_hold_copy_summary {
+    my ($self, $rec_id, $org) = @_;
+    
+    my $req1 = OpenSRF::AppSession->create('open-ils.search')->request(
+        'open-ils.search.biblio.record.copy_count', $org, $rec_id); 
+
+    $self->ctx->{record_hold_count} = $U->simplereq(
+        'open-ils.circ', 'open-ils.circ.bre.holds.count', $rec_id);
+
+    $self->ctx->{copy_summary} = $req1->recv->content;
+}
+
 1;
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index c34cf9a..582b98b 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -12,13 +12,6 @@
                     src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/[% ident %]' /></a>
                 [% END %]
                 <br />
-                <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
-                    <div>[% l("Image provided by") %]</div>
-                    <div>
-                        <a target='_blank' href='[% l("http://amazon.com/dp/") %]'
-                            class='classic_link' id='rdetail.jacket_attrib_link'>[% l("Amazon") %]</a>
-                    </div>
-                </div>
             </td>
     
             <td valign="top">
@@ -98,6 +91,16 @@
                             <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
                         </tr>
                     </table>
+
+                    <!-- hold/copy summary -->
+                    <div style="padding-top:15px;">
+                        <div>
+                            [% l("[quant,_1,Hold,Holds] with [quant,_2,total copy,total copies]", 
+                                ctx.record_hold_count, ctx.copy_summary.0.count) %]
+                        </div>
+                        <div>[% l('[quant,_1,Copy,Copies] available', ctx.copy_summary.0.available) %]</div>
+                    </div>
+
                 </div>
             </td>
         </tr>

commit fbbb94c521533ef61970082aa81757feddadff52
Merge: b29048c 1030565
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jun 10 14:22:02 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit b29048c055d68892414ece81623cc8302a36c0a1
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jun 10 14:21:50 2011 -0400

    Chilifresh reviews for results and record pages
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/base.tt2 b/Open-ILS/web/templates/default/opac/parts/base.tt2
index d54a7e0..1fd0536 100644
--- a/Open-ILS/web/templates/default/opac/parts/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/base.tt2
@@ -14,5 +14,6 @@
         [% content %] 
         [% INCLUDE 'default/opac/parts/footer.tt2' %]
         [% INCLUDE 'default/opac/parts/js.tt2' %]
+        [% INCLUDE 'default/opac/parts/chilifresh.tt2' %]
     </body>
 </html>
diff --git a/Open-ILS/web/templates/default/opac/parts/chilifresh.tt2 b/Open-ILS/web/templates/default/opac/parts/chilifresh.tt2
new file mode 100644
index 0000000..9c64e55
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/chilifresh.tt2
@@ -0,0 +1,20 @@
+
+<!-- Set up the chilifresh account information and load the JS -->
+
+[%  IF ENV.OILS_CHILIFRESH_URL AND ENV.OILS_CHILIFRESH_ACCOUNT 
+            AND (ctx.page == 'rresult' OR ctx.page == 'record');
+        chili_url = ENV.OILS_CHILIFRESH_URL;
+        IF CGI.https AND ENV.OILS_CHILIFRESH_HTTPS_URL;
+            chili_url = ENV.OILS_CHILIFRESH_HTTPS_URL;
+        END; 
+%]
+    <input type="hidden" id="chilifresh_account" name="chilifresh_account" value="[% ENV.OILS_CHILIFRESH_ACCOUNT %]"/>
+    <!--
+    <input type="hidden" id="chilifresh_profile" name="chilifresh_profile" value="[% ENV.OILS_CHILIFRESH_PROFILE %]"/>
+    -->
+    <input type="hidden" id="chilifresh_version" name="chilifresh_version" value="onsite_v1" />
+    <input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
+    <script type="text/javascript" src="[% chili_url %]"></script>
+    <script>try { chili_init(); } catch(E) {}</script>
+[% END %]
+
diff --git a/Open-ILS/web/templates/default/opac/parts/record/awards.tt2 b/Open-ILS/web/templates/default/opac/parts/record/awards.tt2
new file mode 100644
index 0000000..dda3949
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/record/awards.tt2
@@ -0,0 +1,31 @@
+<div class='rdetail_extras_div'> 
+    <div style="margin-bottom:20px;"></div>
+
+        <!-- Chilifresh patron reviews -->
+        <strong>[% l('Patron Reviews:') %]</strong>
+        <div style="margin-bottom:20px;">
+            <div class="chili_review" id="isbn_[% attrs.isbn_clean %]"> </div>
+            <div id="chili_review_[% attrs.isbn_clean %]" style="display: none;" align="center" width="100%"></div>
+        </div>
+    
+        <!-- Reviews from added content provider -->
+        [% IF 0 %] 
+        <strong>[% l('Reviews:') %]</strong>
+        <div id='rdetail_review_container' style="margin-bottom:20px;"></div>
+        [% END %]
+
+        <!-- Novelist suggestions-->
+        [% IF 0 %] 
+        <strong>[% l('Similar Books:') %]</strong>
+        <div id='rdetail_novelist_div' class='rdetail_extras_div'>
+        <div id="NoveListSelect" class="NoveListSelect">
+            <div id="NoveListAnchor" class="NoveListSelect"></div>
+            <div id="novsuggestions"></div>
+            <div id="nextreads"></div>
+            <div id="novrelatedauthors"></div>
+            <div id="novrelateditems"></div>
+        </div>
+        [% END %]
+    </div>
+</div>
+
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index b101603..66b4917 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -1,44 +1,19 @@
 <div id="rdetail_main_div">
     <div id='rdetail_extras_div' style='width: 100%;'> 
-        <!-- SAMPLE AWARDS LAYOUT / MOVE TO INCLUDE'D TEMPLATE
-        <div id='rdetail_awards_div' class='rdetail_extras_div hide_me'> 
-            <strong>[% l('Awards:') %]</strong>
-            <div id='rdetail_awards_cont' style="margin-bottom:20px;"></div>
-                <strong>[% l('Patron Reviews:') %]</strong>
-                <div id='rdetail_chilifresh_reviews' class='hide_me' style="margin-bottom:20px;">
-                    <div id='chilifreshReviewLink' name='chilifreshReviewLink' class='chili_review'></div>
-                    <div id='chilifreshReviewResult' name='chilifreshReviewResult' class='hidden'></div>
-                </div>
-                <strong>[% l('Reviews:') %]</strong>
-                <div id='rdetail_review_container' style="margin-bottom:20px;"></div>
-                <strong>[% l('Suggested Reads:') %]</strong>
-                <div id='rdetail_novelist_div' class='rdetail_extras_div'>
-                <div id="NoveListSelect" class="NoveListSelect">
-                    <div id="NoveListAnchor" class="NoveListSelect"></div>
-                    <div id="novsuggestions"></div>
-                    <div id="nextreads"></div>
-                    <div id="novrelatedauthors"></div>
-                    <div id="novrelateditems"></div>
-                </div>
-            </div>
-        </div>
-        -->
 
         [%  # Hidden extras are not yet implemented.  Some may require JS
-
         extras = [
-            {name => 'summary',  label => l('Summary &amp; More'), hide => 1}, # Content Cafe
+            {name => 'summary',  label => l('Summaries &amp; More'), hide => 1}, # Content Cafe
             {name => 'content',  label => l('Contents'), hide => 1}, # ToC
             {name => 'authors',  label => l('Authors')}, 
             {name => 'series',   label => l('Series'), hide => 1}, 
             {name => 'awards',   label => l('Series'), hide => 1}, 
             {name => 'subjects', label => l('Subject')}, 
             {name => 'annotation', label => l('Annotation'), hide => 1}, 
-            {name => 'reviews',  label => l('Reviews'), hide => 1}, 
+            {name => 'awards',  label => l('Awards, Reviews, & Suggested Reads')}, 
             {name => 'excerpt',  label => l('Excerpt'), hide => 1},
             {name => 'issues',   label => l('Issues Held'), hide => !ctx.have_holdings_to_show},
             {name => 'preview',  label => l('Preview'), hide => 1}, 
-            {name => 'novelist', label => l('Suggestions by NoveList'), hide => 1},
             {name => 'cnbrowse', label => l('Shelf Browser'), hide => 1},
             {name => 'copyinfo', label => l('Copy Summary'), hide => 1}, 
             {name => 'marchtml', label => l('MARC Record')}
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index ba326e9..6fc3b2e 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -75,7 +75,7 @@
                                                 name="results_row_count">[%
                                                     result_count; result_count = result_count + 1
                                                 %].</td>
-                                            <td class='result_table_pic_header'
+                                            <td class='result_table_pic_header' align='center'
                                                 width="78" nowrap="nowrap" valign="top">
                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
                                                 <a href="[% ctx.opac_root %]/record/[% rec.id _ propagator %]"><img alt="[% l('Image of item') %]"
@@ -208,23 +208,15 @@
                                                 </div>
                                             </td>
                                         </tr>
-
-                                        <!-- Placeholder for ChiliFresh Review -->
-                                        <tr class="hide_me" name="chilifreshReview">
-                                            <td></td>
-                                            <td valign="top" colspan="5">
-                                                <div style="position:relative;left:-19px;">
-                                                    <span name="chilifreshReviewLink" class="chili_review"></span>
-                                                    <div name="chilifreshReviewResult" style="display:none"></div>
-                                                </div>
-                                            </td>
-                                        </tr>
                                         <tr>
-                                            <td colspan="5">
-                                                <div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div>
-                                                <!-- <hr class='opac-auto-013' color="#FFCC33" /> -->
+                                            <td/>
+                                            <td align='center'>
+                                                <!-- Chilifresh link and reviews panel --> 
+                                                <div class="chili_review" id="isbn_[% attrs.isbn_clean %]"> </div>
+                                                <div id="chili_review_[% attrs.isbn_clean %]" style="display: none;" align="center" width="100%"></div>
                                             </td>
                                         </tr>
+                                        <tr><td colspan="5"><div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div></td></tr>
                                     </tbody>
                                 </table>
                             </td>

commit 263d4bedb965eba4b3935c3246d15db00494f94b
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jun 10 14:21:13 2011 -0400

    Pass ENV down to template environment
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index 36e6797..b6b4ed2 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -57,7 +57,7 @@ sub handler {
         }
     });
 
-    unless($tt->process($template, {ctx => $ctx, l => set_text_handler($ctx, $r)})) {
+    unless($tt->process($template, {ctx => $ctx, ENV => \%ENV, l => set_text_handler($ctx, $r)})) {
         $r->log->warn('egweb: template error: ' . $tt->error);
         return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
     }

commit d7228aa2bb7c782735f6f64d30b68cec5cadb523
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jun 10 14:20:50 2011 -0400

    Added Chilifresh secure url to sample apache config

diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf
index 7fb1354..e8ca3ec 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf
+++ b/Open-ILS/examples/apache/eg_vhost.conf
@@ -114,6 +114,7 @@ RewriteRule . - [E=locale:%1]
     #SetEnv OILS_CHILIFRESH_ACCOUNT
     #SetEnv OILS_CHILIFRESH_PROFILE
     #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
+    #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
 
     # Specify the initial script URL for Novelist (containing account credentials, etc.)
     #SetEnv OILS_NOVELIST_URL

commit 83116b2ac0277e6b11a86a281a227203d733f9fa
Merge: c59af6d 7543140
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jun 10 12:51:17 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit c59af6db9fa9397c57f8a5b5d0750c9b80c78a48
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Fri Jun 10 09:22:56 2011 -0400

    Mark invalid home ous as such in patron editor
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>

diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js
index 1698cb1..43864d3 100644
--- a/Open-ILS/web/js/ui/default/actor/user/register.js
+++ b/Open-ILS/web/js/ui/default/actor/user/register.js
@@ -45,6 +45,7 @@ var stageUser;
 var optInSettings;
 var allCardsTemplate;
 var uEditCloneCopyAddr; // if true, copy addrs on clone instead of link
+var homeOuTypes = {};
 
 var dupeUsrname = false;
 var dupeBarcode = false;
@@ -197,6 +198,12 @@ function load() {
         fieldDoc[doc.fm_class()][doc.field()] = doc;
     }
 
+    list = pcrud.search('aout', {can_have_users: 'true'});
+    for(var i in list) {
+        var type = list[i];
+        homeOuTypes[type.id()] = true;
+    }
+
     tbody = dojo.byId('uedit-tbody');
 
     if(orgSettings['ui.patron.edit.default_suggested'])
@@ -1065,6 +1072,15 @@ function attachWidgetEvents(fmcls, fmfield, widget) {
                 return;
 
             case 'home_ou':
+                widget.widget.isValid = function() {
+                    if(this.item) {
+                        if(homeOuTypes[this.store.getValue(this.item, 'ou_type')]) {
+                            return true;
+                        }
+                        return false;
+                    }
+                    return true;
+                };
                 dojo.connect(widget.widget, 'onChange',
                     function(newVal) { 
                         checkClaimsReturnCountPerm(); 

commit 1e79f43d9eb473bf51ca2d57f50b27d8e22dc31b
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jun 9 16:51:20 2011 -0400

    added notification of successful settings update to patron prefs page
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index b9c5883..efaeb28 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -159,6 +159,7 @@ sub load_myopac_prefs_settings {
         $self->editor->authtoken, undef, \%settings);
 
     # re-fetch user prefs 
+    $self->ctx->{updated_user_settings} = \%settings;
     return $self->_load_user_with_prefs || Apache2::Const::OK;
 }
 
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
index 84ef7a8..fda86fe 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
@@ -3,6 +3,7 @@
     myopac_page = "prefs_notify";
     prefs_page = 'settings' %]
 
+
     <form method='POST'>
 
         <div style="float:right;width:65px;">
@@ -13,9 +14,17 @@
             </div>
         </div>
 
-
         <table class="full-width data_grid" id="acct_search_main">
             <tbody>
+
+                [% IF ctx.updated_user_settings %]
+                <tr><td colspan='2'>
+                    <div class='renew-summary'>
+                        [% l('Account Successfully Updated') %]
+                    </div>
+                </td></tr>
+                [% END %]
+
                 <tr >
                     <td width='20%'>[% l("Search hits per page") %]</td>
                     <td>

commit cd9b2cd8b9d53ba0929791e9ffe8fae5950b3a72
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jun 9 16:39:03 2011 -0400

    honor hit count user pref on results page
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 50a09f1..787228c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -5,6 +5,7 @@ use OpenSRF::Utils::Logger qw/$logger/;
 use OpenILS::Utils::CStoreEditor qw/:funcs/;
 use OpenILS::Utils::Fieldmapper;
 use OpenILS::Application::AppUtils;
+use OpenSRF::Utils::JSON;
 my $U = 'OpenILS::Application::AppUtils';
 
 
@@ -101,6 +102,25 @@ sub _prepare_biblio_search {
     return ($query, $site, $depth);
 }
 
+sub _get_search_limit {
+    my $self = shift;
+
+    # param takes precedence
+    my $limit = $self->cgi->param('limit');
+    return $limit if $limit;
+
+    if($self->editor->requestor) {
+        # See if the user has a hit count preference
+        my $lset = $self->editor->search_actor_user_setting({
+            usr => $self->editor->requestor->id, 
+            name => 'opac.hits_per_page'
+        })->[0];
+        return OpenSRF::Utils::JSON->JSON2perl($lset->value) if $lset;
+    }
+
+    return 10; # default
+}
+
 # context additions: 
 #   page_size
 #   hit_count
@@ -114,7 +134,7 @@ sub load_rresults {
     $ctx->{page} = 'rresult';
     my $page = $cgi->param('page') || 0;
     my $facet = $cgi->param('facet');
-    my $limit = $cgi->param('limit') || 10; # TODO user settings
+    my $limit = $self->_get_search_limit;
     my $loc = $cgi->param('loc');
     my $offset = $page * $limit;
 
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 83da3d8..ba326e9 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -1,7 +1,7 @@
 [%  PROCESS "default/opac/parts/misc_util.tt2";
 
     ctx.result_start = 1 + ctx.page_size * page;
-    ctx.result_stop = 1 + ctx.page_size * (page + 1);
+    ctx.result_stop = ctx.page_size * (page + 1);
     IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
 
     result_count = ctx.result_start;

commit 1f49fd9b7e2e9a69bcb1985c5c12d965313fe265
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jun 9 16:04:43 2011 -0400

    Initial support for updating user prefs
    
    Starting with hits-per-page and enable/disable circ/hold history
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index f9c7bf4..b9c5883 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -7,6 +7,7 @@ use OpenILS::Utils::Fieldmapper;
 use OpenILS::Application::AppUtils;
 use OpenILS::Event;
 use OpenSRF::Utils::JSON;
+use DateTime;
 my $U = 'OpenILS::Application::AppUtils';
 
 sub prepare_extended_user_info {
@@ -106,7 +107,7 @@ sub update_optin_prefs {
     return $user_prefs;
 }
 
-sub load_myopac_prefs_settings {
+sub _load_user_with_prefs {
     my $self = shift;
     my $stat = $self->prepare_extended_user_info('settings');
     return $stat if $stat; # not-OK
@@ -116,12 +117,49 @@ sub load_myopac_prefs_settings {
             @{$self->ctx->{user}->settings}
     };
 
+    return undef;
+}
+
+sub load_myopac_prefs_settings {
+    my $self = shift;
+
+    my $stat = $self->_load_user_with_prefs;
+    return $stat if $stat;
+
     return Apache2::Const::OK
         unless $self->cgi->request_method eq 'POST';
 
-    # process POST request...
+    # some setting values from the form don't match the 
+    # required value/format for the db, so they have to be 
+    # individually translated.
+
+    my %settings;
+    my $set_map = $self->ctx->{user_setting_map};
+
+    my $key = 'opac.hits_per_page';
+    my $val = $self->cgi->param($key);
+    $settings{$key}= $val unless $$set_map{$key} eq $val;
+
+    my $now = DateTime->now->strftime('%F');
+    for $key (qw/history.circ.retention_start history.hold.retention_start/) {
+        $val = $self->cgi->param($key);
+        if($val and $val eq 'on') {
+            # Set the start time to 'now' unless a start time already exists for the user
+            $settings{$key} = $now unless $$set_map{$key};
+        } else {
+            # clear the start time if one previously existed for the user
+            $settings{$key} = undef if $$set_map{$key};
+        }
+    }
+    
+    # Send the modified settings off to be saved
+    $U->simplereq(
+        'open-ils.actor', 
+        'open-ils.actor.patron.settings.update',
+        $self->editor->authtoken, undef, \%settings);
 
-    return Apache2::Const::OK;
+    # re-fetch user prefs 
+    return $self->_load_user_with_prefs || Apache2::Const::OK;
 }
 
 sub fetch_user_holds {
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
index cb5335a..84ef7a8 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
@@ -3,13 +3,12 @@
     myopac_page = "prefs_notify";
     prefs_page = 'settings' %]
 
-    <form method='GET'>
+    <form method='POST'>
 
         <div style="float:right;width:65px;">
             <div style="position:absolute">
                 <div style="position:relative;top:75px;">
-                    <a id='acct_prefs_save' href="#"><img alt="[% l('Save') %]"
-                         src="[% ctx.media_prefix %]/images/save-btn.png" /></a>
+                    <input type="image" alt="[% l('Save') %]" src="[% ctx.media_prefix %]/images/save-btn.png"/>
                 </div>
             </div>
         </div>

commit 9c760edbb7e04916097cd70e223709f5ff099c0d
Merge: 65e493c c873055
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu Jun 9 14:07:12 2011 -0400

    Merge branch 'template-toolkit-opac' of git.evergreen-ils.org:evergreen/equinox into template-toolkit-opac


commit 65e493c9bc74426131438323b47d1b111d3fa005
Merge: 7317039 000ddbb
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu Jun 9 14:07:11 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit c873055829a359bda3505e887e53ba5cd368a0f9
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jun 9 09:17:04 2011 -0400

    added read support for holds history setting

diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
index 85594f7..cb5335a 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
@@ -15,11 +15,10 @@
         </div>
 
 
-        <table class="full-width" id="acct_search_main">
+        <table class="full-width data_grid" id="acct_search_main">
             <tbody>
-                <tr id='myopac_prefs_row'>
+                <tr >
                     <td width='20%'>[% l("Search hits per page") %]</td>
-
                     <td>
                         <div style="position:absolute">
                             <div style="position:relative;top:0px;left:55px;">
@@ -27,28 +26,30 @@
                                     src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
                             </div>
                         </div>
-                        <select name='opac.hits_per_page'>
-                            [%  key = 'opac.hits_per_page';
-                                FOR val IN [5, 8, 10, 15, 20, 25, 50] %]
+                        [% setting = 'opac.hits_per_page' %]
+                        <select name='[% setting %]'>
+                            [%  FOR val IN [5, 8, 10, 15, 20, 25, 50] %]
                                 <option value='[% val %]' 
-                                    [% IF ctx.user_setting_map.$key == val %]
+                                    [% IF ctx.user_setting_map.$setting == val %]
                                         selected='selected'[% END %]>[% val %]</option>
                             [% END %]
                         </select>
                     </td>
                 </tr>
-
                 <tr>
+                    <td>[% l('Keep history of checked out items?') %]</td>
                     <td>
-                        [% l('Keep history of checked out items?') %]
+                        [% setting = 'history.circ.retention_start' %]
+                        <input name='[% setting %]' type="checkbox"
+                            [% IF ctx.user_setting_map.$setting; %] checked='checked' [% END %]/>
                     </td>
+                </tr>
+                <tr>
+                    <td>[% l('Keep history of holds?') %]</td>
                     <td>
-                        <input name='history.circ.retention_start' type="checkbox"
-                            [% 
-                                key = 'history.circ.retention_start';
-                                IF ctx.user_setting_map.$key; # any value
-                            %] checked='checked' [% END %]
-                        />
+                        [% setting = 'history.hold.retention_start' %]
+                        <input name='[% setting %]' type="checkbox"
+                            [% IF ctx.user_setting_map.$setting; %] checked='checked' [% END %]/>
                     </td>
                 </tr>
 

commit 471e5be5386c5a548a01bb21da7a4e2b4311d890
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jun 8 17:25:31 2011 -0400

    Read support for some user settings in setting page
    
    Search hits per page and circ history opt-in displaying
    
    TODO: add more settings
    TODO: implement POST/write for updating values
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 0e96bb2..f9c7bf4 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -11,13 +11,14 @@ my $U = 'OpenILS::Application::AppUtils';
 
 sub prepare_extended_user_info {
     my $self = shift;
+    my @extra_flesh = @_;
 
     $self->ctx->{user} = $self->editor->retrieve_actor_user([
         $self->ctx->{user}->id,
         {
             flesh => 1,
             flesh_fields => {
-                au => [qw/card home_ou addresses ident_type billing_address/]
+                au => [qw/card home_ou addresses ident_type billing_address/, @extra_flesh]
                 # ...
             }
         }
@@ -107,7 +108,20 @@ sub update_optin_prefs {
 
 sub load_myopac_prefs_settings {
     my $self = shift;
-    return $self->prepare_extended_user_info || Apache2::Const::OK;
+    my $stat = $self->prepare_extended_user_info('settings');
+    return $stat if $stat; # not-OK
+
+    $self->ctx->{user_setting_map} = {
+        map { $_->name => OpenSRF::Utils::JSON->JSON2perl($_->value) } 
+            @{$self->ctx->{user}->settings}
+    };
+
+    return Apache2::Const::OK
+        unless $self->cgi->request_method eq 'POST';
+
+    # process POST request...
+
+    return Apache2::Const::OK;
 }
 
 sub fetch_user_holds {
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
index daf65be..85594f7 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
@@ -3,112 +3,89 @@
     myopac_page = "prefs_notify";
     prefs_page = 'settings' %]
 
-USER SETTINGS
+    <form method='GET'>
 
-        <!-- SEARCH PREFS SAVE, MOVE TO SUB-TEMPLATE
         <div style="float:right;width:65px;">
             <div style="position:absolute">
                 <div style="position:relative;top:75px;">
-                    <a id='acct_prefs_save'
-                         class='hide_me'
-                         href="#"><img alt="Save"
+                    <a id='acct_prefs_save' href="#"><img alt="[% l('Save') %]"
                          src="[% ctx.media_prefix %]/images/save-btn.png" /></a>
                 </div>
             </div>
         </div>
-        -->
 
 
-        <!-- SEARCH PREFERENCES / leaving here for reference
-        <table class="hide_me full-width" id="acct_search_main">
-            <tbody id='myopac_prefs_tbody'>
-                <tr id='myopac_prefs_loading'>
-                    <td colspan='3'><b>[% l("Loading...") %]</b></td>
-                </tr>
-
+        <table class="full-width" id="acct_search_main">
+            <tbody>
                 <tr id='myopac_prefs_row'>
                     <td width='20%'>[% l("Search hits per page") %]</td>
 
                     <td>
                         <div style="position:absolute">
                             <div style="position:relative;top:0px;left:55px;">
-                                <a href="#">
-                                <img alt="Search Hits Help"
-                                     src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                                <a href="#"><img alt="[% l('Search Hits Help') %]" 
+                                    src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
                             </div>
-                        </div><select id='prefs_hits_per'
-                            style="position:relative;z-index:100;">
-                            <option value='5'>
-                                5
-                            </option>
-
-                            <option value='8'>
-                                8
-                            </option>
-
-                            <option value='10'>
-                                10
-                            </option>
-
-                            <option value='15'>
-                                15
-                            </option>
-
-                            <option value='20'>
-                                20
-                            </option>
-
-                            <option value='25'>
-                                25
-                            </option>
-
-                            <option value='50'>
-                                50
-                            </option>
+                        </div>
+                        <select name='opac.hits_per_page'>
+                            [%  key = 'opac.hits_per_page';
+                                FOR val IN [5, 8, 10, 15, 20, 25, 50] %]
+                                <option value='[% val %]' 
+                                    [% IF ctx.user_setting_map.$key == val %]
+                                        selected='selected'[% END %]>[% val %]</option>
+                            [% END %]
                         </select>
                     </td>
                 </tr>
 
                 <tr>
-                    <td colspan="2"><label for="circHistStart">Keep history of
-                    checked out items?</label> <input type="checkbox"
-                           id="circHistStart" /></td>
+                    <td>
+                        [% l('Keep history of checked out items?') %]
+                    </td>
+                    <td>
+                        <input name='history.circ.retention_start' type="checkbox"
+                            [% 
+                                key = 'history.circ.retention_start';
+                                IF ctx.user_setting_map.$key; # any value
+                            %] checked='checked' [% END %]
+                        />
+                    </td>
                 </tr>
 
-                <tr class="hide_me">
+                <!--
+                <tr>
                     <td>[% l("Default Font Size") %]</td>
-
-                    <td><select id='prefs_def_font'>
-                        <option value='regular'>
-                            [% l("Regular Font") %]
-                        </option>
-
-                        <option value='large'>
-                            [% l("Large Font") %]
-                        </option>
-                    </select></td>
+                    <td>
+                        <select id='prefs_def_font'>
+                            <option value='regular'>[% l("Regular Font") %]</option>
+                            <option value='large'>[% l("Large Font") %]</option>
+                        </select>
+                    </td>
                 </tr>
 
-                <tr class="hide_me">
+                <tr>
                     <td>[% l("Default Search Location") %]</td>
                     <td>
                         <div style='margin-bottom: 5px;'>
                             <input type='checkbox' id='myopac_pref_home_lib' />
-                                 [% l("Always search my home library by default.") %]
+                            [% l("Search my home library by default.") %]
                         </div>
                         <select id='prefs_def_location'></select>
                     </td>
                 </tr>
 
-                <tr class="hide_me">
+                <tr>
                     <td>[% l("Default Search Range") %]</td>
-
-                    <td><select id='prefs_def_range'>
-                        </select></td>
+                    <td>
+                        <select>
+                            [%# TODO %]
+                        </select>
+                    </td>
                 </tr>
+                -->
+
             </tbody>
         </table>
-        [% INCLUDE "default/opac/parts/myopac/prefs_hints.tt2" %]
-        -->
-
+    </form>
+    [% INCLUDE "default/opac/parts/myopac/prefs_hints.tt2" %]
 [% END %]

commit 85ca1e2f2a8568fe11cb48847539ab9ee1331e9d
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jun 8 12:46:51 2011 -0400

    Select all fines for CC payment by default

diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 71382e7..674e097 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -77,8 +77,8 @@
                         </strong>
                     </td>
                     <td>
-                        <input type="checkbox" title="[% l('Pay this fine') %]"
-                            name="xact" value="[% f.xact.id %]" />
+                        <input type="checkbox" checked="checked" 
+                            title="[% l('Pay this fine') %]" name="xact" value="[% f.xact.id %]" />
                     </td>
                 </tr>
                 [% END %]

commit 7317039da6611ad49edd84273f7d7457749f742d
Merge: 69d5e69 dfbf495
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sun Jun 5 10:45:53 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 69d5e693cdbd599f566d2ca9de92266a6f855d42
Merge: bbdba93 06bd754
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Jun 3 13:10:14 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit bbdba9334c497e06cc1e829098913bef7e596633
Merge: d4c52cd 7d1040a
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Jun 3 09:56:20 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit d4c52cd68ca0cd5562a99fd83f8a89c0e39fc19f
Merge: fa1ef0c 80c12c4
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu Jun 2 10:33:44 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit fa1ef0cf51f37367c01a2f86b2e29a9651ef59b6
Merge: 910f63e 1aea64d
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Jun 1 11:49:36 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 910f63e6213ab0dbd9b9c23ab6ad5bf5e74322fa
Merge: b2d7b3a 8b8e12c
Author: Bill Erickson <berick at esilibrary.com>
Date:   Sat May 28 10:03:22 2011 -0400

    Merge branch 'template-toolkit-opac' of git://git.evergreen-ils.org/evergreen/equinox into template-toolkit-opac


commit b2d7b3a89814c3acb1fd23e98f1ce566bc450a2c
Author: Bill Erickson <berick at esilibrary.com>
Date:   Sat May 28 10:01:43 2011 -0400

    Format selector improvements
    
    Consistent with format icon fall-thru, try mattype first to locate the
    list of formats for search selection.  If no mattype configuration is
    found, fall through to item_type.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index 9f1c949..788b571 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -32,7 +32,7 @@
             <td valign='top'>
                 <strong>[% l("Item Type") %]</strong><br />
                 [%  INCLUDE "default/opac/parts/coded_value_selector.tt2"
-                        attr="mattype" multiple="multiple" size="4"
+                        attr=["mattype", "item_type"] multiple="multiple" size="4"
                         id="adv_global_item_type_basic" %]
             </td>
             <td valign='top'>
diff --git a/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
index cfcd9a0..92a96ee 100644
--- a/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
@@ -1,15 +1,28 @@
-[%- name = name || "fi:" _ attr;
-    id = id || attr _ "_selector";
-    values = values || CGI.param(name); -%]
+
+[%- 
+    # If caller passes a list of possible attribute types, 
+    # search all until we find some values
+
+    IF !attr.size; attr = [attr]; END;
+    all_values = [];
+    attr_class = '';
+    FOR attr_class IN attr;
+        all_values = ctx.search_ccvm('ctype', attr_class);
+        IF all_values.size > 0; LAST; END;
+    END;
+    name = name || "fi:" _ attr_class;
+    id = id || attr_class _ "_selector";
+    values = values || CGI.param(name); 
+-%]
+
 <select id='[% id %]' name='[% name %]'[%
     multiple ? ' multiple="multiple"' : '';
     size ? (' size="' _ size _ '"') : ''; %]>
-[%  all_values = ctx.search_ccvm('ctype', attr);
-IF none_ok %]
+[% IF none_ok %]
     <option value=''>[% l('-- Any --') %]</option>
-[% END;
-FOR o IN all_values;
-   |l(o.value) %]
-    <option value='[% o.code %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : '' %]>[_1]</option>
-[%  END; END -%]
+[% END %]
+[% FOR o IN all_values %]
+    <option value='[% o.code %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : '' %]>[% o.value %]</option>
+[%  END -%]
 </select>
+
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index a38259f..433ce68 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -48,7 +48,7 @@
         [% UNLESS is_advanced %]
         <tr>
             <td>
-                [% INCLUDE "default/opac/parts/coded_value_selector.tt2" attr="mattype" none_ok=1 %]
+                [% INCLUDE "default/opac/parts/coded_value_selector.tt2" attr=["mattype", "item_type"] none_ok=1 %]
             </td>
             <td>
                 <span id='depth_selector_span'>

commit 8b8e12c7bf4dff7e9cb740804d9315aac8d67b5d
Merge: a4ff813 81818c8
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri May 27 14:45:59 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit a4ff813d312d4c0032c1f946752c4ad90eb8ada3
Merge: f335a59 bbc874d
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu May 26 20:11:26 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit f335a598496a253cd38eb76d210750b849d6b09e
Merge: a490912 ac80f3b
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu May 26 13:12:05 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit a4909125e618daa4b2dc7038f3eaf354fd712067
Merge: 530b5a3 623aeb0
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu May 26 10:56:55 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 530b5a3f229f363a446349141f0c677a61c0bd75
Merge: 8a2e62c 8a26888
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed May 25 20:41:31 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 8a2e62c49367f3ab9ff7efb2b6698fa0993675d6
Merge: 4c765e3 e62e2f7
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed May 25 14:20:51 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 4c765e3b4cee657819e43d16bcf46e38dc581da1
Merge: 6d39c78 8bb24e6
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed May 25 10:12:28 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 6d39c780ba9b0bf8bde075138379f773a43431c7
Merge: 2daa25b 598d111
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon May 23 12:30:06 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 2daa25ba645f57e29b97a892e6933b29cd05ff19
Merge: c471501 5f132d5
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sat May 21 09:42:47 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit c471501f126dabf9852ede75b17b233cd6766ed6
Merge: 840e327 ea20f39
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri May 20 10:43:44 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 840e327dc445531ecee4357846e9b2197b9a8ed9
Merge: eb52a2e ed4c017
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu May 19 12:59:22 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit eb52a2e4637d3aa656dcfa168b47df088ed8e169
Merge: b1368bb 0b4b17a
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu May 19 09:52:07 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit b1368bb7e259e3f95990c041d43b9b366a5bc364
Merge: a8cb26c 76791e2
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed May 18 15:36:00 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit a8cb26c25bed205f0a189af1ebf8fe25f43979af
Merge: 604f94f 4abc3d7
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed May 18 12:41:10 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 604f94f79ce5e238e917b02d36cb52f5e4880485
Merge: 1de637f bf83c01
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed May 18 09:28:17 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 1de637fc6e3ee0c5c79ed3825eaf460e97498f47
Merge: 60c2398 41510e8
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue May 17 15:02:00 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 60c2398c1f654732abda6e10ffca8e1d19be5a9a
Merge: 608aa32 8dd3cce
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue May 17 14:11:05 2011 -0400

    Merge branch 'template-toolkit-opac' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 608aa3241afeff95c613df8ec306a0637155d9c9
Merge: b1b2d91 007195f
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue May 17 14:11:04 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 8dd3ccefd1b6ff4fccfb1957bf7f9619de9b4191
Author: senator <lebbeous at esilibrary.com>
Date:   Tue May 17 11:59:36 2011 -0400

    cleanup:
    
    1) fix broken INCLUDE statements in circ and hold histories
    
    2) move an opac "part" to the parts directory

diff --git a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
index 8848693..a095558 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
@@ -1,5 +1,5 @@
 [%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/marc_misc.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
     WRAPPER "default/opac/parts/myopac/base.tt2";
     myopac_page = "circs"
     limit = ctx.circ_history_limit;
diff --git a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
index 048dbb2..43f3256 100644
--- a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
@@ -1,5 +1,5 @@
 [%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/marc_misc.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
     WRAPPER "default/opac/parts/myopac/base.tt2";
     myopac_page = "holds"  
     limit = ctx.hold_history_limit;
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
index 8a57d64..c10d5a2 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
@@ -160,7 +160,7 @@
                             onclick="history.go(-1);" />
                     </td>
                 </tr>
-                [% INCLUDE "default/opac/myopac/main_refund_policy.tt2" %]
+                [% INCLUDE "default/opac/parts/myopac/main_refund_policy.tt2" %]
             </tbody>
         </table>
     </form>
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_refund_policy.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/main_refund_policy.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/main_refund_policy.tt2
rename to Open-ILS/web/templates/default/opac/parts/myopac/main_refund_policy.tt2

commit 16aa970437079882e01a0454116d90e8c715885d
Author: senator <lebbeous at esilibrary.com>
Date:   Tue May 17 11:51:04 2011 -0400

    empty cases for fines

diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 1a4b1b4..71382e7 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -151,6 +151,9 @@
         </table>
     </div>
     [% END %]
+    [% UNLESS ctx.fines.grocery.size OR ctx.fines.circulation.size %]
+    <div>[% l('You have no current fines.') %]</div>
+    [% ELSE %]
     <div class="text-right pad-top-ten">
         <input type="image"
             alt="[% l('Pay selected fines') %]"
@@ -159,5 +162,6 @@
             onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
             src="[% ctx.media_prefix %]/images/pay-fines-btn.png" />
     </div>
+    [% END %]
 </form>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
index a79141e..18f39f4 100644
--- a/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
@@ -10,7 +10,9 @@
     </div>
 
     <!-- fines summary along the right of the page -->
-    [% IF myopac_main_page == "payment_form" %]
+    [% IF myopac_main_page == "payment_form" OR (
+        !ctx.fines.circulation.size AND !ctx.fines.grocery.size
+    ) %]
     <div id="myopac_sum_fines_placehold"></div>
     [% ELSE %]
     <div id="myopac_sum_fines">

commit 2e80ff099e72c6de985b1ae1000299add43964b1
Merge: e22e11a b1b2d91
Author: senator <lebbeous at esilibrary.com>
Date:   Tue May 17 11:32:00 2011 -0400

    Merge branch 'template-toolkit-opac' of ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit e22e11aeb8e9e3afe8a6bda72d68544c4475997a
Author: senator <lebbeous at esilibrary.com>
Date:   Tue May 17 11:31:08 2011 -0400

    Emailing receipts working, some tweaks to payment history page

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index bb49e11..0e96bb2 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -5,9 +5,8 @@ use OpenSRF::Utils::Logger qw/$logger/;
 use OpenILS::Utils::CStoreEditor qw/:funcs/;
 use OpenILS::Utils::Fieldmapper;
 use OpenILS::Application::AppUtils;
+use OpenILS::Event;
 use OpenSRF::Utils::JSON;
-#use Data::Dumper;
-#$Data::Dumper::Indent = 0;
 my $U = 'OpenILS::Application::AppUtils';
 
 sub prepare_extended_user_info {
@@ -651,6 +650,24 @@ sub load_myopac_receipt_print {
     return Apache2::Const::OK;
 }
 
+sub load_myopac_receipt_email {
+    my $self = shift;
+
+    # The following ML method doesn't actually check whether the user in
+    # question has an email address, so we do.
+    if ($self->ctx->{user}->email) {
+        $self->ctx->{email_receipt_result} = $U->simplereq(
+           "open-ils.circ", "open-ils.circ.money.payment_receipt.email",
+           $self->editor->authtoken, [$self->cgi->param("payment")]
+        );
+    } else {
+        $self->ctx->{email_receipt_result} =
+            new OpenILS::Event("PATRON_NO_EMAIL_ADDRESS");
+    }
+
+    return Apache2::Const::OK;
+}
+
 sub prepare_fines {
     my ($self, $limit, $offset, $id_list) = @_;
 
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index ac67524..caba3e0 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -877,6 +877,10 @@ div.select-wrapper:hover {
 }
 
 #myopac_payments_table th { text-align: left; }
+#myopac_payments_table tbody tr:nth-child(odd) { background-color: #ddd; }
+#myopac_payments_table form { display: inline; }
+#myopac_payments_table input[type="submit"] { padding: 1px; }
+
 .payment-error {
     font-weight: bold; color: red;
     padding: 10px; border: 1px solid #888;
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
index 2c4daa4..83e25f3 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
@@ -34,10 +34,14 @@
                 <td>[% (payment.xact_type == 'grocery') ? payment.last_billing_type : payment.title %]</td>
                 <td>[% money(payment.mp.amount) %]</td>
                 <td>
-                    [%# post to print/email form... XXX wait, why post? -senator %]
-                    <a href="[% ctx.opac_root %]/myopac/receipt_print?payment=[% payment.mp.id %]" target="_egrcpt">[% l('Print') %]</a>
-                    /
-                    <a href=''>[% l('Email') %]</a>
+                    <form action="[% ctx.opac_root %]/myopac/receipt_print" method="POST">
+                        <input type="hidden" name="payment" value="[% payment.mp.id %]" />
+                        <input type="submit" value="[% l('Print') %]" />
+                    </form>
+                    <form action="[% ctx.opac_root %]/myopac/receipt_email" method="POST">
+                        <input type="hidden" name="payment" value="[% payment.mp.id %]" />
+                        <input type="submit" value="[% l('Email') %]" />
+                    </form>
                 </td>
             </tr>
             [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/receipt_email.tt2 b/Open-ILS/web/templates/default/opac/myopac/receipt_email.tt2
new file mode 100644
index 0000000..371f7df
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/receipt_email.tt2
@@ -0,0 +1,15 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
+    WRAPPER "default/opac/parts/myopac/base.tt2";
+    myopac_page = "prefs"  %]
+    [% IF ctx.email_receipt_result; # result should be undef on success %]
+    <div class="payment-error">
+        [% l('Error preparing receipt:') %]
+        <span title="[% ctx.email_receipt_result.textcode %]">
+            [% ctx.email_receipt_result.desc %]
+        </span>
+    </div>
+    [% ELSE %]
+    <div>[% l('Your receipt will be emailed to [_1]', ctx.user.email) %]</div>
+    [% END %]
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2 b/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2
index 4867561..0ee7b12 100644
--- a/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2
@@ -11,7 +11,7 @@
         [% ELSE %]
         <div class="payment-error">
             [% l(
-                'Error creating receipt: [_1]',
+                'Error preparing receipt: [_1]',
                     (ctx.printable_receipt.textcode ? ctx.printable_receipt.textcode _ ' / ' _ ctx.printable_receipt.desc : 0) ||
                     ctx.printable_receipt.error_output.data ||
                     l('No receipt data returned from server')

commit b1b2d917207c83a5a714d6cb8906cef0eadb34e5
Merge: 6b47f0a 2f27f0b
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue May 17 10:19:10 2011 -0400

    Merge branch 'template-toolkit-opac' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 6b47f0a3204ed395be9a2e93105741430d4d6835
Merge: 0169867 d6f8124
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue May 17 10:19:09 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 2f27f0b4af301597dfcb0b5ca3ac92488121dbb6
Merge: b6e7ed5 0169867
Author: senator <lebbeous at esilibrary.com>
Date:   Mon May 16 18:40:16 2011 -0400

    Merge branch 'template-toolkit-opac' of ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit b6e7ed5d89ba5abf3898bc157e4d28cb7f0c1952
Author: senator <lebbeous at esilibrary.com>
Date:   Mon May 16 18:39:32 2011 -0400

    Receipt printing also from payment history

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 4a1811b..72fbf59 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -125,6 +125,8 @@ sub load {
     return $self->load_myopac_payments if $path =~ m|opac/myopac/main_payments|;
     return $self->load_myopac_pay if $path =~ m|opac/myopac/main_pay|;
     return $self->load_myopac_main if $path =~ m|opac/myopac/main|;
+    return $self->load_myopac_receipt_email if $path =~ m|opac/myopac/receipt_email|;
+    return $self->load_myopac_receipt_print if $path =~ m|opac/myopac/receipt_print|;
     return $self->load_myopac_update_email if $path =~ m|opac/myopac/update_email|;
     return $self->load_myopac_update_password if $path =~ m|opac/myopac/update_password|;
     return $self->load_myopac_update_username if $path =~ m|opac/myopac/update_username|;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 1e16eca..bb49e11 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -640,6 +640,17 @@ sub load_myopac_pay {
     return Apache2::Const::OK;
 }
 
+sub load_myopac_receipt_print {
+    my $self = shift;
+
+    $self->ctx->{printable_receipt} = $U->simplereq(
+       "open-ils.circ", "open-ils.circ.money.payment_receipt.print",
+       $self->editor->authtoken, [$self->cgi->param("payment")]
+    );
+
+    return Apache2::Const::OK;
+}
+
 sub prepare_fines {
     my ($self, $limit, $offset, $id_list) = @_;
 
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
index 5cd7cdd..1992181 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
@@ -18,8 +18,13 @@
         </p>
     [% ELSE %]
         <p><big>[% l('Your payment has been approved.') %]</big></p>
-        [% IF ctx.printable_receipt.template_output %]
-        <p>[ <a href="javascript:void(0);"
+        [% IF ctx.printable_receipt.template_output;
+            print_args = [];
+            FOR p IN ctx.payment_response.payments;
+                print_args.push('payment=' _ p);
+            END %]
+        <p>[ <a href="[% ctx.opac_root %]/myopac/receipt_print?[% print_args.join('&amp;') %]"
+            target="_egrecpt"
             onclick="try { print_node('printable-receipt'); } catch (e) { window.print(); } return false;">[% l('Print receipt') %]</a> ]</p>
         <tt id="printable-receipt">
             [% ctx.printable_receipt.template_output.data %]
@@ -28,6 +33,7 @@
         <div class="payment-error">
             [% l(
                 'Error creating receipt: [_1]',
+                    (ctx.printable_receipt.textcode ? ctx.printable_receipt.textcode _ ' / ' _ ctx.printable_receipt.desc : 0) ||
                     ctx.printable_receipt.error_output.data ||
                     l('No receipt data returned from server')
                 ) %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
index bf956b6..2c4daa4 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
@@ -34,8 +34,10 @@
                 <td>[% (payment.xact_type == 'grocery') ? payment.last_billing_type : payment.title %]</td>
                 <td>[% money(payment.mp.amount) %]</td>
                 <td>
-                    [%# post to print/email form... %]
-                    <a href=''>[% l('Print') %]</a> / <a href=''>[% l('Email') %]</a>
+                    [%# post to print/email form... XXX wait, why post? -senator %]
+                    <a href="[% ctx.opac_root %]/myopac/receipt_print?payment=[% payment.mp.id %]" target="_egrcpt">[% l('Print') %]</a>
+                    /
+                    <a href=''>[% l('Email') %]</a>
                 </td>
             </tr>
             [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2 b/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2
new file mode 100644
index 0000000..4867561
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/receipt_print.tt2
@@ -0,0 +1,22 @@
+[%# sic! no wrapper %]
+<html>
+    <head>
+        <title>[% l('Receipt') %]</title>
+    </head>
+    <body onload="if (document.getElementById('printable-receipt')) window.print();">
+        [% IF ctx.printable_receipt.template_output %]
+        <tt id="printable-receipt">
+            [% ctx.printable_receipt.template_output.data %]
+        </tt>
+        [% ELSE %]
+        <div class="payment-error">
+            [% l(
+                'Error creating receipt: [_1]',
+                    (ctx.printable_receipt.textcode ? ctx.printable_receipt.textcode _ ' / ' _ ctx.printable_receipt.desc : 0) ||
+                    ctx.printable_receipt.error_output.data ||
+                    l('No receipt data returned from server')
+                ) %]
+        </div>
+        [% END %]
+    </body>
+</html>

commit 016986736eef82c29d3fb9579600848caccd20df
Merge: 81b398c 1a87cbc
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon May 16 18:26:41 2011 -0400

    Merge branch 'template-toolkit-opac' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 81b398c0b2168967e89c4dbacae4c1c890acb37a
Merge: d616e2e e56a342
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon May 16 18:26:40 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 1a87cbccd53269559004a367fe212a77ba5f21eb
Merge: 5d672af d616e2e
Author: senator <lebbeous at esilibrary.com>
Date:   Mon May 16 17:04:30 2011 -0400

    Merge branch 'template-toolkit-opac' of ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 5d672af3ab051bfa47aea7b0638d99079d6bd379
Merge: 8dd8381 f40b83b
Author: senator <lebbeous at esilibrary.com>
Date:   Mon May 16 16:22:58 2011 -0400

    Merge branch 'master' of ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit d616e2e9c2282840586ce8a3fd71f9fd1fefd759
Merge: 444dc60 8dd8381
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon May 16 16:20:45 2011 -0400

    Merge branch 'template-toolkit-opac' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 444dc606406b5ba4b38a27d7e9334ccc906240c6
Merge: f4cd158 f40b83b
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon May 16 16:20:43 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 8dd8381122c06bb36d7ed8804f91d0b704f289b8
Merge: 5e35339 f4cd158
Author: senator <lebbeous at esilibrary.com>
Date:   Mon May 16 14:39:31 2011 -0400

    Merge branch 'template-toolkit-opac' of ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 5e35339e8dec5603ff5a8b69141b7e894c81f2fa
Author: senator <lebbeous at esilibrary.com>
Date:   Mon May 16 14:14:57 2011 -0400

    Credit card payments working with printable receipts
    
    Could still use e-mailed receipts

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 328f92b..4a1811b 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -121,9 +121,9 @@ sub load {
     return $self->load_place_hold if $path =~ m|opac/place_hold|;
     return $self->load_myopac_holds if $path =~ m|opac/myopac/holds|;
     return $self->load_myopac_circs if $path =~ m|opac/myopac/circs|;
-    return $self->load_myopac_pay if $path =~ m|opac/myopac/pay|;
     return $self->load_myopac_payment_form if $path =~ m|opac/myopac/main_payment_form|;
     return $self->load_myopac_payments if $path =~ m|opac/myopac/main_payments|;
+    return $self->load_myopac_pay if $path =~ m|opac/myopac/main_pay|;
     return $self->load_myopac_main if $path =~ m|opac/myopac/main|;
     return $self->load_myopac_update_email if $path =~ m|opac/myopac/update_email|;
     return $self->load_myopac_update_password if $path =~ m|opac/myopac/update_password|;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 61f0cc8..1e16eca 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -6,6 +6,8 @@ use OpenILS::Utils::CStoreEditor qw/:funcs/;
 use OpenILS::Utils::Fieldmapper;
 use OpenILS::Application::AppUtils;
 use OpenSRF::Utils::JSON;
+#use Data::Dumper;
+#$Data::Dumper::Indent = 0;
 my $U = 'OpenILS::Application::AppUtils';
 
 sub prepare_extended_user_info {
@@ -594,16 +596,21 @@ sub load_myopac_pay {
     my $self = shift;
     my $r;
 
-    $r = $self->prepare_fines and return $r;
+    $r = $self->prepare_fines(undef, undef, [$self->cgi->param('xact')]) and
+        return $r;
 
     # balance_owed is computed specifically from the fines we're trying
     # to pay in this case.
-    return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR if
-        $self->ctx->{fines}->{balance_owed} <= 0;
+    if ($self->ctx->{fines}->{balance_owed} <= 0) {
+        $self->apache->log->info(
+            sprintf("Can't pay non-positive balance. xacts selected: (%s)",
+                join(", ", map(int, $self->cgi->param("xact"))))
+        );
+        return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+    }
+
+    my $cc_args = {"where_process" => 1};
 
-    my $cc_args = {
-        "where_process" => 1,
-    };
     $cc_args->{$_} = $self->cgi->param($_) for (qw/
         number cvv2 expire_year expire_month billing_first
         billing_last billing_address billing_city billing_state
@@ -613,15 +620,24 @@ sub load_myopac_pay {
     my $args = {
         "cc_args" => $cc_args,
         "userid" => $self->ctx->{user}->id,
-        "payment_type": "credit_card_payment",
-        "payments" => [$self->cgi->param('xact')]   # should be safe after self->prepare_fines
+        "payment_type" => "credit_card_payment",
+        "payments" => $self->prepare_fines_for_payment   # should be safe after self->prepare_fines
     };
 
-    $U->simplereq("open-ils.circ", "open-ils.circ.money.payment",
+    my $resp = $U->simplereq("open-ils.circ", "open-ils.circ.money.payment",
         $self->editor->authtoken, $args, $self->ctx->{user}->last_xact_id
     );
 
-    # XXX FINISH ME: indicate success/fail, redirect to page with layout
+    $self->ctx->{"payment_response"} = $resp;
+
+    unless ($resp->{"textcode"}) {
+        $self->ctx->{printable_receipt} = $U->simplereq(
+           "open-ils.circ", "open-ils.circ.money.payment_receipt.print",
+           $self->editor->authtoken, $resp->{payments}
+        );
+    }
+
+    return Apache2::Const::OK;
 }
 
 sub prepare_fines {
@@ -629,6 +645,8 @@ sub prepare_fines {
 
     # XXX TODO: check for failure after various network calls
 
+    # It may be unclear, but this result structure lumps circulation and
+    # reservation fines together, and keeps grocery fines separate.
     $self->ctx->{"fines"} = {
         "circulation" => [],
         "grocery" => [],
@@ -713,6 +731,21 @@ sub prepare_fines {
     return;
 }
 
+sub prepare_fines_for_payment {
+    # This assumes $self->prepare_fines has already been run
+    my ($self) = @_;
+
+    my @results = ();
+    if ($self->ctx->{fines}) {
+        push @results, [$_->{xact}->id, $_->{xact}->balance_owed] foreach (
+            @{$self->ctx->{fines}->{circulation}},
+            @{$self->ctx->{fines}->{grocery}}
+        );
+    }
+
+    return \@results;
+}
+
 sub load_myopac_main {
     my $self = shift;
     my $limit = $self->cgi->param('limit') || 0;
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 0ce3c8e..ac67524 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -877,6 +877,10 @@ div.select-wrapper:hover {
 }
 
 #myopac_payments_table th { text-align: left; }
+.payment-error {
+    font-weight: bold; color: red;
+    padding: 10px; border: 1px solid #888;
+}
 
 #adv_search_parent {
 	margin-bottom:0px;
diff --git a/Open-ILS/web/js/ui/default/opac/simple.js b/Open-ILS/web/js/ui/default/opac/simple.js
index 776dfef..d71c98a 100644
--- a/Open-ILS/web/js/ui/default/opac/simple.js
+++ b/Open-ILS/web/js/ui/default/opac/simple.js
@@ -27,3 +27,24 @@ function addSearchRow() {
         $("adv_global_addrow")
     );
 }
+function print_node(node_id) {
+    var iframe = document.createElement("iframe");
+    var source_node = document.getElementById(node_id);
+    source_node.parentNode.appendChild(iframe);
+
+    var iwin = iframe.contentWindow;
+
+    /* These next three statements are only needed by IE, but they don't
+     * hurt FF/Chrome. */
+    iwin.document.open();
+    iwin.document.write(    /* XXX make better/customizable? */
+        "<html><head><title>Recipt</title></head><body></body></html>"
+    );
+    iwin.document.close();
+
+    iwin.document.body.innerHTML = source_node.innerHTML;
+    iframe.focus();
+
+    try { iframe.print(); } catch (e) { iwin.print(); }
+    setTimeout(function() { iframe.style.display = "none"; }, 3500);
+}
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 3a4bc04..1a4b1b4 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -4,7 +4,7 @@
     myopac_page = "main";
     myopac_main_page = "main";
 %]
-<form action="[% ctx.opac_root %]/myopac/main_payment_form" method="POST">
+<form action="[% ctx.opac_root %]/myopac/main_payment_form" method="GET">
     [% IF ctx.fines.circulation.size > 0 %]
     <div id='myopac_circ_trans_div'>
         <table width='100%' class='data_grid'>
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
new file mode 100644
index 0000000..5cd7cdd
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
@@ -0,0 +1,38 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
+    WRAPPER "default/opac/parts/myopac/base.tt2";
+    myopac_page = "main";
+    myopac_main_page = "pay" %]
+<div id="myopac_summary_div">
+    [% IF ctx.payment_response.textcode %]
+        <div class="payment-error">
+            <span title="[% ctx.payment_response.textcode %]">
+                [% ctx.payment_response.desc %]
+            </span><br />
+            [% ctx.payment_response.payload.error_message %]
+        </div>
+        <p>
+            <a href="[% ctx.opac_root %]/myopac/main"
+                onclick="history.go(-1); return false;">[% l('Go back') %]</a>
+            [% l('to try again or to cancel this payment attempt.') %]
+        </p>
+    [% ELSE %]
+        <p><big>[% l('Your payment has been approved.') %]</big></p>
+        [% IF ctx.printable_receipt.template_output %]
+        <p>[ <a href="javascript:void(0);"
+            onclick="try { print_node('printable-receipt'); } catch (e) { window.print(); } return false;">[% l('Print receipt') %]</a> ]</p>
+        <tt id="printable-receipt">
+            [% ctx.printable_receipt.template_output.data %]
+        </tt>
+        [% ELSE %]
+        <div class="payment-error">
+            [% l(
+                'Error creating receipt: [_1]',
+                    ctx.printable_receipt.error_output.data ||
+                    l('No receipt data returned from server')
+                ) %]
+        </div>
+        [% END %]
+    [% END %]
+</div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
index b7824a8..8a57d64 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
@@ -11,7 +11,7 @@
 </div>
 [% ELSE %]
 <div id="pay_fines_now">
-    <form action="[% ctx.opac_root %]/myopac/pay" method="POST"
+    <form action="[% ctx.opac_root %]/myopac/main_pay" method="POST"
         onsubmit="return confirm('[% l("Are you sure you are ready to charge [_1] to your credit card?", money(ctx.fines.balance_owed)) %]');">
         [% FOR xact IN CGI.param('xact') %]
         <input type="hidden" name="xact" value="[% xact | html %]" />
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
index 0630a10..a79141e 100644
--- a/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
@@ -39,7 +39,7 @@
             [% money(ctx.user_stats.fines.balance_owed) %]
         </span><br />
 
-        <form action="[% ctx.opac_root %]/myopac/main_payment_form" method="POST"><input
+        <form action="[% ctx.opac_root %]/myopac/main_payment_form" method="GET"><input
             type="image" title="[% l('Pay Fines') %]" alt="[% l('Pay Fines') %]"
             onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
             onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"

commit f4cd158b5df5cd4ae39a8c5fb9634b961d9a3aa9
Merge: e8bb847 8893e1c
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon May 16 11:12:40 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit e8bb8477c41585afced154483f8a1ffa2d2b8111
Merge: 4cce969 e72fba2
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sun May 15 17:52:04 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit 4cce9694a6d72dfebf90b1bb8c5fca6d452c5389
Merge: b4f9764 cce32dd
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sun May 15 13:42:15 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit b4f97644fba8388500816b21efdee861ef32b81f
Merge: b4c6627 7cb0820
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sat May 14 17:31:18 2011 -0400

    Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac


commit b4c66270581e2875399dc15e4a3a897427ca72e2
Merge: f494ca3 ec28db7
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sat May 14 08:39:10 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit f494ca35a90ae7bcfac0d2097fb60ad7d8bbccc3
Merge: c300b4a 75c58c9
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri May 13 13:33:52 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit c300b4a91a3c259eb4ad0e69bc35f206aa903e3b
Merge: 383db74 0bdfc37
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri May 13 13:20:12 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 383db748b9353cb0eecce0bc67bffcebbfabcb62
Merge: 23e5f30 3341913
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri May 13 11:30:21 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 9106a4abea7bd4f6a7bea2410ca6976862986bb8
Author: senator <lebbeous at esilibrary.com>
Date:   Thu May 12 16:53:54 2011 -0400

    begin a sub to process payment

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 8a8bc70..328f92b 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -121,6 +121,7 @@ sub load {
     return $self->load_place_hold if $path =~ m|opac/place_hold|;
     return $self->load_myopac_holds if $path =~ m|opac/myopac/holds|;
     return $self->load_myopac_circs if $path =~ m|opac/myopac/circs|;
+    return $self->load_myopac_pay if $path =~ m|opac/myopac/pay|;
     return $self->load_myopac_payment_form if $path =~ m|opac/myopac/main_payment_form|;
     return $self->load_myopac_payments if $path =~ m|opac/myopac/main_payments|;
     return $self->load_myopac_main if $path =~ m|opac/myopac/main|;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index e9da422..61f0cc8 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -8,7 +8,7 @@ use OpenILS::Application::AppUtils;
 use OpenSRF::Utils::JSON;
 my $U = 'OpenILS::Application::AppUtils';
 
-sub load_extended_user_info {
+sub prepare_extended_user_info {
     my $self = shift;
 
     $self->ctx->{user} = $self->editor->retrieve_actor_user([
@@ -29,7 +29,7 @@ sub load_extended_user_info {
 #   user : au object, fleshed
 sub load_myopac_prefs {
     my $self = shift;
-    return $self->load_extended_user_info || Apache2::Const::OK;
+    return $self->prepare_extended_user_info || Apache2::Const::OK;
 }
 
 sub load_myopac_prefs_notify {
@@ -106,7 +106,7 @@ sub update_optin_prefs {
 
 sub load_myopac_prefs_settings {
     my $self = shift;
-    return $self->load_extended_user_info || Apache2::Const::OK;
+    return $self->prepare_extended_user_info || Apache2::Const::OK;
 }
 
 sub fetch_user_holds {
@@ -562,16 +562,8 @@ sub load_myopac_payment_form {
     my $self = shift;
     my $r;
 
-    $r = $self->load_fines(undef, undef, [$self->cgi->param('xact')]) and return $r;
-
-    # total selected fines
-    foreach (
-        @{$self->ctx->{"fines"}->{"circulation"}},
-        @{$self->ctx->{"fines"}->{"grocery"}}
-    ) {
-    }
-
-    $r = $self->load_extended_user_info and return $r;
+    $r = $self->prepare_fines(undef, undef, [$self->cgi->param('xact')]) and return $r;
+    $r = $self->prepare_extended_user_info and return $r;
 
     return Apache2::Const::OK;
 }
@@ -598,7 +590,41 @@ sub load_myopac_payments {
     return Apache2::Const::OK;
 }
 
-sub load_fines {
+sub load_myopac_pay {
+    my $self = shift;
+    my $r;
+
+    $r = $self->prepare_fines and return $r;
+
+    # balance_owed is computed specifically from the fines we're trying
+    # to pay in this case.
+    return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR if
+        $self->ctx->{fines}->{balance_owed} <= 0;
+
+    my $cc_args = {
+        "where_process" => 1,
+    };
+    $cc_args->{$_} = $self->cgi->param($_) for (qw/
+        number cvv2 expire_year expire_month billing_first
+        billing_last billing_address billing_city billing_state
+        billing_zip
+    /);
+
+    my $args = {
+        "cc_args" => $cc_args,
+        "userid" => $self->ctx->{user}->id,
+        "payment_type": "credit_card_payment",
+        "payments" => [$self->cgi->param('xact')]   # should be safe after self->prepare_fines
+    };
+
+    $U->simplereq("open-ils.circ", "open-ils.circ.money.payment",
+        $self->editor->authtoken, $args, $self->ctx->{user}->last_xact_id
+    );
+
+    # XXX FINISH ME: indicate success/fail, redirect to page with layout
+}
+
+sub prepare_fines {
     my ($self, $limit, $offset, $id_list) = @_;
 
     # XXX TODO: check for failure after various network calls
@@ -692,7 +718,7 @@ sub load_myopac_main {
     my $limit = $self->cgi->param('limit') || 0;
     my $offset = $self->cgi->param('offset') || 0;
 
-    return $self->load_fines($limit, $offset) || Apache2::Const::OK;
+    return $self->prepare_fines($limit, $offset) || Apache2::Const::OK;
 }
 
 sub load_myopac_update_email {

commit 23e5f30bdc3b011de9072459c7d6ad81d51542f5
Merge: 36858e8 f99ae92
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu May 12 15:57:55 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 36858e868ac02653f2992ed437c0083fc91cad87
Merge: 5e3fd6d fbfb746
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu May 12 15:25:28 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 5e3fd6d9822b96368e20b0d6e682c59d6b7b760e
Merge: 7deb3ef b109023
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu May 12 10:30:04 2011 -0400

    Merge branch 'template-toolkit-opac' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 7deb3ef94b0fa94c218f7ec2e14818ecba2f9a37
Merge: e99e1ba baf52ae
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu May 12 10:30:01 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 8ff2f5db229edd644d711add2c574d25282429b2
Author: senator <lebbeous at esilibrary.com>
Date:   Thu May 12 10:19:35 2011 -0400

    doh, it's history not location.history

diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
index b054f46..b7824a8 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
@@ -157,7 +157,7 @@
                     <td colspan='2' align="center">
                         <input type="submit" value="[% l('Submit Payment') %]" />
                         <input type="reset" value="[% l('Cancel') %]"
-                            onclick="location.history.go(-1);" />
+                            onclick="history.go(-1);" />
                     </td>
                 </tr>
                 [% INCLUDE "default/opac/myopac/main_refund_policy.tt2" %]

commit b109023db4f4bce464bad03b683dc0e55c8ecbfd
Author: senator <lebbeous at esilibrary.com>
Date:   Thu May 12 10:15:41 2011 -0400

    remove in-template fine-totaling: mod_perl code was already doing the same
    
    also:
        make that fine-totaling not use floating point math.
        don't provide payment form for <= 0 totals (we're not issuing refunds)
        last copyright date in footer always current year, not hardcoded

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index a4fa51f..e9da422 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -560,9 +560,20 @@ sub load_myopac_hold_history {
 
 sub load_myopac_payment_form {
     my $self = shift;
-    my $r = $self->load_fines(undef, undef, [$self->cgi->param('xact')]);
-    return $r if $r;
-    return $self->load_extended_user_info || Apache2::Const::OK;
+    my $r;
+
+    $r = $self->load_fines(undef, undef, [$self->cgi->param('xact')]) and return $r;
+
+    # total selected fines
+    foreach (
+        @{$self->ctx->{"fines"}->{"circulation"}},
+        @{$self->ctx->{"fines"}->{"grocery"}}
+    ) {
+    }
+
+    $r = $self->load_extended_user_info and return $r;
+
+    return Apache2::Const::OK;
 }
 
 # TODO: add other filter options as params/configs/etc.
@@ -631,6 +642,9 @@ sub load_fines {
         }
     );
 
+    my @total_keys = qw/total_paid total_owed balance_owed/;
+    $self->ctx->{"fines"}->{@total_keys} = (0, 0, 0);
+
     while(my $resp = $req->recv) {
         my $mobts = $resp->content;
         my $circ = $mobts->circulation;
@@ -641,10 +655,10 @@ sub load_fines {
             $last_billing = pop(@billings);
         }
 
-        # XXX TODO switch to some money-safe non-fp library for math
-        $self->ctx->{"fines"}->{$_} += $mobts->$_ for (
-            qw/total_paid total_owed balance_owed/
-        );
+        # XXX TODO confirm that the following, and the later division by 100.0
+        # to get a floating point representation once again, is sufficiently
+        # "money-safe" math.
+        $self->ctx->{"fines"}->{$_} += int($mobts->$_ * 100) for (@total_keys);
 
         my $marc_xml = undef;
         if ($mobts->xact_type eq 'reservation' and
@@ -669,7 +683,8 @@ sub load_fines {
         );
     }
 
-     return;
+    $self->ctx->{"fines"}->{$_} /= 100.0 for (@total_keys);
+    return;
 }
 
 sub load_myopac_main {
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index c0a9004..0ce3c8e 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -806,6 +806,8 @@ div.select-wrapper:hover {
 	height: 166px;
 }
 
+#myopac_sum_fines_placehold { float: right; width: 177px; height: 166px; }
+
 .acct_holds_temp td {
 	text-align: left;
 }
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
index a70b684..b054f46 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
@@ -4,8 +4,15 @@
     myopac_page = "main";
     myopac_main_page = "payment_form";
 %]
+[% IF ctx.fines.balance_owed <= 0 %]
+<div>
+    [% l("You either have no fines to pay or you have selected fines whose " _
+        "total is non-positive.  We cannot process non-positive amounts.") %]
+</div>
+[% ELSE %]
 <div id="pay_fines_now">
-    <form action="[% ctx.opac_root %]/myopac/pay" method="POST">
+    <form action="[% ctx.opac_root %]/myopac/pay" method="POST"
+        onsubmit="return confirm('[% l("Are you sure you are ready to charge [_1] to your credit card?", money(ctx.fines.balance_owed)) %]');">
         [% FOR xact IN CGI.param('xact') %]
         <input type="hidden" name="xact" value="[% xact | html %]" />
         [% END %]
@@ -24,7 +31,6 @@
                             </thead>
                             <tbody>
                             [%
-                            pay_total = 0.0;
                             FOR f IN ctx.fines.circulation;
                                 NEXT IF CGI.param('xact').size &&
                                     !CGI.param('xact').grep(f.xact.id).size;
@@ -33,9 +39,7 @@
                                     PROCESS get_marc_attrs args=attrs;
                                 ELSIF f.xact.reservation;
                                     attrs.title = f.xact.reservation.target_resource_type.name;
-                                END;
-                                # XXX use fixed point math
-                                pay_total = pay_total + f.xact.balance_owed; %]
+                                END %]
                                 <tr>
                                     <td>[% attrs.title %]</td>
                                     <td class="text-right">[% money(f.xact.balance_owed) %]</td>
@@ -44,9 +48,7 @@
                             END;
                             FOR f IN ctx.fines.grocery;
                                 NEXT IF CGI.param('xact').size &&
-                                    !CGI.param('xact').grep(f.xact.id).size;
-                                # XXX use fixed point math
-                                pay_total = pay_total + f.xact.balance_owed; %]
+                                    !CGI.param('xact').grep(f.xact.id).size %]
                                 <tr>
                                     <td>[% f.xact.last_billing_type %]</td>
                                     <td class="text-right">[% money(f.xact.balance_owed) %]</td>
@@ -57,10 +59,7 @@
                         <br />
                         <div>
                             [% l('Total amount to pay:') %]
-                            [%# XXX TODO: calculate pay_total not here in the
-                            template but rather in the mod_perl, and only
-                            proceed when that number is positive %]
-                            <strong>[% money(pay_total) %]</strong>
+                            <strong>[% money(ctx.fines.balance_owed) %]</strong>
                         </div>
                         <br />
                         [% | l('<strong>', '</strong>') %]Click [_1]Cancel[_2] to go back and (un)select other fines.[% END %]
@@ -167,3 +166,4 @@
     </form>
 </div>
 [% END %]
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/footer.tt2 b/Open-ILS/web/templates/default/opac/parts/footer.tt2
index 70379c4..eb6db18 100644
--- a/Open-ILS/web/templates/default/opac/parts/footer.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/footer.tt2
@@ -6,7 +6,7 @@
     <a href="http://example.com">[% l('Bottom Link 5') %]</a>
 
     <div id="copyright_text" style="margin-top: 2em;">
-        [% l('Copyright &copy; 2006-2011 Georgia Public Library Service, and others') %]
+        [% l('Copyright &copy; 2006-[_1] Georgia Public Library Service, and others', date.format(date.now, '%Y')) %]
     </div>
     <div id="footer_logo">
         [% l('Powered by') %]
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
index 2115655..0630a10 100644
--- a/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
@@ -10,6 +10,9 @@
     </div>
 
     <!-- fines summary along the right of the page -->
+    [% IF myopac_main_page == "payment_form" %]
+    <div id="myopac_sum_fines_placehold"></div>
+    [% ELSE %]
     <div id="myopac_sum_fines">
         <div style="position:absolute;">
             <div style="position:relative;top:-15px;left:-23px;">
@@ -43,6 +46,7 @@
             src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
             class="pos-rel-top-5" /></form>
     </div>
+    [% END %]
 
     <div style="width:662px;">
         <div style="float:left;">

commit 69668c4a198fb266056b68ef3a2824c4bc3bdfad
Author: senator <lebbeous at esilibrary.com>
Date:   Wed May 11 17:45:58 2011 -0400

    support paying all fines at once

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 171fa39..a4fa51f 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -612,7 +612,7 @@ sub load_fines {
         {
             usr => $self->editor->requestor->id,
             balance_owed => {'!=' => 0},
-            (ref $id_list eq 'ARRAY' ? ("id" => $id_list) : ()),
+            ($id_list && @$id_list ? ("id" => $id_list) : ()),
         },
         {
             flesh => 4,
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
index 587c01b..a70b684 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
@@ -26,7 +26,8 @@
                             [%
                             pay_total = 0.0;
                             FOR f IN ctx.fines.circulation;
-                                NEXT UNLESS CGI.param('xact').grep(f.xact.id).size;
+                                NEXT IF CGI.param('xact').size &&
+                                    !CGI.param('xact').grep(f.xact.id).size;
                                 attrs = {marc_xml => f.marc_xml};
                                 IF f.marc_xml;
                                     PROCESS get_marc_attrs args=attrs;
@@ -42,7 +43,8 @@
                             [%
                             END;
                             FOR f IN ctx.fines.grocery;
-                                NEXT UNLESS CGI.param('xact').grep(f.xact.id).size;
+                                NEXT IF CGI.param('xact').size &&
+                                    !CGI.param('xact').grep(f.xact.id).size;
                                 # XXX use fixed point math
                                 pay_total = pay_total + f.xact.balance_owed; %]
                                 <tr>

commit ab4a93c35dafb410162df844e1473c99e440a8a2
Author: senator <lebbeous at esilibrary.com>
Date:   Wed May 11 16:02:12 2011 -0400

    Payment for mostly done. Still needs:
    
    1) to be able to handle the upper "Pay Fines" button that will mean "all
    my fines"
    
    2) to use fixed point fine totaling math and bail on total <= 0
    
    3) ... anything else?

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 18ed515..8a8bc70 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -121,6 +121,7 @@ sub load {
     return $self->load_place_hold if $path =~ m|opac/place_hold|;
     return $self->load_myopac_holds if $path =~ m|opac/myopac/holds|;
     return $self->load_myopac_circs if $path =~ m|opac/myopac/circs|;
+    return $self->load_myopac_payment_form if $path =~ m|opac/myopac/main_payment_form|;
     return $self->load_myopac_payments if $path =~ m|opac/myopac/main_payments|;
     return $self->load_myopac_main if $path =~ m|opac/myopac/main|;
     return $self->load_myopac_update_email if $path =~ m|opac/myopac/update_email|;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index f8622b5..171fa39 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -8,10 +8,7 @@ use OpenILS::Application::AppUtils;
 use OpenSRF::Utils::JSON;
 my $U = 'OpenILS::Application::AppUtils';
 
-
-# context additions: 
-#   user : au object, fleshed
-sub load_myopac_prefs {
+sub load_extended_user_info {
     my $self = shift;
 
     $self->ctx->{user} = $self->editor->retrieve_actor_user([
@@ -19,13 +16,20 @@ sub load_myopac_prefs {
         {
             flesh => 1,
             flesh_fields => {
-                au => [qw/card home_ou addresses ident_type/]
+                au => [qw/card home_ou addresses ident_type billing_address/]
                 # ...
             }
         }
-    ]);
+    ]) or return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
 
-    return Apache2::Const::OK;
+    return;
+}
+
+# context additions: 
+#   user : au object, fleshed
+sub load_myopac_prefs {
+    my $self = shift;
+    return $self->load_extended_user_info || Apache2::Const::OK;
 }
 
 sub load_myopac_prefs_notify {
@@ -102,22 +106,9 @@ sub update_optin_prefs {
 
 sub load_myopac_prefs_settings {
     my $self = shift;
-
-    $self->ctx->{user} = $self->editor->retrieve_actor_user([
-        $self->ctx->{user}->id,
-        {
-            flesh => 1,
-            flesh_fields => {
-                au => [qw/card home_ou addresses ident_type/]
-                # ...
-            }
-        }
-    ]);
-
-    return Apache2::Const::OK;
+    return $self->load_extended_user_info || Apache2::Const::OK;
 }
 
-
 sub fetch_user_holds {
     my $self = shift;
     my $hold_ids = shift;
@@ -567,6 +558,13 @@ sub load_myopac_hold_history {
     return Apache2::Const::OK;
 }
 
+sub load_myopac_payment_form {
+    my $self = shift;
+    my $r = $self->load_fines(undef, undef, [$self->cgi->param('xact')]);
+    return $r if $r;
+    return $self->load_extended_user_info || Apache2::Const::OK;
+}
+
 # TODO: add other filter options as params/configs/etc.
 sub load_myopac_payments {
     my $self = shift;
@@ -589,16 +587,12 @@ sub load_myopac_payments {
     return Apache2::Const::OK;
 }
 
+sub load_fines {
+    my ($self, $limit, $offset, $id_list) = @_;
 
+    # XXX TODO: check for failure after various network calls
 
-sub load_myopac_main {
-    my $self = shift;
-    my $limit = $self->cgi->param('limit') || 0;
-    my $offset = $self->cgi->param('offset') || 0;
-    my $e = $self->editor;
-    my $ctx = $self->ctx;
-
-    $ctx->{"fines"} = {
+    $self->ctx->{"fines"} = {
         "circulation" => [],
         "grocery" => [],
         "total_paid" => 0,
@@ -606,7 +600,6 @@ sub load_myopac_main {
         "balance_owed" => 0
     };
 
-
     my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
 
     # TODO: This should really be a ML call, but the existing calls 
@@ -617,8 +610,9 @@ sub load_myopac_main {
     my $req = $cstore->request(
         'open-ils.cstore.direct.money.open_billable_transaction_summary.search',
         {
-            usr => $e->requestor->id,
-            balance_owed => {'!=' => 0}
+            usr => $self->editor->requestor->id,
+            balance_owed => {'!=' => 0},
+            (ref $id_list eq 'ARRAY' ? ("id" => $id_list) : ()),
         },
         {
             flesh => 4,
@@ -648,7 +642,7 @@ sub load_myopac_main {
         }
 
         # XXX TODO switch to some money-safe non-fp library for math
-        $ctx->{"fines"}->{$_} += $mobts->$_ for (
+        $self->ctx->{"fines"}->{$_} += $mobts->$_ for (
             qw/total_paid total_owed balance_owed/
         );
 
@@ -666,7 +660,7 @@ sub load_myopac_main {
         }
 
         push(
-            @{$ctx->{"fines"}->{$mobts->grocery ? "grocery" : "circulation"}},
+            @{$self->ctx->{"fines"}->{$mobts->grocery ? "grocery" : "circulation"}},
             {
                 xact => $mobts,
                 last_grocery_billing => $last_billing,
@@ -675,8 +669,16 @@ sub load_myopac_main {
         );
     }
 
-     return Apache2::Const::OK;
-}       
+     return;
+}
+
+sub load_myopac_main {
+    my $self = shift;
+    my $limit = $self->cgi->param('limit') || 0;
+    my $offset = $self->cgi->param('offset') || 0;
+
+    return $self->load_fines($limit, $offset) || Apache2::Const::OK;
+}
 
 sub load_myopac_update_email {
     my $self = shift;
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index b187f0d..3a4bc04 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -4,7 +4,7 @@
     myopac_page = "main";
     myopac_main_page = "main";
 %]
-<form action="[% ctx.opac_root %]/myopac/main_pay" method="POST">
+<form action="[% ctx.opac_root %]/myopac/main_payment_form" method="POST">
     [% IF ctx.fines.circulation.size > 0 %]
     <div id='myopac_circ_trans_div'>
         <table width='100%' class='data_grid'>
@@ -77,7 +77,8 @@
                         </strong>
                     </td>
                     <td>
-                        <input type="checkbox" name="selector" title="[% l('Pay this fine') %]" />
+                        <input type="checkbox" title="[% l('Pay this fine') %]"
+                            name="xact" value="[% f.xact.id %]" />
                     </td>
                 </tr>
                 [% END %]
@@ -141,7 +142,8 @@
                     </td>
                     <td>[% f.xact.last_billing_type %]</td>
                     <td>
-                        <input type="checkbox" name='selector' title='[% l("Pay this fine") %]'/>
+                        <input type="checkbox" title='[% l("Pay this fine") %]'
+                            name="xact" value="[% f.xact.id %]" />
                     </td>
                 </tr>
                 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
deleted file mode 100644
index ff9b512..0000000
--- a/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
+++ /dev/null
@@ -1,158 +0,0 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/main_base.tt2";
-    myopac_page = "main";
-    myopac_main_page = "pay";
-
-    # XXX When we get no parameters, we're in "pay everything" mode.
-    # When we get paramters, they refer to the fines that we'll be paying
-%]
-<div id="pay_fines_now">
-    <table id='oils-selfck-cc-payment-table'>
-        <tbody>
-            <tr>
-                <td><div style="width:129px;"></div></td>
-                <td><div style="width:195px;"></div></td>
-                <td><div style="width:324px;"></div></td>
-            </tr>
-            <tr>
-                <td colspan='2'><strong>Billing Information</strong></td>
-                <td rowspan='13' valign='top'>
-                    Selected fines you are paying for:
-                    <table cellpadding="0" cellspacing="5" border="0">
-                        <thead>
-                            <tr>
-                                <td>
-                                    <strong>Name</strong>
-                                </td>
-                                <td>
-                                    <strong>Amount</strong>
-                                </td>
-                            </tr>
-                        </thead>
-                        <tbody id="selectedFines">
-                        </tbody>
-                    </table>
-                    <br />
-                    <div id='oils-selfck-cc-payment-summary'>
-                        Total amount to pay:
-                        <strong>$<span></span></strong>
-                    </div>
-                    <br />
-                    Click <strong>Cancel</strong> to go back and (un)select
-                    other fines.
-                </td>
-            </tr>
-            <tr>
-                <td>First Name</td>
-                <td><input jsId='oilsSelfckCCFName' /></td>
-            </tr>
-            <tr>
-                <td>Last Name</td>
-                <td><input jsId='oilsSelfckCCLName' /></td>
-            </tr>
-            <tr>
-                <td>Street Address</td>
-                <td><input jsId='oilsSelfckCCStreet' /></td>
-            </tr>
-            <tr>
-                <td>City</td>
-                <td><input jsId='oilsSelfckCCCity' /></td>
-            </tr>
-            <tr>
-                <td>State or Province</td>
-                <td><input jsId='oilsSelfckCCState' /></td>
-            </tr>
-            <tr>
-                <td>ZIP or Postal Code</td>
-                <td><input jsId='oilsSelfckCCZip' /></td>
-            </tr>
-            <tr>
-              <td colspan='2'><strong>Credit Card Information</strong></td>
-            </tr>
-            <!-- Technically not needed since card type is derived from the CC number
-            <tr>
-                <td>Type of Card</td>
-                <td>
-                    <select jsId='oilsSelfckCCType' required='true'>
-                        <option value='VISA'>VISA</option>
-                        <option value='MasterCard'>MasterCard</option>
-                        <option value='American Express'>American Express</option>
-                    </select>
-                </td>
-            </tr>
-            -->
-            <tr>
-                <td>Credit Card #</td>
-                <td><input jsId='oilsSelfckCCNumber' /></td>
-            </tr>
-            <tr>
-                <td>
-                    <div style="position:absolute;">
-                        <div style="position:relative;left:80px;">
-                            <a href="#"><img
-                                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
-                        </div>
-                    </div>
-                    Security Code
-                </td>
-                <td>
-                    <input jsId='oilsSelfckCCCVV' />
-                </td>
-            </tr>
-            <tr>
-                <td>Exipration Month</td>
-                <td>
-                    <select jsId='oilsSelfckCCMonth'>
-                        <option value='01' selected='selected'>January</option>
-                        <option value='02'>February</option>
-                        <option value='03'>March</option>
-                        <option value='04'>April</option>
-                        <option value='05'>May</option>
-                        <option value='06'>June</option>
-                        <option value='07'>July</option>
-                        <option value='08'>August</option>
-                        <option value='09'>September</option>
-                        <option value='10'>October</option>
-                        <option value='11'>November</option>
-                        <option value='12'>December</option>
-                    </select>
-                </td>
-            </tr>
-            <tr>
-                <td>Expiration Year</td>
-                <td>
-                  <select jsId='oilsSelfckCCYear'>
-                    <option value='2011'>2011</option>
-                    <option value='2012'>2012</option>
-                    <option value='2013'>2013</option>
-                    <option value='2014'>2014</option>
-                    <option value='2015'>2015</option>
-                    <option value='2016'>2016</option>
-                    <option value='2017'>2017</option>
-                    <option value='2018'>2018</option>
-                    <option value='2019'>2019</option>
-                  </select>
-                </td>
-            </tr>
-            <tr class="hide_me">
-                <td>Edit Billing Address</td>
-                <td>
-                    <input jsId='oilsSelfckEditDetails'/>
-                </td>
-            </tr>
-            <tr>
-                <td colspan='2' align="center">
-                    <button jsId='oilsSelfckCCSubmit'>
-                        Submit Payment
-                    </button>
-                    <button>
-                        Cancel
-                    </button>
-                </td>
-            </tr>
-            [% INCLUDE "default/opac/myopac/main_refund_policy.tt2" %]
-        </tbody>
-    </table>
-</div>
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
new file mode 100644
index 0000000..587c01b
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
@@ -0,0 +1,167 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
+    WRAPPER "default/opac/parts/myopac/main_base.tt2";
+    myopac_page = "main";
+    myopac_main_page = "payment_form";
+%]
+<div id="pay_fines_now">
+    <form action="[% ctx.opac_root %]/myopac/pay" method="POST">
+        [% FOR xact IN CGI.param('xact') %]
+        <input type="hidden" name="xact" value="[% xact | html %]" />
+        [% END %]
+        <table>
+            <tbody>
+                <tr>
+                    <td colspan='2'><strong>[% l('Billing Information') %]</strong></td>
+                    <td rowspan='13' valign='top'>
+                        [% l('Selected fines you are paying for:') %]
+                        <table cellpadding="0" cellspacing="5" border="0">
+                            <thead>
+                                <tr>
+                                    <th>[% l('Name') %]</th>
+                                    <th>[% l('Amount') %]</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                            [%
+                            pay_total = 0.0;
+                            FOR f IN ctx.fines.circulation;
+                                NEXT UNLESS CGI.param('xact').grep(f.xact.id).size;
+                                attrs = {marc_xml => f.marc_xml};
+                                IF f.marc_xml;
+                                    PROCESS get_marc_attrs args=attrs;
+                                ELSIF f.xact.reservation;
+                                    attrs.title = f.xact.reservation.target_resource_type.name;
+                                END;
+                                # XXX use fixed point math
+                                pay_total = pay_total + f.xact.balance_owed; %]
+                                <tr>
+                                    <td>[% attrs.title %]</td>
+                                    <td class="text-right">[% money(f.xact.balance_owed) %]</td>
+                                </tr>
+                            [%
+                            END;
+                            FOR f IN ctx.fines.grocery;
+                                NEXT UNLESS CGI.param('xact').grep(f.xact.id).size;
+                                # XXX use fixed point math
+                                pay_total = pay_total + f.xact.balance_owed; %]
+                                <tr>
+                                    <td>[% f.xact.last_billing_type %]</td>
+                                    <td class="text-right">[% money(f.xact.balance_owed) %]</td>
+                                </tr>
+                            [% END %]
+                            </tbody>
+                        </table>
+                        <br />
+                        <div>
+                            [% l('Total amount to pay:') %]
+                            [%# XXX TODO: calculate pay_total not here in the
+                            template but rather in the mod_perl, and only
+                            proceed when that number is positive %]
+                            <strong>[% money(pay_total) %]</strong>
+                        </div>
+                        <br />
+                        [% | l('<strong>', '</strong>') %]Click [_1]Cancel[_2] to go back and (un)select other fines.[% END %]
+                    </td>
+                </tr>
+                <tr>
+                    <td>[% l('First Name') %]</td>
+                    <td><input type="text" name="billing_first" value="[% ctx.user.first_given_name | html %]" /></td>
+                </tr>
+                <tr>
+                    <td>[% l('Last Name') %]</td>
+                    <td><input type="text" name="billing_last" value="[% ctx.user.family_name | html %]" /></td>
+                </tr>
+                <tr>
+                    <td>[% l('Street Address') %]</td>
+                    <td><input type="text" name="billing_address" value="[% ctx.user.billing_address.street1 _ ctx.user.billing_address.street2 | html %]" /></td>
+                </tr>
+                <tr>
+                    <td>[% l('City' )%]</td>
+                    <td><input type="text" name="billing_city" value="[% ctx.user.billing_address.city | html %]" /></td>
+                </tr>
+                <tr>
+                    <td>[% l('State or Province') %]</td>
+                    <td><input type="text" name="billing_state" value="[% ctx.user.billing_address.state | html %]" /></td>
+                </tr>
+                <tr>
+                    <td>[% l('ZIP or Postal Code') %]</td>
+                    <td><input type="text" name="billing_zip" value="[% ctx.user.billing_address.post_code | html %]" /></td>
+                </tr>
+                <tr>
+                  <td colspan='2'><strong>[% l('Credit Card Information') %]</strong></td>
+                </tr>
+                <!-- Technically not needed since card type is derived from the CC number
+                <tr>
+                    <td>Type of Card</td>
+                    <td>
+                        <select name="type">
+                            <option value='VISA'>VISA</option>
+                            <option value='MasterCard'>MasterCard</option>
+                            <option value='American Express'>American Express</option>
+                        </select>
+                    </td>
+                </tr>
+                -->
+                <tr>
+                    <td>[% l('Credit Card #') %]</td>
+                    <td><input type="text" name="number" maxlength="16" /></td>
+                </tr>
+                <tr>
+                    <td>
+                        <div style="position:absolute;">
+                            <div style="position:relative;left:80px;">
+                                <a href="#"><img
+                                    src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                            </div>
+                        </div>
+                        [% l('Security Code') %]
+                    </td>
+                    <td>
+                        <input type="text" size="4" maxlength="5" name="cvv2" />
+                    </td>
+                </tr>
+                <tr>
+                    <td>[% l('Exipration Month') %]</td>
+                    <td>
+                        <select name="expire_month">
+                            <option value="01">[% l("January") %]</option>
+                            <option value="02">[% l("February") %]</option>
+                            <option value="03">[% l("March") %]</option>
+                            <option value="04">[% l("April") %]</option>
+                            <option value="05">[% l("May") %]</option>
+                            <option value="06">[% l("June") %]</option>
+                            <option value="07">[% l("July") %]</option>
+                            <option value="08">[% l("August") %]</option>
+                            <option value="09">[% l("September") %]</option>
+                            <option value="10">[% l("October") %]</option>
+                            <option value="11">[% l("November") %]</option>
+                            <option value="12">[% l("December") %]</option>
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td>[% l('Expiration Year') %]</td>
+                    <td>
+                        <select name="expire_year">
+                        [% year = date.format(date.now, '%Y');
+                        y = year;
+                        WHILE y < year + 10; # show ten years starting now %]
+                            <option value="[% y %]">[% y %]</option>
+                        [% y = y + 1; END %]
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan='2' align="center">
+                        <input type="submit" value="[% l('Submit Payment') %]" />
+                        <input type="reset" value="[% l('Cancel') %]"
+                            onclick="location.history.go(-1);" />
+                    </td>
+                </tr>
+                [% INCLUDE "default/opac/myopac/main_refund_policy.tt2" %]
+            </tbody>
+        </table>
+    </form>
+</div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
index da0a088..2115655 100644
--- a/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
@@ -36,7 +36,7 @@
             [% money(ctx.user_stats.fines.balance_owed) %]
         </span><br />
 
-        <form action="[% ctx.opac_root %]/myopac/main_pay" method="POST"><input
+        <form action="[% ctx.opac_root %]/myopac/main_payment_form" method="POST"><input
             type="image" title="[% l('Pay Fines') %]" alt="[% l('Pay Fines') %]"
             onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
             onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"

commit 8f14e53142af5dd19ccb535633642c871d33c059
Author: senator <lebbeous at esilibrary.com>
Date:   Tue May 10 17:54:59 2011 -0400

    start on cc payments

diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index 81d8632..e4e9eb7 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -131,7 +131,7 @@
 .opac-auto-145 { position: relative; top: -3px; left: 3px; }
 .opac-auto-146 { position: relative; top: -3px; left: -5px; }
 .opac-auto-147 { position: relative; top: -5px; }
-#learn_more { position: relative; top: 5px; }
+.pos-rel-top-5 { position: relative; top: 5px; }
 .opac-auto-149 { position: relative; top: 5px; left: 25px; }
 #util_print_btn { position: relative; top: 5px; left: 30px; }
 .opac-auto-151 { position: relative; top: 75px; }
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index edae0eb..c0a9004 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -987,7 +987,7 @@ a.dash-link:hover { text-decoration: underline !important; }
 .hold-editor-controls { text-align: center; padding-top: 1em !important; }
 .hold-editor-controls a { padding-left: 2em; }
 
-#rdetail_cn_browse_div { text-align: center; }
+.text-right { text-align: right; }
 .rdetail-author-div { padding-bottom: 10px; }
 
 .invisible { visibility: hidden; }
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 1c707c8..b187f0d 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -4,7 +4,7 @@
     myopac_page = "main";
     myopac_main_page = "main";
 %]
-
+<form action="[% ctx.opac_root %]/myopac/main_pay" method="POST">
     [% IF ctx.fines.circulation.size > 0 %]
     <div id='myopac_circ_trans_div'>
         <table width='100%' class='data_grid'>
@@ -21,13 +21,11 @@
                     <td>[% l("Due Date") %]</td>
                     <td>[% l("Date Returned") %]</td>
                     <td>[% l("Balance Owed") %]</td>
-                    <!-- TODO: hidden until pay-fines is implemented
                     <td nowrap="nowrap" style="white-space:nowrap;">
-                        <input id="pay_fines_box1" checked="checked"
+                        <!-- XXX TODO select all js --><input id="pay_fines_box1" checked="checked"
                             type="checkbox" title="[% l('Click to (un)select all fines') %]" />
                         <label for="pay_fines_box1">[% l('Pay Fines') %]</label>
                     </td>
-                    -->
                 </tr>
             </thead>
             <tbody id='myopac_circ_trans_tbody'>
@@ -78,11 +76,9 @@
                             [% money(f.xact.balance_owed) %]
                         </strong>
                     </td>
-                    <!-- TODO: hidden until pay-fines is implemented
                     <td>
                         <input type="checkbox" name="selector" title="[% l('Pay this fine') %]" />
                     </td>
-                    -->
                 </tr>
                 [% END %]
             </tbody>
@@ -111,7 +107,6 @@
                     <td width='16%'>[% l("Total Amount Paid") %]</td>
                     <td width='16%'>[% l("Balance Owed") %]</td>
                     <td width='16%'>[% l("Billing Type") %]</td>
-                    <!-- TODO: hidden until pay-fines is implemented
                     <td width='4%' align="center" nowrap="nowrap"
                         style="white-space:nowrap;">
                         <input id="pay_fines_box2" checked="checked"
@@ -119,7 +114,6 @@
                             title="[% l('Click to (un)select all fines') %]" />
                         <label for="pay_fines_box2">[% l("Pay Fines") %]</label>
                     </td>
-                    -->
                 </tr>
             </thead>
             <tbody id='myopac_trans_tbody'>
@@ -146,166 +140,22 @@
                         </strong>
                     </td>
                     <td>[% f.xact.last_billing_type %]</td>
-                    <!-- TODO: hidden until pay-fines is implemented
                     <td>
                         <input type="checkbox" name='selector' title='[% l("Pay this fine") %]'/>
                     </td>
-                    -->
                 </tr>
                 [% END %]
             </tbody>
         </table>
     </div>
     [% END %]
-
-<!-- TODO: move payment form to its own page -->
-
-<div id="pay_fines_now" class="hide_me">
-    <table id='oils-selfck-cc-payment-table'>
-        <tbody>
-            <tr>
-                <td><div style="width:129px;"></div></td>
-                <td><div style="width:195px;"></div></td>
-                <td><div style="width:324px;"></div></td>
-            </tr>
-            <tr>
-                <td colspan='2'><strong>Billing Information</strong></td>
-                <td rowspan='13' valign='top'>
-                    Selected fines you are paying for:
-                    <table cellpadding="0" cellspacing="5" border="0">
-                        <thead>
-                            <tr>
-                                <td>
-                                    <strong>Name</strong>
-                                </td>
-                                <td>
-                                    <strong>Amount</strong>
-                                </td>
-                            </tr>
-                        </thead>
-                        <tbody id="selectedFines">
-                        </tbody>
-                    </table>
-                    <br />
-                    <div id='oils-selfck-cc-payment-summary'>
-                        Total amount to pay:
-                        <strong>$<span></span></strong>
-                    </div>
-                    <br />
-                    Click <strong>Cancel</strong> to go back and (un)select
-                    other fines.
-                </td>
-            </tr>
-            <tr>
-                <td>First Name</td>
-                <td><input jsId='oilsSelfckCCFName' /></td>
-            </tr>
-            <tr>
-                <td>Last Name</td>
-                <td><input jsId='oilsSelfckCCLName' /></td>
-            </tr>
-            <tr>
-                <td>Street Address</td>
-                <td><input jsId='oilsSelfckCCStreet' /></td>
-            </tr>
-            <tr>
-                <td>City</td>
-                <td><input jsId='oilsSelfckCCCity' /></td>
-            </tr>
-            <tr>
-                <td>State or Province</td>
-                <td><input jsId='oilsSelfckCCState' /></td>
-            </tr>
-            <tr>
-                <td>ZIP or Postal Code</td>
-                <td><input jsId='oilsSelfckCCZip' /></td>
-            </tr>
-            <tr>
-              <td colspan='2'><strong>Credit Card Information</strong></td>
-            </tr>
-            <!-- Technically not needed since card type is derived from the CC number
-            <tr>
-                <td>Type of Card</td>
-                <td>
-                    <select jsId='oilsSelfckCCType' required='true'>
-                        <option value='VISA'>VISA</option>
-                        <option value='MasterCard'>MasterCard</option>
-                        <option value='American Express'>American Express</option>
-                    </select>
-                </td>
-            </tr>
-            -->
-            <tr>
-                <td>Credit Card #</td>
-                <td><input jsId='oilsSelfckCCNumber' /></td>
-            </tr>
-            <tr>
-                <td>
-                    <div style="position:absolute;">
-                        <div style="position:relative;left:80px;">
-                            <a href="#"><img
-                                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
-                        </div>
-                    </div>
-                    Security Code
-                </td>
-                <td>
-                    <input jsId='oilsSelfckCCCVV' />
-                </td>
-            </tr>
-            <tr>
-                <td>Exipration Month</td>
-                <td>
-                    <select jsId='oilsSelfckCCMonth'>
-                        <option value='01' selected='selected'>January</option>
-                        <option value='02'>February</option>
-                        <option value='03'>March</option>
-                        <option value='04'>April</option>
-                        <option value='05'>May</option>
-                        <option value='06'>June</option>
-                        <option value='07'>July</option>
-                        <option value='08'>August</option>
-                        <option value='09'>September</option>
-                        <option value='10'>October</option>
-                        <option value='11'>November</option>
-                        <option value='12'>December</option>
-                    </select>
-                </td>
-            </tr>
-            <tr>
-                <td>Expiration Year</td>
-                <td>
-                  <select jsId='oilsSelfckCCYear'>
-                    <option value='2011'>2011</option>
-                    <option value='2012'>2012</option>
-                    <option value='2013'>2013</option>
-                    <option value='2014'>2014</option>
-                    <option value='2015'>2015</option>
-                    <option value='2016'>2016</option>
-                    <option value='2017'>2017</option>
-                    <option value='2018'>2018</option>
-                    <option value='2019'>2019</option>
-                  </select>
-                </td>
-            </tr>
-            <tr class="hide_me">
-                <td>Edit Billing Address</td>
-                <td>
-                    <input jsId='oilsSelfckEditDetails'/>
-                </td>
-            </tr>
-            <tr>
-                <td colspan='2' align="center">
-                    <button jsId='oilsSelfckCCSubmit'>
-                        Submit Payment
-                    </button>
-                    <button>
-                        Cancel
-                    </button>
-                </td>
-            </tr>
-            [% INCLUDE "default/opac/myopac/main_refund_policy.tt2" %]
-        </tbody>
-    </table>
-</div>
+    <div class="text-right pad-top-ten">
+        <input type="image"
+            alt="[% l('Pay selected fines') %]"
+            title="[% l('Pay selected fines') %]"
+            onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
+            onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
+            src="[% ctx.media_prefix %]/images/pay-fines-btn.png" />
+    </div>
+</form>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
new file mode 100644
index 0000000..ff9b512
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/main_pay.tt2
@@ -0,0 +1,158 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
+    WRAPPER "default/opac/parts/myopac/main_base.tt2";
+    myopac_page = "main";
+    myopac_main_page = "pay";
+
+    # XXX When we get no parameters, we're in "pay everything" mode.
+    # When we get paramters, they refer to the fines that we'll be paying
+%]
+<div id="pay_fines_now">
+    <table id='oils-selfck-cc-payment-table'>
+        <tbody>
+            <tr>
+                <td><div style="width:129px;"></div></td>
+                <td><div style="width:195px;"></div></td>
+                <td><div style="width:324px;"></div></td>
+            </tr>
+            <tr>
+                <td colspan='2'><strong>Billing Information</strong></td>
+                <td rowspan='13' valign='top'>
+                    Selected fines you are paying for:
+                    <table cellpadding="0" cellspacing="5" border="0">
+                        <thead>
+                            <tr>
+                                <td>
+                                    <strong>Name</strong>
+                                </td>
+                                <td>
+                                    <strong>Amount</strong>
+                                </td>
+                            </tr>
+                        </thead>
+                        <tbody id="selectedFines">
+                        </tbody>
+                    </table>
+                    <br />
+                    <div id='oils-selfck-cc-payment-summary'>
+                        Total amount to pay:
+                        <strong>$<span></span></strong>
+                    </div>
+                    <br />
+                    Click <strong>Cancel</strong> to go back and (un)select
+                    other fines.
+                </td>
+            </tr>
+            <tr>
+                <td>First Name</td>
+                <td><input jsId='oilsSelfckCCFName' /></td>
+            </tr>
+            <tr>
+                <td>Last Name</td>
+                <td><input jsId='oilsSelfckCCLName' /></td>
+            </tr>
+            <tr>
+                <td>Street Address</td>
+                <td><input jsId='oilsSelfckCCStreet' /></td>
+            </tr>
+            <tr>
+                <td>City</td>
+                <td><input jsId='oilsSelfckCCCity' /></td>
+            </tr>
+            <tr>
+                <td>State or Province</td>
+                <td><input jsId='oilsSelfckCCState' /></td>
+            </tr>
+            <tr>
+                <td>ZIP or Postal Code</td>
+                <td><input jsId='oilsSelfckCCZip' /></td>
+            </tr>
+            <tr>
+              <td colspan='2'><strong>Credit Card Information</strong></td>
+            </tr>
+            <!-- Technically not needed since card type is derived from the CC number
+            <tr>
+                <td>Type of Card</td>
+                <td>
+                    <select jsId='oilsSelfckCCType' required='true'>
+                        <option value='VISA'>VISA</option>
+                        <option value='MasterCard'>MasterCard</option>
+                        <option value='American Express'>American Express</option>
+                    </select>
+                </td>
+            </tr>
+            -->
+            <tr>
+                <td>Credit Card #</td>
+                <td><input jsId='oilsSelfckCCNumber' /></td>
+            </tr>
+            <tr>
+                <td>
+                    <div style="position:absolute;">
+                        <div style="position:relative;left:80px;">
+                            <a href="#"><img
+                                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                        </div>
+                    </div>
+                    Security Code
+                </td>
+                <td>
+                    <input jsId='oilsSelfckCCCVV' />
+                </td>
+            </tr>
+            <tr>
+                <td>Exipration Month</td>
+                <td>
+                    <select jsId='oilsSelfckCCMonth'>
+                        <option value='01' selected='selected'>January</option>
+                        <option value='02'>February</option>
+                        <option value='03'>March</option>
+                        <option value='04'>April</option>
+                        <option value='05'>May</option>
+                        <option value='06'>June</option>
+                        <option value='07'>July</option>
+                        <option value='08'>August</option>
+                        <option value='09'>September</option>
+                        <option value='10'>October</option>
+                        <option value='11'>November</option>
+                        <option value='12'>December</option>
+                    </select>
+                </td>
+            </tr>
+            <tr>
+                <td>Expiration Year</td>
+                <td>
+                  <select jsId='oilsSelfckCCYear'>
+                    <option value='2011'>2011</option>
+                    <option value='2012'>2012</option>
+                    <option value='2013'>2013</option>
+                    <option value='2014'>2014</option>
+                    <option value='2015'>2015</option>
+                    <option value='2016'>2016</option>
+                    <option value='2017'>2017</option>
+                    <option value='2018'>2018</option>
+                    <option value='2019'>2019</option>
+                  </select>
+                </td>
+            </tr>
+            <tr class="hide_me">
+                <td>Edit Billing Address</td>
+                <td>
+                    <input jsId='oilsSelfckEditDetails'/>
+                </td>
+            </tr>
+            <tr>
+                <td colspan='2' align="center">
+                    <button jsId='oilsSelfckCCSubmit'>
+                        Submit Payment
+                    </button>
+                    <button>
+                        Cancel
+                    </button>
+                </td>
+            </tr>
+            [% INCLUDE "default/opac/myopac/main_refund_policy.tt2" %]
+        </tbody>
+    </table>
+</div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
index 0676ee9..da0a088 100644
--- a/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
@@ -36,13 +36,12 @@
             [% money(ctx.user_stats.fines.balance_owed) %]
         </span><br />
 
-        [%# TODO %]
-        <a class="hide_me" href="#" id="pay_fines_btn1"><img
-            alt="[% l('Pay Fines') %]"
+        <form action="[% ctx.opac_root %]/myopac/main_pay" method="POST"><input
+            type="image" title="[% l('Pay Fines') %]" alt="[% l('Pay Fines') %]"
             onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
             onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
             src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
-            style="position:relative;top:5px;" /></a>
+            class="pos-rel-top-5" /></form>
     </div>
 
     <div style="width:662px;">

commit e99e1baddf113c3605ea58f127dadf711caf36e3
Author: senator <lebbeous at esilibrary.com>
Date:   Tue May 10 12:38:56 2011 -0400

    Fix an ugly grey bar in the record detail page
    
    I have no idea what caused this or why this css adjustments fixes the
    problem

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index e903350..edae0eb 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -566,6 +566,8 @@ div.select-wrapper:hover {
 	border-bottom: 1px solid black;
 }
 
+.content-wrapper-record-page { top: -15px; position: relative; }
+
 #main-content-home { width: 694px; margin: auto; padding-left: 17px; }
 #main-content { width: 974px; margin:auto; padding-left: 0px; }
 
diff --git a/Open-ILS/web/templates/default/opac/record.tt2 b/Open-ILS/web/templates/default/opac/record.tt2
index ffe90f4..0149bf1 100644
--- a/Open-ILS/web/templates/default/opac/record.tt2
+++ b/Open-ILS/web/templates/default/opac/record.tt2
@@ -6,7 +6,7 @@
         [% INCLUDE "default/opac/parts/printnav.tt2" %]
         [% INCLUDE "default/opac/parts/searchbar.tt2" %]
     </div>
-    <div id="content-wrapper">
+    <div id="content-wrapper" class="content-wrapper-record-page">
         <div id="main-content">
             [% INCLUDE "default/opac/parts/record/body.tt2" %]
             <div class="common-full-pad"></div>	

commit 0fc734340081a5f52a20306553219afefc50b067
Author: senator <lebbeous at esilibrary.com>
Date:   Tue May 10 10:28:55 2011 -0400

    Better redirect from place_hold
    
    Before this, if you click place hold on something while not logged in,
    you are redirected to the login page, which is good, and redirected
    thence to the place hold page, which is good. But after actually
    placing the hold you got redirected to the login page again, which is
    not good.  Now you get sent back to the home page.
    
    This may not be the ideal choice.  myopac/main may make more sense.
    Also, there is still not any clear visual feedback for the user that
    their hold placement succeeded.  That'll need to be addressed too.

diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index fc4dce0..8f56aa5 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -58,8 +58,16 @@
                 value="[% CGI.param('hold_target') | html %]" />
             <input type="hidden" name="hold_type"
                 value="[% CGI.param('hold_type') | html %]" />
+            [%
+                new_redirect_to = ctx.referer;
+                IF new_redirect_to.match('redirect_to');
+                    new_redirect_to = 'https://' _ ctx.hostname _ ctx.opac_root _ '/home';
+                ELSE;
+                    new_redirect_to = new_redirect_to | replace('^http:', 'https:');
+                END;
+            %]
             <input type="hidden" name="redirect_to"
-                value="[% ctx.referer | replace('^http:', 'https:') | html %]" />
+                value="[% new_redirect_to | html %]" />
             <h1>Place Hold</h1>
             <p>
                 [% | l(attrs.title, ctx.get_aou(ctx.default_pickup_lib).name) %]

commit 51b2791b38329465159b1b8df45d3963235549a0
Merge: 22da181 d5d6a0a
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon May 9 15:21:56 2011 -0400

    Merge branch 'template-toolkit-opac' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 22da181312106f8a20be7377ac9f1f6080e86864
Merge: 8859e73 f0ab78f
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon May 9 15:21:52 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit d5d6a0a7c3dc751ff625cff8ca406236e4f2e33a
Merge: 35db902 8859e73
Author: senator <lebbeous at esilibrary.com>
Date:   Mon May 9 15:01:56 2011 -0400

    Merge branch 'template-toolkit-opac' of ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 35db902ccd97696d360772c43c37d4add035aff6
Author: senator <lebbeous at esilibrary.com>
Date:   Mon May 9 15:01:41 2011 -0400

    serial issue display and holds work

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 2486e23..f8622b5 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -304,8 +304,18 @@ sub load_place_hold {
     $ctx->{hold_type} = $cgi->param('hold_type');
     $ctx->{default_pickup_lib} = $e->requestor->home_ou; # XXX staff
 
-    if($ctx->{hold_type} eq 'T') {
+    if ($ctx->{hold_type} eq 'T') {
         $ctx->{record} = $e->retrieve_biblio_record_entry($ctx->{hold_target});
+    } elsif ($ctx->{hold_type} eq 'I') {
+        my $iss = $e->retrieve_serial_issuance([
+            $ctx->{hold_target}, {
+                "flesh" => 2,
+                "flesh_fields" => {
+                    "siss" => ["subscription"], "ssub" => ["record_entry"]
+                }
+            }
+        ]);
+        $ctx->{record} = $iss->subscription->record_entry;
     }
     # ...
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index 3a54fbc..7b56ee4 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -36,11 +36,30 @@ sub load_record {
     $ctx->{copy_limit} = $copy_limit;
     $ctx->{copy_offset} = $copy_offset;
 
+    $ctx->{have_holdings_to_show} = 0;
+
+    # XXX TODO we'll also need conditional logic to show MFHD-based holdings
+    if (
+        $ctx->{get_org_setting}->
+            ($org, "opac.fully_compressed_serial_holdings")
+    ) {
+        $ctx->{holding_summaries} =
+            $self->get_holding_summaries($rec_id, $org, $depth);
+
+        $ctx->{have_holdings_to_show} =
+            scalar(@{$ctx->{holding_summaries}->{basic}}) ||
+            scalar(@{$ctx->{holding_summaries}->{index}}) ||
+            scalar(@{$ctx->{holding_summaries}->{supplement}});
+    }
+
     for my $expand ($self->cgi->param('expand')) {
         $ctx->{"expand_$expand"} = 1;
-        if($expand eq 'marchtml') {
+        if ($expand eq 'marchtml') {
             $ctx->{marchtml} = $self->mk_marc_html($rec_id);
-        } 
+        } elsif ($expand eq 'issues' and $ctx->{have_holdings_to_show}) {
+            $ctx->{expanded_holdings} =
+                $self->get_expanded_holdings($rec_id, $org, $depth);
+        }
     }
 
     return Apache2::Const::OK;
@@ -137,4 +156,33 @@ sub mk_marc_html {
         'open-ils.search.biblio.record.html', $rec_id, 1);
 }
 
+sub get_holding_summaries {
+    my ($self, $rec_id, $org, $depth) = @_;
+
+    return (
+        create OpenSRF::AppSession("open-ils.serial")->request(
+            "open-ils.serial.bib.summary_statements",
+            $rec_id, {"org_id" => $org, "depth" => $depth}
+        )->gather(1)
+    );
+}
+
+sub get_expanded_holdings {
+    my ($self, $rec_id, $org, $depth) = @_;
+
+    my $holding_limit = int($self->cgi->param("holding_limit") || 10);
+    my $holding_offset = int($self->cgi->param("holding_offset") || 0);
+    my $type = $self->cgi->param("expand_holding_type");
+
+    return create OpenSRF::AppSession("open-ils.serial")->request(
+        "open-ils.serial.received_siss.retrieve.by_bib.atomic",
+        $rec_id, {
+            "ou" => $org, "depth" => $depth,
+            "limit" => $holding_limit, "offset" => $holding_offset,
+            "type" => $type
+        }
+    )->gather(1);
+}
+
+
 1;
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index 8bafc7d..b101603 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -36,6 +36,7 @@
             {name => 'annotation', label => l('Annotation'), hide => 1}, 
             {name => 'reviews',  label => l('Reviews'), hide => 1}, 
             {name => 'excerpt',  label => l('Excerpt'), hide => 1},
+            {name => 'issues',   label => l('Issues Held'), hide => !ctx.have_holdings_to_show},
             {name => 'preview',  label => l('Preview'), hide => 1}, 
             {name => 'novelist', label => l('Suggestions by NoveList'), hide => 1},
             {name => 'cnbrowse', label => l('Shelf Browser'), hide => 1},
diff --git a/Open-ILS/web/templates/default/opac/parts/record/issues.tt2 b/Open-ILS/web/templates/default/opac/parts/record/issues.tt2
new file mode 100644
index 0000000..4f9f295
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/record/issues.tt2
@@ -0,0 +1,26 @@
+<div id='rdetail_issues_div' class='rdetail_extras_div'>
+[%
+base_expando = ctx.full_path _ "?expand=issues";
+FOREACH type IN ctx.holding_summaries.keys;
+    NEXT UNLESS ctx.holding_summaries.$type.size;
+    expanded = CGI.param('expand_holding_type') == type; %]
+    <div class="rdetail-issue-type">
+        <a href="[% base_expando; expanded ? '' : '&amp;expand_holding_type=' _ type; %]#issues">[[% expanded ? '-' : '+' %]]</a>
+        [% ctx.holding_summaries.$type.join(", ") %]
+        [% IF expanded %]
+        <table>
+            [% FOR blob IN ctx.expanded_holdings %]
+            <tr>
+                <td class="rdetail-issue-issue">[% blob.issuance.label %]</td>
+                [% IF blob.has_units %]
+                <td class="rdetail-issue-place-hold">
+                    <a href="[% ctx.opac_root %]/place_hold?hold_target=[% blob.issuance.id %]&amp;hold_type=I">[% l("Place Hold") %]</a>
+                </td>
+                [% END %]
+            </tr>
+            [% END %]
+        </table>
+        [% END %]
+    </div>
+[% END %]
+</div>

commit 8859e73ad82d9080f28e64d3a7429a05ee542da1
Merge: 122e7be f480ee0
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sat May 7 09:13:35 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 122e7beb7228a41c77e9c9730a8c0fc17effacc5
Merge: 8670942 5cea2d6
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri May 6 08:52:28 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 8670942afbff4f920bd41d365c9b632da22d76cc
Merge: 84eaa08 b58f802
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu May 5 15:31:46 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 84eaa081df57da4bb12b6b35439885914804184c
Merge: 710d871 407d24b
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu May 5 14:11:39 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 710d871aac9afaa95fe0908ae77f0c9359993236
Merge: 10083d8 5c7d442
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu May 5 09:48:41 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 10083d85c06addf8f3fb4deda6fbb8641677d9e0
Merge: c10da0a a369525
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed May 4 20:01:42 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit c10da0aa07811eee10318069ba800cf110a36ec2
Merge: 61fde21 3640be4
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed May 4 11:54:01 2011 -0400

    Merge branch 'template-toolkit-opac' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 61fde21a9a371a25f02c570a93b17883c5ab39a5
Merge: 6ddaccc dc971e2
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed May 4 11:53:59 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 3640be40f163784c3f6f77c2bc5ac04b22ae49c5
Author: berick <berick at esilibrary.com>
Date:   Wed May 4 09:11:02 2011 -0400

    removed unnecessary kcls record summary template file override

diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates_kcls/default/opac/parts/record/summary.tt2
deleted file mode 100644
index 9d08781..0000000
--- a/Open-ILS/web/templates_kcls/default/opac/parts/record/summary.tt2
+++ /dev/null
@@ -1,248 +0,0 @@
-<!-- ****************** rdetail_summary.xml ***************************** -->
-<abbr class="unapi-id" title='tag:HTTP_HOST,OILS_TIME_YEAR:biblio-record_entry/OILS_OPAC_RID'></abbr><!-- XXX FIXME or remove -->
-<!-- This holds the record summary information -->
-
-<table width="100%" border="0" cellpadding="0" cellspacing="0" id="rdetail_details_table">
-    <tbody id="rdetail_details_tbody">
-        <tr>
-            <td width="90" valign="top" id="rdetail_image_cell">
-                [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
-                <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident %]'><img
-                    alt="[% l('Image of item') %]" id='rdetail_image'
-                    src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/[% ident %]' /></a>
-                [% END %]
-                <br />
-                <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
-                    <div>[% l("Image provided by") %]</div>
-                    <div>
-                        <a target='_blank' href='[% l("http://amazon.com/dp/") %]'
-                            class='classic_link' id='rdetail.jacket_attrib_link'>[% l("Amazon") %]</a>
-                    </div>
-                </div>
-            </td>
-    
-            <td valign="top">
-                <table border="0" cellpadding="0" cellspacing="0" width="100%">
-                    <tr>
-                        <td valign="top">
-                            <span id='rdetail_title'>[% attrs.title %]</span><br />
-                            [% IF attrs.author %]
-                            <span class='opac-auto-030'>[% l("Author") %]:</span>
-                            <em><a title='[% l("Perform an author search") %]'
-                                    id='rdetail_author'
-                                    href="[% ctx.opac_root %]/results?qtype=author&query=[%-
-                                        attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% CGI.param('loc') | uri %]">[% attrs.author %]</a></em>
-                            [% END %]
-                        </td>
-                        <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
-                            <div style="width:230px;text-align:left;margin-top:3px;">
-                                <div style="float:right;">
-                                    <div class="rdetail_aux_utils opac-auto-010">
-                                        <a href="[% ctx.opac_root %]/place_hold[%-
-                                            propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% ctx.bre_id %]&hold_type=T" id="rdetail_place_hold" class="no-dec"><img
-                                            src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
-                                                style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
-                                    </div>
-                                    <div class="rdetail_aux_utils opac-auto-121">
-                                        [%  
-                                            operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add";
-                                            label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); 
-                                        %]
-                                        <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
-                                            <input type="hidden" name="record" value="[% ctx.bre_id %]" />
-                                            <div class="pos-abs">
-                                                <div class="opac-auto-149">
-                                                    <input type="submit" title="[% label %]" value="[% label %]" class="subtle-button" />
-                                                </div>
-                                            </div>
-                                            <input type="image" alt="[% label %]"
-                                                src="[% ctx.media_prefix %]/images/clipboard.png" />
-                                        </form>
-                                    </div>
-                                </div>
-                                <div style="float:right;margin-right:17px;">
-                                    [% IF attrs.format_icon %]
-                                    <img alt="[% attrs.format_label %]" title="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
-                                    [% END %]
-                                </div>
-                            </div>
-                        </td>
-                    </tr>
-                </table>
-                <div class='opac-auto-018'>
-                    <table border="0" cellpadding="0" width="100%">
-                        <tr>
-                            <td nowrap='nowrap' valign="top">
-                                [% IF attrs.isbn %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
-                            </td>
-                            <td valign="top" id='rdetail_isbn'>[% attrs.isbn %]</td>
-                            <td nowrap='nowrap' valign="top">
-                                [% IF attrs.phys_desc %]<strong id="rdetail_phys_lbl">[% l("Physical Description") %]</strong>[% END %]
-                            </td>
-                            <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc %]</td>
-                        </tr>
-                        <tr>
-                            <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
-                            </td>
-                            <td valign="top" id='rdetail_edition'>[% attrs.edition %]</td>
-                        </tr>
-                        <tr>
-                            <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
-                            </td>
-                            <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
-                            <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
-                            </td>
-                            <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
-                        </tr>
-                    </table>
-                </div>
-            </td>
-        </tr>
-    </tbody>
-</table>
-<br /><br />
-
-<table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
-    <thead>
-        <tr id="rdetails_status_head">
-            <td>[% l("Location") %]</td>
-            <td>[% l("Call Number") %]</td>
-            <td>[% l("Barcode") %]</td>
-            <td>[% l("Shelving Location") %]</td>
-            [% IF ctx.is_staff %]
-            <td>[% l("Age Hold Protection") %]</td>
-            <td>[% l("Create Date") %]</td>
-            <td>[% l("Holdable") %]</td>
-            [% END %]
-            <td>[% l("Status") %]</td>
-            <td>[% l("Due Date") %]</td>
-        </tr>
-    </thead>
-    <tbody class="copy_details_table">
-        [% FOR copy_info IN ctx.copies %]
-        <tr>
-            <td>[%
-                # XXX KCLS-specific kludging
-                org_name = ctx.get_aou(copy_info.circ_lib).name;
-                dir = org_name | lower | replace('[^\w]', '') |
-                    replace('.+320th', '320th'); %]
-                <a href="http://www.kcls.org/[% dir %]/"
-                    class="classic_link">[% org_name %]</a>
-            </td>
-            <td>[% copy_info.call_number_label %]</td>
-            <td>[% copy_info.barcode %]</td>
-            <td>[% copy_info.copy_location %]</td>
-            [% IF ctx.is_staff %]
-            <td>
-                [% copy_info.age_protect ?
-                    ctx.get_crahp(copy_info.age_protect).name : l('None') %]
-            </td>
-            <td>[% date.format(
-                ctx.parse_datetime(copy_info.create_date),
-                DATE_FORMAT
-            ) %]</td>
-            <td>[% (copy_info.holdable == 't' AND
-                    copy_info.location_holdable == 't' AND
-                    copy_info.status_holdable == 't') ? l('Yes') : l('No') %]</td>
-            [% END %]
-            <td>[% copy_info.copy_status %]</td>
-            <td>[%
-                IF copy_info.due_date;
-                    date.format(
-                        ctx.parse_datetime(copy_info.due_date),
-                        DATE_FORMAT
-                    );
-                ELSE;
-                    '-';
-                END %]</td>
-        </tr>
-        [% END %]
-        <tr>
-        [% IF ctx.copy_offset > 0;
-            new_offset = ctx.copy_offset - ctx.copy_limit;
-            IF new_offset < 0; new_offset = 0; END %]
-            <td>
-                [%# For some reason, browsers render &copy (as in, &copy_limit=foo) as the copyright 
-                    symbol, even though it's inside inside the href attribute string.  Use ; instead %]
-                <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% new_offset %];copy_limit=[% ctx.copy_limit %]">&laquo; [%
-                    l('Previous [_1]', ctx.copy_offset - new_offset)
-                %]</a>
-            </td>
-        [% END %]
-        [% IF ctx.copies.size >= ctx.copy_limit %]
-            <td>
-                <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %];copy_limit=[% ctx.copy_limit %]">[%
-                    l('Next [_1]', ctx.copy_limit)
-                %] &raquo;</a>
-            </td>
-        [% END %]
-        </tr>
-    </tbody>
-</table>
-
-<div id="rdetail_locs_expand" class="hide_me">
-    <a href="#"><img
-        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
-    <a style="position:relative;top:-3px;" href="#">Show more locations</a>
-</div>
-
-<div id="rdetail_locs_collapse" class="hide_me">
-    <a href="#"><img
-        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
-    <a style="position:relative;top:-3px;" href="#">Collapse locations</a>
-</div>
-
-<div id="rdetail_extras_expand" class="hide_me">
-    <a href="#"><img
-        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
-    <a style="position:relative;top:-3px;" href="#">Expand all tabs</a>
-</div>
-
-<div id="rdetail_extras_collapse" class="hide_me">
-    <a href="#"><img src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
-    <a style="position:relative;top:-3px;" href="#">Collapse all tabs</a>
-</div>
-
-<div class="hide_me">
-    <table id='' border="0" width="100%">
-        <tbody id='rdetail_details_tbody'>
-            <tr>
-                <td id='' rowspan='2' valign="top" align="center" style="padding-right:10px;">
-                </td>
-                <td class='rdetail_desc' valign="top" colspan="3">
-                    <table border="0" width="100%">
-                        <tr>
-                            <td valign="top">
-                                <div style="padding-bottom:7px;">
-                                    <strong>[% l("Title") %]:</strong>
-                                </div>
-                            </td>
-                            <td width="1" valign="top" align="right" style="white-space:nowrap;">
-                                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% ctx.bre_id %]&hold_type=T"><img alt="[% l('Place Hold') %]"
-                                    src="[% ctx.media_prefix %]/images/place_hold.gif" /></a>
-                                <a href="#" id="rd_reviews_and_more" target="_blank"><img
-                                    alt="[% l('Reviews and More') %]" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>
-                                <a href="#" id=""><img alt="[% l('Add to My List') %]"
-                                    src="[% ctx.media_prefix %]/images/add_mylist.gif" /></a>
-                            </td>
-                        </tr>
-                    </table>
-                </td>        
-            </tr>
-            <tr>
-                <td nowrap='nowrap' colspan="3" valign="bottom" style="padding-bottom:16px;">
-                </td>
-            </tr>
-            <tr>
-                <td><div style="height:20px;"></div></td>
-            </tr>
-        </tbody>
-    </table>
-    <!-- Empty span used for creating unAPI links -->
-    <abbr name="unapi" class="unapi-id"> <!-- unAPI URI goes here --> </abbr>
-</div> <!-- details_body -->
-
-<!-- ****************** end: rdetail_summary.xml ***************************** -->

commit f656e372e6b76c243e152dd2bc79c07f89be225a
Merge: 6ddaccc 5d41928
Author: berick <berick at esilibrary.com>
Date:   Wed May 4 09:06:23 2011 -0400

    Merge remote branch 'dbs-git/dbs/tt-htmlcleanup' into template-toolkit-opac


commit 6ddaccc67fe997a7fbbf796107c8b77a6e3a0006
Merge: f821b88 b4b0aa8
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed May 4 01:30:53 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 5d41928d098a2eb4e9ae96c5e822856b1e1e4515
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue May 3 22:32:34 2011 -0400

    Clean up the rest of the non-entity ampersands in URLs
    
    Continue the global change to entity ampersands in URLs
    in the TT OPAC. This should be the last of it.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
index 91e5f37..8848693 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
@@ -21,10 +21,10 @@
     <div class="header_middle">
         <span class="float-left">[% l('Previously Checked Out Items') %]</span>
         <span class='float-left' style='padding-left: 10px;'>
-            <a href='circ_history?limit=[% limit %]&offset=[% offset - limit %]'
+            <a href='circ_history?limit=[% limit %]&amp;offset=[% offset - limit %]'
                 [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
             [%# TODO: get total to prevent paging off then end of the list.. %]
-            <a href='circ_history?limit=[% limit %]&offset=[% offset + limit %]'
+            <a href='circ_history?limit=[% limit %]&amp;offset=[% offset + limit %]'
                [% IF ctx.circs.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">&#9658;</span></a>
         </span>
         <span class="float-right">
@@ -73,7 +73,7 @@
                             <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" 
                                 name="[% l('Catalog record') %]">[% attrs.title %]</a>
                             [% IF attrs.author %] /
-                            <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
                             [% END %]
                         </td>
                         <td style="padding-left:5px;">
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index c16d28c..67f94b8 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -108,7 +108,7 @@
                             name="author">
                             <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" name="[% l('Catalog record') %]">[% attrs.title %]</a>
                             [% IF attrs.author %] /
-                            <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
                             [% END %]
                         </td>
                         <td width="8%" name="renewals" align="center">
diff --git a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
index ac8d99c..048dbb2 100644
--- a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
@@ -21,10 +21,10 @@
     <div class="header_middle">
         <span style="float:left;">[% l("Previously Held Items") %]</span>
         <span class='float-left' style='padding-left: 10px;'>
-            <a href='hold_history?limit=[% limit %]&offset=[% offset - limit %]'
+            <a href='hold_history?limit=[% limit %]&amp;offset=[% offset - limit %]'
                 [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
             [%# TODO: get total to prevent paging off then end of the list.. %]
-            <a href='hold_history?limit=[% limit %]&offset=[% offset + limit %]'
+            <a href='hold_history?limit=[% limit %]&amp;offset=[% offset + limit %]'
                [% IF ctx.holds.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">&#9658;</span></a>
         </span>
         <span style="float:right;">
@@ -67,7 +67,7 @@
                     </td>
                     <td width="123">
                         <div style="margin-top:10px;margin-bottom:10px;">
-                            <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
+                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
                         </div>
                     </td>
                     <td width="64">
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 1a7c814..a6bb670 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -140,7 +140,7 @@
                     </td>
                     <td width="123">
                         <div style="margin-top:10px;margin-bottom:10px;">
-                            <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
+                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
                         </div>
                     </td>
                     <td width="64">
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index c00356f..1c707c8 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -48,7 +48,7 @@
                         [% END %]
                     </td>
                     <td>
-                        <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                        <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
                     </td>
                     <td name='myopac_circ_trans_start'>
                         [% ts = f.xact.circulation.xact_start || f.xact.reservation.start_time || 0;
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
index 882f986..bf956b6 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
@@ -11,10 +11,10 @@
     <div class="header_middle">
         <span class="float-left">[% l('Payments History') %]</span>
         <span class='float-left' style='padding-left: 10px;'>
-            <a href='main_payments?limit=[% limit %]&offset=[% offset - limit %]'
+            <a href='main_payments?limit=[% limit %]&amp;offset=[% offset - limit %]'
                 [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
             [%# TODO: get total to prevent paging off then end of the list.. %]
-            <a href='main_payments?limit=[% limit %]&offset=[% offset + limit %]'
+            <a href='main_payments?limit=[% limit %]&amp;offset=[% offset + limit %]'
                [% IF ctx.payments.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">&#9658;</span></a>
         </span>
     </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/authors.tt2 b/Open-ILS/web/templates/default/opac/parts/record/authors.tt2
index 5d9db77..93a8b83 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/authors.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/authors.tt2
@@ -31,7 +31,7 @@ BLOCK build_author_links;
             code = subfield.getAttribute('code');
             NEXT UNLESS code.match('[a-z]');
             term = subfield.textContent | html;
-            '<br/><a href="' _ ctx.opac_root _ '/results?qtype=author&query=' _ term _ '&loc=' _ loc _ '">' _ term _ '</a>';
+            '<br/><a href="' _ ctx.opac_root _ '/results?qtype=author&amp;query=' _ term _ '&amp;loc=' _ loc _ '">' _ term _ '</a>';
         END;
     END;
 END;
diff --git a/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2 b/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
index d608019..7819187 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
@@ -38,7 +38,7 @@
                 single_term = subfield.textContent | html;
                 all_terms.push(subfield.textContent);
                 total_term = all_terms.join(" ").replace('\s+$', '') | uri;
-                '<a href="' _ ctx.opac_root _ '/results?qtype=subject&query=' _ total_term _ '&loc=' _ loc _ '">' _ single_term _ '</a>';
+                '<a href="' _ ctx.opac_root _ '/results?qtype=subject&amp;query=' _ total_term _ '&amp;loc=' _ loc _ '">' _ single_term _ '</a>';
             END;
             IF all_terms.size; "<br/>"; END;
         END;

commit 6e0d1765c2ddce581342e2864d2b7305b03a2df2
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue May 3 20:51:44 2011 -0400

    Avoid empty ID attribute in SELECT element
    
    The current code appears to always generate an empty id="" attribute,
    as the "id" variable never gets populated. For now, protect against
    the empty ID attribute.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
index aa99e91..2daf63a 100644
--- a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
@@ -17,7 +17,7 @@
     #   PROCESS build_org_selector id='selector-id' name='selector-name'
     BLOCK build_org_selector;
 %]
-    <select id='[% id %]' name='[% name %]'>
+    <select [% IF id %] id='[% id %]' [% END %] name='[% name %]'>
     [% PROCESS build_org_selector_options walker=(org_unit || ctx.aou_tree) value=value %]
     </select>
 [%  END %]

commit 6b09dfbc8b23d534cbd48e72325f073fbbb28987
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue May 3 20:42:16 2011 -0400

    HTML compliance in result table
    
    Convert & to &amp; in URLs, and change a SPAN element to a DIV
    (because SPAN elements are not allowed to contain block-level
    elements like DIV and TABLE).
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index cb76024..83da3d8 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -25,7 +25,7 @@
                     [%  class = 'search_page_nav_link';
                         href = '#';
                         IF page > 0;
-                            href = propagator _ '&page=' _ (page - 1);
+                            href = propagator _ '&amp;page=' _ (page - 1);
                         ELSE; class = class _ ' invisible'; END;
                     %]
                     <a class='[% class %]' href='[% href %]' 
@@ -37,7 +37,7 @@
                     [%  class = 'search_page_nav_link';
                         href = '#';
                         IF (page + 1) < page_count;
-                            href = propagator _ '&page=' _ (page + 1);
+                            href = propagator _ '&amp;page=' _ (page + 1);
                         ELSE; class = class _ ' invisible'; END;
                     %]
                     <a class='[% class %]' href='[% href %]' 
@@ -91,12 +91,12 @@
                                                         href="[% ctx.opac_root %]/record/[% rec.id _ propagator %]"
                                                         class='search_link'>[% attrs.title %]</a>
                                                 </div>
-                                                <span style="font-size:11px;">
+                                                <div style="font-size:11px;">
                                                     <div>
                                                         <em><a title="[% l("Perform an Author Search") %]"
                                                                 name='item_author'
-                                                                href="[% ctx.opac_root %]/results?qtype=author&query=[% 
-                                                                    attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% CGI.param('loc') | uri %]"
+                                                                href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% 
+                                                                    attrs.author | replace('[,\.:;]', '') | uri %]&amp;loc=[% CGI.param('loc') | uri %]"
                                                                 class='search_link'>[% attrs.author %]</a></em>
                                                         &nbsp;&nbsp;
                                                         [% attrs.pubdate %]
@@ -142,7 +142,7 @@
                                                             #rec.copy_counts.available, rec.copy_counts.visible) 
                                                         %]
                                                     </div>
-                                                </span>
+                                                </div>
                                                 <div class="hide_me">
                                                     <span name='result_table_extra_span' class='hide_me'>
                                                         <span name='result_table_pub_box'
@@ -177,7 +177,7 @@
                                                 <div style="width:250px;text-align:left;">
                                                     <div style="float:right;">
                                                         <div class="results_aux_utils opac-auto-010"><a
-                                                                href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% rec.id %]&hold_type=T" 
+                                                                href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% rec.id %]&amp;hold_type=T" 
                                                                     name="place_hold_link" class="no-dec"><img
                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
                                                                 alt="[% l('Place hold') %]"/><span style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>

commit f821b88394a33914598f1cce53ba11f042a50f98
Merge: a949303 d1fc490
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue May 3 18:04:45 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit ccbb9eef0e2d10aa46cf09a077bae904de8a39db
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue May 3 17:08:59 2011 -0400

    Less aggressive URL encoding
    
    We were double-encoding URIs, as the url and uri filters in
    TT happily encode % - which is fine the first time around,
    but after you've already escaped everything as %nn the propagator
    was serving it back to url to be escaped again on the following
    page request.
    
    The right way to do this might be to unescape the incoming query
    string, then pass it on to url for escaping again - but for now,
    using the entity version of & is good enough to begin with.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 4c68368..114b4c3 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -15,10 +15,9 @@
 
     query_string = CGI.query_string |
         replace(';x=\d+','') | replace(';y=\d+','') | replace(';page=\d*', '') |
-        replace(';', '&');
+        replace(';', '&') | replace('&', '&amp;');
 
-
-    propagator = '?' _ query_string | url | replace('&', '&amp;');
+    propagator = '?' _ query_string;
 
     is_advanced = CGI.param("_adv").size;
 %]

commit c88c0ac5f43a408bca0fe337991517edc3aef2c1
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue May 3 16:48:48 2011 -0400

    Ensure ampersands in URLs are &amp; per HTML spec
    
    The propagator variable defined in parts/header.tt2 holds the value
    of the CGI query string - which, as it comes off the wire, is a simple
    "&". The problem with this is perhaps best explained at
    http://www.htmlhelp.com/tools/validator/problems.html#amp (and it
    explains why "&copy_..." gets converted into a copyright symbol).
    
    By passing the incoming query string through the TT url filter and
    then replacing "&" with "&amp;" we avoid this problem at the source.
    From there, we have to address the other locations in the code in
    which we are manually appending GET variables.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 08c5ca6..4c68368 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -17,7 +17,8 @@
         replace(';x=\d+','') | replace(';y=\d+','') | replace(';page=\d*', '') |
         replace(';', '&');
 
-    propagator = '?' _ query_string;
+
+    propagator = '?' _ query_string | url | replace('&', '&amp;');
 
     is_advanced = CGI.param("_adv").size;
 %]
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 26e1056..c34cf9a 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -30,8 +30,8 @@
                             <span class='opac-auto-030'>[% l("Author") %]:</span>
                             <em><a title='[% l("Perform an author search") %]'
                                     id='rdetail_author'
-                                    href="[% ctx.opac_root %]/results?qtype=author&query=[%-
-                                        attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% CGI.param('loc') | uri %]">[% attrs.author %]</a></em>
+                                    href="[% ctx.opac_root %]/results?qtype=author&amp;query=[%-
+                                        attrs.author | replace('[,\.:;]', '') | uri %]&amp;loc=[% CGI.param('loc') | uri %]">[% attrs.author %]</a></em>
                             [% END %]
                         </td>
                         <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
@@ -39,7 +39,7 @@
                                 <div style="float:right;">
                                     <div class="rdetail_aux_utils opac-auto-010">
                                         <a href="[% ctx.opac_root %]/place_hold[%-
-                                            propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% ctx.bre_id %]&hold_type=T" id="rdetail_place_hold" class="no-dec"><img
+                                            propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% ctx.bre_id %]&amp;hold_type=T" id="rdetail_place_hold" class="no-dec"><img
                                             src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
                                                 style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
                                     </div>
@@ -165,16 +165,14 @@
             new_offset = ctx.copy_offset - ctx.copy_limit;
             IF new_offset < 0; new_offset = 0; END %]
             <td>
-                [%# For some reason, browsers render &copy (as in, &copy_limit=foo) as the copyright 
-                    symbol, even though it's inside inside the href attribute string.  Use ; instead %]
-                <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% new_offset %];copy_limit=[% ctx.copy_limit %]">&laquo; [%
+                <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% new_offset %]&amp;copy_limit=[% ctx.copy_limit %]">&laquo; [%
                     l('Previous [_1]', ctx.copy_offset - new_offset)
                 %]</a>
             </td>
         [% END %]
         [% IF ctx.copies.size >= ctx.copy_limit %]
             <td>
-                <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %];copy_limit=[% ctx.copy_limit %]">[%
+                <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %]&amp;copy_limit=[% ctx.copy_limit %]">[%
                     l('Next [_1]', ctx.copy_limit)
                 %] &raquo;</a>
             </td>
@@ -221,7 +219,7 @@
                                 </div>
                             </td>
                             <td width="1" valign="top" align="right" style="white-space:nowrap;">
-                                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% ctx.bre_id %]&hold_type=T"><img alt="[% l('Place Hold') %]"
+                                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% ctx.bre_id %]&amp;hold_type=T"><img alt="[% l('Place Hold') %]"
                                     src="[% ctx.media_prefix %]/images/place_hold.gif" /></a>
                                 <a href="#" id="rd_reviews_and_more" target="_blank"><img
                                     alt="[% l('Reviews and More') %]" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>

commit ba77484053cd77f665c834aaa7a0f07f71709d80
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue May 3 16:17:56 2011 -0400

    Fix unclosed quoted attribute in TT OPAC footer
    
    Forgot to place the closing attribute quote on the footer image.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/footer.tt2 b/Open-ILS/web/templates/default/opac/parts/footer.tt2
index f822e4e..70379c4 100644
--- a/Open-ILS/web/templates/default/opac/parts/footer.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/footer.tt2
@@ -13,7 +13,7 @@
         <a href="http://evergreen-ils.org">
             <img src="[% ctx.media_prefix %]/opac/images/eg_tiny_logo.jpg"
                 style="border:none; width: 94px; height: 16px;"
-                alt="[% l('Evergreen') %]
+                alt="[% l('Evergreen') %]"
             />
         </a>
     </div>

commit a949303c5a3ec991e9e6e70af937794dd6d9c7ae
Merge: 32a899f 9ef4193
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue May 3 11:11:02 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit 32a899ff1a0f6e9fed8b17fdd6c5a459b965afea
Merge: dc527f1 ee8f8eb
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue May 3 09:31:54 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit dc527f11740ee2428f83174449483a4d4b4c6a23
Merge: f083cb9 f6401d9
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon May 2 14:56:55 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into template-toolkit-opac


commit f083cb988c5fc99c0986f55c92aec9773a2129dd
Author: Dan Scott <dan at coffeecode.net>
Date:   Mon May 2 09:18:35 2011 -0400

    Debrand the KCLS-specific hint about Library Elf in prefs settings
    
    Even though prefs settings are not yet exposed, we can turn the
    KCLS-specific comment into a brandable "hints" section in prefs
    settings.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
index 4267d3a..daf65be 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
@@ -107,10 +107,8 @@ USER SETTINGS
                         </select></td>
                 </tr>
             </tbody>
-        </table><a href=
-        "http://www.kcls.org/usingthelibrary/catalog_help/library_elf.cfm"><u>Try
-        Library Elf-to manage library materials!</u></a>
-
+        </table>
+        [% INCLUDE "default/opac/parts/myopac/prefs_hints.tt2" %]
         -->
 
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/prefs_hints.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/prefs_hints.tt2
new file mode 100644
index 0000000..e2fbc6b
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/prefs_hints.tt2
@@ -0,0 +1,5 @@
+<p>
+    [% l('Ensure your account has a valid email address so that we can notify
+          you about available holds, items that are about to be overdue, and
+          overdue items!') %]
+</p>
diff --git a/Open-ILS/web/templates_kcls/default/opac/myopac/prefs_settings.tt2 b/Open-ILS/web/templates_kcls/default/opac/myopac/prefs_settings.tt2
deleted file mode 100644
index 4267d3a..0000000
--- a/Open-ILS/web/templates_kcls/default/opac/myopac/prefs_settings.tt2
+++ /dev/null
@@ -1,116 +0,0 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    WRAPPER "default/opac/parts/myopac/prefs_base.tt2";
-    myopac_page = "prefs_notify";
-    prefs_page = 'settings' %]
-
-USER SETTINGS
-
-        <!-- SEARCH PREFS SAVE, MOVE TO SUB-TEMPLATE
-        <div style="float:right;width:65px;">
-            <div style="position:absolute">
-                <div style="position:relative;top:75px;">
-                    <a id='acct_prefs_save'
-                         class='hide_me'
-                         href="#"><img alt="Save"
-                         src="[% ctx.media_prefix %]/images/save-btn.png" /></a>
-                </div>
-            </div>
-        </div>
-        -->
-
-
-        <!-- SEARCH PREFERENCES / leaving here for reference
-        <table class="hide_me full-width" id="acct_search_main">
-            <tbody id='myopac_prefs_tbody'>
-                <tr id='myopac_prefs_loading'>
-                    <td colspan='3'><b>[% l("Loading...") %]</b></td>
-                </tr>
-
-                <tr id='myopac_prefs_row'>
-                    <td width='20%'>[% l("Search hits per page") %]</td>
-
-                    <td>
-                        <div style="position:absolute">
-                            <div style="position:relative;top:0px;left:55px;">
-                                <a href="#">
-                                <img alt="Search Hits Help"
-                                     src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
-                            </div>
-                        </div><select id='prefs_hits_per'
-                            style="position:relative;z-index:100;">
-                            <option value='5'>
-                                5
-                            </option>
-
-                            <option value='8'>
-                                8
-                            </option>
-
-                            <option value='10'>
-                                10
-                            </option>
-
-                            <option value='15'>
-                                15
-                            </option>
-
-                            <option value='20'>
-                                20
-                            </option>
-
-                            <option value='25'>
-                                25
-                            </option>
-
-                            <option value='50'>
-                                50
-                            </option>
-                        </select>
-                    </td>
-                </tr>
-
-                <tr>
-                    <td colspan="2"><label for="circHistStart">Keep history of
-                    checked out items?</label> <input type="checkbox"
-                           id="circHistStart" /></td>
-                </tr>
-
-                <tr class="hide_me">
-                    <td>[% l("Default Font Size") %]</td>
-
-                    <td><select id='prefs_def_font'>
-                        <option value='regular'>
-                            [% l("Regular Font") %]
-                        </option>
-
-                        <option value='large'>
-                            [% l("Large Font") %]
-                        </option>
-                    </select></td>
-                </tr>
-
-                <tr class="hide_me">
-                    <td>[% l("Default Search Location") %]</td>
-                    <td>
-                        <div style='margin-bottom: 5px;'>
-                            <input type='checkbox' id='myopac_pref_home_lib' />
-                                 [% l("Always search my home library by default.") %]
-                        </div>
-                        <select id='prefs_def_location'></select>
-                    </td>
-                </tr>
-
-                <tr class="hide_me">
-                    <td>[% l("Default Search Range") %]</td>
-
-                    <td><select id='prefs_def_range'>
-                        </select></td>
-                </tr>
-            </tbody>
-        </table><a href=
-        "http://www.kcls.org/usingthelibrary/catalog_help/library_elf.cfm"><u>Try
-        Library Elf-to manage library materials!</u></a>
-
-        -->
-
-[% END %]
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/myopac/prefs_hints.tt2 b/Open-ILS/web/templates_kcls/default/opac/parts/myopac/prefs_hints.tt2
new file mode 100644
index 0000000..bb7c642
--- /dev/null
+++ b/Open-ILS/web/templates_kcls/default/opac/parts/myopac/prefs_hints.tt2
@@ -0,0 +1,4 @@
+<a href=
+        "http://www.kcls.org/usingthelibrary/catalog_help/library_elf.cfm"><u>Try
+        Library Elf-to manage library materials!</u></a>
+

commit f3b42de8be849241c779035533068b730622331a
Author: Dan Scott <dan at coffeecode.net>
Date:   Mon May 2 08:33:54 2011 -0400

    Make refund policy for lost items a branding option
    
    Different sites will have different policies for refunds
    on lost items (and might not even provide refunds for lost
    items, for that matter), so break out that policy description
    into its own template and provide a KCLS-specific version of
    it.
    
    Signed-off-by: Dan Scott <dbs at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 03347fb..c00356f 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -304,30 +304,7 @@
                     </button>
                 </td>
             </tr>
-            <tr>
-                <td colspan="3">
-                    <br />
-                    Important! You must have a printed receipt to be
-                    eligible for a refund on lost items (regulations allow
-                    for no exceptions).
-                    <br />
-                    <strong>
-                        To ensure your necessary receipt information is
-                        not lost, enter your email address above and a
-                        receipt will be emailed to you. Otherwise, make
-                        certain you have a printed receipt in hand before
-                        closing the payment receipt screen.
-                    </strong>
-                    <br />
-                    Refunds are not available for parts and pieces, overdue
-                    fines, or items that do not display a specific title in
-                    My Account. For a full list of refundable and
-                    non-refundable items, visit
-                    <a href="http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm">http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm</a><br /><br />
-                    This site uses VeriSign SSL encryption to ensure your
-                    privacy.
-                </td>
-            </tr>
+            [% INCLUDE "default/opac/myopac/main_refund_policy.tt2" %]
         </tbody>
     </table>
 </div>
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_refund_policy.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_refund_policy.tt2
new file mode 100644
index 0000000..a1a81f9
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/main_refund_policy.tt2
@@ -0,0 +1,16 @@
+<tr>
+    <td colspan="3">
+        <br />
+        Important! You must have a printed receipt to be
+        eligible for a refund on lost items (regulations allow
+        for no exceptions).
+        <br />
+        <strong>
+            To ensure your necessary receipt information is
+            not lost, enter your email address above and a
+            receipt will be emailed to you. Otherwise, make
+            certain you have a printed receipt in hand before
+            closing the payment receipt screen.
+        </strong>
+    </td>
+</tr>
diff --git a/Open-ILS/web/templates_kcls/default/opac/myopac/main.tt2 b/Open-ILS/web/templates_kcls/default/opac/myopac/main.tt2
deleted file mode 100644
index 03347fb..0000000
--- a/Open-ILS/web/templates_kcls/default/opac/myopac/main.tt2
+++ /dev/null
@@ -1,334 +0,0 @@
-[%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/myopac/main_base.tt2";
-    myopac_page = "main";
-    myopac_main_page = "main";
-%]
-
-    [% IF ctx.fines.circulation.size > 0 %]
-    <div id='myopac_circ_trans_div'>
-        <table width='100%' class='data_grid'>
-            <thead>
-                <tr>
-                    <td colspan='10' style='padding: 6px'>
-                        <strong>[% l("Fines") %]</strong>
-                    </td>
-                </tr>
-                <tr>
-                    <td>[% l("Title") %]</td>
-                    <td>[% l("Author") %]</td>
-                    <td>[% l("Checkout Date") %]</td>
-                    <td>[% l("Due Date") %]</td>
-                    <td>[% l("Date Returned") %]</td>
-                    <td>[% l("Balance Owed") %]</td>
-                    <!-- TODO: hidden until pay-fines is implemented
-                    <td nowrap="nowrap" style="white-space:nowrap;">
-                        <input id="pay_fines_box1" checked="checked"
-                            type="checkbox" title="[% l('Click to (un)select all fines') %]" />
-                        <label for="pay_fines_box1">[% l('Pay Fines') %]</label>
-                    </td>
-                    -->
-                </tr>
-            </thead>
-            <tbody id='myopac_circ_trans_tbody'>
-                [% FOR f IN ctx.fines.circulation;
-                    attrs = {marc_xml => f.marc_xml};
-                    IF f.marc_xml;
-                        PROCESS get_marc_attrs args=attrs;
-                    ELSIF f.xact.reservation;
-                        attrs.title = f.xact.reservation.target_resource_type.name;
-                    END %]
-                <tr id='myopac_circ_trans_row'>
-                    <td>
-                        [% recid = f.xact.circulation.target_copy.call_number.record.id || f.xact.reservation.target_resource_type.record.id;
-                        IF recid; %]
-                        <a href="[% ctx.opac_root %]/record/[% recid %]">[% attrs.title %]</a>
-                        [% ELSE %]
-                        [% attrs.title %]
-                        [% END %]
-                    </td>
-                    <td>
-                        <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
-                    </td>
-                    <td name='myopac_circ_trans_start'>
-                        [% ts = f.xact.circulation.xact_start || f.xact.reservation.start_time || 0;
-                        IF ts;
-                            date.format(ctx.parse_datetime(ts), DATE_FORMAT);
-                        END %]
-                    </td>
-                    <td name='myopac_circ_trans_due'>
-                        [% ts = f.xact.circulation.due_date || f.xact.reservation.end_time || 0;
-                        IF ts;
-                            date.format(ctx.parse_datetime(ts), DATE_FORMAT);
-                        END %]
-                    </td>
-                    <td name='myopac_circ_trans_finished'>
-                        [%  ts = f.xact.circulation.checkin_time || f.xact.reservation.return_time || 0;
-                            IF ts;
-                                date.format(ctx.parse_datetime(ts), DATE_FORMAT);
-                            ELSE %]
-                            <!-- XXX TODO fines aren't really accruing
-                                if circ has hit maxfines. more clarity
-                                here? -->
-                            <span class="red">[% l('(fines accruing)') %]</span>
-                        [%  END %]
-                    </td>
-                    <td>
-                        <strong class="red">
-                            [% money(f.xact.balance_owed) %]
-                        </strong>
-                    </td>
-                    <!-- TODO: hidden until pay-fines is implemented
-                    <td>
-                        <input type="checkbox" name="selector" title="[% l('Pay this fine') %]" />
-                    </td>
-                    -->
-                </tr>
-                [% END %]
-            </tbody>
-        </table>
-    </div>
-    [% END %]
-
-    [% IF ctx.fines.grocery.size > 0 %]
-    <!-- Table for all non-circulation transactions -->
-    <div id='myopac_trans_div'>
-        <br/>
-        <hr class='opac-auto-013'  color="#dcdbdb" />
-        <br/>
-        <table width='100%' class='data_grid data_grid_center'
-            id='myopac_trans_table'>
-            <thead>
-                <tr>
-                    <td colspan='8' style='padding: 6px'>
-                        <b>[% l("Other Fees") %]</b>
-                    </td>
-                </tr>
-                <tr>
-                    <td width='16%'>[% l("Transaction Start Time") %]</td>
-                    <td width='16%'>[% l("Last Payment Time") %]</td>
-                    <td width='16%'>[% l("Initial Amount Owed") %]</td>
-                    <td width='16%'>[% l("Total Amount Paid") %]</td>
-                    <td width='16%'>[% l("Balance Owed") %]</td>
-                    <td width='16%'>[% l("Billing Type") %]</td>
-                    <!-- TODO: hidden until pay-fines is implemented
-                    <td width='4%' align="center" nowrap="nowrap"
-                        style="white-space:nowrap;">
-                        <input id="pay_fines_box2" checked="checked"
-                            type="checkbox"
-                            title="[% l('Click to (un)select all fines') %]" />
-                        <label for="pay_fines_box2">[% l("Pay Fines") %]</label>
-                    </td>
-                    -->
-                </tr>
-            </thead>
-            <tbody id='myopac_trans_tbody'>
-                [% FOR f IN ctx.fines.grocery %]
-                <tr id='myopac_trans_row'>
-                    <td>[% date.format(
-                            ctx.parse_datetime(f.xact.xact_start),
-                            DATE_FORMAT
-                    ) %]</td>
-                    <td>
-                        [%  IF f.xact.last_payment_ts;
-                                date.format(
-                                    ctx.parse_datetime(
-                                        f.xact.last_payment_ts
-                                    ), DATE_FORMAT
-                                );
-                            END %]
-                    </td>
-                    <td>[% money(f.xact.total_owed) %]</td>
-                    <td>[% money(f.xact.total_paid) %]</td>
-                    <td class="red">
-                        <strong>
-                            [% money(f.xact.balance_owed) %]
-                        </strong>
-                    </td>
-                    <td>[% f.xact.last_billing_type %]</td>
-                    <!-- TODO: hidden until pay-fines is implemented
-                    <td>
-                        <input type="checkbox" name='selector' title='[% l("Pay this fine") %]'/>
-                    </td>
-                    -->
-                </tr>
-                [% END %]
-            </tbody>
-        </table>
-    </div>
-    [% END %]
-
-<!-- TODO: move payment form to its own page -->
-
-<div id="pay_fines_now" class="hide_me">
-    <table id='oils-selfck-cc-payment-table'>
-        <tbody>
-            <tr>
-                <td><div style="width:129px;"></div></td>
-                <td><div style="width:195px;"></div></td>
-                <td><div style="width:324px;"></div></td>
-            </tr>
-            <tr>
-                <td colspan='2'><strong>Billing Information</strong></td>
-                <td rowspan='13' valign='top'>
-                    Selected fines you are paying for:
-                    <table cellpadding="0" cellspacing="5" border="0">
-                        <thead>
-                            <tr>
-                                <td>
-                                    <strong>Name</strong>
-                                </td>
-                                <td>
-                                    <strong>Amount</strong>
-                                </td>
-                            </tr>
-                        </thead>
-                        <tbody id="selectedFines">
-                        </tbody>
-                    </table>
-                    <br />
-                    <div id='oils-selfck-cc-payment-summary'>
-                        Total amount to pay:
-                        <strong>$<span></span></strong>
-                    </div>
-                    <br />
-                    Click <strong>Cancel</strong> to go back and (un)select
-                    other fines.
-                </td>
-            </tr>
-            <tr>
-                <td>First Name</td>
-                <td><input jsId='oilsSelfckCCFName' /></td>
-            </tr>
-            <tr>
-                <td>Last Name</td>
-                <td><input jsId='oilsSelfckCCLName' /></td>
-            </tr>
-            <tr>
-                <td>Street Address</td>
-                <td><input jsId='oilsSelfckCCStreet' /></td>
-            </tr>
-            <tr>
-                <td>City</td>
-                <td><input jsId='oilsSelfckCCCity' /></td>
-            </tr>
-            <tr>
-                <td>State or Province</td>
-                <td><input jsId='oilsSelfckCCState' /></td>
-            </tr>
-            <tr>
-                <td>ZIP or Postal Code</td>
-                <td><input jsId='oilsSelfckCCZip' /></td>
-            </tr>
-            <tr>
-              <td colspan='2'><strong>Credit Card Information</strong></td>
-            </tr>
-            <!-- Technically not needed since card type is derived from the CC number
-            <tr>
-                <td>Type of Card</td>
-                <td>
-                    <select jsId='oilsSelfckCCType' required='true'>
-                        <option value='VISA'>VISA</option>
-                        <option value='MasterCard'>MasterCard</option>
-                        <option value='American Express'>American Express</option>
-                    </select>
-                </td>
-            </tr>
-            -->
-            <tr>
-                <td>Credit Card #</td>
-                <td><input jsId='oilsSelfckCCNumber' /></td>
-            </tr>
-            <tr>
-                <td>
-                    <div style="position:absolute;">
-                        <div style="position:relative;left:80px;">
-                            <a href="#"><img
-                                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
-                        </div>
-                    </div>
-                    Security Code
-                </td>
-                <td>
-                    <input jsId='oilsSelfckCCCVV' />
-                </td>
-            </tr>
-            <tr>
-                <td>Exipration Month</td>
-                <td>
-                    <select jsId='oilsSelfckCCMonth'>
-                        <option value='01' selected='selected'>January</option>
-                        <option value='02'>February</option>
-                        <option value='03'>March</option>
-                        <option value='04'>April</option>
-                        <option value='05'>May</option>
-                        <option value='06'>June</option>
-                        <option value='07'>July</option>
-                        <option value='08'>August</option>
-                        <option value='09'>September</option>
-                        <option value='10'>October</option>
-                        <option value='11'>November</option>
-                        <option value='12'>December</option>
-                    </select>
-                </td>
-            </tr>
-            <tr>
-                <td>Expiration Year</td>
-                <td>
-                  <select jsId='oilsSelfckCCYear'>
-                    <option value='2011'>2011</option>
-                    <option value='2012'>2012</option>
-                    <option value='2013'>2013</option>
-                    <option value='2014'>2014</option>
-                    <option value='2015'>2015</option>
-                    <option value='2016'>2016</option>
-                    <option value='2017'>2017</option>
-                    <option value='2018'>2018</option>
-                    <option value='2019'>2019</option>
-                  </select>
-                </td>
-            </tr>
-            <tr class="hide_me">
-                <td>Edit Billing Address</td>
-                <td>
-                    <input jsId='oilsSelfckEditDetails'/>
-                </td>
-            </tr>
-            <tr>
-                <td colspan='2' align="center">
-                    <button jsId='oilsSelfckCCSubmit'>
-                        Submit Payment
-                    </button>
-                    <button>
-                        Cancel
-                    </button>
-                </td>
-            </tr>
-            <tr>
-                <td colspan="3">
-                    <br />
-                    Important! You must have a printed receipt to be
-                    eligible for a refund on lost items (regulations allow
-                    for no exceptions).
-                    <br />
-                    <strong>
-                        To ensure your necessary receipt information is
-                        not lost, enter your email address above and a
-                        receipt will be emailed to you. Otherwise, make
-                        certain you have a printed receipt in hand before
-                        closing the payment receipt screen.
-                    </strong>
-                    <br />
-                    Refunds are not available for parts and pieces, overdue
-                    fines, or items that do not display a specific title in
-                    My Account. For a full list of refundable and
-                    non-refundable items, visit
-                    <a href="http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm">http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm</a><br /><br />
-                    This site uses VeriSign SSL encryption to ensure your
-                    privacy.
-                </td>
-            </tr>
-        </tbody>
-    </table>
-</div>
-[% END %]
diff --git a/Open-ILS/web/templates_kcls/default/opac/myopac/main_refund_policy.tt2 b/Open-ILS/web/templates_kcls/default/opac/myopac/main_refund_policy.tt2
new file mode 100644
index 0000000..9ad8bc0
--- /dev/null
+++ b/Open-ILS/web/templates_kcls/default/opac/myopac/main_refund_policy.tt2
@@ -0,0 +1,24 @@
+<tr>
+    <td colspan="3">
+        <br />
+        Important! You must have a printed receipt to be
+        eligible for a refund on lost items (regulations allow
+        for no exceptions).
+        <br />
+        <strong>
+            To ensure your necessary receipt information is
+            not lost, enter your email address above and a
+            receipt will be emailed to you. Otherwise, make
+            certain you have a printed receipt in hand before
+            closing the payment receipt screen.
+        </strong>
+        <br />
+        Refunds are not available for parts and pieces, overdue
+        fines, or items that do not display a specific title in
+        My Account. For a full list of refundable and
+        non-refundable items, visit
+        <a href="http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm">http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm</a><br /><br />
+        This site uses VeriSign SSL encryption to ensure your
+        privacy.
+    </td>
+</tr>

commit 50b8a947a14882e4693c006e9d1cbe5dd5aca81a
Author: Dan Scott <dan at coffeecode.net>
Date:   Mon May 2 08:23:34 2011 -0400

    Debrand lowhits purchase request reference to KCLS
    
    While we break this out to a separate template, perhaps we
    could pull the library name from context instead of having
    it hardcoded. It will probably depend on each instance, ergo
    hardcoding the generic "your library" for now should be fine.
    
    Signed-off-by: Dan Scott <dbs at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2 b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
index 37e3af6..c66b114 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
@@ -19,12 +19,7 @@
             </table>
         </div>
         <div style="float:right;width:353px;background:#ccc;padding:10px;margin-top:7px;">
-            <p>
-                <strong>Still not finding what you are looking for?</strong><br />
-                Request that KCLS purchase the material you are looking for by making a
-                <a href="javascript:;">Purchase Request</a><br />
-                <strong>Note:</strong> You must be logged in to make a Purchase Request<br />
-            </p>
+            [% INCLUDE "default/opac/parts/result/lowhits_purchase.tt2" %]
             <p>
                 <strong>Keyword Search Tips</strong><br />
                 Change to <strong>Advanced Keyword Search.</strong>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/lowhits_purchase.tt2 b/Open-ILS/web/templates/default/opac/parts/result/lowhits_purchase.tt2
new file mode 100644
index 0000000..263269a
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/result/lowhits_purchase.tt2
@@ -0,0 +1,6 @@
+<p>
+    <strong>Still not finding what you are looking for?</strong><br />
+    Request that your library purchase the material you are looking for by making a
+    <a href="javascript:;">Purchase Request</a><br />
+    <strong>Note:</strong> You must be logged in to make a Purchase Request<br />
+</p>
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/result/lowhits_purchase.tt2 b/Open-ILS/web/templates_kcls/default/opac/parts/result/lowhits_purchase.tt2
new file mode 100644
index 0000000..a41f658
--- /dev/null
+++ b/Open-ILS/web/templates_kcls/default/opac/parts/result/lowhits_purchase.tt2
@@ -0,0 +1,6 @@
+<p>
+    <strong>Still not finding what you are looking for?</strong><br />
+    Request that KCLS purchase the material you are looking for by making a
+    <a href="javascript:;">Purchase Request</a><br />
+    <strong>Note:</strong> You must be logged in to make a Purchase Request<br />
+</p>

commit a34bd6c164a40cff6c2a85397713fdbe38c0399e
Merge: 1184851 c4da3fe
Author: Dan Scott <dan at coffeecode.net>
Date:   Mon May 2 07:37:48 2011 -0400

    Merge branch 'opac-tt-poc' into dbs/tt-opac-debrand
    
    Conflicts:
    	Open-ILS/web/templates/default/opac/parts/result/table.tt2


commit c4da3fe71817a2a8d02dfbd9b8f192d5fab2aa14
Merge: c8a24da c0005a6
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sun May 1 23:40:04 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit c8a24da4bcf1fc18312b347b6640876c04443e17
Merge: bcf9efb 3aa4743
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sun May 1 23:40:03 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 1184851a7cd793a242a6f94851735117d6153c29
Author: Dan Scott <dan at coffeecode.net>
Date:   Sun May 1 22:06:50 2011 -0400

    Pull call number from XML holdings, not MARC record
    
    KCLS uses call numbers in the MARC record, but most other sites
    use the call numbers from asset.call_number. For now, just display
    the first returned call number; eventually the display will probably
    need to be adjusted to handle call number / shelving location / library
    / status like the current AjaxPAC does.
    
    Also note that ##URI## call numbers should be filtered out but are
    not yet.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index 3e6b175..0e7cd2c 100644
--- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -26,11 +26,11 @@
         # clean up the ISBN
         args.isbn_clean = args.isbn.replace('\ .*', '');
 
-        args.holdsing = [];
+        args.holdings = [];
         FOR holding IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
-            args.holdings.push({
-                # TODO
-            });
+            args.holdings.push(
+                holding.getAttribute('label')
+            );
         END;
 
         # Extract the copy count summary
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 3ce5ffa..8110fcf 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -104,31 +104,32 @@
                                                     <table cellpadding="0" cellspacing="0" border="0"
                                                         class="results_info_table">
                                                         <tr name='bib_cn_list' class='result_table_title_cell'>
-                                                            <td colspan='2'>
-                                                                <strong>Call number:</strong>[% args.marc_cn %][%# XXX KCLS %]
+                                                            <td valign='top'>
+                                                                <strong>[% l('Call number:') %]</strong>
                                                             </td>
+                                                            <td>[% args.holdings.0 %]</td>
                                                         </tr>
                                                         <tr name="results_pub_tr" class="[% attrs.publisher ? '' : 'hide_me' %]">
                                                             <td valign="top">
-                                                                <strong>Publisher:</strong>
+                                                                <strong>[% l('Publisher:') %]</strong>
                                                             </td>
                                                             <td>[% attrs.publisher; %]</td>
                                                         </tr>
                                                         <tr name="results_isbn_tr" class="[% attrs.isbn ? '' : 'hide_me' %]">
                                                             <td valign="top">
-                                                                <strong>ISBN:</strong>
+                                                                <strong>[% l('ISBN:') %]</strong>
                                                             </td>
                                                             <td>[% attrs.isbn %]</td>
                                                         </tr>
                                                         <tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
                                                             <td valign="top">
-                                                                <strong>Edition:</strong>
+                                                                <strong>[% l('Edition:') %]</strong>
                                                             </td>
                                                             <td>[% attrs.edition %]</td>
                                                         </tr>
                                                         <tr name="results_phys_desc_tr" class="[% attrs.phys_desc ? '' : 'hide_me' %]">
                                                             <td nowrap="nowrap" valign="top">
-                                                                <strong>Phys. Desc.:</strong>
+                                                                <strong>[% l('Phys. Desc.:') %]</strong>
                                                             </td>
                                                             <td>
                                                                 [% args.phys_desc %]
@@ -161,11 +162,8 @@
                                                 <img title="[% attrs.format_label %]" alt="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
                                                 [% END %]
 
-                                                <!-- Empty span used for creating unAPI links -->
                                                 <span class="hide_me">
-                                                    <abbr style='padding-left: 8px;' name="unapi" class="unapi-id">
-                                                    <!-- unAPI URI goes here -->
-                                                    </abbr>
+                                                    <abbr class="unapi-id">&nbsp;</abbr>
                                                 </span>
 
                                                 <!-- Empty span used for creating Google Book Search-->

commit 37c1a6bb8147b47df5a82c37a174cb6fdf80fb79
Author: Dan Scott <dan at coffeecode.net>
Date:   Sun May 1 21:25:38 2011 -0400

    Debrand the login form
    
    Breaking the password hint and login help sections out into
    separate templates enables sites to adjust the hint and
    login help links without touching the rest of the interface.
    
    Signed-off-by: Dan Scott <dbs at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/login/form.tt2 b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
index c0624ae..b30d47f 100644
--- a/Open-ILS/web/templates/default/opac/parts/login/form.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
@@ -116,11 +116,7 @@
                         <tr>
                             <td valign="top" class="lbl1">
                                 [% l('PIN Number or Password') %]<br />
-                                <span class="lbl2">
-                                    [% | l('<br/>', '<br/>') %]
-                                       If this is your first time logging in, please enter [_1] the last 4 digits of your phone number. [_2] Example: 0926
-                                    [% END %]
-                                </span>
+                                [% INCLUDE "default/opac/parts/login/password_hint.tt2" %]
                             </td>
                             <td valign="top">
                                 <div class="input_bg">
@@ -152,18 +148,7 @@
                     <br /><br />
                 </td>
 	            <td><div style="width:10px;"></div></td>
-                <td class="login_boxes right_brain" align="center" valign="top" width="291">
-
-                    <a href="http://www.kcls.org/about/contact/"><img 
-                        src="[% ctx.media_prefix %]/images/questions.png" alt="[% l('Questions?') %]" style="margin-top:29px;" /></a>
-
-	                <div style="width:182px;color:black;padding:5px 25px;">
-                        [% l('Visit our FAQs section for answers to common questions about how to use your account.') %]
-	                </div>
-
-                    <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm#FAQs"><img
-                        alt="[% l('FAQs') %]" src="[% ctx.media_prefix %]/images/faqs-btn.png" style="margin-top:13px;" /></a>
-	            </td>
+                [% INCLUDE "default/opac/parts/login/help.tt2" %]
             </tr>
         </table>
     </form>
diff --git a/Open-ILS/web/templates/default/opac/parts/login/help.tt2 b/Open-ILS/web/templates/default/opac/parts/login/help.tt2
new file mode 100644
index 0000000..16db31f
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/login/help.tt2
@@ -0,0 +1,12 @@
+<td class="login_boxes right_brain" align="center" valign="top" width="291">
+
+    <a href="http://example.com"><img 
+        src="[% ctx.media_prefix %]/images/questions.png" alt="[% l('Questions?') %]" style="margin-top:29px;" /></a>
+
+    <div style="width:182px;color:black;padding:5px 25px;">
+        [% l('Visit our FAQs section for answers to common questions about how to use your account.') %]
+    </div>
+
+    <a href="http://example.com"><img
+        alt="[% l('FAQs') %]" src="[% ctx.media_prefix %]/images/faqs-btn.png" style="margin-top:13px;" /></a>
+</td>
diff --git a/Open-ILS/web/templates/default/opac/parts/login/password_hint.tt2 b/Open-ILS/web/templates/default/opac/parts/login/password_hint.tt2
new file mode 100644
index 0000000..a95b47f
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/login/password_hint.tt2
@@ -0,0 +1,5 @@
+<span class="lbl2">
+    [% | l('<br/>', '<br/>') %]
+       If this is your first time logging in, please enter [_1] the last 4 digits of your phone number. [_2] Example: 0926
+    [% END %]
+</span>
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/login/form.tt2 b/Open-ILS/web/templates_kcls/default/opac/parts/login/form.tt2
deleted file mode 100644
index c0624ae..0000000
--- a/Open-ILS/web/templates_kcls/default/opac/parts/login/form.tt2
+++ /dev/null
@@ -1,171 +0,0 @@
-<!-- TODO: MOVE INTO SEPARATE FORGOT-PASSWORD PAGE 
-
-<div class="hide_me">
-	<div class='login_text color_1' style='padding: 4px; text-align: center;'>
-		<span>[% l("Login") %]</span>
-	</div>
-	<br/>
-</div>
-<div class="hide_me" id="forget_pw">
-    <h1>Password Reset</h1>
-	Username or Barcode<br />
-	<input type="text" id="forget_pw_user" /><br /><br />
-	Email Address on account<br />
-	<input type="text" id="forget_pw_email" /><br />
-    <a href="#">Submit</a> &nbsp;
-    <a href="#">Cancel</a>
-</div>
-<table id='change_pw_table' class='data_grid hide_me' style='margin-left: 20px;' width='95%'>
-	<thead>
-        <tr><td colspan='2' align='center'><b>[% l("Password") %]</b></td></tr>
-    </thead>
-    <tbody>
-        <tr>
-            <td colspan='2' style='padding:10px;'>
-                [% l("This appears to be the first time you have logged in.  You will need to change your password.") %]
-                [% l("The password must be at least 7 characters in length,
- contain at least one letter (a-z/A-Z),
- and contain at least one number.") %]
-            </td>
-        </tr>
-        <tr>
-            <td>[% l("Enter your current password") %]</td>
-            <td><input type='password' id='change_pw_current'/></td>
-        </tr>
-        <tr>
-            <td>[% l("Enter the new password") %]</td>
-            <td><input type='password' id='change_pw_1'/></td>
-        </tr>
-        <tr>
-            <td>[% l("Re-type the new password for verification") %]</td>
-            <td><input type='password' id='change_pw_2'/></td>
-        </tr>
-        <tr><td><br/></td><td/></tr>
-        <tr class='color_1'>
-            <td colspan='2' align='center'>
-                <span class='login_text' style='margin-right: 20px;'>
-                    <input type='submit' value='[% l("Update Password") %]'  id='change_pw_button'/>
-                </span>
-            </td>
-        </tr>
-    </tbody>
-</table>
-
-
-<span id='pw_no_match' class='hide_me'>[% l("Passwords do not match") %]</span>
-<span id='pw_update_successful' class='hide_me'>[% l("Password successfully updated") %]</span>
-<span id='pw_not_strong' class='hide_me'>
-    [% l("The password provided is not strong enough.") %]
-    [% l("The password must be at least 7 characters in length, contain at least one letter (a-z/A-Z), and contain at least one number.") %]
-</span>
-
- ^== TODO: MOVE INTO SEPARATE FORGOT-PASSWORD PAGE  -->
-
-[% IF ctx.login_failed_event %]
-<div id='login-failed-message'>
-[%
-    IF ctx.login_failed_event.textcode == 'PATRON_CARD_INACTIVE';
-        l("The barcode used to login is marked as inactive.  Please contact your local library.");
-    ELSIF ctx.login_failed_event.textcode == 'PATRON_INACTIVE';
-        l("This account has been deactivated.  Please contact your local library.");
-    ELSE;
-        l("Login failed. The username or password provided was not valid.  
-            Ensure Caps-Lock is off and try again or contact your local library.");
-    END;
-%]
-</div>
-[% END %]
-
-<div>
-    <div style="height:20px;"></div>
-    <form method='POST'>
-        <table cellpadding="0" cellspacing="0" border="0">
-            <tr>
-                <td valign="top" width="676" class="login_boxes left_brain">
-                    <table cellpadding="0" cellspacing="0" border="0"
-                        width="100%">
-                        <tr>
-	                        <td colspan="2" style="padding-bottom: 10px;">
-                                <h1>[% l('Log in to Your Account') %]</h1>
-                                [% l('Please enter the following information:') %]
-                                <br /><br />
-                            </td>
-                        </tr>
-                        <tr>
-                            <td width="42%" class="lbl1">
-                                [% l('Library Card Number or Username') %]
-                                <br />
-                                <span class="lbl2">
-                                    [% l('Please include leading zeros and no spaces.') %]
-                                    <br/>
-                                    [% l('Example: 0026626051') %]
-                                </span>
-                                <br /><br />
-                            </td>
-                            <td width="58%" valign="top">
-                                <div class="input_bg">
-                                    <input type="text" id="username_field" name="username"/>
-                                </div>
-                            </td>
-                        </tr>
-                        <tr>
-                            <td colspan="2">
-                                <div style="height:15px;"></div>
-                            </td>
-                        </tr>
-                        <tr>
-                            <td valign="top" class="lbl1">
-                                [% l('PIN Number or Password') %]<br />
-                                <span class="lbl2">
-                                    [% | l('<br/>', '<br/>') %]
-                                       If this is your first time logging in, please enter [_1] the last 4 digits of your phone number. [_2] Example: 0926
-                                    [% END %]
-                                </span>
-                            </td>
-                            <td valign="top">
-                                <div class="input_bg">
-                                    <input name="password" type="password" />
-                                </div>
-                                <div style="padding-top:7px;">
-                                    [%
-                                        # If no redirect is offered or it's leading us back to the 
-                                        # login form, redirect the user to My Account
-                                        redirect = CGI.param('redirect_to') || ctx.referer;
-                                        IF !redirect OR redirect.match(ctx.path_info _ '$');
-                                            redirect = CGI.url('-full' => 1) _ '/opac/myopac/main';
-                                        END;
-                                        redirect = redirect  | replace('^http:', 'https:');
-                                    %]
-                                    <input type='hidden' name='redirect_to' value='[% redirect %]'/>
-                                    <input type="checkbox" name="persist" /> [% l('Remember Me?') %]
-                                </div>
-                                <div style="padding-top:14px;">
-                                    <input type='image' alt="[% l('Log in') %]" src="[% ctx.media_prefix %]/images/login-btn2.png" />
-                                    <!-- TODO
-                                    <a href="reset_password"
-                                        style="position:relative;top:-13px;left:2px;font-size:10px;">Forgot your PIN?</a>
-                                    -->
-                                </div>
-	                        </td>
-                        </tr>
-                    </table>
-                    <br /><br />
-                </td>
-	            <td><div style="width:10px;"></div></td>
-                <td class="login_boxes right_brain" align="center" valign="top" width="291">
-
-                    <a href="http://www.kcls.org/about/contact/"><img 
-                        src="[% ctx.media_prefix %]/images/questions.png" alt="[% l('Questions?') %]" style="margin-top:29px;" /></a>
-
-	                <div style="width:182px;color:black;padding:5px 25px;">
-                        [% l('Visit our FAQs section for answers to common questions about how to use your account.') %]
-	                </div>
-
-                    <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm#FAQs"><img
-                        alt="[% l('FAQs') %]" src="[% ctx.media_prefix %]/images/faqs-btn.png" style="margin-top:13px;" /></a>
-	            </td>
-            </tr>
-        </table>
-    </form>
-    <div class="clear-both"></div>
-</div>
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/login/help.tt2 b/Open-ILS/web/templates_kcls/default/opac/parts/login/help.tt2
new file mode 100644
index 0000000..a6d7ebb
--- /dev/null
+++ b/Open-ILS/web/templates_kcls/default/opac/parts/login/help.tt2
@@ -0,0 +1,12 @@
+<td class="login_boxes right_brain" align="center" valign="top" width="291">
+
+    <a href="http://www.kcls.org/about/contact/"><img 
+        src="[% ctx.media_prefix %]/images/questions.png" alt="[% l('Questions?') %]" style="margin-top:29px;" /></a>
+
+    <div style="width:182px;color:black;padding:5px 25px;">
+        [% l('Visit our FAQs section for answers to common questions about how to use your account.') %]
+    </div>
+
+    <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm#FAQs"><img
+        alt="[% l('FAQs') %]" src="[% ctx.media_prefix %]/images/faqs-btn.png" style="margin-top:13px;" /></a>
+</td>

commit b6d2dab531f807f4a5d503eaeb37ba39e109677b
Author: Dan Scott <dan at coffeecode.net>
Date:   Sun May 1 19:02:27 2011 -0400

    Debrand the OPAC footer, home page, and topnav links
    
    Restore the copyright message and Powered by Evergreen logo
    in the footer, and provide obvious example links instead of
    the KCLS-specific links.
    
    Also, replace the KCLS home page with the main Evergreen logo.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/footer.tt2 b/Open-ILS/web/templates/default/opac/parts/footer.tt2
index 9ab3ace..f822e4e 100644
--- a/Open-ILS/web/templates/default/opac/parts/footer.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/footer.tt2
@@ -1,10 +1,21 @@
 <div id="footer">
-    <a href="http://www.kcls.org/usingthelibrary/request/">[% l('Request a Purchase') %]</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/usingthelibrary/request/">[% l('Interlibrary Loan') %]</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/about/contact/">[% l('Contact Us') %]</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/usingthelibrary/catalog_help/">[% l('Site Help') %]</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/usingthelibrary/policies/privacy.cfm">[% l('Privacy Statement') %]</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/about/support/">[% l('Support KCLS') %]</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/employment/">[% l('Employment') %]</a> 
+    <a href="http://example.com">[% l('Bottom Link 1') %]</a> &nbsp;|&nbsp;
+    <a href="http://example.com">[% l('Bottom Link 2') %]</a> &nbsp;|&nbsp;
+    <a href="http://example.com">[% l('Bottom Link 3') %]</a> &nbsp;|&nbsp;
+    <a href="http://example.com">[% l('Bottom Link 4') %]</a> &nbsp;|&nbsp;
+    <a href="http://example.com">[% l('Bottom Link 5') %]</a>
+
+    <div id="copyright_text" style="margin-top: 2em;">
+        [% l('Copyright &copy; 2006-2011 Georgia Public Library Service, and others') %]
+    </div>
+    <div id="footer_logo">
+        [% l('Powered by') %]
+        <a href="http://evergreen-ils.org">
+            <img src="[% ctx.media_prefix %]/opac/images/eg_tiny_logo.jpg"
+                style="border:none; width: 94px; height: 16px;"
+                alt="[% l('Evergreen') %]
+            />
+        </a>
+    </div>
 </div>
 
diff --git a/Open-ILS/web/templates/default/opac/parts/homesearch.tt2 b/Open-ILS/web/templates/default/opac/parts/homesearch.tt2
index 2021f16..e5104b6 100644
--- a/Open-ILS/web/templates/default/opac/parts/homesearch.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/homesearch.tt2
@@ -1,64 +1,3 @@
 <div style='width:664px;height:35px;background:#FFFFFF;'>
-    <strong><center></center></strong>
-</div>
-<div id='hp-banner'>
-    <a href='http://www.kcls.org/newcatalog/'><img
-        src='[% ctx.media_prefix %]/images/golive.jpg'
-        alt='new catalog' title='New Catalog Information' /></a>
-</div>
-<div id='hp-buttons'>
-    <div class="float-left">
-        <img src='[% ctx.media_prefix %]/images/hp-links-left.jpg' />
-    </div>
-    <div class="float-left">
-	    <div id='homesearch_thing'>
-	        <table cellpadding='0' cellspacing='5' border='0' id='hp-ql-table'>
-                <tr>
-                    <td colspan='4'>
-                        <span class="opac-auto-029">
-                            [% l("Browse for") %]:
-                        </span>
-                    </td>
-                </tr>
-                <tr>
-                    <td>
-                        <a href='http://www.kcls.org/booksandreading/'>books</a>
-                    </td>
-                    <td>
-                        <a href='http://www.kcls.org/movies/movies_browse.cfm'>movies</a>
-                    </td>
-                    <td>
-                        <a href='http://www.kcls.org/ecollection/'>downloads</a>
-                    </td>
-                    <td>
-                        <a href='http://www.kcls.org/websites/'>websites</a>
-                    </td>
-                </tr>
-                <tr>
-                    <td>
-                        <a href='http://www.kcls.org/music/'>music</a>
-                    </td>
-                    <td>
-                        <a href='http://www.kcls.org/databases/subject_categories.cfm#17'>magazines</a>
-                    </td>
-                    <td>
-                        <a href='http://www.kcls.org/databases/'>databases</a>
-                    </td>
-                    <td>
-                        <a href='http://www.kcls.org/answers/'>answers</a>
-                    </td>
-                </tr>
-	        </table>
-	    </div>
-	    <div id='hp-ql-bottom'>
-            <a href='http://www.kcls.org/locations'>Locations:
-                Find a Library Near You!
-                <img src='[% ctx.media_prefix %]/images/arrow-right.png' /></a>
-
-	    </div>
-    </div>
-    <div class="float-left">
-        <img src='[% ctx.media_prefix %]/images/hp-links-right.jpg' />
-    </div>
-    <div class="clear-both"></div>
+    <strong><center><img src="[% ctx.media_prefix %]/opac/images/main_logo.jpg" /></center></strong>
 </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav_links.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav_links.tt2
index 2a8c9b0..e6f4169 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav_links.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav_links.tt2
@@ -1,11 +1,11 @@
 <div id="gold-links-holder">
     <div id="gold-links">
         <div id="header-links">
-            <a href="http://example.com">Link 1</a>
-            <a href="http://example.com">Link 2</a>
-            <a href="http://example.com">Link 3</a>
-            <a href="http://example.com">Link 4</a>
-            <a href="http://example.com">Link 5</a>
+            <a href="http://example.com">[% l('Link 1') %]</a>
+            <a href="http://example.com">[% l('Link 2') %]</a>
+            <a href="http://example.com">[% l('Link 3') %]</a>
+            <a href="http://example.com">[% l('Link 4') %]</a>
+            <a href="http://example.com">[% l('Link 5') %]</a>
         </div>
     </div>
 </div>

commit e368f3acde6c968d31e9b166f5c8193371a2f4f4
Author: Dan Scott <dan at coffeecode.net>
Date:   Sun May 1 16:57:01 2011 -0400

    Create a templates_kcls to hold KCLS branding of TT OPAC
    
    The debranding of the TT OPAC begins with the top navigation.
      * Replace the KCLS logo with the Evergreen logo (even though
        white background on black doesn't look great, it's something)
      * Replace the KCLS specific top links with example links.
      * Split the logo and the links sections out into separate
        templates so that we can maximize commonality of the
        topnav.tt2 template.
    
    For now, all files containing the string 'kcls' have been
    copied into the templates_kcls directory. As we move through
    the templates, we may refactor them in similar to how we just
    refactored topnav.tt2.
    
    Signed-off-by: Dan Scott <dbs at coffeecode.net>

diff --git a/Open-ILS/web/templates/default/opac/parts/printnav.tt2 b/Open-ILS/web/templates/default/opac/parts/printnav.tt2
index 13a8f66..580c0d6 100644
--- a/Open-ILS/web/templates/default/opac/parts/printnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/printnav.tt2
@@ -12,7 +12,7 @@
                 <a href="javascript:window.print();"
                     id="util_print_btn"><img alt="[% l('Print Page') %]"
                     src="[% ctx.media_prefix %]/images/tool_print.png" /></a>
-                <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm"
+                <a href="http://open-ils.org/dokuwiki/doku.php?id=evergreen-user:opac_help"
                     id="util_help_btn"><img alt="[% l('Help') %]"
                     src="[% ctx.media_prefix %]/images/tool_help.png" /></a>
                 <a href="javascript:history.go(+1)"
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
index ab467c8..5c01e7e 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@ -1,8 +1,7 @@
 [% IF !ctx.is_staff %]
 <div id="header">
     <div class="float-left">
-        <a href="http://www.kcls.org"><img alt="[% l('KCLS Logo') %]" 
-            src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /></a>
+        [% INCLUDE "default/opac/parts/topnav_logo.tt2" %]
     </div>
     <div class="float-right">
         [% IF !ctx.user %]
@@ -104,16 +103,4 @@
     <div class="common-no-pad"></div>
 </div>
 [% END %]
-<div id="gold-links-holder">
-    <div id="gold-links">
-        <div id="header-links">
-            <a href="http://www.kcls.org/usingthelibrary/index.cfm">Using the Library</a>
-            <a href="http://www.kcls.org/booksandreading/">Books &amp; Reading</a>
-            <a href="http://www.kcls.org/research/index.cfm">Research &amp; Homework</a>
-            <a href="http://www.kcls.org/programs/">Programs &amp; Classes</a>
-            <a href="http://www.kcls.org/events/">Events</a>
-            <a href="/opac/extras/mobile/">Mobile Catalog</a>
-            <a href="http://www.kcls.org/about/">About KCLS</a>
-        </div>
-    </div>
-</div>
+[% INCLUDE "default/opac/parts/topnav_links.tt2" %]
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav_links.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav_links.tt2
new file mode 100644
index 0000000..2a8c9b0
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/topnav_links.tt2
@@ -0,0 +1,11 @@
+<div id="gold-links-holder">
+    <div id="gold-links">
+        <div id="header-links">
+            <a href="http://example.com">Link 1</a>
+            <a href="http://example.com">Link 2</a>
+            <a href="http://example.com">Link 3</a>
+            <a href="http://example.com">Link 4</a>
+            <a href="http://example.com">Link 5</a>
+        </div>
+    </div>
+</div>
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav_logo.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav_logo.tt2
new file mode 100644
index 0000000..7e479f9
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/topnav_logo.tt2
@@ -0,0 +1,2 @@
+        <a href="http://evergreen-ils.org"><img alt="[% l('Evergreen Logo') %]" 
+            src="[% ctx.media_prefix %]/opac/images/small_logo.jpg" /></a>
diff --git a/Open-ILS/web/templates_kcls/default/opac/myopac/main.tt2 b/Open-ILS/web/templates_kcls/default/opac/myopac/main.tt2
new file mode 100644
index 0000000..03347fb
--- /dev/null
+++ b/Open-ILS/web/templates_kcls/default/opac/myopac/main.tt2
@@ -0,0 +1,334 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
+    WRAPPER "default/opac/parts/myopac/main_base.tt2";
+    myopac_page = "main";
+    myopac_main_page = "main";
+%]
+
+    [% IF ctx.fines.circulation.size > 0 %]
+    <div id='myopac_circ_trans_div'>
+        <table width='100%' class='data_grid'>
+            <thead>
+                <tr>
+                    <td colspan='10' style='padding: 6px'>
+                        <strong>[% l("Fines") %]</strong>
+                    </td>
+                </tr>
+                <tr>
+                    <td>[% l("Title") %]</td>
+                    <td>[% l("Author") %]</td>
+                    <td>[% l("Checkout Date") %]</td>
+                    <td>[% l("Due Date") %]</td>
+                    <td>[% l("Date Returned") %]</td>
+                    <td>[% l("Balance Owed") %]</td>
+                    <!-- TODO: hidden until pay-fines is implemented
+                    <td nowrap="nowrap" style="white-space:nowrap;">
+                        <input id="pay_fines_box1" checked="checked"
+                            type="checkbox" title="[% l('Click to (un)select all fines') %]" />
+                        <label for="pay_fines_box1">[% l('Pay Fines') %]</label>
+                    </td>
+                    -->
+                </tr>
+            </thead>
+            <tbody id='myopac_circ_trans_tbody'>
+                [% FOR f IN ctx.fines.circulation;
+                    attrs = {marc_xml => f.marc_xml};
+                    IF f.marc_xml;
+                        PROCESS get_marc_attrs args=attrs;
+                    ELSIF f.xact.reservation;
+                        attrs.title = f.xact.reservation.target_resource_type.name;
+                    END %]
+                <tr id='myopac_circ_trans_row'>
+                    <td>
+                        [% recid = f.xact.circulation.target_copy.call_number.record.id || f.xact.reservation.target_resource_type.record.id;
+                        IF recid; %]
+                        <a href="[% ctx.opac_root %]/record/[% recid %]">[% attrs.title %]</a>
+                        [% ELSE %]
+                        [% attrs.title %]
+                        [% END %]
+                    </td>
+                    <td>
+                        <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                    </td>
+                    <td name='myopac_circ_trans_start'>
+                        [% ts = f.xact.circulation.xact_start || f.xact.reservation.start_time || 0;
+                        IF ts;
+                            date.format(ctx.parse_datetime(ts), DATE_FORMAT);
+                        END %]
+                    </td>
+                    <td name='myopac_circ_trans_due'>
+                        [% ts = f.xact.circulation.due_date || f.xact.reservation.end_time || 0;
+                        IF ts;
+                            date.format(ctx.parse_datetime(ts), DATE_FORMAT);
+                        END %]
+                    </td>
+                    <td name='myopac_circ_trans_finished'>
+                        [%  ts = f.xact.circulation.checkin_time || f.xact.reservation.return_time || 0;
+                            IF ts;
+                                date.format(ctx.parse_datetime(ts), DATE_FORMAT);
+                            ELSE %]
+                            <!-- XXX TODO fines aren't really accruing
+                                if circ has hit maxfines. more clarity
+                                here? -->
+                            <span class="red">[% l('(fines accruing)') %]</span>
+                        [%  END %]
+                    </td>
+                    <td>
+                        <strong class="red">
+                            [% money(f.xact.balance_owed) %]
+                        </strong>
+                    </td>
+                    <!-- TODO: hidden until pay-fines is implemented
+                    <td>
+                        <input type="checkbox" name="selector" title="[% l('Pay this fine') %]" />
+                    </td>
+                    -->
+                </tr>
+                [% END %]
+            </tbody>
+        </table>
+    </div>
+    [% END %]
+
+    [% IF ctx.fines.grocery.size > 0 %]
+    <!-- Table for all non-circulation transactions -->
+    <div id='myopac_trans_div'>
+        <br/>
+        <hr class='opac-auto-013'  color="#dcdbdb" />
+        <br/>
+        <table width='100%' class='data_grid data_grid_center'
+            id='myopac_trans_table'>
+            <thead>
+                <tr>
+                    <td colspan='8' style='padding: 6px'>
+                        <b>[% l("Other Fees") %]</b>
+                    </td>
+                </tr>
+                <tr>
+                    <td width='16%'>[% l("Transaction Start Time") %]</td>
+                    <td width='16%'>[% l("Last Payment Time") %]</td>
+                    <td width='16%'>[% l("Initial Amount Owed") %]</td>
+                    <td width='16%'>[% l("Total Amount Paid") %]</td>
+                    <td width='16%'>[% l("Balance Owed") %]</td>
+                    <td width='16%'>[% l("Billing Type") %]</td>
+                    <!-- TODO: hidden until pay-fines is implemented
+                    <td width='4%' align="center" nowrap="nowrap"
+                        style="white-space:nowrap;">
+                        <input id="pay_fines_box2" checked="checked"
+                            type="checkbox"
+                            title="[% l('Click to (un)select all fines') %]" />
+                        <label for="pay_fines_box2">[% l("Pay Fines") %]</label>
+                    </td>
+                    -->
+                </tr>
+            </thead>
+            <tbody id='myopac_trans_tbody'>
+                [% FOR f IN ctx.fines.grocery %]
+                <tr id='myopac_trans_row'>
+                    <td>[% date.format(
+                            ctx.parse_datetime(f.xact.xact_start),
+                            DATE_FORMAT
+                    ) %]</td>
+                    <td>
+                        [%  IF f.xact.last_payment_ts;
+                                date.format(
+                                    ctx.parse_datetime(
+                                        f.xact.last_payment_ts
+                                    ), DATE_FORMAT
+                                );
+                            END %]
+                    </td>
+                    <td>[% money(f.xact.total_owed) %]</td>
+                    <td>[% money(f.xact.total_paid) %]</td>
+                    <td class="red">
+                        <strong>
+                            [% money(f.xact.balance_owed) %]
+                        </strong>
+                    </td>
+                    <td>[% f.xact.last_billing_type %]</td>
+                    <!-- TODO: hidden until pay-fines is implemented
+                    <td>
+                        <input type="checkbox" name='selector' title='[% l("Pay this fine") %]'/>
+                    </td>
+                    -->
+                </tr>
+                [% END %]
+            </tbody>
+        </table>
+    </div>
+    [% END %]
+
+<!-- TODO: move payment form to its own page -->
+
+<div id="pay_fines_now" class="hide_me">
+    <table id='oils-selfck-cc-payment-table'>
+        <tbody>
+            <tr>
+                <td><div style="width:129px;"></div></td>
+                <td><div style="width:195px;"></div></td>
+                <td><div style="width:324px;"></div></td>
+            </tr>
+            <tr>
+                <td colspan='2'><strong>Billing Information</strong></td>
+                <td rowspan='13' valign='top'>
+                    Selected fines you are paying for:
+                    <table cellpadding="0" cellspacing="5" border="0">
+                        <thead>
+                            <tr>
+                                <td>
+                                    <strong>Name</strong>
+                                </td>
+                                <td>
+                                    <strong>Amount</strong>
+                                </td>
+                            </tr>
+                        </thead>
+                        <tbody id="selectedFines">
+                        </tbody>
+                    </table>
+                    <br />
+                    <div id='oils-selfck-cc-payment-summary'>
+                        Total amount to pay:
+                        <strong>$<span></span></strong>
+                    </div>
+                    <br />
+                    Click <strong>Cancel</strong> to go back and (un)select
+                    other fines.
+                </td>
+            </tr>
+            <tr>
+                <td>First Name</td>
+                <td><input jsId='oilsSelfckCCFName' /></td>
+            </tr>
+            <tr>
+                <td>Last Name</td>
+                <td><input jsId='oilsSelfckCCLName' /></td>
+            </tr>
+            <tr>
+                <td>Street Address</td>
+                <td><input jsId='oilsSelfckCCStreet' /></td>
+            </tr>
+            <tr>
+                <td>City</td>
+                <td><input jsId='oilsSelfckCCCity' /></td>
+            </tr>
+            <tr>
+                <td>State or Province</td>
+                <td><input jsId='oilsSelfckCCState' /></td>
+            </tr>
+            <tr>
+                <td>ZIP or Postal Code</td>
+                <td><input jsId='oilsSelfckCCZip' /></td>
+            </tr>
+            <tr>
+              <td colspan='2'><strong>Credit Card Information</strong></td>
+            </tr>
+            <!-- Technically not needed since card type is derived from the CC number
+            <tr>
+                <td>Type of Card</td>
+                <td>
+                    <select jsId='oilsSelfckCCType' required='true'>
+                        <option value='VISA'>VISA</option>
+                        <option value='MasterCard'>MasterCard</option>
+                        <option value='American Express'>American Express</option>
+                    </select>
+                </td>
+            </tr>
+            -->
+            <tr>
+                <td>Credit Card #</td>
+                <td><input jsId='oilsSelfckCCNumber' /></td>
+            </tr>
+            <tr>
+                <td>
+                    <div style="position:absolute;">
+                        <div style="position:relative;left:80px;">
+                            <a href="#"><img
+                                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                        </div>
+                    </div>
+                    Security Code
+                </td>
+                <td>
+                    <input jsId='oilsSelfckCCCVV' />
+                </td>
+            </tr>
+            <tr>
+                <td>Exipration Month</td>
+                <td>
+                    <select jsId='oilsSelfckCCMonth'>
+                        <option value='01' selected='selected'>January</option>
+                        <option value='02'>February</option>
+                        <option value='03'>March</option>
+                        <option value='04'>April</option>
+                        <option value='05'>May</option>
+                        <option value='06'>June</option>
+                        <option value='07'>July</option>
+                        <option value='08'>August</option>
+                        <option value='09'>September</option>
+                        <option value='10'>October</option>
+                        <option value='11'>November</option>
+                        <option value='12'>December</option>
+                    </select>
+                </td>
+            </tr>
+            <tr>
+                <td>Expiration Year</td>
+                <td>
+                  <select jsId='oilsSelfckCCYear'>
+                    <option value='2011'>2011</option>
+                    <option value='2012'>2012</option>
+                    <option value='2013'>2013</option>
+                    <option value='2014'>2014</option>
+                    <option value='2015'>2015</option>
+                    <option value='2016'>2016</option>
+                    <option value='2017'>2017</option>
+                    <option value='2018'>2018</option>
+                    <option value='2019'>2019</option>
+                  </select>
+                </td>
+            </tr>
+            <tr class="hide_me">
+                <td>Edit Billing Address</td>
+                <td>
+                    <input jsId='oilsSelfckEditDetails'/>
+                </td>
+            </tr>
+            <tr>
+                <td colspan='2' align="center">
+                    <button jsId='oilsSelfckCCSubmit'>
+                        Submit Payment
+                    </button>
+                    <button>
+                        Cancel
+                    </button>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="3">
+                    <br />
+                    Important! You must have a printed receipt to be
+                    eligible for a refund on lost items (regulations allow
+                    for no exceptions).
+                    <br />
+                    <strong>
+                        To ensure your necessary receipt information is
+                        not lost, enter your email address above and a
+                        receipt will be emailed to you. Otherwise, make
+                        certain you have a printed receipt in hand before
+                        closing the payment receipt screen.
+                    </strong>
+                    <br />
+                    Refunds are not available for parts and pieces, overdue
+                    fines, or items that do not display a specific title in
+                    My Account. For a full list of refundable and
+                    non-refundable items, visit
+                    <a href="http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm">http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm</a><br /><br />
+                    This site uses VeriSign SSL encryption to ensure your
+                    privacy.
+                </td>
+            </tr>
+        </tbody>
+    </table>
+</div>
+[% END %]
diff --git a/Open-ILS/web/templates_kcls/default/opac/myopac/prefs_settings.tt2 b/Open-ILS/web/templates_kcls/default/opac/myopac/prefs_settings.tt2
new file mode 100644
index 0000000..4267d3a
--- /dev/null
+++ b/Open-ILS/web/templates_kcls/default/opac/myopac/prefs_settings.tt2
@@ -0,0 +1,116 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    WRAPPER "default/opac/parts/myopac/prefs_base.tt2";
+    myopac_page = "prefs_notify";
+    prefs_page = 'settings' %]
+
+USER SETTINGS
+
+        <!-- SEARCH PREFS SAVE, MOVE TO SUB-TEMPLATE
+        <div style="float:right;width:65px;">
+            <div style="position:absolute">
+                <div style="position:relative;top:75px;">
+                    <a id='acct_prefs_save'
+                         class='hide_me'
+                         href="#"><img alt="Save"
+                         src="[% ctx.media_prefix %]/images/save-btn.png" /></a>
+                </div>
+            </div>
+        </div>
+        -->
+
+
+        <!-- SEARCH PREFERENCES / leaving here for reference
+        <table class="hide_me full-width" id="acct_search_main">
+            <tbody id='myopac_prefs_tbody'>
+                <tr id='myopac_prefs_loading'>
+                    <td colspan='3'><b>[% l("Loading...") %]</b></td>
+                </tr>
+
+                <tr id='myopac_prefs_row'>
+                    <td width='20%'>[% l("Search hits per page") %]</td>
+
+                    <td>
+                        <div style="position:absolute">
+                            <div style="position:relative;top:0px;left:55px;">
+                                <a href="#">
+                                <img alt="Search Hits Help"
+                                     src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                            </div>
+                        </div><select id='prefs_hits_per'
+                            style="position:relative;z-index:100;">
+                            <option value='5'>
+                                5
+                            </option>
+
+                            <option value='8'>
+                                8
+                            </option>
+
+                            <option value='10'>
+                                10
+                            </option>
+
+                            <option value='15'>
+                                15
+                            </option>
+
+                            <option value='20'>
+                                20
+                            </option>
+
+                            <option value='25'>
+                                25
+                            </option>
+
+                            <option value='50'>
+                                50
+                            </option>
+                        </select>
+                    </td>
+                </tr>
+
+                <tr>
+                    <td colspan="2"><label for="circHistStart">Keep history of
+                    checked out items?</label> <input type="checkbox"
+                           id="circHistStart" /></td>
+                </tr>
+
+                <tr class="hide_me">
+                    <td>[% l("Default Font Size") %]</td>
+
+                    <td><select id='prefs_def_font'>
+                        <option value='regular'>
+                            [% l("Regular Font") %]
+                        </option>
+
+                        <option value='large'>
+                            [% l("Large Font") %]
+                        </option>
+                    </select></td>
+                </tr>
+
+                <tr class="hide_me">
+                    <td>[% l("Default Search Location") %]</td>
+                    <td>
+                        <div style='margin-bottom: 5px;'>
+                            <input type='checkbox' id='myopac_pref_home_lib' />
+                                 [% l("Always search my home library by default.") %]
+                        </div>
+                        <select id='prefs_def_location'></select>
+                    </td>
+                </tr>
+
+                <tr class="hide_me">
+                    <td>[% l("Default Search Range") %]</td>
+
+                    <td><select id='prefs_def_range'>
+                        </select></td>
+                </tr>
+            </tbody>
+        </table><a href=
+        "http://www.kcls.org/usingthelibrary/catalog_help/library_elf.cfm"><u>Try
+        Library Elf-to manage library materials!</u></a>
+
+        -->
+
+[% END %]
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/footer.tt2 b/Open-ILS/web/templates_kcls/default/opac/parts/footer.tt2
new file mode 100644
index 0000000..9ab3ace
--- /dev/null
+++ b/Open-ILS/web/templates_kcls/default/opac/parts/footer.tt2
@@ -0,0 +1,10 @@
+<div id="footer">
+    <a href="http://www.kcls.org/usingthelibrary/request/">[% l('Request a Purchase') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/usingthelibrary/request/">[% l('Interlibrary Loan') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/about/contact/">[% l('Contact Us') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/usingthelibrary/catalog_help/">[% l('Site Help') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/usingthelibrary/policies/privacy.cfm">[% l('Privacy Statement') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/about/support/">[% l('Support KCLS') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/employment/">[% l('Employment') %]</a> 
+</div>
+
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/homesearch.tt2 b/Open-ILS/web/templates_kcls/default/opac/parts/homesearch.tt2
new file mode 100644
index 0000000..2021f16
--- /dev/null
+++ b/Open-ILS/web/templates_kcls/default/opac/parts/homesearch.tt2
@@ -0,0 +1,64 @@
+<div style='width:664px;height:35px;background:#FFFFFF;'>
+    <strong><center></center></strong>
+</div>
+<div id='hp-banner'>
+    <a href='http://www.kcls.org/newcatalog/'><img
+        src='[% ctx.media_prefix %]/images/golive.jpg'
+        alt='new catalog' title='New Catalog Information' /></a>
+</div>
+<div id='hp-buttons'>
+    <div class="float-left">
+        <img src='[% ctx.media_prefix %]/images/hp-links-left.jpg' />
+    </div>
+    <div class="float-left">
+	    <div id='homesearch_thing'>
+	        <table cellpadding='0' cellspacing='5' border='0' id='hp-ql-table'>
+                <tr>
+                    <td colspan='4'>
+                        <span class="opac-auto-029">
+                            [% l("Browse for") %]:
+                        </span>
+                    </td>
+                </tr>
+                <tr>
+                    <td>
+                        <a href='http://www.kcls.org/booksandreading/'>books</a>
+                    </td>
+                    <td>
+                        <a href='http://www.kcls.org/movies/movies_browse.cfm'>movies</a>
+                    </td>
+                    <td>
+                        <a href='http://www.kcls.org/ecollection/'>downloads</a>
+                    </td>
+                    <td>
+                        <a href='http://www.kcls.org/websites/'>websites</a>
+                    </td>
+                </tr>
+                <tr>
+                    <td>
+                        <a href='http://www.kcls.org/music/'>music</a>
+                    </td>
+                    <td>
+                        <a href='http://www.kcls.org/databases/subject_categories.cfm#17'>magazines</a>
+                    </td>
+                    <td>
+                        <a href='http://www.kcls.org/databases/'>databases</a>
+                    </td>
+                    <td>
+                        <a href='http://www.kcls.org/answers/'>answers</a>
+                    </td>
+                </tr>
+	        </table>
+	    </div>
+	    <div id='hp-ql-bottom'>
+            <a href='http://www.kcls.org/locations'>Locations:
+                Find a Library Near You!
+                <img src='[% ctx.media_prefix %]/images/arrow-right.png' /></a>
+
+	    </div>
+    </div>
+    <div class="float-left">
+        <img src='[% ctx.media_prefix %]/images/hp-links-right.jpg' />
+    </div>
+    <div class="clear-both"></div>
+</div>
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/login/form.tt2 b/Open-ILS/web/templates_kcls/default/opac/parts/login/form.tt2
new file mode 100644
index 0000000..c0624ae
--- /dev/null
+++ b/Open-ILS/web/templates_kcls/default/opac/parts/login/form.tt2
@@ -0,0 +1,171 @@
+<!-- TODO: MOVE INTO SEPARATE FORGOT-PASSWORD PAGE 
+
+<div class="hide_me">
+	<div class='login_text color_1' style='padding: 4px; text-align: center;'>
+		<span>[% l("Login") %]</span>
+	</div>
+	<br/>
+</div>
+<div class="hide_me" id="forget_pw">
+    <h1>Password Reset</h1>
+	Username or Barcode<br />
+	<input type="text" id="forget_pw_user" /><br /><br />
+	Email Address on account<br />
+	<input type="text" id="forget_pw_email" /><br />
+    <a href="#">Submit</a> &nbsp;
+    <a href="#">Cancel</a>
+</div>
+<table id='change_pw_table' class='data_grid hide_me' style='margin-left: 20px;' width='95%'>
+	<thead>
+        <tr><td colspan='2' align='center'><b>[% l("Password") %]</b></td></tr>
+    </thead>
+    <tbody>
+        <tr>
+            <td colspan='2' style='padding:10px;'>
+                [% l("This appears to be the first time you have logged in.  You will need to change your password.") %]
+                [% l("The password must be at least 7 characters in length,
+ contain at least one letter (a-z/A-Z),
+ and contain at least one number.") %]
+            </td>
+        </tr>
+        <tr>
+            <td>[% l("Enter your current password") %]</td>
+            <td><input type='password' id='change_pw_current'/></td>
+        </tr>
+        <tr>
+            <td>[% l("Enter the new password") %]</td>
+            <td><input type='password' id='change_pw_1'/></td>
+        </tr>
+        <tr>
+            <td>[% l("Re-type the new password for verification") %]</td>
+            <td><input type='password' id='change_pw_2'/></td>
+        </tr>
+        <tr><td><br/></td><td/></tr>
+        <tr class='color_1'>
+            <td colspan='2' align='center'>
+                <span class='login_text' style='margin-right: 20px;'>
+                    <input type='submit' value='[% l("Update Password") %]'  id='change_pw_button'/>
+                </span>
+            </td>
+        </tr>
+    </tbody>
+</table>
+
+
+<span id='pw_no_match' class='hide_me'>[% l("Passwords do not match") %]</span>
+<span id='pw_update_successful' class='hide_me'>[% l("Password successfully updated") %]</span>
+<span id='pw_not_strong' class='hide_me'>
+    [% l("The password provided is not strong enough.") %]
+    [% l("The password must be at least 7 characters in length, contain at least one letter (a-z/A-Z), and contain at least one number.") %]
+</span>
+
+ ^== TODO: MOVE INTO SEPARATE FORGOT-PASSWORD PAGE  -->
+
+[% IF ctx.login_failed_event %]
+<div id='login-failed-message'>
+[%
+    IF ctx.login_failed_event.textcode == 'PATRON_CARD_INACTIVE';
+        l("The barcode used to login is marked as inactive.  Please contact your local library.");
+    ELSIF ctx.login_failed_event.textcode == 'PATRON_INACTIVE';
+        l("This account has been deactivated.  Please contact your local library.");
+    ELSE;
+        l("Login failed. The username or password provided was not valid.  
+            Ensure Caps-Lock is off and try again or contact your local library.");
+    END;
+%]
+</div>
+[% END %]
+
+<div>
+    <div style="height:20px;"></div>
+    <form method='POST'>
+        <table cellpadding="0" cellspacing="0" border="0">
+            <tr>
+                <td valign="top" width="676" class="login_boxes left_brain">
+                    <table cellpadding="0" cellspacing="0" border="0"
+                        width="100%">
+                        <tr>
+	                        <td colspan="2" style="padding-bottom: 10px;">
+                                <h1>[% l('Log in to Your Account') %]</h1>
+                                [% l('Please enter the following information:') %]
+                                <br /><br />
+                            </td>
+                        </tr>
+                        <tr>
+                            <td width="42%" class="lbl1">
+                                [% l('Library Card Number or Username') %]
+                                <br />
+                                <span class="lbl2">
+                                    [% l('Please include leading zeros and no spaces.') %]
+                                    <br/>
+                                    [% l('Example: 0026626051') %]
+                                </span>
+                                <br /><br />
+                            </td>
+                            <td width="58%" valign="top">
+                                <div class="input_bg">
+                                    <input type="text" id="username_field" name="username"/>
+                                </div>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td colspan="2">
+                                <div style="height:15px;"></div>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td valign="top" class="lbl1">
+                                [% l('PIN Number or Password') %]<br />
+                                <span class="lbl2">
+                                    [% | l('<br/>', '<br/>') %]
+                                       If this is your first time logging in, please enter [_1] the last 4 digits of your phone number. [_2] Example: 0926
+                                    [% END %]
+                                </span>
+                            </td>
+                            <td valign="top">
+                                <div class="input_bg">
+                                    <input name="password" type="password" />
+                                </div>
+                                <div style="padding-top:7px;">
+                                    [%
+                                        # If no redirect is offered or it's leading us back to the 
+                                        # login form, redirect the user to My Account
+                                        redirect = CGI.param('redirect_to') || ctx.referer;
+                                        IF !redirect OR redirect.match(ctx.path_info _ '$');
+                                            redirect = CGI.url('-full' => 1) _ '/opac/myopac/main';
+                                        END;
+                                        redirect = redirect  | replace('^http:', 'https:');
+                                    %]
+                                    <input type='hidden' name='redirect_to' value='[% redirect %]'/>
+                                    <input type="checkbox" name="persist" /> [% l('Remember Me?') %]
+                                </div>
+                                <div style="padding-top:14px;">
+                                    <input type='image' alt="[% l('Log in') %]" src="[% ctx.media_prefix %]/images/login-btn2.png" />
+                                    <!-- TODO
+                                    <a href="reset_password"
+                                        style="position:relative;top:-13px;left:2px;font-size:10px;">Forgot your PIN?</a>
+                                    -->
+                                </div>
+	                        </td>
+                        </tr>
+                    </table>
+                    <br /><br />
+                </td>
+	            <td><div style="width:10px;"></div></td>
+                <td class="login_boxes right_brain" align="center" valign="top" width="291">
+
+                    <a href="http://www.kcls.org/about/contact/"><img 
+                        src="[% ctx.media_prefix %]/images/questions.png" alt="[% l('Questions?') %]" style="margin-top:29px;" /></a>
+
+	                <div style="width:182px;color:black;padding:5px 25px;">
+                        [% l('Visit our FAQs section for answers to common questions about how to use your account.') %]
+	                </div>
+
+                    <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm#FAQs"><img
+                        alt="[% l('FAQs') %]" src="[% ctx.media_prefix %]/images/faqs-btn.png" style="margin-top:13px;" /></a>
+	            </td>
+            </tr>
+        </table>
+    </form>
+    <div class="clear-both"></div>
+</div>
diff --git a/Open-ILS/web/templates/default/opac/parts/printnav.tt2 b/Open-ILS/web/templates_kcls/default/opac/parts/printnav.tt2
similarity index 100%
copy from Open-ILS/web/templates/default/opac/parts/printnav.tt2
copy to Open-ILS/web/templates_kcls/default/opac/parts/printnav.tt2
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates_kcls/default/opac/parts/record/summary.tt2
new file mode 100644
index 0000000..9d08781
--- /dev/null
+++ b/Open-ILS/web/templates_kcls/default/opac/parts/record/summary.tt2
@@ -0,0 +1,248 @@
+<!-- ****************** rdetail_summary.xml ***************************** -->
+<abbr class="unapi-id" title='tag:HTTP_HOST,OILS_TIME_YEAR:biblio-record_entry/OILS_OPAC_RID'></abbr><!-- XXX FIXME or remove -->
+<!-- This holds the record summary information -->
+
+<table width="100%" border="0" cellpadding="0" cellspacing="0" id="rdetail_details_table">
+    <tbody id="rdetail_details_tbody">
+        <tr>
+            <td width="90" valign="top" id="rdetail_image_cell">
+                [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
+                <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident %]'><img
+                    alt="[% l('Image of item') %]" id='rdetail_image'
+                    src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/[% ident %]' /></a>
+                [% END %]
+                <br />
+                <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
+                    <div>[% l("Image provided by") %]</div>
+                    <div>
+                        <a target='_blank' href='[% l("http://amazon.com/dp/") %]'
+                            class='classic_link' id='rdetail.jacket_attrib_link'>[% l("Amazon") %]</a>
+                    </div>
+                </div>
+            </td>
+    
+            <td valign="top">
+                <table border="0" cellpadding="0" cellspacing="0" width="100%">
+                    <tr>
+                        <td valign="top">
+                            <span id='rdetail_title'>[% attrs.title %]</span><br />
+                            [% IF attrs.author %]
+                            <span class='opac-auto-030'>[% l("Author") %]:</span>
+                            <em><a title='[% l("Perform an author search") %]'
+                                    id='rdetail_author'
+                                    href="[% ctx.opac_root %]/results?qtype=author&query=[%-
+                                        attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% CGI.param('loc') | uri %]">[% attrs.author %]</a></em>
+                            [% END %]
+                        </td>
+                        <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
+                            <div style="width:230px;text-align:left;margin-top:3px;">
+                                <div style="float:right;">
+                                    <div class="rdetail_aux_utils opac-auto-010">
+                                        <a href="[% ctx.opac_root %]/place_hold[%-
+                                            propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% ctx.bre_id %]&hold_type=T" id="rdetail_place_hold" class="no-dec"><img
+                                            src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
+                                                style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
+                                    </div>
+                                    <div class="rdetail_aux_utils opac-auto-121">
+                                        [%  
+                                            operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add";
+                                            label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); 
+                                        %]
+                                        <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
+                                            <input type="hidden" name="record" value="[% ctx.bre_id %]" />
+                                            <div class="pos-abs">
+                                                <div class="opac-auto-149">
+                                                    <input type="submit" title="[% label %]" value="[% label %]" class="subtle-button" />
+                                                </div>
+                                            </div>
+                                            <input type="image" alt="[% label %]"
+                                                src="[% ctx.media_prefix %]/images/clipboard.png" />
+                                        </form>
+                                    </div>
+                                </div>
+                                <div style="float:right;margin-right:17px;">
+                                    [% IF attrs.format_icon %]
+                                    <img alt="[% attrs.format_label %]" title="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
+                                    [% END %]
+                                </div>
+                            </div>
+                        </td>
+                    </tr>
+                </table>
+                <div class='opac-auto-018'>
+                    <table border="0" cellpadding="0" width="100%">
+                        <tr>
+                            <td nowrap='nowrap' valign="top">
+                                [% IF attrs.isbn %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
+                            </td>
+                            <td valign="top" id='rdetail_isbn'>[% attrs.isbn %]</td>
+                            <td nowrap='nowrap' valign="top">
+                                [% IF attrs.phys_desc %]<strong id="rdetail_phys_lbl">[% l("Physical Description") %]</strong>[% END %]
+                            </td>
+                            <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc %]</td>
+                        </tr>
+                        <tr>
+                            <td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
+                            </td>
+                            <td valign="top" id='rdetail_edition'>[% attrs.edition %]</td>
+                        </tr>
+                        <tr>
+                            <td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
+                            </td>
+                            <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
+                            <td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
+                            </td>
+                            <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
+                        </tr>
+                    </table>
+                </div>
+            </td>
+        </tr>
+    </tbody>
+</table>
+<br /><br />
+
+<table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
+    <thead>
+        <tr id="rdetails_status_head">
+            <td>[% l("Location") %]</td>
+            <td>[% l("Call Number") %]</td>
+            <td>[% l("Barcode") %]</td>
+            <td>[% l("Shelving Location") %]</td>
+            [% IF ctx.is_staff %]
+            <td>[% l("Age Hold Protection") %]</td>
+            <td>[% l("Create Date") %]</td>
+            <td>[% l("Holdable") %]</td>
+            [% END %]
+            <td>[% l("Status") %]</td>
+            <td>[% l("Due Date") %]</td>
+        </tr>
+    </thead>
+    <tbody class="copy_details_table">
+        [% FOR copy_info IN ctx.copies %]
+        <tr>
+            <td>[%
+                # XXX KCLS-specific kludging
+                org_name = ctx.get_aou(copy_info.circ_lib).name;
+                dir = org_name | lower | replace('[^\w]', '') |
+                    replace('.+320th', '320th'); %]
+                <a href="http://www.kcls.org/[% dir %]/"
+                    class="classic_link">[% org_name %]</a>
+            </td>
+            <td>[% copy_info.call_number_label %]</td>
+            <td>[% copy_info.barcode %]</td>
+            <td>[% copy_info.copy_location %]</td>
+            [% IF ctx.is_staff %]
+            <td>
+                [% copy_info.age_protect ?
+                    ctx.get_crahp(copy_info.age_protect).name : l('None') %]
+            </td>
+            <td>[% date.format(
+                ctx.parse_datetime(copy_info.create_date),
+                DATE_FORMAT
+            ) %]</td>
+            <td>[% (copy_info.holdable == 't' AND
+                    copy_info.location_holdable == 't' AND
+                    copy_info.status_holdable == 't') ? l('Yes') : l('No') %]</td>
+            [% END %]
+            <td>[% copy_info.copy_status %]</td>
+            <td>[%
+                IF copy_info.due_date;
+                    date.format(
+                        ctx.parse_datetime(copy_info.due_date),
+                        DATE_FORMAT
+                    );
+                ELSE;
+                    '-';
+                END %]</td>
+        </tr>
+        [% END %]
+        <tr>
+        [% IF ctx.copy_offset > 0;
+            new_offset = ctx.copy_offset - ctx.copy_limit;
+            IF new_offset < 0; new_offset = 0; END %]
+            <td>
+                [%# For some reason, browsers render &copy (as in, &copy_limit=foo) as the copyright 
+                    symbol, even though it's inside inside the href attribute string.  Use ; instead %]
+                <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% new_offset %];copy_limit=[% ctx.copy_limit %]">&laquo; [%
+                    l('Previous [_1]', ctx.copy_offset - new_offset)
+                %]</a>
+            </td>
+        [% END %]
+        [% IF ctx.copies.size >= ctx.copy_limit %]
+            <td>
+                <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %];copy_limit=[% ctx.copy_limit %]">[%
+                    l('Next [_1]', ctx.copy_limit)
+                %] &raquo;</a>
+            </td>
+        [% END %]
+        </tr>
+    </tbody>
+</table>
+
+<div id="rdetail_locs_expand" class="hide_me">
+    <a href="#"><img
+        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
+    <a style="position:relative;top:-3px;" href="#">Show more locations</a>
+</div>
+
+<div id="rdetail_locs_collapse" class="hide_me">
+    <a href="#"><img
+        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
+    <a style="position:relative;top:-3px;" href="#">Collapse locations</a>
+</div>
+
+<div id="rdetail_extras_expand" class="hide_me">
+    <a href="#"><img
+        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
+    <a style="position:relative;top:-3px;" href="#">Expand all tabs</a>
+</div>
+
+<div id="rdetail_extras_collapse" class="hide_me">
+    <a href="#"><img src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
+    <a style="position:relative;top:-3px;" href="#">Collapse all tabs</a>
+</div>
+
+<div class="hide_me">
+    <table id='' border="0" width="100%">
+        <tbody id='rdetail_details_tbody'>
+            <tr>
+                <td id='' rowspan='2' valign="top" align="center" style="padding-right:10px;">
+                </td>
+                <td class='rdetail_desc' valign="top" colspan="3">
+                    <table border="0" width="100%">
+                        <tr>
+                            <td valign="top">
+                                <div style="padding-bottom:7px;">
+                                    <strong>[% l("Title") %]:</strong>
+                                </div>
+                            </td>
+                            <td width="1" valign="top" align="right" style="white-space:nowrap;">
+                                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% ctx.bre_id %]&hold_type=T"><img alt="[% l('Place Hold') %]"
+                                    src="[% ctx.media_prefix %]/images/place_hold.gif" /></a>
+                                <a href="#" id="rd_reviews_and_more" target="_blank"><img
+                                    alt="[% l('Reviews and More') %]" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>
+                                <a href="#" id=""><img alt="[% l('Add to My List') %]"
+                                    src="[% ctx.media_prefix %]/images/add_mylist.gif" /></a>
+                            </td>
+                        </tr>
+                    </table>
+                </td>        
+            </tr>
+            <tr>
+                <td nowrap='nowrap' colspan="3" valign="bottom" style="padding-bottom:16px;">
+                </td>
+            </tr>
+            <tr>
+                <td><div style="height:20px;"></div></td>
+            </tr>
+        </tbody>
+    </table>
+    <!-- Empty span used for creating unAPI links -->
+    <abbr name="unapi" class="unapi-id"> <!-- unAPI URI goes here --> </abbr>
+</div> <!-- details_body -->
+
+<!-- ****************** end: rdetail_summary.xml ***************************** -->
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/topnav_links.tt2 b/Open-ILS/web/templates_kcls/default/opac/parts/topnav_links.tt2
new file mode 100644
index 0000000..6ea4b4d
--- /dev/null
+++ b/Open-ILS/web/templates_kcls/default/opac/parts/topnav_links.tt2
@@ -0,0 +1,13 @@
+<div id="gold-links-holder">
+    <div id="gold-links">
+        <div id="header-links">
+            <a href="http://www.kcls.org/usingthelibrary/index.cfm">Using the Library</a>
+            <a href="http://www.kcls.org/booksandreading/">Books &amp; Reading</a>
+            <a href="http://www.kcls.org/research/index.cfm">Research &amp; Homework</a>
+            <a href="http://www.kcls.org/programs/">Programs &amp; Classes</a>
+            <a href="http://www.kcls.org/events/">Events</a>
+            <a href="/opac/extras/mobile/">Mobile Catalog</a>
+            <a href="http://www.kcls.org/about/">About KCLS</a>
+        </div>
+    </div>
+</div>
diff --git a/Open-ILS/web/templates_kcls/default/opac/parts/topnav_logo.tt2 b/Open-ILS/web/templates_kcls/default/opac/parts/topnav_logo.tt2
new file mode 100644
index 0000000..f9d4320
--- /dev/null
+++ b/Open-ILS/web/templates_kcls/default/opac/parts/topnav_logo.tt2
@@ -0,0 +1,2 @@
+        <a href="http://www.kcls.org"><img alt="[% l('KCLS Logo') %]" 
+            src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /></a>

commit c0005a6846811da742d822a41e7d519658903f93
Author: Dan Scott <dan at coffeecode.net>
Date:   Sun May 1 13:05:06 2011 -0400

    Internationalize more of the TT OPAC (records and results)
    
    There are a number of hardcoded strings remaining in the TT OPAC.
    This is just some of the lowhanging fruit; more work needs to be
    done on the more complex cases involving HTML and placeholders.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>
    Signed-off-by: berick <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index a87248b..8bafc7d 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -2,16 +2,16 @@
     <div id='rdetail_extras_div' style='width: 100%;'> 
         <!-- SAMPLE AWARDS LAYOUT / MOVE TO INCLUDE'D TEMPLATE
         <div id='rdetail_awards_div' class='rdetail_extras_div hide_me'> 
-            <strong>Awards:</strong>
+            <strong>[% l('Awards:') %]</strong>
             <div id='rdetail_awards_cont' style="margin-bottom:20px;"></div>
-                <strong>Patron Reviews:</strong>
+                <strong>[% l('Patron Reviews:') %]</strong>
                 <div id='rdetail_chilifresh_reviews' class='hide_me' style="margin-bottom:20px;">
                     <div id='chilifreshReviewLink' name='chilifreshReviewLink' class='chili_review'></div>
                     <div id='chilifreshReviewResult' name='chilifreshReviewResult' class='hidden'></div>
                 </div>
-                <strong>Reviews:</strong>
+                <strong>[% l('Reviews:') %]</strong>
                 <div id='rdetail_review_container' style="margin-bottom:20px;"></div>
-                <strong>Suggested Reads:</strong>
+                <strong>[% l('Suggested Reads:') %]</strong>
                 <div id='rdetail_novelist_div' class='rdetail_extras_div'>
                 <div id="NoveListSelect" class="NoveListSelect">
                     <div id="NoveListAnchor" class="NoveListSelect"></div>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2 b/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
index 98c8b1a..d608019 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
@@ -61,7 +61,7 @@
             [% END; %]
         [% END; %]
     [% IF any_subjects == 0 %]
-        <tr><td><i>No Subjects</i></td></tr>
+        <tr><td><i>[% l('No Subjects') %]</i></td></tr>
     [% END; %]
     </table>
 </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 21a083a..26e1056 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -186,24 +186,24 @@
 <div id="rdetail_locs_expand" class="hide_me">
     <a href="#"><img
         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
-    <a style="position:relative;top:-3px;" href="#">Show more locations</a>
+    <a style="position:relative;top:-3px;" href="#">[% l('Show more locations') %]</a>
 </div>
 
 <div id="rdetail_locs_collapse" class="hide_me">
     <a href="#"><img
         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
-    <a style="position:relative;top:-3px;" href="#">Collapse locations</a>
+    <a style="position:relative;top:-3px;" href="#">[% l('Collapse locations') %]</a>
 </div>
 
 <div id="rdetail_extras_expand" class="hide_me">
     <a href="#"><img
         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
-    <a style="position:relative;top:-3px;" href="#">Expand all tabs</a>
+    <a style="position:relative;top:-3px;" href="#">[% l('Expand all tabs') %]</a>
 </div>
 
 <div id="rdetail_extras_collapse" class="hide_me">
     <a href="#"><img src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
-    <a style="position:relative;top:-3px;" href="#">Collapse all tabs</a>
+    <a style="position:relative;top:-3px;" href="#">[% l('Collapse all tabs') %]</a>
 </div>
 
 <div class="hide_me">
diff --git a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2 b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
index 9393c49..37e3af6 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
@@ -12,7 +12,7 @@
             <table cellpadding="0" cellspacing="0" border="0">
                 <tr>
                     <td valign="top" style="padding-right:10px;">
-                        <span id="zero_hits_label2" class="hide_me">Other Possibilities:</span>
+                        <span id="zero_hits_label2" class="hide_me">[% l('Other Possibilities:') %]</span>
                     </td>
                     <td id="zero_hits_suggestions"></td>
                 </tr>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 6477ef6..5445489 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -29,7 +29,7 @@
                         ELSE; class = class _ ' invisible'; END;
                     %]
                     <a class='[% class %]' href='[% href %]' 
-                        title='[% l("Previous page") %]'><span class="nav_arrow_fix">&#9668;</span> Previous </a>
+                        title='[% l("Previous page") %]'><span class="nav_arrow_fix">&#9668;</span> [% l('Previous') %] </a>
                     <span class='hide_me'
                         style='padding-left: 11px; padding-right:11px;'>
                         <span></span>
@@ -41,7 +41,7 @@
                         ELSE; class = class _ ' invisible'; END;
                     %]
                     <a class='[% class %]' href='[% href %]' 
-                        title='[% l("Next page") %]'> Next <span class="nav_arrow_fix">&#9658;</span></a>
+                        title='[% l("Next page") %]'> [% l('Next') %] <span class="nav_arrow_fix">&#9658;</span></a>
                 </span>
             </td>
         </tr>
@@ -78,7 +78,7 @@
                                             <td class='result_table_pic_header'
                                                 width="78" nowrap="nowrap" valign="top">
                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
-                                                <a href="[% ctx.opac_root %]/record/[% rec.id _ propagator %]"><img alt="Image of item"
+                                                <a href="[% ctx.opac_root %]/record/[% rec.id _ propagator %]"><img alt="[% l('Image of item') %]"
                                                         name='item_jacket' class='result_table_pic' width="55"
                                                         src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a><br />
                                                 [% END %]
@@ -105,30 +105,30 @@
                                                         class="results_info_table">
                                                         <tr name='bib_cn_list' class='result_table_title_cell'>
                                                             <td colspan='2'>
-                                                                <strong>Call number:</strong>[% args.marc_cn %][%# XXX KCLS %]
+                                                                <strong>[% l('Call number:') %]</strong>[% args.marc_cn %][%# XXX KCLS %]
                                                             </td>
                                                         </tr>
                                                         <tr name="results_pub_tr" class="[% attrs.publisher ? '' : 'hide_me' %]">
                                                             <td valign="top">
-                                                                <strong>Publisher:</strong>
+                                                                <strong>[% l('Publisher:') %]</strong>
                                                             </td>
                                                             <td>[% attrs.publisher; %]</td>
                                                         </tr>
                                                         <tr name="results_isbn_tr" class="[% attrs.isbn ? '' : 'hide_me' %]">
                                                             <td valign="top">
-                                                                <strong>ISBN:</strong>
+                                                                <strong>[% l('ISBN:') %]</strong>
                                                             </td>
                                                             <td>[% attrs.isbn %]</td>
                                                         </tr>
                                                         <tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
                                                             <td valign="top">
-                                                                <strong>Edition:</strong>
+                                                                <strong>[% l('Edition:') %]</strong>
                                                             </td>
                                                             <td>[% attrs.edition %]</td>
                                                         </tr>
                                                         <tr name="results_phys_desc_tr" class="[% attrs.phys_desc ? '' : 'hide_me' %]">
                                                             <td nowrap="nowrap" valign="top">
-                                                                <strong>Phys. Desc.:</strong>
+                                                                <strong>[% l('Phys. Desc.:') %]</strong>
                                                             </td>
                                                             <td>
                                                                 [% args.phys_desc %]
@@ -183,7 +183,7 @@
                                                         </div>
                                                         <div class="results_aux_utils opac-auto-011">
                                                             [%  operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
-                                                                label = (operation == "add") ? "Add to" : "Remove from"; %]
+                                                                label = (operation == "add") ? l("Add to") : l("Remove from"); %]
                                                             <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
                                                                 <input type="hidden" name="record" value="[% rec.id %]" />
                                                             <div style="position:absolute;">
@@ -199,9 +199,9 @@
                                                         <!-- <div style="padding-top:7px;" class="results_aux_utils">
                                                             <a title="Reviews and More" target="_blank" class="no-dec"
                                                                 name="reviews_and_more" href="javascript:;"><img
-                                                                alt="reviews &amp; more"
+                                                                alt="[% l('Reviews and more') %]"
                                                                 src="[% ctx.media_prefix %]/images/starz.png" /> <span
-                                                                    style="position:relative;top:-5px;">Reviews &amp; More</span></a>
+                                                                    style="position:relative;top:-5px;">[% l('Reviews and More') %]</span></a>
                                                         </div> -->
                                                     </div>
                                                 </div>

commit 6f5c16aa5e1b42fd70766f326d00dd644a5d6837
Author: Dan Scott <dan at coffeecode.net>
Date:   Sun May 1 11:55:11 2011 -0400

    Enable unAPI support in TT OPAC
    
    We have enough information available from the context and date
    plugin to construct valid unAPI IDs - so let's do it and take
    one more XXX off the table. (This is good for Zotero support!)
    
    Sadly, Zotero doesn't seem to recognize more than one unAPI
    ID on the search results page; in theory it should give the
    user the ability to add all of the search results at once,
    but in practice it doesn't display anything.
    
    At the same time, we can remove the duplicate unAPI placeholders
    and remove unnecessary <span> elements.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>
    Signed-off-by: berick <berick at esilibrary.com>

diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 9d08781..21a083a 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -1,5 +1,5 @@
 <!-- ****************** rdetail_summary.xml ***************************** -->
-<abbr class="unapi-id" title='tag:HTTP_HOST,OILS_TIME_YEAR:biblio-record_entry/OILS_OPAC_RID'></abbr><!-- XXX FIXME or remove -->
+<abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
 <!-- This holds the record summary information -->
 
 <table width="100%" border="0" cellpadding="0" cellspacing="0" id="rdetail_details_table">
@@ -241,8 +241,6 @@
             </tr>
         </tbody>
     </table>
-    <!-- Empty span used for creating unAPI links -->
-    <abbr name="unapi" class="unapi-id"> <!-- unAPI URI goes here --> </abbr>
 </div> <!-- details_body -->
 
 <!-- ****************** end: rdetail_summary.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 3ce5ffa..6477ef6 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -161,12 +161,8 @@
                                                 <img title="[% attrs.format_label %]" alt="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
                                                 [% END %]
 
-                                                <!-- Empty span used for creating unAPI links -->
-                                                <span class="hide_me">
-                                                    <abbr style='padding-left: 8px;' name="unapi" class="unapi-id">
-                                                    <!-- unAPI URI goes here -->
-                                                    </abbr>
-                                                </span>
+                                                <!-- unAPI link -->
+                                                <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.id %]'></abbr>
 
                                                 <!-- Empty span used for creating Google Book Search-->
                                                 <span name="googleBooksLink" class="hide_me">

commit 3aa47438872f3e7cf43b40d9a20e3497342839ae
Author: erickson <erickson at dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date:   Sun May 1 15:29:39 2011 +0000

    ContentCafe summary of avaible item content
    
    Added "available_json" support for Content Cafe.  Returns and array of
    available content for a given item, where the content type is mapped to
    one of the Evergreen standard added content types, e.g. "summary",
    "anotes", "reviews", ...
    
    git-svn-id: svn://svn.open-ils.org/ILS/trunk@20367 dcc99617-32d9-48b4-a31d-7c20da2025e4

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/ContentCafe.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/ContentCafe.pm
index c6e7f4f..9ecaebe 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/ContentCafe.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/ContentCafe.pm
@@ -206,6 +206,27 @@ sub summary_json {
         $self->fetch_content('AnnotationDetail', $key));
 }
 
+sub available_json {
+    my($self, $key) = @_;
+    my $xml = $self->fetch_content('AvailableContent', $key);
+    my $doc = XML::LibXML->new->parse_string($xml);
+
+    my @avail;
+    for my $node ($doc->findnodes('//*[text()="true"]')) {
+        push(@avail, 'summary') if $node->nodeName eq 'Annotation';
+        push(@avail, 'jacket') if $node->nodeName eq 'Jacket';
+        push(@avail, 'toc') if $node->nodeName eq 'TOC';
+        push(@avail, 'anotes') if $node->nodeName eq 'Biography';
+        push(@avail, 'excerpt') if $node->nodeName eq 'Excerpt';
+        push(@avail, 'reviews') if $node->nodeName eq 'Review';
+    }
+
+    return { 
+        content_type => 'text/plain', 
+        content => OpenSRF::Utils::JSON->perl2JSON(\@avail)
+    };
+}
+
 
 # --------------------------------------------------------------------------
 

commit 4d36c86bca3e89703d3e2cc08f91948a8ab960fa
Merge: 0ce3836 beee382
Author: berick <berick at esilibrary.com>
Date:   Sun May 1 10:33:34 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit beee382e450c90e845d7fc7a03d98404a7f4d5f8
Author: miker <miker at dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date:   Sun May 1 13:52:48 2011 +0000

    After investigation by Dan Scott, Michael Peters and Mike Rylander (a little), apos removal in advanced search normalization is considered harmful.
    
    git-svn-id: svn://svn.open-ils.org/ILS/trunk@20364 dcc99617-32d9-48b4-a31d-7c20da2025e4

diff --git a/Open-ILS/web/opac/skin/default/js/adv_global.js b/Open-ILS/web/opac/skin/default/js/adv_global.js
index a6311b7..897b1ea 100644
--- a/Open-ILS/web/opac/skin/default/js/adv_global.js
+++ b/Open-ILS/web/opac/skin/default/js/adv_global.js
@@ -295,7 +295,6 @@ function advBuildSearchBlob() {
 				break;
 		}
 		if(string) {
-			string = string.replace(/'/g,' ');
 			string = string.replace(/\\/g,' ');
             string = string.replace(/^\s*/,'');
             string = string.replace(/\s*$/,'');

commit 8cd02588b36c50043cf134f1d656b3be3e79bfa5
Author: miker <miker at dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date:   Sun May 1 13:47:10 2011 +0000

    Patch from Michael Peters, Jason Boyer and Jason Etheridge addressing LP#744244: bill_details.xul "Checkout or Renew Library" column is blank
    
    git-svn-id: svn://svn.open-ils.org/ILS/trunk@20361 dcc99617-32d9-48b4-a31d-7c20da2025e4

diff --git a/Open-ILS/xul/staff_client/server/cat/copy_summary.xul b/Open-ILS/xul/staff_client/server/cat/copy_summary.xul
index 4810959..3a459a2 100644
--- a/Open-ILS/xul/staff_client/server/cat/copy_summary.xul
+++ b/Open-ILS/xul/staff_client/server/cat/copy_summary.xul
@@ -122,7 +122,7 @@
                                 } else {
                                     $w('copy_summary_callnumber',cn.label());    
                                 }
-                                g.list.append({'row':{'my':{'acp':copy,'acn':cn}}});
+                                g.list.append({'row':{'my':{'acp':copy,'acn':cn,'circ':xulG.circ}}});
                                 g.barcode = copy.barcode(); g.doc_id = cn.record();
                                 if (g.doc_id > -1) {
                                     $('show_in_opac').hidden = false;
diff --git a/Open-ILS/xul/staff_client/server/patron/bill_details.js b/Open-ILS/xul/staff_client/server/patron/bill_details.js
index 8ad14be..56627e0 100644
--- a/Open-ILS/xul/staff_client/server/patron/bill_details.js
+++ b/Open-ILS/xul/staff_client/server/patron/bill_details.js
@@ -91,7 +91,7 @@ function retrieve_circ() {
                 var copy_summary = document.createElement('iframe'); csb.appendChild(copy_summary);
                 copy_summary.setAttribute('src',urls.XUL_COPY_SUMMARY); // + '?copy_id=' + r_circ.target_copy());
                 copy_summary.setAttribute('flex','1');
-                get_contentWindow(copy_summary).xulG = { 'copy_id' : r_circ.target_copy(), 'new_tab' : xulG.new_tab, 'url_prefix' : xulG.url_prefix };
+                get_contentWindow(copy_summary).xulG = { 'circ' : r_circ, 'copy_id' : r_circ.target_copy(), 'new_tab' : xulG.new_tab, 'url_prefix' : xulG.url_prefix };
 
                 g.network.simple_request(
                     'MODS_SLIM_RECORD_RETRIEVE_VIA_COPY.authoritative',

commit 6b9a7ac33738b3f5c1d590ed3b0db8afdf4e48e3
Author: dbs <dbs at dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date:   Sun May 1 12:20:55 2011 +0000

    Remove hard-coded default bootstrap location from authority_control_fields.pl
    
    Let autoconf do its magic and we get away from one more hard-coded
    default.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>
    
    
    git-svn-id: svn://svn.open-ils.org/ILS/trunk@20359 dcc99617-32d9-48b4-a31d-7c20da2025e4

diff --git a/Open-ILS/src/support-scripts/authority_control_fields.pl b/Open-ILS/src/support-scripts/authority_control_fields.pl.in
similarity index 99%
rename from Open-ILS/src/support-scripts/authority_control_fields.pl
rename to Open-ILS/src/support-scripts/authority_control_fields.pl.in
index f8864d0..07c9f77 100755
--- a/Open-ILS/src/support-scripts/authority_control_fields.pl
+++ b/Open-ILS/src/support-scripts/authority_control_fields.pl.in
@@ -30,7 +30,7 @@ use Data::Dumper;
 use Pod::Usage qw/ pod2usage /;
 
 my ($start_id, $end_id);
-my $bootstrap = '/openils/conf/opensrf_core.xml';
+my $bootstrap = '@sysconfdir@/opensrf_core.xml';
 my @records;
 
 my %options;
@@ -503,7 +503,7 @@ table identifying the record ID, field, and subfield(s) that were not controlled
 =item * B<-c> I<config-file>, B<--configuration>=I<config-file>
 
 Specifies the OpenSRF configuration file used to connect to the OpenSRF router.
-Defaults to F</openils/conf/opensrf_core.xml>
+Defaults to F<@sysconfdir@/opensrf_core.xml>
 
 =item * B<-r> I<record-ID>, B<--record>=I<record-ID>
 
diff --git a/configure.ac b/configure.ac
index 8131258..dd0b098 100644
--- a/configure.ac
+++ b/configure.ac
@@ -378,6 +378,7 @@ AC_CONFIG_FILES([Makefile
          Open-ILS/src/extras/import/marc2bre.pl
          Open-ILS/src/extras/import/marc2sre.pl
          Open-ILS/src/extras/import/parallel_pg_loader.pl
+         Open-ILS/src/support-scripts/authority_control_fields.pl
          Open-ILS/src/support-scripts/marc_export
          Open-ILS/src/perlmods/Makefile
          Open-ILS/src/perlmods/lib/OpenILS/Utils/Cronscript.pm],
@@ -388,6 +389,7 @@ AC_CONFIG_FILES([Makefile
             if test -e "./Open-ILS/src/extras/import/marc2bre.pl"; then chmod 755 Open-ILS/src/extras/import/marc2bre.pl; fi;
             if test -e "./Open-ILS/src/extras/import/marc2sre.pl"; then chmod 755 Open-ILS/src/extras/import/marc2sre.pl; fi;
             if test -e "./Open-ILS/src/extras/import/parallel_pg_loader.pl"; then chmod 755 Open-ILS/src/extras/import/parallel_pg_loader.pl; fi;
+            if test -e "./Open-ILS/src/support-scripts/authority_control_fields.pl"; then chmod 755 Open-ILS/src/support-scripts/authority_control_fields.pl; fi;
             if test -e "./Open-ILS/src/support-scripts/marc_export"; then chmod 755 Open-ILS/src/support-scripts/marc_export; fi;
         ])
 AC_OUTPUT

commit f1eb75992d902209707829bca24e7cbd93e0669c
Author: dbs <dbs at dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date:   Sun May 1 12:11:27 2011 +0000

    Slight optimization for authority_control_fields.pl
    
    Instead of creating two CStoreEditors per bib record, reuse the global
    CStoreEditor for read operations; this way we only have to create a new
    CStoreEditor if a record has fields to authorize.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>
    
    
    git-svn-id: svn://svn.open-ils.org/ILS/trunk@20356 dcc99617-32d9-48b4-a31d-7c20da2025e4

diff --git a/Open-ILS/src/support-scripts/authority_control_fields.pl b/Open-ILS/src/support-scripts/authority_control_fields.pl
index d65e8a7..f8864d0 100755
--- a/Open-ILS/src/support-scripts/authority_control_fields.pl
+++ b/Open-ILS/src/support-scripts/authority_control_fields.pl
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# Copyright (C) 2010 Laurentian University
+# Copyright (C) 2010-2011 Laurentian University
 # Author: Dan Scott <dscott at laurentian.ca>
 #
 # This program is free software; you can redistribute it and/or
@@ -54,12 +54,12 @@ Fieldmapper->import(IDL => OpenSRF::Utils::SettingsClient->new->config_value("ID
 use OpenILS::Utils::CStoreEditor;
 OpenILS::Utils::CStoreEditor::init();
 
-my $editor = OpenILS::Utils::CStoreEditor->new;
+my $e = OpenILS::Utils::CStoreEditor->new;
 my $undeleted;
 if ($options{all}) {
     # get a list of all non-deleted records from Evergreen
     # open-ils.cstore open-ils.cstore.direct.biblio.record_entry.id_list.atomic {"deleted":"f"}
-    $undeleted = $editor->request( 
+    $undeleted = $e->request( 
         'open-ils.cstore.direct.biblio.record_entry.id_list.atomic', 
         [{deleted => 'f'}, {id => { '>' => 0}}]
     );
@@ -340,7 +340,6 @@ my %controllees = (
 foreach my $rec_id (@records) {
     # print "$rec_id\n";
 
-    my $e = OpenILS::Utils::CStoreEditor->new();
     # State variable; was the record changed?
     my $changed;
 

commit 0ce38362afd19101a528ad9eae7487eab22b87a4
Author: berick <berick at esilibrary.com>
Date:   Sat Apr 30 20:28:30 2011 -0400

    use medium-sized jacket image on record details page

diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 015f533..9d08781 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -9,7 +9,7 @@
                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
                 <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident %]'><img
                     alt="[% l('Image of item') %]" id='rdetail_image'
-                    src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a>
+                    src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/[% ident %]' /></a>
                 [% END %]
                 <br />
                 <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>

commit 49b4999822d70d875b392903ad88d01068d2486e
Author: dbs <dbs at dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date:   Sun May 1 00:28:23 2011 +0000

    Add excerpt AC and avoid rate-limiting for OpenLibrary content
    
    OpenLibrary added rate-limiting (100 cover requests per 5 minutes)
    for cover images requested by ISBN; using the OpenLibrary book
    API to pull the list of direct cover URLs avoids the rate limit.
    
    Also, add excerpt added content calls for OpenLibrary.
    
    Signed-off-by: Dan Scott <dbs at coffeecode.net>
    
    
    git-svn-id: svn://svn.open-ils.org/ILS/trunk@20354 dcc99617-32d9-48b4-a31d-7c20da2025e4

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/OpenLibrary.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/OpenLibrary.pm
index 7555223..2be38a0 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/OpenLibrary.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/OpenLibrary.pm
@@ -49,19 +49,19 @@ sub new {
 sub jacket_small {
     my( $self, $key ) = @_;
     return $self->send_img(
-        $self->fetch_cover_response('-S.jpg', $key));
+        $self->fetch_cover_response('small', $key));
 }
 
 sub jacket_medium {
     my( $self, $key ) = @_;
     return $self->send_img(
-        $self->fetch_cover_response('-M.jpg', $key));
+        $self->fetch_cover_response('medium', $key));
 
 }
 sub jacket_large {
     my( $self, $key ) = @_;
     return $self->send_img(
-        $self->fetch_cover_response('-L.jpg', $key));
+        $self->fetch_cover_response('large', $key));
 }
 
 # --------------------------------------------------------------------------
@@ -122,6 +122,47 @@ sub ebooks_html {
     $logger->debug("$key: $ebook_html");
     $self->send_html("<ul class='ebooks'>$ebook_html</ul>");
 }
+
+sub excerpt_html {
+    my( $self, $key ) = @_;
+    my $book_details_json = $self->fetch_details_response($key)->content();
+
+    $logger->debug("$key: $book_details_json");
+
+    my $excerpt_html;
+    
+    my $book_details = OpenSRF::Utils::JSON->JSON2perl($book_details_json);
+    my $book_key = (keys %$book_details)[0];
+
+    # We didn't find a matching book; short-circuit our response
+    if (!$book_key) {
+        $logger->debug("$key: no found book");
+        return 0;
+    }
+
+    my $first_sentence = $book_details->{$book_key}->{first_sentence};
+    if ($first_sentence) {
+        $excerpt_html .= "<div class='sentence1'>$first_sentence</div>\n";
+    }
+
+    my $excerpts_json = $book_details->{$book_key}->{excerpts};
+    if ($excerpts_json && scalar(@$excerpts_json)) {
+        # Load up excerpt text with comments in tooltip
+        foreach my $excerpt (@$excerpts_json) {
+            my $text = $excerpt->{text};
+            my $cmnt = $excerpt->{comment};
+            $excerpt_html .= "<div class='ac_excerpt' title='$text'>$cmnt</div>\n";
+        }
+    }
+
+    if (!$excerpt_html) {
+        return 0;
+    }
+
+    $logger->debug("$key: $excerpt_html");
+    $self->send_html("<div class='ac_excerpts'>$excerpt_html</div>");
+}
+
 =head1
 
 OpenLibrary returns a JSON hash of zero or more book responses matching our
@@ -241,8 +282,26 @@ sub fetch_details_response {
 # returns the HTTP response object from the URL fetch
 sub fetch_cover_response {
     my( $self, $size, $key ) = @_;
-    my $url = $cover_base_url . "$key$size";
-    return $AC->get_url($url);
+
+    my $response = $self->fetch_data_response($key)->content();
+
+    my $book_data = OpenSRF::Utils::JSON->JSON2perl($response);
+    my $book_key = (keys %$book_data)[0];
+
+    # We didn't find a matching book; short-circuit our response
+    if (!$book_key) {
+        $logger->debug("$key: no found book");
+        return 0;
+    }
+
+    my $covers_json = $book_data->{$book_key}->{cover};
+    if (!$covers_json) {
+        $logger->debug("$key: no covers for this book");
+        return 0;
+    }
+
+    $logger->debug("$key: " . $covers_json->{$size});
+    return $AC->get_url($covers_json->{$size}) || 0;
 }
 
 

commit baf1d055df9dbcac40fe69a1bcc5de33d208a5ef
Author: berick <berick at esilibrary.com>
Date:   Sat Apr 30 17:28:02 2011 -0400

    force empty value for the default 'Any' option to avoid using the option text as a valid value

diff --git a/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
index a78edfd..cfcd9a0 100644
--- a/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
@@ -6,7 +6,7 @@
     size ? (' size="' _ size _ '"') : ''; %]>
 [%  all_values = ctx.search_ccvm('ctype', attr);
 IF none_ok %]
-    <option>[% l('-- Any --') %]</option>
+    <option value=''>[% l('-- Any --') %]</option>
 [% END;
 FOR o IN all_values;
    |l(o.value) %]

commit f195bfa0c05aa1c23116868802f948c87137579c
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Apr 27 15:53:52 2011 -0400

    generic filters in advanced search using SVF
    
    incidentally, this reveals that my database has some *weird* languages
    represented in it

diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index 433b438..9f1c949 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -31,19 +31,19 @@
           <table cellpadding='10' cellspacing='0' border='0'><tr>
             <td valign='top'>
                 <strong>[% l("Item Type") %]</strong><br />
-                [%  INCLUDE "default/opac/parts/format_selector.tt2"
-                        multiple="multiple" size="4"
+                [%  INCLUDE "default/opac/parts/coded_value_selector.tt2"
+                        attr="mattype" multiple="multiple" size="4"
                         id="adv_global_item_type_basic" %]
             </td>
             <td valign='top'>
                 <strong>[% l("Language") %]</strong><br />
-                [%  INCLUDE "default/opac/parts/language_selector.tt2"
-                        multiple="multiple" size="4" %]
+                [%  INCLUDE "default/opac/parts/coded_value_selector.tt2"
+                        attr="item_lang" multiple="multiple" size="4" %]
             </td>
             <td valign='top'>
                 <strong>[% l("Audience") %]</strong><br />
-                    [% INCLUDE "default/opac/parts/audience_selector.tt2"
-                        id="adv_global_audience_basic"
+                    [% INCLUDE "default/opac/parts/coded_value_selector.tt2"
+                        attr="audience" id="adv_global_audience_basic" 
                         multiple="multiple" size="4" %]
                 </select>
                     <!--<a id='adv_global_audience_link_adv' class='classic_link adv_adv_link'
diff --git a/Open-ILS/web/templates/default/opac/parts/audience_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/audience_selector.tt2
deleted file mode 100644
index b3e86bf..0000000
--- a/Open-ILS/web/templates/default/opac/parts/audience_selector.tt2
+++ /dev/null
@@ -1,16 +0,0 @@
-[%  name = name || "fi:audience";
-    id = id || "audience_selector";
-    values = values || CGI.param(name) %]
-<select id='[% id %]' name='[% name %]'[%
-    multiple ? ' multiple="multiple"' : '';
-    size ? (' size="' _ size _ '"') : ''; %]>
-[%
-FOR opt IN [
-    {'code' => 'a,b,c,j', 'label' => l("Juvenile")},
-    {'code' => 'd', 'label' => l("General")},
-    {'code' => 'e', 'label' => l("Adult")}
-];
-    |l(opt.code, opt.label) %]
-<option value='[_1]'[% values.grep('^' _ opt.code _ '$').size ? ' selected="selected"' : '' %]>[_2]</option>
-[% END; END %]
-</select>
diff --git a/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
new file mode 100644
index 0000000..a78edfd
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/coded_value_selector.tt2
@@ -0,0 +1,15 @@
+[%- name = name || "fi:" _ attr;
+    id = id || attr _ "_selector";
+    values = values || CGI.param(name); -%]
+<select id='[% id %]' name='[% name %]'[%
+    multiple ? ' multiple="multiple"' : '';
+    size ? (' size="' _ size _ '"') : ''; %]>
+[%  all_values = ctx.search_ccvm('ctype', attr);
+IF none_ok %]
+    <option>[% l('-- Any --') %]</option>
+[% END;
+FOR o IN all_values;
+   |l(o.value) %]
+    <option value='[% o.code %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : '' %]>[_1]</option>
+[%  END; END -%]
+</select>
diff --git a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
deleted file mode 100644
index d52129b..0000000
--- a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
+++ /dev/null
@@ -1,30 +0,0 @@
-[% 
-    # Start w/ mattype, fall back to item_type
-    format_spec = '';
-    formats = [];
-    FOR format_spec IN ['mattype', 'item_type'];
-        formats = ctx.search_ccvm('ctype', format_spec);
-        IF formats.size; BREAK; END;
-    END;
-    name = name || "fi:" _ format_spec;
-    id = id || "format_selector";
-    values = values || CGI.param(name) 
--%]
-
-<select id='[% id %]' name='[% name %]'[%
-    multiple ? ' multiple="multiple"' : '';
-    size ? (' size="' _ size _ '"') : ''; %]>
-    <option value=''>[% l("All Formats") %]</option>
-
-[% FOR o IN formats %]
-    <option value='[% o.code %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : ''%]>[% o.value %]</option>
-[%- END %]
-<!--
-	<option value='at'>[% l("Books") %]</option>
-	<option value='at-d'>[% l("Large Print Books") %]</option>
-	<option value='i'>[% l("Audiobooks") %]</option>
-	<option value='g'>[% l("Video Recordings") %]</option>
-	<option value='j'>[% l("Music") %]</option>
-	<option value='m'>[% l("Electronic Resources") %]</option>
--->
-</select>
diff --git a/Open-ILS/web/templates/default/opac/parts/language_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/language_selector.tt2
deleted file mode 100644
index 6bdfffe..0000000
--- a/Open-ILS/web/templates/default/opac/parts/language_selector.tt2
+++ /dev/null
@@ -1,40 +0,0 @@
-[%- name = name || "fi:language";
-    id = id || "language_selector";
-    values = values || CGI.param(name); -%]
-<select id='[% id %]' name='[% name %]'[%
-    multiple ? ' multiple="multiple"' : '';
-    size ? (' size="' _ size _ '"') : ''; %]>
-[%-
-# Language otions for languages that exist in the catalog.
-# This file should be updated on occasion.
-#
-# develooper=# select code,value from config.language_map m
-#   join metabib.rec_descriptor r on (r.item_lang = m.code) group by 1,2;
-
-# XXX I haven't internationalized these labels because this stuff shouldn't
-# be hardcoded like this forever.
-FOR lang IN [
-    {'code' => 'eng', 'label' => 'English'},
-    {'code' => 'spa', 'label' => 'Spanish'},
-    {'code' => 'fre', 'label' => 'French'},
-    {'code' => 'ger', 'label' => 'German'},
-    {'code' => 'ita', 'label' => 'Italian'},
-    {'code' => 'chi', 'label' => 'Chinese'},
-    {'code' => 'jpn', 'label' => 'Japanese'},
-    {'code' => 'kor', 'label' => 'Korean'},
-    {'code' => 'dut', 'label' => 'Dutch'},
-    {'code' => 'gre', 'label' => 'Greek, Modern (1453- )'},
-    {'code' => 'lat', 'label' => 'Latin'},
-    {'code' => 'vie', 'label' => 'Vietnamese'},
-    {'code' => 'rus', 'label' => 'Russian'},
-    {'code' => 'nor', 'label' => 'Norwegian'},
-    {'code' => 'wel', 'label' => 'Welsh'},
-    {'code' => 'pau', 'label' => 'Palauan'},
-    {'code' => 'swe', 'label' => 'Swedish'},
-    {'code' => 'nav', 'label' => 'Navajo'},
-    {'code' => 'und', 'label' => 'Undetermined'}
-];
-    |l(lang.code, lang.label) %]
-<option value='[_1]'[% values.grep('^' _ lang.code _ '$').size ? ' selected="selected"' : '' %]>[_2]</option>
-[%  END; END -%]
-</select>
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 4be2b14..a38259f 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -48,7 +48,7 @@
         [% UNLESS is_advanced %]
         <tr>
             <td>
-                [% INCLUDE "default/opac/parts/format_selector.tt2" value=CGI.param("format") %]
+                [% INCLUDE "default/opac/parts/coded_value_selector.tt2" attr="mattype" none_ok=1 %]
             </td>
             <td>
                 <span id='depth_selector_span'>

commit bcf9efbf6cdafd4daa571212ae6eafddcbadd65e
Merge: 04c0829 97bae1e
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 27 13:43:15 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 04c0829feff9c9317f95606a0cdcc2a03c7839b5
Merge: 02282d1 290a9b1
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Apr 26 21:15:37 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 02282d1558ac2b90647ec911d35bae24d50910c7
Merge: 33104ab d5ac9f7
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Apr 26 21:15:36 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 290a9b17a888302a26e95dce43d260b386b0758e
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Apr 25 16:15:51 2011 -0400

    one more minor thing when showing fines on reservations
    
    if there's not a record associated with the xact (like in the case of
    a reservation against a non-cataloged resource), don't try to show a
    link

diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index a99cc2d..03347fb 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -40,7 +40,12 @@
                     END %]
                 <tr id='myopac_circ_trans_row'>
                     <td>
-                        <a href="[% ctx.opac_root %]/record/[% f.xact.circulation.target_copy.call_number.record.id %]">[% attrs.title %]</a>
+                        [% recid = f.xact.circulation.target_copy.call_number.record.id || f.xact.reservation.target_resource_type.record.id;
+                        IF recid; %]
+                        <a href="[% ctx.opac_root %]/record/[% recid %]">[% attrs.title %]</a>
+                        [% ELSE %]
+                        [% attrs.title %]
+                        [% END %]
                     </td>
                     <td>
                         <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>

commit 81bd5b6754407ebfa3156c70f877432863cfd309
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Apr 25 15:32:50 2011 -0400

    fines on reservations no longer break myopac/main (my account)

diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml
index e9250ef..048273c 100644
--- a/Open-ILS/examples/fm_IDL.xml
+++ b/Open-ILS/examples/fm_IDL.xml
@@ -2258,6 +2258,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 			<field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
 			<field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
 			<field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
+			<field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
 			<field name="billing_location" reporter:datatype="link"/>
 		</fields>
 		<links>
@@ -2265,6 +2266,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 			<link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
 			<link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
 			<link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
+			<link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
 			<link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
 		</links>
 	</class>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 9881b5e..2486e23 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -613,7 +613,9 @@ sub load_myopac_main {
         {
             flesh => 4,
             flesh_fields => {
-                mobts => ['circulation', 'grocery'],
+                mobts => [qw/grocery circulation reservation/],
+                bresv => ['target_resource_type'],
+                brt => ['record'],
                 mg => ['billings'],
                 mb => ['btype'],
                 circ => ['target_copy'],
@@ -640,14 +642,25 @@ sub load_myopac_main {
             qw/total_paid total_owed balance_owed/
         );
 
+        my $marc_xml = undef;
+        if ($mobts->xact_type eq 'reservation' and
+            $mobts->reservation->target_resource_type->record) {
+            $marc_xml = XML::LibXML->new->parse_string(
+                $mobts->reservation->target_resource_type->record->marc
+            );
+        } elsif ($mobts->xact_type eq 'circulation' and
+            $circ->target_copy->call_number->id != -1) {
+            $marc_xml = XML::LibXML->new->parse_string(
+                $circ->target_copy->call_number->record->marc
+            );
+        }
+
         push(
             @{$ctx->{"fines"}->{$mobts->grocery ? "grocery" : "circulation"}},
             {
                 xact => $mobts,
                 last_grocery_billing => $last_billing,
-                marc_xml => ($mobts->xact_type ne 'circulation' or $circ->target_copy->call_number->id == -1) ?
-                    undef :
-                    XML::LibXML->new->parse_string($circ->target_copy->call_number->record->marc),
+                marc_xml => $marc_xml
             } 
         );
     }
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 6f2584b..a99cc2d 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -33,7 +33,11 @@
             <tbody id='myopac_circ_trans_tbody'>
                 [% FOR f IN ctx.fines.circulation;
                     attrs = {marc_xml => f.marc_xml};
-                    PROCESS get_marc_attrs args=attrs %]
+                    IF f.marc_xml;
+                        PROCESS get_marc_attrs args=attrs;
+                    ELSIF f.xact.reservation;
+                        attrs.title = f.xact.reservation.target_resource_type.name;
+                    END %]
                 <tr id='myopac_circ_trans_row'>
                     <td>
                         <a href="[% ctx.opac_root %]/record/[% f.xact.circulation.target_copy.call_number.record.id %]">[% attrs.title %]</a>
@@ -42,26 +46,21 @@
                         <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
                     </td>
                     <td name='myopac_circ_trans_start'>
-                        [% date.format(
-                            ctx.parse_datetime(
-                                f.xact.circulation.xact_start
-                            ), DATE_FORMAT
-                        ) %]
+                        [% ts = f.xact.circulation.xact_start || f.xact.reservation.start_time || 0;
+                        IF ts;
+                            date.format(ctx.parse_datetime(ts), DATE_FORMAT);
+                        END %]
                     </td>
                     <td name='myopac_circ_trans_due'>
-                        [% date.format(
-                            ctx.parse_datetime(
-                                f.xact.circulation.due_date
-                            ), DATE_FORMAT
-                        ) %]
+                        [% ts = f.xact.circulation.due_date || f.xact.reservation.end_time || 0;
+                        IF ts;
+                            date.format(ctx.parse_datetime(ts), DATE_FORMAT);
+                        END %]
                     </td>
                     <td name='myopac_circ_trans_finished'>
-                        [%  IF f.xact.circulation.checkin_time;
-                                date.format(
-                                    ctx.parse_datetime(
-                                        f.xact.circulation.checkin_time
-                                    ), DATE_FORMAT
-                                );
+                        [%  ts = f.xact.circulation.checkin_time || f.xact.reservation.return_time || 0;
+                            IF ts;
+                                date.format(ctx.parse_datetime(ts), DATE_FORMAT);
                             ELSE %]
                             <!-- XXX TODO fines aren't really accruing
                                 if circ has hit maxfines. more clarity

commit 33104ab77c5467e46e4332e9f44f7a535a369808
Merge: 7b6ddfa 19bde8a
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sat Apr 23 11:40:15 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 7b6ddfa084f2a35045b7b09f49cbcd4b83fdf403
Merge: 7219d04 f520b83
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Apr 22 12:43:42 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 7219d04526bd19f0597bc6d96d5ec3b81ef4c38e
Merge: e2c3268 8d91019
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Apr 22 10:59:04 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit e2c3268ab218f5f6a0428090a5de3a1056458bb9
Merge: e8e30bb 9665615
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu Apr 21 10:49:52 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit e8e30bb6ada22c019dde28d3e9f1ed980898e64e
Merge: 83fdd35 2a529e2
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu Apr 21 10:49:49 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 9665615fff2e2c565db12ae559da165ed8a05c9a
Merge: 677b916 83fdd35
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 21 10:04:57 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 677b916ba8cdfcaab2ad96d9e94b93d7648cf53b
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 21 10:03:55 2011 -0400

    if no query is sent in the search, return the user to the referring page

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 5f8643a..50a09f1 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -120,6 +120,8 @@ sub load_rresults {
 
     my ($query, $site, $depth) = _prepare_biblio_search($cgi, $ctx);
 
+    return $self->generic_redirect unless $query;
+
     # Limit and offset will stay here. Everything else should be part of
     # the query string, not special args.
     my $args = {'limit' => $limit, 'offset' => $offset};

commit 83fdd35df046b1e16b2a5bdfa53e59be6ecb6661
Merge: 3a112a0 f69e07f
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 20 20:12:40 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 3a112a05995104c1c0714a1ba05cc44b8b444d78
Merge: 6c67b45 1896615
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 20 19:44:40 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 6c67b45f9e6c78ccf3872017d93d119d12d75464
Merge: 889edcb 25cd82a
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 20 19:44:37 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 189661577821bfb8b1a7e264da65f59eefd8fbad
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 20 17:50:29 2011 -0400

    show No Subjects when, well, there are no subjects; cleanup

diff --git a/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2 b/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
index 64cc3c4..98c8b1a 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
@@ -1,77 +1,67 @@
-<div id='rdetail_subject_div'>
-    <table cellpadding="0" cellspacing="0" border="0">
-        <tr>
-            <td width="1" style="padding-right:7px;" valign="top">
-                <strong>[% l('Subject:') %] </strong>
-            </td>
-            <td>
-                [% BLOCK render_subject;
-                loc = CGI.param('loc') | uri;
-                xpath = xpath || '//*[starts-with(@tag,"6")]';
-                FOR node IN ctx.marc_xml.findnodes(xpath);
-                    all_terms = [];
-                    FOR subfield IN node.childNodes;
-                        NEXT UNLESS subfield.nodeName == "subfield";
-                        code = 0;
-                        FOR a IN subfield.attributes;
-                            IF a.nodeName == "code";
-                                code = a.nodeValue;
-                            END;
-                        END;
-                        NEXT UNLESS code.match('[a-z]');
-
-                        IF code.match('[vxyz]');
-                            " &mdash; ";
-                        END;
-                        # at this point, we actually have a partial term to use.
-                        single_term = subfield.textContent | html;
-                        all_terms.push(subfield.textContent);
-                        total_term = all_terms.join(" ").replace('\s+$', '') ; # XXX need to take care of any &'s, right?
-                        '<a href="' _ ctx.opac_root _ '/results?qtype=subject&query=' _ total_term _ '&loc=' _ loc _ '">' _ single_term _ '</a>';
-                    END;
-                    "<br />";
-                END %]
-                [% END %]
-                [% s = PROCESS render_subject; IF s.match('\S'); s; END; %]
-            </td>
-        </tr>
+[% 
+    subjects = [
+        {
+            label => l('Genre: '),
+            xpath => '//*[@tag="655"]|//*[@tag="659"]'
+        }, {
+            label => l('Topic Heading: '),
+            xpath => '//*[@tag="690"]'
+        }, {
+            label => l('Geographic Setting: '),
+            xpath => '//*[@tag="691"]'
+        }, {
+            label => l('Biographical Subject: '),
+            xpath => '//*[@tag="692"]'
+        }, {
+            label => l('Character Attributes: '),
+            xpath => '//*[@tag="693"]'
+        }, {
+            label => l('Setting: '),
+            xpath => '//*[@tag="698"]'
+        }, {
+            label => l('Time Period: '),
+            xpath => '//*[@tag="699"]'
+        }
+    ];
 
-        [%
-            subjects = [
-                {
-                    label => l('Genre: '),
-                    xpath => '//*[@tag="655"]|//*[@tag="659"]'
-                }, {
-                    label => l('Topic Heading: '),
-                    xpath => '//*[@tag="690"]'
-                }, {
-                    label => l('Geographic Setting: '),
-                    xpath => '//*[@tag="691"]'
-                }, {
-                    label => l('Biographical Subject: '),
-                    xpath => '//*[@tag="692"]'
-                }, {
-                    label => l('Character Attributes: '),
-                    xpath => '//*[@tag="693"]'
-                }, {
-                    label => l('Setting: '),
-                    xpath => '//*[@tag="698"]'
-                }, {
-                    label => l('Time Period: '),
-                    xpath => '//*[@tag="699"]'
-                }
-            ];
+    BLOCK render_subject;
+        loc = CGI.param('loc') | uri;
+        xpath = xpath || '//*[starts-with(@tag,"6")]';
+        FOR node IN ctx.marc_xml.findnodes(xpath);
+            all_terms = [];
+            FOR subfield IN node.childNodes;
+                NEXT UNLESS subfield.nodeName == "subfield";
+                code = subfield.getAttribute('code');
+                NEXT UNLESS code.match('[a-z]');
+                IF code.match('[vxyz]'); " &mdash; "; END;
+                # at this point, we actually have a partial term to use.
+                single_term = subfield.textContent | html;
+                all_terms.push(subfield.textContent);
+                total_term = all_terms.join(" ").replace('\s+$', '') | uri;
+                '<a href="' _ ctx.opac_root _ '/results?qtype=subject&query=' _ total_term _ '&loc=' _ loc _ '">' _ single_term _ '</a>';
+            END;
+            IF all_terms.size; "<br/>"; END;
+        END;
+    END 
+%]
 
-            FOREACH subj IN subjects;
-                '<!-- SUBJECT = ' _ subj.label _ ' : xpath = ' _ subj.xpath _ ' -->';
-                content = PROCESS render_subject(xpath=subj.xpath);
-                IF content.match('\S') %]
-                <tr>
-                    <td width="1" style="padding:5px 7px 0px 0px;" valign="top">
-                        <strong>[% subj.label %]</strong>
-                    </td>
-                    <td style="padding-top:5px;"><div>[% content %] </div></td>
-                </tr>
-        [% END; END; %]
+<div id='rdetail_subject_div'>
+    <table cellpadding="0" cellspacing="0" border="0">
+    [%  any_subjects = 0;
+        FOREACH subj IN subjects;
+            content = PROCESS render_subject(xpath=subj.xpath);
+            IF content.match('\S');
+                any_subjects = 1; %]
+            <tr>
+                <td width="1" style="padding:5px 7px 0px 0px;" valign="top">
+                    <strong>[% subj.label %]</strong>
+                </td>
+                <td style="padding-top:5px;"><div>[% content %] </div></td>
+            </tr>
+            [% END; %]
+        [% END; %]
+    [% IF any_subjects == 0 %]
+        <tr><td><i>No Subjects</i></td></tr>
+    [% END; %]
     </table>
 </div>

commit ca56f8be2d4c949a50c4b62b8f9ac38aa607c637
Merge: 56537cd 889edcb
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 20 14:52:46 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 56537cd1aabf35e472d303b3856224a38b70f923
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 20 14:52:00 2011 -0400

    allow filter negation (e.g. -item_type(a) ) in dynamic filter query string building

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 524c9a6..5f8643a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -53,7 +53,7 @@ sub _prepare_biblio_search {
 
     # filters
     foreach (grep /^fi:/, $cgi->param) {
-        /:(\w+)$/ or next;
+        /:(-?\w+)$/ or next;
         my $term = join(",", $cgi->param($_));
         $query .= " $1($term)" if length $term;
     }

commit 889edcb5d42e63384373f95e6595659cda9e01eb
Merge: 31a58d7 919bb3c
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 20 14:51:21 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 31a58d7ba09d9b4c2692ad92d73c8294a9a8662c
Merge: 9ae7968 6de7b78
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 20 12:17:32 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 9ae796818d8ed8db2ca479854adc8951796b0cf9
Merge: 4b46eb6 70baa43
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 20 12:17:29 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 6de7b782d69b1cb68d558960b88f92aa06eecc22
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 20 11:01:45 2011 -0400

    format selector gets formats from CCVM fields, starting with 'mattype', falling back to item_type

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 9577121..524c9a6 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -51,6 +51,7 @@ sub _prepare_biblio_search {
 
     $query = ('#' . $_ . ' ' . $query) foreach ($cgi->param('modifier'));
 
+    # filters
     foreach (grep /^fi:/, $cgi->param) {
         /:(\w+)$/ or next;
         my $term = join(",", $cgi->param($_));
@@ -128,6 +129,8 @@ sub load_rresults {
 
     $query = "$query $facet" if $facet; # TODO
 
+    $logger->activity("EGWeb: [search] $query");
+
     my $results;
 
     try {
diff --git a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
index 2ca397b..d52129b 100644
--- a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
@@ -1,12 +1,23 @@
-[%-  name = name || "fi:format";
+[% 
+    # Start w/ mattype, fall back to item_type
+    format_spec = '';
+    formats = [];
+    FOR format_spec IN ['mattype', 'item_type'];
+        formats = ctx.search_ccvm('ctype', format_spec);
+        IF formats.size; BREAK; END;
+    END;
+    name = name || "fi:" _ format_spec;
     id = id || "format_selector";
-    values = values || CGI.param(name) -%]
+    values = values || CGI.param(name) 
+-%]
+
 <select id='[% id %]' name='[% name %]'[%
     multiple ? ' multiple="multiple"' : '';
     size ? (' size="' _ size _ '"') : ''; %]>
     <option value=''>[% l("All Formats") %]</option>
+
 [% FOR o IN formats %]
-    <option value='[% o.code %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : ''%]>[% o.name %]</option>
+    <option value='[% o.code %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : ''%]>[% o.value %]</option>
 [%- END %]
 <!--
 	<option value='at'>[% l("Books") %]</option>

commit 5e2751074bf814f7508aad406b65e2ed4c26060b
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 20 11:00:22 2011 -0400

    added simple field/value filter to the RO fetch/cache code;  useful for limiting larger sets of config data like ccvm objects

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 282d0e1..8b12453 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -12,6 +12,7 @@ my $ro_object_subs; # cached subs
 our %cache = ( # cached data
     map => {aou => {}}, # others added dynamically as needed
     list => {},
+    search => {},
     org_settings => {}
 );
 
@@ -42,21 +43,34 @@ sub init_ro_object_cache {
 
         my $list_key = "${hint}_list";
         my $get_key = "get_$hint";
+        my $search_key = "search_$hint";
 
+        # Retrieve the full set of objects with class $hint
         $ro_object_subs->{$list_key} = sub {
             my $method = "retrieve_all_$eclass";
             $cache{list}{$hint} = $e->$method() unless $cache{list}{$hint};
             return $cache{list}{$hint};
         };
     
-        $cache{map}{$hint} = {} unless $cache{map}{$hint};
-
+        # locate object of class $hint with Ident field $id
+        $cache{map}{$hint} = {};
         $ro_object_subs->{$get_key} = sub {
             my $id = shift;
             return $cache{map}{$hint}{$id} if $cache{map}{$hint}{$id}; 
             ($cache{map}{$hint}{$id}) = grep { $_->$ident_field eq $id } @{$ro_object_subs->{$list_key}->()};
             return $cache{map}{$hint}{$id};
         };
+
+        # search for objects of class $hint where field=value
+        $cache{search}{$hint} = {};
+        $ro_object_subs->{$search_key} = sub {
+            my ($field, $val) = @_;
+            my $method = "search_$eclass";
+            $cache{search}{$hint}{$field} = {} unless $cache{search}{$hint}{$field};
+            $cache{search}{$hint}{$field}{$val} = $e->$method({$field => $val}) 
+                unless $cache{search}{$hint}{$field}{$val};
+            return $cache{search}{$hint}{$field}{$val};
+        };
     }
 
     $ro_object_subs->{aou_tree} = sub {

commit 4b46eb6ef8c760a7557c3ce8a076ba2596d62944
Merge: bc33154 a4fa188
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 20 10:34:41 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit bc33154ed4b47c6aa53e5d6428e056f05b283852
Merge: 2ee25ad 1b1839b
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 20 10:34:39 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit a4fa188d77b2317255f264264048cd4d16167b29
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 20 09:57:34 2011 -0400

    use the more explicit get_foo instead of find_foo for pub/cache object lookup

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 5c6046d..9577121 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -80,7 +80,7 @@ sub _prepare_biblio_search {
     my $site;
     my $org = $cgi->param('loc');
     if (defined($org) and $org ne '' and ($org ne $ctx->{aou_tree}->()->id) and not $query =~ /site\(\S+\)/) {
-        $site = $ctx->{find_aou}->($org)->shortname;
+        $site = $ctx->{get_aou}->($org)->shortname;
         $query .= " site($site)";
     }
 
@@ -93,7 +93,7 @@ sub _prepare_biblio_search {
     my $depth;
     if (defined($cgi->param('depth')) and not $query =~ /depth\(\d+\)/) {
         $depth = defined $cgi->param('depth') ?
-            $cgi->param('depth') : $ctx->{find_aou}->($site)->ou_type->depth;
+            $cgi->param('depth') : $ctx->{get_aou}->($site)->ou_type->depth;
         $query .= " depth($depth)";
     }
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 456f9c3..282d0e1 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -41,7 +41,7 @@ sub init_ro_object_cache {
         $eclass =~ s/::/_/g;
 
         my $list_key = "${hint}_list";
-        my $find_key = "find_$hint";
+        my $get_key = "get_$hint";
 
         $ro_object_subs->{$list_key} = sub {
             my $method = "retrieve_all_$eclass";
@@ -51,7 +51,7 @@ sub init_ro_object_cache {
     
         $cache{map}{$hint} = {} unless $cache{map}{$hint};
 
-        $ro_object_subs->{$find_key} = sub {
+        $ro_object_subs->{$get_key} = sub {
             my $id = shift;
             return $cache{map}{$hint}{$id} if $cache{map}{$hint}{$id}; 
             ($cache{map}{$hint}{$id}) = grep { $_->$ident_field eq $id } @{$ro_object_subs->{$list_key}->()};
@@ -76,7 +76,7 @@ sub init_ro_object_cache {
             sub flesh_aout {
                 my $node = shift;
                 my $ro_object_subs = shift;
-                $node->ou_type( $ro_object_subs->{find_aout}->($node->ou_type) );
+                $node->ou_type( $ro_object_subs->{get_aout}->($node->ou_type) );
                 $cache{map}{aou}{$node->id} = $node;
                 flesh_aout($_, $ro_object_subs) foreach @{$node->children};
             };
@@ -89,7 +89,7 @@ sub init_ro_object_cache {
     };
 
     # Add a special handler for the tree-shaped org unit cache
-    $ro_object_subs->{find_aou} = sub {
+    $ro_object_subs->{get_aou} = sub {
         my $org_id = shift;
         $ro_object_subs->{aou_tree}->(); # force the org tree to load
         return $cache{map}{aou}{$org_id};
@@ -190,7 +190,7 @@ sub get_records_and_facets {
     if ($facet_key) {
         $facets = $facet_req->gather(1);
         $facets->{$_} = {
-            cmf => $self->ctx->{find_cmf}->($_),
+            cmf => $self->ctx->{get_cmf}->($_),
             data => $facets->{$_}
         } for keys %$facets;    # quick-n-dirty
     } else {
diff --git a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
index 999d6b7..ac8d99c 100644
--- a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
@@ -81,7 +81,7 @@
                         </div>
                     </td>
                     <td width="136">
-                        [% ctx.find_aou(ahr.pickup_lib).name %]
+                        [% ctx.get_aou(ahr.pickup_lib).name %]
                     </td>
                     <td width="104">
                         [% IF ahr.frozen == 't' AND ahr.thaw_date;
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index ec18831..1a7c814 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -154,7 +154,7 @@
                         </div>
                     </td>
                     <td width="136">
-                        [% ctx.find_aou(ahr.pickup_lib).name %]
+                        [% ctx.get_aou(ahr.pickup_lib).name %]
                     </td>
                     <td width="104">
                         <!-- <input
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index 1c2f8b5..fc4dce0 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -62,7 +62,7 @@
                 value="[% ctx.referer | replace('^http:', 'https:') | html %]" />
             <h1>Place Hold</h1>
             <p>
-                [% | l(attrs.title, ctx.find_aou(ctx.default_pickup_lib).name) %]
+                [% | l(attrs.title, ctx.get_aou(ctx.default_pickup_lib).name) %]
                 You would like to place a hold on <strong><q>[_1]</q></strong> to be picked up at [_2].
                 If this is correct, press <strong>SUBMIT</strong>.
                 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 79eb75b..015f533 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -126,7 +126,7 @@
         <tr>
             <td>[%
                 # XXX KCLS-specific kludging
-                org_name = ctx.find_aou(copy_info.circ_lib).name;
+                org_name = ctx.get_aou(copy_info.circ_lib).name;
                 dir = org_name | lower | replace('[^\w]', '') |
                     replace('.+320th', '320th'); %]
                 <a href="http://www.kcls.org/[% dir %]/"
@@ -138,7 +138,7 @@
             [% IF ctx.is_staff %]
             <td>
                 [% copy_info.age_protect ?
-                    ctx.find_crahp(copy_info.age_protect).name : l('None') %]
+                    ctx.get_crahp(copy_info.age_protect).name : l('None') %]
             </td>
             <td>[% date.format(
                 ctx.parse_datetime(copy_info.create_date),

commit 2ee25ad13cfb5a299b85b149881de868ecbe1de1
Merge: 22b0569 28283b6
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Apr 19 13:36:40 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 22b0569858c4bd9b622d9f311c42f57f544cda14
Merge: c362984 307a437
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Apr 18 16:02:07 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit c362984c5d829ca737549f9a274db61717673492
Merge: c4424da b9750bf
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Apr 18 11:42:46 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit c4424da85ae1f84c7dd6492d383281b23d0a2cc4
Merge: d43668a 995e8d9
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Apr 18 11:30:53 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit d43668a690345f109bd448dfec4d3c17a5522ba0
Merge: d8627ef c43136a
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sun Apr 17 09:13:02 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit d8627efd4136a265b2cd7bc18a17082ecd9e829d
Merge: 4f59a8e ab70fb8
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sun Apr 17 09:13:00 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit c43136a300648ee8d75c8c9a427cac7061384e02
Author: berick <berick at esilibrary.com>
Date:   Fri Apr 15 16:12:08 2011 -0400

    move utils.tt2 to printnav.tt2 just to give it a more explicit name; i18n and cleanup

diff --git a/Open-ILS/web/templates/default/opac/advanced.tt2 b/Open-ILS/web/templates/default/opac/advanced.tt2
index 8d9e125..5c953a3 100644
--- a/Open-ILS/web/templates/default/opac/advanced.tt2
+++ b/Open-ILS/web/templates/default/opac/advanced.tt2
@@ -3,7 +3,7 @@
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = l("Advanced Search") %]
     <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/printnav.tt2" %]
         <div id="adv_search_parent">
             <div id="adv_search_tabs">
                 <a href="#" alt="[% l('Advanced Search') %]" id="adv_search"></a>
diff --git a/Open-ILS/web/templates/default/opac/home.tt2 b/Open-ILS/web/templates/default/opac/home.tt2
index 3436a46..5e1fe41 100644
--- a/Open-ILS/web/templates/default/opac/home.tt2
+++ b/Open-ILS/web/templates/default/opac/home.tt2
@@ -3,7 +3,7 @@
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = l("Home") %]
     <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/printnav.tt2" %]
         [% INCLUDE "default/opac/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
diff --git a/Open-ILS/web/templates/default/opac/login.tt2 b/Open-ILS/web/templates/default/opac/login.tt2
index 675a40d..5f4d03f 100644
--- a/Open-ILS/web/templates/default/opac/login.tt2
+++ b/Open-ILS/web/templates/default/opac/login.tt2
@@ -3,7 +3,7 @@
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = l("Account Login") %]
     <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/printnav.tt2" %]
         [% INCLUDE "default/opac/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
diff --git a/Open-ILS/web/templates/default/opac/mylist.tt2 b/Open-ILS/web/templates/default/opac/mylist.tt2
index 2152b52..2ec8a5d 100644
--- a/Open-ILS/web/templates/default/opac/mylist.tt2
+++ b/Open-ILS/web/templates/default/opac/mylist.tt2
@@ -4,7 +4,7 @@
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = l("Record Detail") %]
     <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/printnav.tt2" %]
         [% INCLUDE "default/opac/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
index 9e1125a..fccb14b 100644
--- a/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
@@ -11,7 +11,7 @@
 %]
     [% INCLUDE "default/opac/parts/topnav.tt2" %]
     <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/printnav.tt2" %]
         [% INCLUDE "default/opac/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
diff --git a/Open-ILS/web/templates/default/opac/parts/printnav.tt2 b/Open-ILS/web/templates/default/opac/parts/printnav.tt2
new file mode 100644
index 0000000..13a8f66
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/printnav.tt2
@@ -0,0 +1,25 @@
+<div class="big-block">
+    <div class="float-right">
+        <div class="pos-rel">
+            <img src="[% ctx.media_prefix %]/images/utils-corner-left.png" class="float-left" />
+            <div class="left-corner"> 
+                <a href="javascript:history.go(-1)"
+                    id="util_back_btn"><img alt="[% l('Back') %]"
+                    src="[% ctx.media_prefix %]/images/tool_back.png" /></a>
+                <a href="[% ctx.opac_root %]/home"
+                    id="util_home_btn"><img alt="[% l('Homepage') %]"
+                    src="[% ctx.media_prefix %]/images/tool_home.png" /></a>
+                <a href="javascript:window.print();"
+                    id="util_print_btn"><img alt="[% l('Print Page') %]"
+                    src="[% ctx.media_prefix %]/images/tool_print.png" /></a>
+                <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm"
+                    id="util_help_btn"><img alt="[% l('Help') %]"
+                    src="[% ctx.media_prefix %]/images/tool_help.png" /></a>
+                <a href="javascript:history.go(+1)"
+                    id="util_forw_btn"><img alt="[% l('Forward') %]"
+                    src="[% ctx.media_prefix %]/images/tool_forward.png" /></a>
+            </div>
+            <img src="[% ctx.media_prefix %]/images/utils-corner-right.png" class="float-left" />
+        </div>
+    </div>
+</div>
diff --git a/Open-ILS/web/templates/default/opac/parts/utils.tt2 b/Open-ILS/web/templates/default/opac/parts/utils.tt2
deleted file mode 100644
index aa70a6c..0000000
--- a/Open-ILS/web/templates/default/opac/parts/utils.tt2
+++ /dev/null
@@ -1,30 +0,0 @@
-        <div class="big-block">
-            <div id="user-ql"></div>
-            <div class="float-right">
-                <div class="pos-rel">
-                    <img
-                        src="[% ctx.media_prefix %]/images/utils-corner-left.png"
-                        class="float-left" />
-                    <div class="left-corner"> 
-                        <a href="javascript:history.go(-1)"
-                            id="util_back_btn"><img alt="Back"
-                            src="[% ctx.media_prefix %]/images/tool_back.png" /></a>
-                        <a href="[% ctx.opac_root %]/home"
-                            id="util_home_btn"><img alt="Homepage"
-                            src="[% ctx.media_prefix %]/images/tool_home.png" /></a>
-                        <a href="javascript:window.print();"
-                            id="util_print_btn"><img alt="Print Page"
-                            src="[% ctx.media_prefix %]/images/tool_print.png" /></a>
-                        <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm"
-                            id="util_help_btn"><img alt="Help"
-                            src="[% ctx.media_prefix %]/images/tool_help.png" /></a>
-                        <a href="javascript:history.go(+1)"
-                            id="util_forw_btn"><img alt="Forward"
-                            src="[% ctx.media_prefix %]/images/tool_forward.png" /></a>
-                    </div>
-                    <img
-                        src="[% ctx.media_prefix %]/images/utils-corner-right.png"
-                        class="float-left" />
-                </div>
-            </div>
-        </div>
diff --git a/Open-ILS/web/templates/default/opac/place_hold.tt2 b/Open-ILS/web/templates/default/opac/place_hold.tt2
index 792b5c2..3e6d2bd 100644
--- a/Open-ILS/web/templates/default/opac/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/place_hold.tt2
@@ -3,7 +3,7 @@
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = l("Place Hold") %]
     <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/printnav.tt2" %]
         [% INCLUDE "default/opac/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
diff --git a/Open-ILS/web/templates/default/opac/record.tt2 b/Open-ILS/web/templates/default/opac/record.tt2
index 7f2a705..ffe90f4 100644
--- a/Open-ILS/web/templates/default/opac/record.tt2
+++ b/Open-ILS/web/templates/default/opac/record.tt2
@@ -3,7 +3,7 @@
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = l("Record Detail") %]
     <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/printnav.tt2" %]
         [% INCLUDE "default/opac/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index db1f298..0fb4c31 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -10,7 +10,7 @@
 %]
     <form action="[% ctx.opac_root %]/results" method="GET">
     <div id="search-wrapper">
-        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/printnav.tt2" %]
         [% INCLUDE "default/opac/parts/searchbar.tt2" took_care_of_form=1 %]
     </div>
     <div class="almost-content-wrapper">

commit 77e581204ed2dfa22e731cd658fbb21f1bbbdd40
Author: berick <berick at esilibrary.com>
Date:   Fri Apr 15 16:11:40 2011 -0400

    use org unit shortname for site param; capture site/depth in search builder to pass on to unapi retrieval, though there's still some template work to do w/ displaying the correct data there (for copy counts)

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 1cae862..5c6046d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -77,17 +77,27 @@ sub _prepare_biblio_search {
         }
     }
 
-    my $site = $cgi->param('loc');
-    if (defined($site) and $site ne '' and ($site ne $ctx->{aou_tree}->()->id) and not $query =~ /site\(\d+\)/) {
+    my $site;
+    my $org = $cgi->param('loc');
+    if (defined($org) and $org ne '' and ($org ne $ctx->{aou_tree}->()->id) and not $query =~ /site\(\S+\)/) {
+        $site = $ctx->{find_aou}->($org)->shortname;
         $query .= " site($site)";
     }
+
+    if(!$site) {
+        ($site) = ($query =~ /site\(([^\)]+)\)/);
+        $site ||= $ctx->{aou_tree}->()->shortname;
+    }
+
+
+    my $depth;
     if (defined($cgi->param('depth')) and not $query =~ /depth\(\d+\)/) {
-        my $depth = defined $cgi->param('depth') ?
+        $depth = defined $cgi->param('depth') ?
             $cgi->param('depth') : $ctx->{find_aou}->($site)->ou_type->depth;
         $query .= " depth($depth)";
     }
 
-    return $query;
+    return ($query, $site, $depth);
 }
 
 # context additions: 
@@ -104,9 +114,11 @@ sub load_rresults {
     my $page = $cgi->param('page') || 0;
     my $facet = $cgi->param('facet');
     my $limit = $cgi->param('limit') || 10; # TODO user settings
+    my $loc = $cgi->param('loc');
     my $offset = $page * $limit;
 
-    my $query = _prepare_biblio_search($cgi, $ctx);
+    my ($query, $site, $depth) = _prepare_biblio_search($cgi, $ctx);
+
     # Limit and offset will stay here. Everything else should be part of
     # the query string, not special args.
     my $args = {'limit' => $limit, 'offset' => $offset};
@@ -140,7 +152,13 @@ sub load_rresults {
     return Apache2::Const::OK if @$rec_ids == 0;
 
     my ($facets, @data) = $self->get_records_and_facets(
-        $rec_ids, $results->{facet_key}, {flesh => '{holdings_xml,mra}'});
+        $rec_ids, $results->{facet_key}, 
+        {
+            flesh => '{holdings_xml,mra}',
+            site => $site,
+            depth => $depth
+        }
+    );
 
     # shove recs into context in search results order
     for my $rec_id (@$rec_ids) {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index e951fef..456f9c3 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -149,7 +149,7 @@ sub get_records_and_facets {
     my ($self, $rec_ids, $facet_key, $unapi_args) = @_;
 
     $unapi_args ||= {};
-    $unapi_args->{loc} ||= $self->ctx->{aou_tree}->()->shortname;
+    $unapi_args->{site} ||= $self->ctx->{aou_tree}->()->shortname;
     $unapi_args->{depth} ||= $self->ctx->{aou_tree}->()->ou_type->depth;
     $unapi_args->{flesh_depth} ||= 5;
 
@@ -171,7 +171,7 @@ sub get_records_and_facets {
          {from => [
             'unapi.bre', $_, 'marcxml','record', 
             $unapi_args->{flesh}, 
-            $unapi_args->{loc}, 
+            $unapi_args->{site}, 
             $unapi_args->{depth}, 
             $unapi_args->{flesh_depth}, 
         ]}

commit 4f59a8edfd8c2cf6169916e2cf478d6075f06170
Merge: 4b13bdb caed635
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Apr 15 12:32:41 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 4b13bdbd2b831260d86eca2eb2c1fadcd063ca2c
Merge: 34f5bcd 07ff0df
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Apr 15 12:26:38 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 34f5bcde3cfbbe6bbd66fe19cad6eb49a459a4ae
Merge: a64a412 a07592f
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Apr 15 12:14:04 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit a64a412ba609cd4c0058791863a61e4bf0c3ee78
Merge: dcbe6d9 348c0f6
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Apr 15 11:09:32 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit dcbe6d9f3f58c0619c2c9a1717e464d5fcd781c5
Merge: 5f176d5 1d8df6c
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Apr 15 09:21:42 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 5f176d5ad2eaf6c04392f96eac95b81ae14ee8f4
Merge: 84be617 73c6e8d
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Apr 15 09:21:40 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 1d8df6cd7bc7e7d35258845bd3a2378796b45f49
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 14 15:04:23 2011 -0400

    fetch bookbags inside xact to avoid replication delays, which can occur directly after bookbag-update actions

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 277c469..9881b5e 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -759,21 +759,31 @@ sub load_myopac_bookbags {
     my $e = $self->editor;
     my $ctx = $self->ctx;
 
+    $e->xact_begin; # replication...
+
     my $rv = $self->load_mylist;
-    return $rv if $rv ne Apache2::Const::OK;
+    unless($rv eq Apache2::Const::OK) {
+        $e->rollback;
+        return $rv;
+    }
 
     my $args = {
         order_by => {cbreb => 'name'},
         limit => $self->cgi->param('limit') || 10,
-        offset => $self->cgi->param('limit') || 0
+        offset => $self->cgi->param('offset') || 0
     };
 
     $ctx->{bookbags} = $e->search_container_biblio_record_entry_bucket([
         {owner => $self->editor->requestor->id, btype => 'bookbag'},
         # XXX what to do about the possibility of really large bookbags here?
         {"flesh" => 1, "flesh_fields" => {"cbreb" => ["items"]}, %$args}
-    ]) or return $e->die_event;
+    ]);
 
+    if(!$ctx->{bookbags}) {
+        $e->rollback;
+        return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+    }
+    
     # get unique record IDs
     my %rec_ids = ();
     foreach my $bbag (@{$ctx->{bookbags}}) {
@@ -786,6 +796,7 @@ sub load_myopac_bookbags {
 
     $ctx->{bookbags_marc_xml} = $self->fetch_marc_xml_by_id([keys %rec_ids]);
 
+    $e->rollback;
     return Apache2::Const::OK;
 }
 

commit 84be617a0be96593cf4e24a3af32a411965556ae
Merge: 12ec58a 7a2b1ea
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 13 14:26:01 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 12ec58a976c75ba0b3894bcac1e88b7218d267be
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 13 14:25:58 2011 -0400

    use unapi for record retrieval on details page; includes svf attrs for matttype, etc.; some i18n cleanup

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index f636744..3a54fbc 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -11,32 +11,35 @@ my $U = 'OpenILS::Application::AppUtils';
 #   record : bre object
 sub load_record {
     my $self = shift;
-    $self->ctx->{page} = 'record';
+    my $ctx = $self->ctx;
+    $ctx->{page} = 'record';
 
-    my $org = $self->cgi->param('loc') || $self->ctx->{aou_tree}->()->id;
+    my $org = $self->cgi->param('loc') || $ctx->{aou_tree}->()->id;
     my $depth = $self->cgi->param('depth') || 0;
     my $copy_limit = int($self->cgi->param('copy_limit') || 10);
     my $copy_offset = int($self->cgi->param('copy_offset') || 0);
 
-    my $rec_id = $self->ctx->{page_args}->[0]
+    my $rec_id = $ctx->{page_args}->[0]
         or return Apache2::Const::HTTP_BAD_REQUEST;
 
     # run copy retrieval in parallel to bib retrieval
+    # XXX unapi
     my $copy_rec = OpenSRF::AppSession->create('open-ils.cstore')->request(
         'open-ils.cstore.json_query.atomic', 
         $self->mk_copy_query($rec_id, $org, $depth, $copy_limit, $copy_offset));
 
-    $self->ctx->{record} = $self->editor->retrieve_biblio_record_entry($rec_id);
-    $self->ctx->{marc_xml} = XML::LibXML->new->parse_string($self->ctx->{record}->marc);
+    my (undef, @rec_data) = $self->get_records_and_facets([$rec_id], undef, {flesh => '{holdings_xml,mra}'});
+    $ctx->{bre_id} = $rec_data[0]->{id};
+    $ctx->{marc_xml} = $rec_data[0]->{marc_xml};
 
-    $self->ctx->{copies} = $copy_rec->gather(1);
-    $self->ctx->{copy_limit} = $copy_limit;
-    $self->ctx->{copy_offset} = $copy_offset;
+    $ctx->{copies} = $copy_rec->gather(1);
+    $ctx->{copy_limit} = $copy_limit;
+    $ctx->{copy_offset} = $copy_offset;
 
     for my $expand ($self->cgi->param('expand')) {
-        $self->ctx->{"expand_$expand"} = 1;
+        $ctx->{"expand_$expand"} = 1;
         if($expand eq 'marchtml') {
-            $self->ctx->{marchtml} = $self->mk_marc_html($rec_id);
+            $ctx->{marchtml} = $self->mk_marc_html($rec_id);
         } 
     }
 
diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index 8a9c0f3..3e6b175 100644
--- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -43,8 +43,10 @@
             END;
         END;
 
+        # "mattype" == "custom marc format specifier"
         FOR icon_style IN ['mattype', 'item_type']; 
-            node = xml.findnodes('//*[local-name()="attributes"]/*[local-name()="field"][@name="' _ icon_style _ '"]');
+            node = xml.findnodes(
+                '//*[local-name()="attributes"]/*[local-name()="field"][@name="' _ icon_style _ '"]');
             IF node;
                 args.format_label = node.getAttribute('coded-value')
                 args.format_icon = ctx.media_prefix _ '/images/format_icons/' _ icon_style _ '/' _ node.textContent _ '.png';
diff --git a/Open-ILS/web/templates/default/opac/parts/record/body.tt2 b/Open-ILS/web/templates/default/opac/parts/record/body.tt2
index 9de517d..3444a59 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/body.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/body.tt2
@@ -1,6 +1,5 @@
 <!-- ****************** page_rdetail.xml ***************************** -->
-[%  record = ctx.record;
-    attrs = {marc_xml => ctx.marc_xml};
+[%  attrs = {marc_xml => ctx.marc_xml};
     PROCESS "default/opac/parts/misc_util.tt2";
     PROCESS get_marc_attrs args=attrs %]
 <div id='canvas_main' class='canvas'>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 5e81b8e..79eb75b 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -30,38 +30,39 @@
                             <span class='opac-auto-030'>[% l("Author") %]:</span>
                             <em><a title='[% l("Perform an author search") %]'
                                     id='rdetail_author'
-                                    href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% CGI.param('loc') | uri %]">[% attrs.author %]</a>
-                            </em>
+                                    href="[% ctx.opac_root %]/results?qtype=author&query=[%-
+                                        attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% CGI.param('loc') | uri %]">[% attrs.author %]</a></em>
                             [% END %]
                         </td>
                         <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
                             <div style="width:230px;text-align:left;margin-top:3px;">
                                 <div style="float:right;">
                                     <div class="rdetail_aux_utils opac-auto-010">
-                                        <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% record.id %]&hold_type=T" id="rdetail_place_hold" class="no-dec"><img
-                                            src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" />
-                                            <span style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
+                                        <a href="[% ctx.opac_root %]/place_hold[%-
+                                            propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% ctx.bre_id %]&hold_type=T" id="rdetail_place_hold" class="no-dec"><img
+                                            src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
+                                                style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
                                     </div>
                                     <div class="rdetail_aux_utils opac-auto-121">
-                                        [%  operation = ctx.mylist.grep(record.id).size ? "delete" : "add";
-                                            label = (operation == "add") ? "Add to" : "Remove from"; %]
+                                        [%  
+                                            operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add";
+                                            label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); 
+                                        %]
                                         <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
-                                            <input type="hidden" name="record" value="[% record.id %]" />
+                                            <input type="hidden" name="record" value="[% ctx.bre_id %]" />
                                             <div class="pos-abs">
                                                 <div class="opac-auto-149">
-                                                    <input type="submit" title="[% l(label _ ' my list') %]" value="[% l(label _ ' my list') %]" class="subtle-button" />
+                                                    <input type="submit" title="[% label %]" value="[% label %]" class="subtle-button" />
                                                 </div>
                                             </div>
-                                            <input type="image"
-                                                alt="[% l(label _ ' my list') %]"
+                                            <input type="image" alt="[% label %]"
                                                 src="[% ctx.media_prefix %]/images/clipboard.png" />
                                         </form>
                                     </div>
                                 </div>
                                 <div style="float:right;margin-right:17px;">
-                                    [% IF attrs.format %]
-                                    <img alt="[% attrs.format %]"
-                                        src="[% ctx.media_prefix %]/images/[% attrs.format_icon %]" />
+                                    [% IF attrs.format_icon %]
+                                    <img alt="[% attrs.format_label %]" title="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
                                     [% END %]
                                 </div>
                             </div>
@@ -166,14 +167,14 @@
             <td>
                 [%# For some reason, browsers render &copy (as in, &copy_limit=foo) as the copyright 
                     symbol, even though it's inside inside the href attribute string.  Use ; instead %]
-                <a href="[% ctx.opac_root %]/record/[% record.id %]?copy_offset=[% new_offset %];copy_limit=[% ctx.copy_limit %]">&laquo; [%
+                <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% new_offset %];copy_limit=[% ctx.copy_limit %]">&laquo; [%
                     l('Previous [_1]', ctx.copy_offset - new_offset)
                 %]</a>
             </td>
         [% END %]
         [% IF ctx.copies.size >= ctx.copy_limit %]
             <td>
-                <a href="[% ctx.opac_root %]/record/[% record.id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %];copy_limit=[% ctx.copy_limit %]">[%
+                <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %];copy_limit=[% ctx.copy_limit %]">[%
                     l('Next [_1]', ctx.copy_limit)
                 %] &raquo;</a>
             </td>
@@ -220,7 +221,7 @@
                                 </div>
                             </td>
                             <td width="1" valign="top" align="right" style="white-space:nowrap;">
-                                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% record.id %]&hold_type=T"><img alt="[% l('Place Hold') %]"
+                                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% ctx.bre_id %]&hold_type=T"><img alt="[% l('Place Hold') %]"
                                     src="[% ctx.media_prefix %]/images/place_hold.gif" /></a>
                                 <a href="#" id="rd_reviews_and_more" target="_blank"><img
                                     alt="[% l('Reviews and More') %]" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>

commit 7a2b1eaff8108032cf42699f2c79c4de85de7f93
Merge: b72c5e8 f81a288
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 13 14:14:34 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit b72c5e8957c5058ff4c2c27b094030886d16d5a0
Merge: 94e9521 c06bd3f
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 13 14:14:31 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit f81a2885e362e2cccfad38477e80a41e7b1df165
Merge: cb41edb 94e9521
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 13 13:53:35 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit cb41edb32f40ebc1dc3413cb265b02403353e334
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 13 13:53:14 2011 -0400

    Pull SVF attrs into displayed bib rec (results page only thus far).  use SVF value to determine format icon and icon label

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index fe61149..1cae862 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -140,7 +140,7 @@ sub load_rresults {
     return Apache2::Const::OK if @$rec_ids == 0;
 
     my ($facets, @data) = $self->get_records_and_facets(
-        $rec_ids, $results->{facet_key}, {flesh => '{holdings_xml}'});
+        $rec_ids, $results->{facet_key}, {flesh => '{holdings_xml,mra}'});
 
     # shove recs into context in search results order
     for my $rec_id (@$rec_ids) {
diff --git a/Open-ILS/web/images/format_icons/item_type/a.png b/Open-ILS/web/images/format_icons/item_type/a.png
new file mode 100644
index 0000000..2800684
Binary files /dev/null and b/Open-ILS/web/images/format_icons/item_type/a.png differ
diff --git a/Open-ILS/web/images/format_icons/item_type/c.png b/Open-ILS/web/images/format_icons/item_type/c.png
new file mode 100644
index 0000000..132ca40
Binary files /dev/null and b/Open-ILS/web/images/format_icons/item_type/c.png differ
diff --git a/Open-ILS/web/images/format_icons/item_type/d.png b/Open-ILS/web/images/format_icons/item_type/d.png
new file mode 100644
index 0000000..132ca40
Binary files /dev/null and b/Open-ILS/web/images/format_icons/item_type/d.png differ
diff --git a/Open-ILS/web/images/format_icons/item_type/e.png b/Open-ILS/web/images/format_icons/item_type/e.png
new file mode 100644
index 0000000..f9f8047
Binary files /dev/null and b/Open-ILS/web/images/format_icons/item_type/e.png differ
diff --git a/Open-ILS/web/images/format_icons/item_type/f.png b/Open-ILS/web/images/format_icons/item_type/f.png
new file mode 100644
index 0000000..f9f8047
Binary files /dev/null and b/Open-ILS/web/images/format_icons/item_type/f.png differ
diff --git a/Open-ILS/web/images/format_icons/item_type/g.png b/Open-ILS/web/images/format_icons/item_type/g.png
new file mode 100644
index 0000000..dd0a56f
Binary files /dev/null and b/Open-ILS/web/images/format_icons/item_type/g.png differ
diff --git a/Open-ILS/web/images/format_icons/item_type/i.png b/Open-ILS/web/images/format_icons/item_type/i.png
new file mode 100644
index 0000000..b6ddf3e
Binary files /dev/null and b/Open-ILS/web/images/format_icons/item_type/i.png differ
diff --git a/Open-ILS/web/images/format_icons/item_type/j.png b/Open-ILS/web/images/format_icons/item_type/j.png
new file mode 100644
index 0000000..5ada234
Binary files /dev/null and b/Open-ILS/web/images/format_icons/item_type/j.png differ
diff --git a/Open-ILS/web/images/format_icons/item_type/k.png b/Open-ILS/web/images/format_icons/item_type/k.png
new file mode 100644
index 0000000..e523300
Binary files /dev/null and b/Open-ILS/web/images/format_icons/item_type/k.png differ
diff --git a/Open-ILS/web/images/format_icons/item_type/m.png b/Open-ILS/web/images/format_icons/item_type/m.png
new file mode 100644
index 0000000..a347513
Binary files /dev/null and b/Open-ILS/web/images/format_icons/item_type/m.png differ
diff --git a/Open-ILS/web/images/format_icons/item_type/o.png b/Open-ILS/web/images/format_icons/item_type/o.png
new file mode 100644
index 0000000..f7b5c7b
Binary files /dev/null and b/Open-ILS/web/images/format_icons/item_type/o.png differ
diff --git a/Open-ILS/web/images/format_icons/item_type/p.png b/Open-ILS/web/images/format_icons/item_type/p.png
new file mode 100644
index 0000000..f7b5c7b
Binary files /dev/null and b/Open-ILS/web/images/format_icons/item_type/p.png differ
diff --git a/Open-ILS/web/images/format_icons/item_type/r.png b/Open-ILS/web/images/format_icons/item_type/r.png
new file mode 100644
index 0000000..7b76d03
Binary files /dev/null and b/Open-ILS/web/images/format_icons/item_type/r.png differ
diff --git a/Open-ILS/web/images/format_icons/item_type/t.png b/Open-ILS/web/images/format_icons/item_type/t.png
new file mode 100644
index 0000000..2800684
Binary files /dev/null and b/Open-ILS/web/images/format_icons/item_type/t.png differ
diff --git a/Open-ILS/web/images/media/2.png b/Open-ILS/web/images/format_icons/mattype/2.png
similarity index 100%
rename from Open-ILS/web/images/media/2.png
rename to Open-ILS/web/images/format_icons/mattype/2.png
diff --git a/Open-ILS/web/images/media/5.png b/Open-ILS/web/images/format_icons/mattype/5.png
similarity index 100%
rename from Open-ILS/web/images/media/5.png
rename to Open-ILS/web/images/format_icons/mattype/5.png
diff --git a/Open-ILS/web/images/media/a.png b/Open-ILS/web/images/format_icons/mattype/a.png
similarity index 100%
rename from Open-ILS/web/images/media/a.png
rename to Open-ILS/web/images/format_icons/mattype/a.png
diff --git a/Open-ILS/web/images/media/b.png b/Open-ILS/web/images/format_icons/mattype/b.png
similarity index 100%
rename from Open-ILS/web/images/media/b.png
rename to Open-ILS/web/images/format_icons/mattype/b.png
diff --git a/Open-ILS/web/images/media/c.png b/Open-ILS/web/images/format_icons/mattype/c.png
similarity index 100%
rename from Open-ILS/web/images/media/c.png
rename to Open-ILS/web/images/format_icons/mattype/c.png
diff --git a/Open-ILS/web/images/media/d.png b/Open-ILS/web/images/format_icons/mattype/d.png
similarity index 100%
rename from Open-ILS/web/images/media/d.png
rename to Open-ILS/web/images/format_icons/mattype/d.png
diff --git a/Open-ILS/web/images/media/e.png b/Open-ILS/web/images/format_icons/mattype/e.png
similarity index 100%
rename from Open-ILS/web/images/media/e.png
rename to Open-ILS/web/images/format_icons/mattype/e.png
diff --git a/Open-ILS/web/images/media/f.png b/Open-ILS/web/images/format_icons/mattype/f.png
similarity index 100%
rename from Open-ILS/web/images/media/f.png
rename to Open-ILS/web/images/format_icons/mattype/f.png
diff --git a/Open-ILS/web/images/media/h.png b/Open-ILS/web/images/format_icons/mattype/h.png
similarity index 100%
rename from Open-ILS/web/images/media/h.png
rename to Open-ILS/web/images/format_icons/mattype/h.png
diff --git a/Open-ILS/web/images/media/i.png b/Open-ILS/web/images/format_icons/mattype/i.png
similarity index 100%
rename from Open-ILS/web/images/media/i.png
rename to Open-ILS/web/images/format_icons/mattype/i.png
diff --git a/Open-ILS/web/images/media/j.png b/Open-ILS/web/images/format_icons/mattype/j.png
similarity index 100%
rename from Open-ILS/web/images/media/j.png
rename to Open-ILS/web/images/format_icons/mattype/j.png
diff --git a/Open-ILS/web/images/media/k.png b/Open-ILS/web/images/format_icons/mattype/k.png
similarity index 100%
rename from Open-ILS/web/images/media/k.png
rename to Open-ILS/web/images/format_icons/mattype/k.png
diff --git a/Open-ILS/web/images/media/l.png b/Open-ILS/web/images/format_icons/mattype/l.png
similarity index 100%
rename from Open-ILS/web/images/media/l.png
rename to Open-ILS/web/images/format_icons/mattype/l.png
diff --git a/Open-ILS/web/images/media/m.png b/Open-ILS/web/images/format_icons/mattype/m.png
similarity index 100%
rename from Open-ILS/web/images/media/m.png
rename to Open-ILS/web/images/format_icons/mattype/m.png
diff --git a/Open-ILS/web/images/media/media_downloadableebook.png b/Open-ILS/web/images/format_icons/mattype/media_downloadableebook.png
similarity index 100%
rename from Open-ILS/web/images/media/media_downloadableebook.png
rename to Open-ILS/web/images/format_icons/mattype/media_downloadableebook.png
diff --git a/Open-ILS/web/images/media/media_electronicgames.png b/Open-ILS/web/images/format_icons/mattype/media_electronicgames.png
similarity index 100%
rename from Open-ILS/web/images/media/media_electronicgames.png
rename to Open-ILS/web/images/format_icons/mattype/media_electronicgames.png
diff --git a/Open-ILS/web/images/media/media_evideo.png b/Open-ILS/web/images/format_icons/mattype/media_evideo.png
similarity index 100%
rename from Open-ILS/web/images/media/media_evideo.png
rename to Open-ILS/web/images/format_icons/mattype/media_evideo.png
diff --git a/Open-ILS/web/images/media/media_onlinejournal.png b/Open-ILS/web/images/format_icons/mattype/media_onlinejournal.png
similarity index 100%
rename from Open-ILS/web/images/media/media_onlinejournal.png
rename to Open-ILS/web/images/format_icons/mattype/media_onlinejournal.png
diff --git a/Open-ILS/web/images/media/media_player.png b/Open-ILS/web/images/format_icons/mattype/media_player.png
similarity index 100%
rename from Open-ILS/web/images/media/media_player.png
rename to Open-ILS/web/images/format_icons/mattype/media_player.png
diff --git a/Open-ILS/web/images/media/media_podcasts.png b/Open-ILS/web/images/format_icons/mattype/media_podcasts.png
similarity index 100%
rename from Open-ILS/web/images/media/media_podcasts.png
rename to Open-ILS/web/images/format_icons/mattype/media_podcasts.png
diff --git a/Open-ILS/web/images/media/media_streamingaudio.png b/Open-ILS/web/images/format_icons/mattype/media_streamingaudio.png
similarity index 100%
rename from Open-ILS/web/images/media/media_streamingaudio.png
rename to Open-ILS/web/images/format_icons/mattype/media_streamingaudio.png
diff --git a/Open-ILS/web/images/media/media_streamingvideo.png b/Open-ILS/web/images/format_icons/mattype/media_streamingvideo.png
similarity index 100%
rename from Open-ILS/web/images/media/media_streamingvideo.png
rename to Open-ILS/web/images/format_icons/mattype/media_streamingvideo.png
diff --git a/Open-ILS/web/images/media/media_vhs.png b/Open-ILS/web/images/format_icons/mattype/media_vhs.png
similarity index 100%
rename from Open-ILS/web/images/media/media_vhs.png
rename to Open-ILS/web/images/format_icons/mattype/media_vhs.png
diff --git a/Open-ILS/web/images/media/n.png b/Open-ILS/web/images/format_icons/mattype/n.png
similarity index 100%
rename from Open-ILS/web/images/media/n.png
rename to Open-ILS/web/images/format_icons/mattype/n.png
diff --git a/Open-ILS/web/images/media/o.png b/Open-ILS/web/images/format_icons/mattype/o.png
similarity index 100%
rename from Open-ILS/web/images/media/o.png
rename to Open-ILS/web/images/format_icons/mattype/o.png
diff --git a/Open-ILS/web/images/media/p.png b/Open-ILS/web/images/format_icons/mattype/p.png
similarity index 100%
rename from Open-ILS/web/images/media/p.png
rename to Open-ILS/web/images/format_icons/mattype/p.png
diff --git a/Open-ILS/web/images/media/q.png b/Open-ILS/web/images/format_icons/mattype/q.png
similarity index 100%
rename from Open-ILS/web/images/media/q.png
rename to Open-ILS/web/images/format_icons/mattype/q.png
diff --git a/Open-ILS/web/images/media/r.png b/Open-ILS/web/images/format_icons/mattype/r.png
similarity index 100%
rename from Open-ILS/web/images/media/r.png
rename to Open-ILS/web/images/format_icons/mattype/r.png
diff --git a/Open-ILS/web/images/media/s.png b/Open-ILS/web/images/format_icons/mattype/s.png
similarity index 100%
rename from Open-ILS/web/images/media/s.png
rename to Open-ILS/web/images/format_icons/mattype/s.png
diff --git a/Open-ILS/web/images/media/t.png b/Open-ILS/web/images/format_icons/mattype/t.png
similarity index 100%
rename from Open-ILS/web/images/media/t.png
rename to Open-ILS/web/images/format_icons/mattype/t.png
diff --git a/Open-ILS/web/images/media/v.png b/Open-ILS/web/images/format_icons/mattype/v.png
similarity index 100%
rename from Open-ILS/web/images/media/v.png
rename to Open-ILS/web/images/format_icons/mattype/v.png
diff --git a/Open-ILS/web/images/media/w.png b/Open-ILS/web/images/format_icons/mattype/w.png
similarity index 100%
rename from Open-ILS/web/images/media/w.png
rename to Open-ILS/web/images/format_icons/mattype/w.png
diff --git a/Open-ILS/web/images/media/x.png b/Open-ILS/web/images/format_icons/mattype/x.png
similarity index 100%
rename from Open-ILS/web/images/media/x.png
rename to Open-ILS/web/images/format_icons/mattype/x.png
diff --git a/Open-ILS/web/images/media/y.png b/Open-ILS/web/images/format_icons/mattype/y.png
similarity index 100%
rename from Open-ILS/web/images/media/y.png
rename to Open-ILS/web/images/format_icons/mattype/y.png
diff --git a/Open-ILS/web/images/media/z.png b/Open-ILS/web/images/format_icons/mattype/z.png
similarity index 100%
rename from Open-ILS/web/images/media/z.png
rename to Open-ILS/web/images/format_icons/mattype/z.png
diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index d309d82..8a9c0f3 100644
--- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -43,10 +43,14 @@
             END;
         END;
 
-        # XXX get me from SVF attrs.  If no "matttype" attr present, fall back to mods-esque item form/type
-        args.mattype = xml.findnodes('//*[@tag="998"]/*[@code="d"]').textContent;
-        args.format = ctx.find_citm(args.mattype).value;
-        args.format_icon = 'media/' _ args.mattype _ '.png';
+        FOR icon_style IN ['mattype', 'item_type']; 
+            node = xml.findnodes('//*[local-name()="attributes"]/*[local-name()="field"][@name="' _ icon_style _ '"]');
+            IF node;
+                args.format_label = node.getAttribute('coded-value')
+                args.format_icon = ctx.media_prefix _ '/images/format_icons/' _ icon_style _ '/' _ node.textContent _ '.png';
+                LAST;
+            END;
+        END;
     END;
 
     BLOCK get_hold_status;
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 6dc5eb3..3ce5ffa 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -154,39 +154,36 @@
                                                     </span>
                                                 </div>
                                             </td>
-                                            <!-- Copy this td for each copy count appended -->
-                                            <td nowrap='nowrap' name="copy_count_cell"
-                                                class='copy_count_cell hide_me' width="1"> </td>
-                                            <td name='result_table_format_cell'
-                                                class='result_table_format_cell' width="1">
-                                                [% IF attrs.format %]
-                                                <img alt="[% attrs.format %]" src="[% ctx.media_prefix %]/images/[% attrs.format_icon %]" />
+
+                                            <td name='result_table_format_cell' class='result_table_format_cell' width="1">
+
+                                                [% IF attrs.format_icon %]
+                                                <img title="[% attrs.format_label %]" alt="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
                                                 [% END %]
-                                                <span class='hide_me opac-auto-031'>
-                                                    <span>[% l("Match Score: ") %] </span>
-                                                    <span name='relevancy_span'> </span>
-                                                </span>
+
                                                 <!-- Empty span used for creating unAPI links -->
                                                 <span class="hide_me">
                                                     <abbr style='padding-left: 8px;' name="unapi" class="unapi-id">
                                                     <!-- unAPI URI goes here -->
                                                     </abbr>
                                                 </span>
+
                                                 <!-- Empty span used for creating Google Book Search-->
                                                 <span name="googleBooksLink" class="hide_me">
                                                     <a style='padding-left: 8px;'
                                                         class='classic_link hide_me'
                                                         name="googleBooks-link">[% l("Browse in Google Books Search") %]</a>
                                                 </span>
+
                                             </td>
                                             <td nowrap='nowrap' width="1" align="right">
                                                 <div style="width:250px;text-align:left;">
                                                     <div style="float:right;">
                                                         <div class="results_aux_utils opac-auto-010"><a
-                                                                href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% rec.id %]&hold_type=T" name="place_hold_link" class="no-dec"><img
+                                                                href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% rec.id %]&hold_type=T" 
+                                                                    name="place_hold_link" class="no-dec"><img
                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
-                                                                alt="place hold" /><span
-                                                                    style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
+                                                                alt="[% l('Place hold') %]"/><span style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
                                                         </div>
                                                         <div class="results_aux_utils opac-auto-011">
                                                             [%  operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
@@ -211,18 +208,10 @@
                                                                     style="position:relative;top:-5px;">Reviews &amp; More</span></a>
                                                         </div> -->
                                                     </div>
-                                                    <div style="float:right;margin-right:17px;">
-                                                    [%  key = attrs.mattype;
-                                                        format_desc = ctx.find_citm(key).value;
-                                                        icon_filename = icon_by_mattype.$key;
-                                                        IF icon_filename; %]
-                                                        <img alt="[% format_desc %]" title="[% format_desc %]"
-                                                            src="[% ctx.media_prefix _ '/images/' _ icon_filename %]" />
-                                                    [% END %]
-                                                    </div>
                                                 </div>
                                             </td>
                                         </tr>
+
                                         <!-- Placeholder for ChiliFresh Review -->
                                         <tr class="hide_me" name="chilifreshReview">
                                             <td></td>
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index b99a3e2..4be2b14 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -38,7 +38,7 @@
                         <input id='search-submit-go' type="image" alt="[% l('Search') %]" src="[% ctx.media_prefix %]/images/go-btn.png"
                             onmouseover="this.src='[% ctx.media_prefix %]/images/go-btn-hover.png';"
                             onmouseout="this.src='[% ctx.media_prefix %]/images/go-btn.png';" 
-                            onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 1000)'/>
+                            onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
                         <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden'/>
                     </div>
                 </div>

commit 94e952161af378dd33add9a1359a8db63a847ced
Merge: cd6711e d079cf1
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 13 11:53:55 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit cd6711edc2ff5dfee5d8898d9aceacb17d9f6ec3
Merge: adca6a0 b462579
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 13 11:53:52 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit d079cf19efd9316c915379c6dc50f866ce3c89f2
Merge: 57130f9 adca6a0
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 13 11:24:14 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 57130f944500b02f3b3da7e5ae0305ae51b68686
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 13 11:24:07 2011 -0400

    particularly for running the catalog embedded in the staff client, which makes no visual indication of page progress, it's good to let the caller know something is happening w/ a search.  after a 1-second search delay, show a small progress spinny icon

diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 158a93f..b99a3e2 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -35,9 +35,11 @@
             <td valign="top">
                 <div class="pos-abs">
                     <div class="opac-auto-143">
-                        <input type="image" alt="[% l('Search') %]" src="[% ctx.media_prefix %]/images/go-btn.png"
+                        <input id='search-submit-go' type="image" alt="[% l('Search') %]" src="[% ctx.media_prefix %]/images/go-btn.png"
                             onmouseover="this.src='[% ctx.media_prefix %]/images/go-btn-hover.png';"
-                            onmouseout="this.src='[% ctx.media_prefix %]/images/go-btn.png';" />
+                            onmouseout="this.src='[% ctx.media_prefix %]/images/go-btn.png';" 
+                            onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 1000)'/>
+                        <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden'/>
                     </div>
                 </div>
             </td>

commit adca6a073d80ad3daada46ba75d6173f4ba9aac4
Merge: fb3577b 2259386
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 13 11:16:03 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit fb3577b307f12d68e5ee7b94b927be77b0818ca5
Merge: 75d0e68 6d7c451
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 13 11:16:01 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 2259386e0e54226a19b046d3549f28d3af00364e
Merge: 1489e83 75d0e68
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 13 10:46:38 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 1489e830de16ffb5c9b7a683a5c1762e019af300
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 13 10:46:32 2011 -0400

    inisial staff client integration in record details page w/ new staff js file; move footer and other js loading to their own templates; hide top-nav pane (my account summary) for embedded mode; load slim version of marc html (no external css; no print button)

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index 0290d88..f636744 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -131,7 +131,7 @@ sub mk_marc_html {
     # could be optimized considerably by performing the xslt on the already fetched record
     return $U->simplereq(
         'open-ils.search', 
-        'open-ils.search.biblio.record.html', $rec_id);
+        'open-ils.search.biblio.record.html', $rec_id, 1);
 }
 
 1;
diff --git a/Open-ILS/web/js/ui/default/opac/simple.js b/Open-ILS/web/js/ui/default/opac/simple.js
index 7124d03..776dfef 100644
--- a/Open-ILS/web/js/ui/default/opac/simple.js
+++ b/Open-ILS/web/js/ui/default/opac/simple.js
@@ -1,4 +1,4 @@
-/* Keep this dead simple. No dojo. Call nothing via onload. */
+/* Keep this dead simple. No dojo. */
 function $(s) { return document.getElementById(s); }
 function removeClass(node, cls) {
     if (!node || !node.className) return;
diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
new file mode 100644
index 0000000..abb8ce8
--- /dev/null
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -0,0 +1,22 @@
+/* staff client integration functions */
+function debug(msg){dump(msg+'\n')}
+var eventCache={};
+function attachEvt(scope, name, action) {
+    if(!eventCache[scope]) eventCache[scope] = {};
+    if(!eventCache[scope][name]) eventCache[scope][name] = [];
+    eventCache[scope][name].push(action);
+}
+function runEvt(scope, name) {
+    debug('running event '+scope+':'+name);
+    var args = Array.prototype.slice.call(arguments).slice(2);
+    if(eventCache[scope]) {
+        var evt = eventCache[scope][name];
+        for(var i in evt) {evt[i].apply(evt[i], args);}
+    } 
+}
+window.onload = function() {
+    // record details page events
+    var rec = location.href.match(/\/opac\/record\/(\d+)/);
+    if(rec && rec[1]) { runEvt('rdetail', 'recordRetrieved', rec[1]); }
+    // fire other events the staff client is expecting...
+}
diff --git a/Open-ILS/web/templates/default/opac/parts/base.tt2 b/Open-ILS/web/templates/default/opac/parts/base.tt2
index 488c21d..d54a7e0 100644
--- a/Open-ILS/web/templates/default/opac/parts/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/base.tt2
@@ -5,42 +5,14 @@
         [% IF ctx.authtime %]
         <meta http-equiv="refresh" content="[% ctx.authtime %];[% ctx.logout_page %]">
         [% END %]
-        <link rel="stylesheet" type="text/css"
-            href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto.css" />
-        <link rel="stylesheet" type="text/css"
-            href="[% ctx.media_prefix %]/css/skin/default/opac/style.css" />
-        <title>[% l('Catalog - King County Library - [_1]', ctx.page_title) %]</title>
+        <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto.css" />
+        <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/default/opac/style.css" />
+        <title>[% l('Catalog - [_1]', ctx.page_title) %]</title>
         <link rel="unapi-server" type="application/xml" title="unAPI" href="/opac/extras/unapi" />
-        [% BLOCK html_head; END; # provide a default that can be overridden -%]
-        [%- PROCESS html_head -%]
     </head>
     <body>
         [% content %] 
-        <div id="footer">
-            <a href="http://www.kcls.org/usingthelibrary/request/">[% l('Request a Purchase') %]</a> &nbsp;|&nbsp;
-            <a href="http://www.kcls.org/usingthelibrary/request/">[% l('Interlibrary Loan') %]</a> &nbsp;|&nbsp;
-            <a href="http://www.kcls.org/about/contact/">[% l('Contact Us') %]</a> &nbsp;|&nbsp;
-            <a href="http://www.kcls.org/usingthelibrary/catalog_help/">[% l('Site Help') %]</a> &nbsp;|&nbsp;
-            <a href="http://www.kcls.org/usingthelibrary/policies/privacy.cfm">[% l('Privacy Statement') %]</a> &nbsp;|&nbsp;
-            <a href="http://www.kcls.org/about/support/">[% l('Support KCLS') %]</a> &nbsp;|&nbsp;
-            <a href="http://www.kcls.org/employment/">[% l('Employment') %]</a> 
-        </div>
-        <script type="text/javascript"
-            src="[% ctx.media_prefix %]/js/ui/default/opac/simple.js"></script>
-        <!-- Google Analytics -->
-        <script type="text/javascript">
-        /* uncomment when ready */ /*
-          var _gaq = _gaq || [];
-          _gaq.push(['_setAccount', 'UA-3018520-10']);
-          _gaq.push(['_trackPageview']);
-
-          (function() {
-            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-          })();
-        */
-        </script>
-        <!-- End Google Analytics -->
+        [% INCLUDE 'default/opac/parts/footer.tt2' %]
+        [% INCLUDE 'default/opac/parts/js.tt2' %]
     </body>
 </html>
diff --git a/Open-ILS/web/templates/default/opac/parts/footer.tt2 b/Open-ILS/web/templates/default/opac/parts/footer.tt2
new file mode 100644
index 0000000..9ab3ace
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/footer.tt2
@@ -0,0 +1,10 @@
+<div id="footer">
+    <a href="http://www.kcls.org/usingthelibrary/request/">[% l('Request a Purchase') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/usingthelibrary/request/">[% l('Interlibrary Loan') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/about/contact/">[% l('Contact Us') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/usingthelibrary/catalog_help/">[% l('Site Help') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/usingthelibrary/policies/privacy.cfm">[% l('Privacy Statement') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/about/support/">[% l('Support KCLS') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/employment/">[% l('Employment') %]</a> 
+</div>
+
diff --git a/Open-ILS/web/templates/default/opac/parts/js.tt2 b/Open-ILS/web/templates/default/opac/parts/js.tt2
new file mode 100644
index 0000000..4f7771d
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/js.tt2
@@ -0,0 +1,24 @@
+<!-- JS imports, etc.  -->
+
+<script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/opac/simple.js"></script>
+
+[% IF ctx.is_staff %]
+<script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/opac/staff.js"></script>
+[% END %]
+
+<!-- Google Analytics -->
+<script type="text/javascript">
+/* uncomment when ready */ /*
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-3018520-10']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+*/
+</script>
+<!-- End Google Analytics -->
+
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
index 15a98af..ab467c8 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@ -1,3 +1,4 @@
+[% IF !ctx.is_staff %]
 <div id="header">
     <div class="float-left">
         <a href="http://www.kcls.org"><img alt="[% l('KCLS Logo') %]" 
@@ -102,6 +103,7 @@
     </div>
     <div class="common-no-pad"></div>
 </div>
+[% END %]
 <div id="gold-links-holder">
     <div id="gold-links">
         <div id="header-links">

commit 75d0e682e78e4a4255308512e2fa319bfce440e4
Merge: 53e086e 11c746b
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 13 09:56:05 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 53e086ea91f862ce6c35c2b7ec6830a974032c6a
Merge: 348356b 22b9755
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 13 09:56:02 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 11c746b0aa9b9ad404535e88ae534169b10f93ea
Merge: e2fee34 348356b
Author: berick <berick at esilibrary.com>
Date:   Tue Apr 12 17:31:45 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit e2fee3428ccaeb39080e2fdbb99e6dd18118c6b7
Author: berick <berick at esilibrary.com>
Date:   Tue Apr 12 17:31:26 2011 -0400

    pile of material type icons that are not yet mapped to codes.  renaming to follow

diff --git a/Open-ILS/web/images/media/media_downloadableebook.png b/Open-ILS/web/images/media/media_downloadableebook.png
new file mode 100644
index 0000000..82f66ba
Binary files /dev/null and b/Open-ILS/web/images/media/media_downloadableebook.png differ
diff --git a/Open-ILS/web/images/media/media_electronicgames.png b/Open-ILS/web/images/media/media_electronicgames.png
new file mode 100644
index 0000000..b696a7a
Binary files /dev/null and b/Open-ILS/web/images/media/media_electronicgames.png differ
diff --git a/Open-ILS/web/images/media/media_evideo.png b/Open-ILS/web/images/media/media_evideo.png
new file mode 100644
index 0000000..09a7ea6
Binary files /dev/null and b/Open-ILS/web/images/media/media_evideo.png differ
diff --git a/Open-ILS/web/images/media/media_onlinejournal.png b/Open-ILS/web/images/media/media_onlinejournal.png
new file mode 100644
index 0000000..65cac4c
Binary files /dev/null and b/Open-ILS/web/images/media/media_onlinejournal.png differ
diff --git a/Open-ILS/web/images/media/media_player.png b/Open-ILS/web/images/media/media_player.png
new file mode 100644
index 0000000..64197e1
Binary files /dev/null and b/Open-ILS/web/images/media/media_player.png differ
diff --git a/Open-ILS/web/images/media/media_podcasts.png b/Open-ILS/web/images/media/media_podcasts.png
new file mode 100644
index 0000000..d563fbb
Binary files /dev/null and b/Open-ILS/web/images/media/media_podcasts.png differ
diff --git a/Open-ILS/web/images/media/media_streamingaudio.png b/Open-ILS/web/images/media/media_streamingaudio.png
new file mode 100644
index 0000000..51c31c3
Binary files /dev/null and b/Open-ILS/web/images/media/media_streamingaudio.png differ
diff --git a/Open-ILS/web/images/media/media_streamingvideo.png b/Open-ILS/web/images/media/media_streamingvideo.png
new file mode 100644
index 0000000..3fe2cbe
Binary files /dev/null and b/Open-ILS/web/images/media/media_streamingvideo.png differ
diff --git a/Open-ILS/web/images/media/media_vhs.png b/Open-ILS/web/images/media/media_vhs.png
new file mode 100644
index 0000000..11c1e42
Binary files /dev/null and b/Open-ILS/web/images/media/media_vhs.png differ

commit 60d9e8074969daa0486e198b2c1083cefaff6c9c
Author: berick <berick at esilibrary.com>
Date:   Tue Apr 12 17:30:43 2011 -0400

    moving toward svf for mattype extraction; much media/material-type icon cleanup; icons are now accessed directly via code instead of inconsistent and map-requiring human names

diff --git a/Open-ILS/web/images/media_cassettewithbook.png b/Open-ILS/web/images/media/2.png
similarity index 100%
rename from Open-ILS/web/images/media_cassettewithbook.png
rename to Open-ILS/web/images/media/2.png
diff --git a/Open-ILS/web/images/media_cdwithbook.png b/Open-ILS/web/images/media/5.png
similarity index 100%
rename from Open-ILS/web/images/media_cdwithbook.png
rename to Open-ILS/web/images/media/5.png
diff --git a/Open-ILS/web/images/media_book.png b/Open-ILS/web/images/media/a.png
similarity index 100%
rename from Open-ILS/web/images/media_book.png
rename to Open-ILS/web/images/media/a.png
diff --git a/Open-ILS/web/images/media_magazine.png b/Open-ILS/web/images/media/b.png
similarity index 100%
rename from Open-ILS/web/images/media_magazine.png
rename to Open-ILS/web/images/media/b.png
diff --git a/Open-ILS/web/images/media_sheetmusic.png b/Open-ILS/web/images/media/c.png
similarity index 100%
rename from Open-ILS/web/images/media_sheetmusic.png
rename to Open-ILS/web/images/media/c.png
diff --git a/Open-ILS/web/images/media_microform.png b/Open-ILS/web/images/media/d.png
similarity index 100%
rename from Open-ILS/web/images/media_microform.png
rename to Open-ILS/web/images/media/d.png
diff --git a/Open-ILS/web/images/media_equipment.png b/Open-ILS/web/images/media/e.png
similarity index 100%
rename from Open-ILS/web/images/media_equipment.png
rename to Open-ILS/web/images/media/e.png
diff --git a/Open-ILS/web/images/media_films.png b/Open-ILS/web/images/media/f.png
similarity index 100%
rename from Open-ILS/web/images/media_films.png
rename to Open-ILS/web/images/media/f.png
diff --git a/Open-ILS/web/images/media_dvd.png b/Open-ILS/web/images/media/h.png
similarity index 100%
rename from Open-ILS/web/images/media_dvd.png
rename to Open-ILS/web/images/media/h.png
diff --git a/Open-ILS/web/images/media_bookoncassette.png b/Open-ILS/web/images/media/i.png
similarity index 100%
rename from Open-ILS/web/images/media_bookoncassette.png
rename to Open-ILS/web/images/media/i.png
diff --git a/Open-ILS/web/images/media_musiccd.png b/Open-ILS/web/images/media/j.png
similarity index 100%
rename from Open-ILS/web/images/media_musiccd.png
rename to Open-ILS/web/images/media/j.png
diff --git a/Open-ILS/web/images/media_musiconcassette.png b/Open-ILS/web/images/media/k.png
similarity index 100%
rename from Open-ILS/web/images/media_musiconcassette.png
rename to Open-ILS/web/images/media/k.png
diff --git a/Open-ILS/web/images/media_musicrecord.png b/Open-ILS/web/images/media/l.png
similarity index 100%
rename from Open-ILS/web/images/media_musicrecord.png
rename to Open-ILS/web/images/media/l.png
diff --git a/Open-ILS/web/images/media_software.png b/Open-ILS/web/images/media/m.png
similarity index 100%
rename from Open-ILS/web/images/media_software.png
rename to Open-ILS/web/images/media/m.png
diff --git a/Open-ILS/web/images/media_bookoncd.png b/Open-ILS/web/images/media/n.png
similarity index 100%
rename from Open-ILS/web/images/media_bookoncd.png
rename to Open-ILS/web/images/media/n.png
diff --git a/Open-ILS/web/images/media_kit.png b/Open-ILS/web/images/media/o.png
similarity index 100%
rename from Open-ILS/web/images/media_kit.png
rename to Open-ILS/web/images/media/o.png
diff --git a/Open-ILS/web/images/media_newspaper.png b/Open-ILS/web/images/media/p.png
similarity index 100%
rename from Open-ILS/web/images/media_newspaper.png
rename to Open-ILS/web/images/media/p.png
diff --git a/Open-ILS/web/images/media_largeprint.png b/Open-ILS/web/images/media/q.png
similarity index 100%
rename from Open-ILS/web/images/media_largeprint.png
rename to Open-ILS/web/images/media/q.png
diff --git a/Open-ILS/web/images/media_3dobject.png b/Open-ILS/web/images/media/r.png
similarity index 100%
rename from Open-ILS/web/images/media_3dobject.png
rename to Open-ILS/web/images/media/r.png
diff --git a/Open-ILS/web/images/media_slideset.png b/Open-ILS/web/images/media/s.png
similarity index 100%
rename from Open-ILS/web/images/media_slideset.png
rename to Open-ILS/web/images/media/s.png
diff --git a/Open-ILS/web/images/media_online.png b/Open-ILS/web/images/media/t.png
similarity index 100%
rename from Open-ILS/web/images/media_online.png
rename to Open-ILS/web/images/media/t.png
diff --git a/Open-ILS/web/images/media_ebook.png b/Open-ILS/web/images/media/v.png
similarity index 100%
rename from Open-ILS/web/images/media_ebook.png
rename to Open-ILS/web/images/media/v.png
diff --git a/Open-ILS/web/images/media_ebookaudio.png b/Open-ILS/web/images/media/w.png
similarity index 100%
rename from Open-ILS/web/images/media_ebookaudio.png
rename to Open-ILS/web/images/media/w.png
diff --git a/Open-ILS/web/images/media_downloadablemusic.png b/Open-ILS/web/images/media/x.png
similarity index 100%
rename from Open-ILS/web/images/media_downloadablemusic.png
rename to Open-ILS/web/images/media/x.png
diff --git a/Open-ILS/web/images/media_downloadablemovie.png b/Open-ILS/web/images/media/y.png
similarity index 100%
rename from Open-ILS/web/images/media_downloadablemovie.png
rename to Open-ILS/web/images/media/y.png
diff --git a/Open-ILS/web/images/media_map.png b/Open-ILS/web/images/media/z.png
similarity index 100%
rename from Open-ILS/web/images/media_map.png
rename to Open-ILS/web/images/media/z.png
diff --git a/Open-ILS/web/images/media_3dobject.jpg b/Open-ILS/web/images/media_3dobject.jpg
deleted file mode 100644
index 21ee11d..0000000
Binary files a/Open-ILS/web/images/media_3dobject.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_book.jpg b/Open-ILS/web/images/media_book.jpg
deleted file mode 100644
index d928e6e..0000000
Binary files a/Open-ILS/web/images/media_book.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_bookoncassette.jpg b/Open-ILS/web/images/media_bookoncassette.jpg
deleted file mode 100644
index acc469e..0000000
Binary files a/Open-ILS/web/images/media_bookoncassette.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_bookoncassettecd.jpg b/Open-ILS/web/images/media_bookoncassettecd.jpg
deleted file mode 100644
index e288689..0000000
Binary files a/Open-ILS/web/images/media_bookoncassettecd.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_bookoncd.jpg b/Open-ILS/web/images/media_bookoncd.jpg
deleted file mode 100644
index 9e49aed..0000000
Binary files a/Open-ILS/web/images/media_bookoncd.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_cassettewithbook.jpg b/Open-ILS/web/images/media_cassettewithbook.jpg
deleted file mode 100644
index c434af6..0000000
Binary files a/Open-ILS/web/images/media_cassettewithbook.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_cdrom.jpg b/Open-ILS/web/images/media_cdrom.jpg
deleted file mode 100644
index 59f9702..0000000
Binary files a/Open-ILS/web/images/media_cdrom.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_cdwithbook.jpg b/Open-ILS/web/images/media_cdwithbook.jpg
deleted file mode 100644
index b1828d8..0000000
Binary files a/Open-ILS/web/images/media_cdwithbook.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_downloadableebook.png b/Open-ILS/web/images/media_downloadableebook.png
deleted file mode 100644
index 82f66ba..0000000
Binary files a/Open-ILS/web/images/media_downloadableebook.png and /dev/null differ
diff --git a/Open-ILS/web/images/media_downloadebook.jpg b/Open-ILS/web/images/media_downloadebook.jpg
deleted file mode 100644
index ce97463..0000000
Binary files a/Open-ILS/web/images/media_downloadebook.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_downloadmusic.jpg b/Open-ILS/web/images/media_downloadmusic.jpg
deleted file mode 100644
index 953b7e7..0000000
Binary files a/Open-ILS/web/images/media_downloadmusic.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_downloadvideo.jpg b/Open-ILS/web/images/media_downloadvideo.jpg
deleted file mode 100644
index e3abfc3..0000000
Binary files a/Open-ILS/web/images/media_downloadvideo.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_dvd.jpg b/Open-ILS/web/images/media_dvd.jpg
deleted file mode 100644
index 905f623..0000000
Binary files a/Open-ILS/web/images/media_dvd.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_eaudio.jpg b/Open-ILS/web/images/media_eaudio.jpg
deleted file mode 100644
index 0d810ba..0000000
Binary files a/Open-ILS/web/images/media_eaudio.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_ebooktext.jpg b/Open-ILS/web/images/media_ebooktext.jpg
deleted file mode 100644
index c45f944..0000000
Binary files a/Open-ILS/web/images/media_ebooktext.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_electronicgames.png b/Open-ILS/web/images/media_electronicgames.png
deleted file mode 100644
index b696a7a..0000000
Binary files a/Open-ILS/web/images/media_electronicgames.png and /dev/null differ
diff --git a/Open-ILS/web/images/media_equipment.jpg b/Open-ILS/web/images/media_equipment.jpg
deleted file mode 100644
index 47b8377..0000000
Binary files a/Open-ILS/web/images/media_equipment.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_evideo.png b/Open-ILS/web/images/media_evideo.png
deleted file mode 100644
index 09a7ea6..0000000
Binary files a/Open-ILS/web/images/media_evideo.png and /dev/null differ
diff --git a/Open-ILS/web/images/media_films.jpg b/Open-ILS/web/images/media_films.jpg
deleted file mode 100644
index 99b74a0..0000000
Binary files a/Open-ILS/web/images/media_films.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_games.jpg b/Open-ILS/web/images/media_games.jpg
deleted file mode 100644
index 24d50ae..0000000
Binary files a/Open-ILS/web/images/media_games.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_kit.jpg b/Open-ILS/web/images/media_kit.jpg
deleted file mode 100644
index ea50e56..0000000
Binary files a/Open-ILS/web/images/media_kit.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_language.jpg b/Open-ILS/web/images/media_language.jpg
deleted file mode 100644
index 0d86b5b..0000000
Binary files a/Open-ILS/web/images/media_language.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_largeprint.jpg b/Open-ILS/web/images/media_largeprint.jpg
deleted file mode 100644
index bd8b0a4..0000000
Binary files a/Open-ILS/web/images/media_largeprint.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_magazines.jpg b/Open-ILS/web/images/media_magazines.jpg
deleted file mode 100644
index e8bb737..0000000
Binary files a/Open-ILS/web/images/media_magazines.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_map.jpg b/Open-ILS/web/images/media_map.jpg
deleted file mode 100644
index 9236724..0000000
Binary files a/Open-ILS/web/images/media_map.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_microform.jpg b/Open-ILS/web/images/media_microform.jpg
deleted file mode 100644
index 7e7e0dc..0000000
Binary files a/Open-ILS/web/images/media_microform.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_musiccassete.jpg b/Open-ILS/web/images/media_musiccassete.jpg
deleted file mode 100644
index 7d9a779..0000000
Binary files a/Open-ILS/web/images/media_musiccassete.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_musiccassette.jpg b/Open-ILS/web/images/media_musiccassette.jpg
deleted file mode 100644
index c4a673f..0000000
Binary files a/Open-ILS/web/images/media_musiccassette.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_musiccd.jpg b/Open-ILS/web/images/media_musiccd.jpg
deleted file mode 100644
index f82eaed..0000000
Binary files a/Open-ILS/web/images/media_musiccd.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_musicrecord.jpg b/Open-ILS/web/images/media_musicrecord.jpg
deleted file mode 100644
index 4731692..0000000
Binary files a/Open-ILS/web/images/media_musicrecord.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_newspaper.jpg b/Open-ILS/web/images/media_newspaper.jpg
deleted file mode 100644
index 8a7b769..0000000
Binary files a/Open-ILS/web/images/media_newspaper.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_online.jpg b/Open-ILS/web/images/media_online.jpg
deleted file mode 100644
index 2f9cfcc..0000000
Binary files a/Open-ILS/web/images/media_online.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_onlinejournal.jpg b/Open-ILS/web/images/media_onlinejournal.jpg
deleted file mode 100644
index 3528f1c..0000000
Binary files a/Open-ILS/web/images/media_onlinejournal.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_onlinejournal.png b/Open-ILS/web/images/media_onlinejournal.png
deleted file mode 100644
index 65cac4c..0000000
Binary files a/Open-ILS/web/images/media_onlinejournal.png and /dev/null differ
diff --git a/Open-ILS/web/images/media_player.png b/Open-ILS/web/images/media_player.png
deleted file mode 100644
index 64197e1..0000000
Binary files a/Open-ILS/web/images/media_player.png and /dev/null differ
diff --git a/Open-ILS/web/images/media_podcasts.jpg b/Open-ILS/web/images/media_podcasts.jpg
deleted file mode 100644
index c65727c..0000000
Binary files a/Open-ILS/web/images/media_podcasts.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_podcasts.png b/Open-ILS/web/images/media_podcasts.png
deleted file mode 100644
index d563fbb..0000000
Binary files a/Open-ILS/web/images/media_podcasts.png and /dev/null differ
diff --git a/Open-ILS/web/images/media_printedmusic.jpg b/Open-ILS/web/images/media_printedmusic.jpg
deleted file mode 100644
index 2379dbd..0000000
Binary files a/Open-ILS/web/images/media_printedmusic.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_projectedmedia.jpg b/Open-ILS/web/images/media_projectedmedia.jpg
deleted file mode 100644
index 99b74a0..0000000
Binary files a/Open-ILS/web/images/media_projectedmedia.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_sheetmusic.jpg b/Open-ILS/web/images/media_sheetmusic.jpg
deleted file mode 100644
index 9207268..0000000
Binary files a/Open-ILS/web/images/media_sheetmusic.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_slide.jpg b/Open-ILS/web/images/media_slide.jpg
deleted file mode 100644
index 62aca57..0000000
Binary files a/Open-ILS/web/images/media_slide.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_software.jpg b/Open-ILS/web/images/media_software.jpg
deleted file mode 100644
index 090cee2..0000000
Binary files a/Open-ILS/web/images/media_software.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_streamingaudio.jpg b/Open-ILS/web/images/media_streamingaudio.jpg
deleted file mode 100644
index 3efafe8..0000000
Binary files a/Open-ILS/web/images/media_streamingaudio.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_streamingaudio.png b/Open-ILS/web/images/media_streamingaudio.png
deleted file mode 100644
index 51c31c3..0000000
Binary files a/Open-ILS/web/images/media_streamingaudio.png and /dev/null differ
diff --git a/Open-ILS/web/images/media_streamingvideo.jpg b/Open-ILS/web/images/media_streamingvideo.jpg
deleted file mode 100644
index ab9bf9c..0000000
Binary files a/Open-ILS/web/images/media_streamingvideo.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_streamingvideo.png b/Open-ILS/web/images/media_streamingvideo.png
deleted file mode 100644
index 3fe2cbe..0000000
Binary files a/Open-ILS/web/images/media_streamingvideo.png and /dev/null differ
diff --git a/Open-ILS/web/images/media_vhs.jpg b/Open-ILS/web/images/media_vhs.jpg
deleted file mode 100644
index 228d156..0000000
Binary files a/Open-ILS/web/images/media_vhs.jpg and /dev/null differ
diff --git a/Open-ILS/web/images/media_vhs.png b/Open-ILS/web/images/media_vhs.png
deleted file mode 100644
index 11c1e42..0000000
Binary files a/Open-ILS/web/images/media_vhs.png and /dev/null differ
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 10788fa..08c5ca6 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -20,42 +20,36 @@
     propagator = '?' _ query_string;
 
     is_advanced = CGI.param("_adv").size;
+%]
+
+
+[%# XXX KCLS Note... Remove me soon...
+BEGIN;
+INSERT INTO config.record_attr_definition (name, label, tag, sf_list)
+    VALUES ('mattype', 'Material Type', '998', 'd');
+INSERT INTO config.coded_value_map (ctype, code, value)
+    VALUES
+        ('mattype', 'a', 'Book'),
+        ('mattype', 'i', 'Book on cassette'),
+        ('mattype', 'n', 'Book on CD'),
+        ('mattype', 'x', 'Download music'),
+        ('mattype', 'y', 'Download video'),
+        ('mattype', 'h', 'DVD'),
+        ('mattype', 'w', 'eBook - Audio'),
+        ('mattype', 'v', 'eBook - Text'),
+        ('mattype', 'e', 'Equipment'),
+        ('mattype', 'f', 'Films'),
+        ('mattype', 'o', 'Kit'),
+        ('mattype', 'q', 'Large print'),
+        ('mattype', 'b', 'Magazine'),
+        ('mattype', 'd', 'Microform'),
+        ('mattype', 'k', 'Music cassette'),                                                                                                                                                              ('mattype', 'j', 'Music CD'),
+        ('mattype', 'l', 'Music LP'),                                                                                                                                                                    ('mattype', 'p', 'Newspaper'),
+        ('mattype', 't', 'Online'),                                                                                                                                                                      ('mattype', 'u', 'Player'),
+        ('mattype', 'c', 'Printed music / scores'),                                                                                                                                                      ('mattype', '2', 'Read along with cassette'),
+        ('mattype', '5', 'Read along with CD'),                                                                                                                                                          ('mattype', 'm', 'Software'),
+        ('mattype', 'g', 'Video'),                                                                                                                                                                       ('mattype', 'r', '3-D Object'),
+        ('mattype', 'z', 'Map'),                                                                                                                                                                         ('mattype', 's', 'Slide set');
+COMMIT;
+%]
 
-    formats = [  # XXX KCLS-specific
-        {'code' => 'a', 'name' => 'Book', 'image' => 'media_book.png'},
-        {'code' => 'i', 'name' => 'Book on cassette', 'image' => 'media_bookoncassette.png'},
-        {'code' => 'n', 'name' => 'Book on CD', 'image' => 'media_bookoncd.png'},
-        {'code' => 'x', 'name' => 'Download music', 'image' => 'media_downloadmusic.jpg'},
-        {'code' => 'y', 'name' => 'Download video', 'image' => 'media_downloadvideo.jpg'},
-        {'code' => 'h', 'name' => 'DVD', 'image' => 'media_dvd.jpg'},
-        {'code' => 'w', 'name' => 'eBook - Audio', 'image' => 'media_eaudio.png'},
-        {'code' => 'v', 'name' => 'eBook - Text', 'image' => 'media_ebooktext.png'},
-        {'code' => 'e', 'name' => 'Equipment', 'image' => 'media_equipment.png'},
-        {'code' => 'f', 'name' => 'Films', 'image' => 'media_films.png'},
-        {'code' => 'o', 'name' => 'Kit', 'image' => 'media_kit.jpg'},
-        {'code' => 'q', 'name' => 'Large print', 'image' => 'media_largeprint.jpg'},
-        {'code' => 'b', 'name' => 'Magazine', 'image' => 'media_magazines.png'},
-        {'code' => 'd', 'name' => 'Microform', 'image' => 'media_microform.jpg'},
-        {'code' => 'k', 'name' => 'Music cassette', 'image' => 'media_musiccassette.jpg'},
-        {'code' => 'j', 'name' => 'Music CD', 'image' => 'media_musiccd.png'},
-        {'code' => 'l', 'name' => 'Music LP', 'image' => 'media_musicrecord.png'},
-        {'code' => 'p', 'name' => 'Newspaper', 'image' => 'media_newspaper.jpg'},
-        {'code' => 't', 'name' => 'Online', 'image' => 'media_online.jpg'},
-        {'code' => 'u', 'name' => 'Player', 'image' => 'media_eaudio.jpg'},
-        {'code' => 'c', 'name' => 'Printed music / scores', 'image' => 'media_printedmusic.jpg'},
-        {'code' => '2', 'name' => 'Read along with cassette', 'image' => 'media_cassettewithbook.png'},
-        {'code' => '5', 'name' => 'Read along with CD', 'image' => 'media_cdwithbook.png'},
-        {'code' => 'm', 'name' => 'Software', 'image' => 'media_software.jpg'},
-        {'code' => 'g', 'name' => 'Video', 'image' => 'media_films.png'},
-        {'code' => 'r', 'name' => '3-D Object', 'image' => 'media_3dobject.jpg'},
-        {'code' => 'z', 'name' => 'Map', 'image' => 'media_map.jpg'},
-        {'code' => 's', 'name' => 'Slide set', 'image' => 'media_slide.jpg'}
-    ];
-
-    icon_by_format = {};
-    FOR o IN formats;
-        code = o.code;
-        icon_by_format.$code = o.image;
-    END;
-
--%]
diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index 284b0a3..d309d82 100644
--- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -20,6 +20,9 @@
         FOR p IN phys; phys_content.push(p.textContent); END;
         args.phys_desc = phys_content.join("");
 
+        # MARC Callnumber
+        args.marc_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent;
+
         # clean up the ISBN
         args.isbn_clean = args.isbn.replace('\ .*', '');
 
@@ -40,12 +43,10 @@
             END;
         END;
 
-        # KCLS-specific stuff; needs to change
+        # XXX get me from SVF attrs.  If no "matttype" attr present, fall back to mods-esque item form/type
         args.mattype = xml.findnodes('//*[@tag="998"]/*[@code="d"]').textContent;
-        args.kcls_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent;
-        mattype = args.mattype;
-        args.format = ctx.find_citm(mattype).value;
-        args.format_icon = icon_by_format.$mattype;
+        args.format = ctx.find_citm(args.mattype).value;
+        args.format_icon = 'media/' _ args.mattype _ '.png';
     END;
 
     BLOCK get_hold_status;
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index ca1961f..6dc5eb3 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -93,20 +93,19 @@
                                                 </div>
                                                 <span style="font-size:11px;">
                                                     <div>
-                                                        <em>
-                                                            <a title="[% l("Perform an Author Search") %]"
+                                                        <em><a title="[% l("Perform an Author Search") %]"
                                                                 name='item_author'
-                                                                href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% CGI.param('loc') | uri %]"
-                                                                class='search_link'>[% attrs.author %]</a>
-                                                        </em> &nbsp;&nbsp;
+                                                                href="[% ctx.opac_root %]/results?qtype=author&query=[% 
+                                                                    attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% CGI.param('loc') | uri %]"
+                                                                class='search_link'>[% attrs.author %]</a></em>
+                                                        &nbsp;&nbsp;
                                                         [% attrs.pubdate %]
                                                     </div>
                                                     <table cellpadding="0" cellspacing="0" border="0"
                                                         class="results_info_table">
                                                         <tr name='bib_cn_list' class='result_table_title_cell'>
                                                             <td colspan='2'>
-                                                                <strong>Call number:</strong>
-                                                                [% args.kcls_cn %]
+                                                                <strong>Call number:</strong>[% args.marc_cn %][%# XXX KCLS %]
                                                             </td>
                                                         </tr>
                                                         <tr name="results_pub_tr" class="[% attrs.publisher ? '' : 'hide_me' %]">

commit 348356b966de6c1a24f13414a8b351305cd41d50
Merge: cd366e1 d429c2d
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Apr 12 14:19:19 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit cd366e184dca610249503f0383a1c2616588dd40
Merge: d45d2a9 5c4e56e
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Apr 12 13:41:35 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit d45d2a903090953951879a7154e08c584dbcdafd
Merge: c4795b5 f22daee
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Apr 12 13:29:54 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit c4795b5a93e32be134a9c1c2c67cbb5199361547
Merge: a94577a 0762a08
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Apr 11 13:11:06 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit a94577a5814edcc1980edddaa0fca6f3e3514f98
Merge: 22f159a 7884a2d
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sun Apr 10 20:56:00 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 22f159aba7223e54242b58ef3684093134951359
Merge: 28d56b3 f867ceb
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sun Apr 10 20:55:57 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 7884a2de8073ee50b72121be3a40cd750f468523
Author: berick <berick at esilibrary.com>
Date:   Fri Apr 8 16:57:56 2011 -0400

    added paging to payment history; added paging arrows to circ/holds/payments history links

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index da895fa..277c469 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -560,10 +560,13 @@ sub load_myopac_hold_history {
 # TODO: add other filter options as params/configs/etc.
 sub load_myopac_payments {
     my $self = shift;
-    my $limit = $self->cgi->param('limit') || 0;
+    my $limit = $self->cgi->param('limit') || 20;
     my $offset = $self->cgi->param('offset') || 0;
     my $e = $self->editor;
 
+    $self->ctx->{payment_history_limit} = $limit;
+    $self->ctx->{payment_history_offset} = $offset;
+
     my $args = {};
     $args->{limit} = $limit if $limit;
     $args->{offset} = $offset if $offset;
diff --git a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
index ed4b8ee..91e5f37 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
@@ -22,10 +22,10 @@
         <span class="float-left">[% l('Previously Checked Out Items') %]</span>
         <span class='float-left' style='padding-left: 10px;'>
             <a href='circ_history?limit=[% limit %]&offset=[% offset - limit %]'
-                [% IF offset == 0 %] class='invisible' [% END %]>[% l('Previous') %]</a>
+                [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
             [%# TODO: get total to prevent paging off then end of the list.. %]
             <a href='circ_history?limit=[% limit %]&offset=[% offset + limit %]'
-               [% IF ctx.circs.size < limit %] class='invisible' [% END %] >[% l('Next') %]</a>
+               [% IF ctx.circs.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">&#9658;</span></a>
         </span>
         <span class="float-right">
             <a class="hide_me" href="#">[% l('Export List') %]</a>
diff --git a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
index 7375443..999d6b7 100644
--- a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
@@ -22,10 +22,10 @@
         <span style="float:left;">[% l("Previously Held Items") %]</span>
         <span class='float-left' style='padding-left: 10px;'>
             <a href='hold_history?limit=[% limit %]&offset=[% offset - limit %]'
-                [% IF offset == 0 %] class='invisible' [% END %]>[% l('Previous') %]</a>
+                [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
             [%# TODO: get total to prevent paging off then end of the list.. %]
             <a href='hold_history?limit=[% limit %]&offset=[% offset + limit %]'
-               [% IF ctx.holds.size < limit %] class='invisible' [% END %] >[% l('Next') %]</a>
+               [% IF ctx.holds.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">&#9658;</span></a>
         </span>
         <span style="float:right;">
             <a class="hide_me" href="#">Export List</a>
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
index 3749bda..882f986 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
@@ -3,8 +3,23 @@
     WRAPPER "default/opac/parts/myopac/main_base.tt2";
     myopac_page = "main";
     myopac_main_page = "payments";
+    limit = ctx.payment_history_limit;
+    offset = ctx.payment_history_offset;
 %]
+
 <div>
+    <div class="header_middle">
+        <span class="float-left">[% l('Payments History') %]</span>
+        <span class='float-left' style='padding-left: 10px;'>
+            <a href='main_payments?limit=[% limit %]&offset=[% offset - limit %]'
+                [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
+            [%# TODO: get total to prevent paging off then end of the list.. %]
+            <a href='main_payments?limit=[% limit %]&offset=[% offset + limit %]'
+               [% IF ctx.payments.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">&#9658;</span></a>
+        </span>
+    </div>
+    <div class="clear-both"></div>
+
     <table id='myopac_payments_table' width='100%' class='data_grid'>
         <thead><tr>
             <th>[% l('Payment Date') %]</th>

commit 434b259f44f8fd44e3b44f06493473199df293ef
Author: berick <berick at esilibrary.com>
Date:   Fri Apr 8 16:34:42 2011 -0400

    make public bookbag name's links to the public view of the bookbag; minor tidying

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index ad8ec8f..18ed515 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -181,7 +181,7 @@ sub load_common {
     $ctx->{full_path} = $ctx->{base_path} . $self->cgi->path_info;
     $ctx->{unparsed_uri} = $self->apache->unparsed_uri;
     $ctx->{opac_root} = $ctx->{base_path} . "/opac"; # absolute base url
-    $ctx->{is_staff} = ($self->apache->headers_in->get('User-Agent') =~ 'oils_xulrunner');
+    $ctx->{is_staff} = ($self->apache->headers_in->get('User-Agent') =~ /oils_xulrunner/);
 
     # capture some commonly accessed pages
     $ctx->{home_page} = 'http://' . $self->apache->hostname . $self->ctx->{opac_root} . "/home";
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index 31144e2..ba8d556 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -3,6 +3,7 @@
     WRAPPER "default/opac/parts/myopac/base.tt2";
     myopac_page = "lists"  %]
 <div id='myopac_bookbag_div' style="padding:5px;">
+
     <!-- <div class="header_middle">
         <span id="acct_holds_header" style="float:left;">[% l('My Lists') %]</span>
         <span style="float:right;"><a class="hide_me" href="#">[% l('Export List') %]</a></span>
@@ -17,123 +18,133 @@
         </div>
     </div> -->
     <div id="temp_wrapper">
-<!-- new list creation -->
-<form action="[% ctx.opac_root %]/myopac/list/update" method="POST" id="create_form">
-    <h2>[% l('Create new list') %]</h2><a name="createnewlist"></a>
-<table cellpadding="0" border="0" id="list_create_table">
-    <tr>
-        <td>
-            <label for="list_create_name">[% l('Enter the name of the new list:') %]</label>
-            <input id="list_create_name" type="text" name="name" />
-            <input type="hidden" name="action" value="create" />
-        </td>
-        <td>
-            <label for="list_create_shared">[% l('Share this list?') %]</label>
-            <select name="shared" id="list_create_shared">
-                <option value="0">[% l('No') %]
-                <option value="1">[% l('Yes') %]
-            </select>
-            <a href="javascript:void(0);" onclick="alert(document.getElementById('bb_publish_text').innerHTML);"><img alt="[% l('Sharing Help') %]"
-                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
-        </td>
-        <td class="list-create-table-buttons">
-            <input type="image" alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png"/>
-            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            <a href="javascript:void(0);"
-                onclick="document.getElementById('create_form').reset(); return false"><img
-                alt="[% l('Cancel') %]"
-                src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
-        </td>
-    </tr>
-</table>
-            </form>
-        [% INCLUDE "default/opac/parts/anon_list.tt2" %]
-        [% IF ctx.bookbags.size %]
-        <div id='acct_lists_prime'>
-            [% FOR bbag IN ctx.bookbags %]
-            <div id='acct_list_template'>
-                <div style="width:100%">
-                    <form action="[% ctx.opac_root %]/myopac/list/update"
-                        method="POST">
-                        <div class="bookbag-share">
-                            <input type="hidden" name="list" value="[% bbag.id %]" />
-                            [% IF bbag.pub != 't' %]
-                            <input type="hidden" name="action" value="show" />
-                            <input type="submit" value="[% l('Share') %]" />
-                            [% ELSE %]
-                            <input type="hidden" name="action" value="hide" />
-                            <input type="submit" value="[% l('Hide') %]" />
-                            [% END %]
-                        </div>
-                    </form>
-                    <form action="[% ctx.opac_root %]/myopac/list/update"
-                        method="POST">
-                        <div class="bookbag-controls">
-                            <input type="hidden" name="list" value="[% bbag.id %]" />
-                            <input type="hidden" name="action" value="delete" />
-                            <input type="submit" value="[% l('Delete List') %]" />
-                        </div>
-                    </form>
-                    <div class="bookbag-controls"><big><strong>[% bbag.name %]</strong></big></div>
-                    <div class="bookbag-controls">
-                        [% IF bbag.pub == 't'; %]
-                        <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
-                            alt="[% l('RSS Feed') %]" border="0"
-                            src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
+
+
+    <!-- new list creation -->
+    <form action="[% ctx.opac_root %]/myopac/list/update" method="POST" id="create_form">
+        <h2>[% l('Create new list') %]</h2><a name="createnewlist"></a>
+        <table cellpadding="0" border="0" id="list_create_table">
+            <tr>
+                <td>
+                    <label for="list_create_name">[% l('Enter the name of the new list:') %]</label>
+                    <input id="list_create_name" type="text" name="name" />
+                    <input type="hidden" name="action" value="create" />
+                </td>
+                <td>
+                    <label for="list_create_shared">[% l('Share this list?') %]</label>
+                    <select name="shared" id="list_create_shared">
+                        <option value="0">[% l('No') %]
+                        <option value="1">[% l('Yes') %]
+                    </select>
+                    <a href="javascript:void(0);" onclick="alert(document.getElementById('bb_publish_text').innerHTML);"><img alt="[% l('Sharing Help') %]"
+                        src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                </td>
+                <td class="list-create-table-buttons">
+                    <input type="image" alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png"/>
+                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                    <a href="javascript:void(0);"
+                        onclick="document.getElementById('create_form').reset(); return false"><img
+                        alt="[% l('Cancel') %]"
+                        src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+                </td>
+            </tr>
+        </table>
+    </form>
+
+    [% INCLUDE "default/opac/parts/anon_list.tt2" %]
+    [% IF ctx.bookbags.size %]
+    <div id='acct_lists_prime'>
+        [% FOR bbag IN ctx.bookbags %]
+        <div id='acct_list_template'>
+            <div style="width:100%">
+                <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
+                    <div class="bookbag-share">
+                        <input type="hidden" name="list" value="[% bbag.id %]" />
+                        [% IF bbag.pub != 't' %]
+                        <input type="hidden" name="action" value="show" />
+                        <input type="submit" value="[% l('Share') %]" />
+                        [% ELSE %]
+                        <input type="hidden" name="action" value="hide" />
+                        <input type="submit" value="[% l('Hide') %]" />
                         [% END %]
                     </div>
-                    <div class="clear-both pad-bottom-five"></div>
-                </div>
+                </form>
                 <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
-                <input type="hidden" name="list" value="[% bbag.id %]" />
-                <table cellpadding='0' cellspacing='0' border='0'>
-                    <thead id="acct_list_header">
-                        <tr>
-                            <td width="1%" style="padding-left: 10px;">
-                            <input type="checkbox" onclick="
-                                var inputs=document.getElementsByTagName('input'); 
-                                for (i = 0; i < inputs.length; i++) { 
-                                    if (inputs[i].name == 'del_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %]) 
-                                        inputs[i].checked = this.checked;}"/>
-
-                            </td>
-                            <td width="49%" style="padding-left: 5px;">[% l('Title') %]</td>
-                            <td width="49%">[% l('Author(s)') %]</td>
-                            <td width="1%" class="nowrap">
-                                <select class="opac-auto-179" name="action">
-                                    <option>[% l('-- Actions for this list --') %]</option>
-                                    <!-- XXX not ready yet<option value="hold">[% l('Place Hold') %]</option> -->
-                                    <option value="del_item">[% l('Remove Items') %]</option>
-                                </select>
-                                <input type="submit" value="[% l('Go') %]" />
-                            </td>
-                        </tr>
-                    </thead>
-                    <tbody>
-                        [% UNLESS bbag.items.size %]
-                        <tr><td colspan="4" class="opac-auto-171 opac-auto-097">
-                            [% l("This list contains no items.") %]
-                        </td></tr>
-                        [% END %]
-                        [% FOR item IN bbag.items;
-                            rec_id = item.target_biblio_record_entry;
-                            attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
-                            PROCESS get_marc_attrs args=attrs %]
-                        <tr>
-                            <td class="opac-auto-097b" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
-                            <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title %]</td>
-                            <td class="opac-auto-097b">[% attrs.author %]</td>
-                        </tr>
-                        [% END %]
-                    </tbody>
-                </table>
+                    <div class="bookbag-controls">
+                        <input type="hidden" name="list" value="[% bbag.id %]" />
+                        <input type="hidden" name="action" value="delete" />
+                        <input type="submit" value="[% l('Delete List') %]" />
+                    </div>
                 </form>
-                <br /><br />
+                <div class="bookbag-controls">
+                    <big><strong>
+                    [% IF bbag.pub == 't' %]
+                        [% url = 'http://' _ ctx.hostname _ '/opac/extras/feed/bookbag/html-full/' _ bbag.id %]
+                        <a target='_blank' href='[% url %]'>[% bbag.name %]</a>
+                    [% ELSE %]
+                    [% bbag.name %]
+                    [% END %]
+                    </strong></big>
+                </div>
+                <div class="bookbag-controls">
+                    [% IF bbag.pub == 't'; %]
+                    <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
+                        alt="[% l('RSS Feed') %]" border="0"
+                        src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
+                    [% END %]
+                </div>
+                <div class="clear-both pad-bottom-five"></div>
             </div>
-            [% END %]
+            <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
+            <input type="hidden" name="list" value="[% bbag.id %]" />
+            <table cellpadding='0' cellspacing='0' border='0'>
+                <thead id="acct_list_header">
+                    <tr>
+                        <td width="1%" style="padding-left: 10px;">
+                        <input type="checkbox" onclick="
+                            var inputs=document.getElementsByTagName('input'); 
+                            for (i = 0; i < inputs.length; i++) { 
+                                if (inputs[i].name == 'del_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %]) 
+                                    inputs[i].checked = this.checked;}"/>
+
+                        </td>
+                        <td width="49%" style="padding-left: 5px;">[% l('Title') %]</td>
+                        <td width="49%">[% l('Author(s)') %]</td>
+                        <td width="1%" class="nowrap">
+                            <select class="opac-auto-179" name="action">
+                                <option>[% l('-- Actions for this list --') %]</option>
+                                <!-- XXX not ready yet<option value="hold">[% l('Place Hold') %]</option> -->
+                                <option value="del_item">[% l('Remove Items') %]</option>
+                            </select>
+                            <input type="submit" value="[% l('Go') %]" />
+                        </td>
+                    </tr>
+                </thead>
+                <tbody>
+                    [% UNLESS bbag.items.size %]
+                    <tr><td colspan="4" class="opac-auto-171 opac-auto-097">
+                        [% l("This list contains no items.") %]
+                    </td></tr>
+                    [% END %]
+                    [% FOR item IN bbag.items;
+                        rec_id = item.target_biblio_record_entry;
+                        attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
+                        PROCESS get_marc_attrs args=attrs %]
+                    <tr>
+                        <td class="opac-auto-097b" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
+                        <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title %]</td>
+                        <td class="opac-auto-097b">[% attrs.author %]</td>
+                    </tr>
+                    [% END %]
+                </tbody>
+            </table>
+            </form>
+            <br /><br />
         </div>
         [% END %]
     </div>
+    [% END %]
+
     <div id='myopac_delete_bookbag_warn' class='hide_me'>
         [% l("This will remove the selected bookbag and all items contained within the bookbag.  Are you sure you wish to continue?") %]
     </div>
@@ -142,7 +153,12 @@
     <div style='width: 99%; text-align: center'>
         <b id='myopac_bookbag_items_name'> </b>
     </div>
-    <span id='bb_publish_text' class='hide_me'>[% l("Sharing a Bookbag means that the contents of the Bookbag will be visible to others.  To see the public view of a shared Bookbag, click the \"View\" link in the \"Shared\" column of the Bookbag list at the top of this page.") %]</span>
+    <span id='bb_publish_text' class='hide_me'>
+[% |l %]Sharing a Bookbag means that the contents 
+of the Bookbag will be visible to others.  
+To see the public view of a shared Bookbag, 
+click on the Bookbag's name in the Bookbag list.[% END %]
+    </span>
     <span id='myopac_remove_bb_item_confirm' class='hide_me'>
         [% l("Are you sure you wish to remove this bookbag item?") %]
     </span>
@@ -164,5 +180,6 @@
     <span class='hide_me' id='bb_update_success'>
         [% l("Bookbag successfully updated") %]
     </span>
+
 </div>
 [% END %]

commit 28d56b3fd700c2d0a1d22d4c31b5951841bd3e32
Merge: 4161606 ea533ee
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Apr 8 14:53:49 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 4161606758dc918354b4e9f84f08395c59568a96
Merge: 5fcfd77 34a2998
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Apr 8 14:53:46 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit ea533eeed1bff9d2a2226564f8d4e6e1549a17e8
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 7 16:35:44 2011 -0400

    improved holds history paging

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 3bd5cc4..da895fa 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -540,8 +540,11 @@ sub load_myopac_hold_history {
     my $self = shift;
     my $e = $self->editor;
     my $ctx = $self->ctx;
-    my $limit = $self->cgi->param('limit');
-    my $offset = $self->cgi->param('offset');
+    my $limit = $self->cgi->param('limit') || 15;
+    my $offset = $self->cgi->param('offset') || 0;
+    $ctx->{hold_history_limit} = $limit;
+    $ctx->{hold_history_offset} = $offset;
+
 
     my $holds = $e->json_query({
         from => ['action.usr_visible_holds', $e->requestor->id],
diff --git a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
index 62429fe..7375443 100644
--- a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
@@ -2,8 +2,8 @@
     PROCESS "default/opac/parts/marc_misc.tt2";
     WRAPPER "default/opac/parts/myopac/base.tt2";
     myopac_page = "holds"  
-    limit = CGI.param('limit') || 25;
-    offset = CGI.param('offset') || 0;
+    limit = ctx.hold_history_limit;
+    offset = ctx.hold_history_offset;
 %]
 
 <div id='myopac_holds_div'>
@@ -19,8 +19,13 @@
     </div>
 
     <div class="header_middle">
-        <span id="acct_holds_header" style="float:left;">
-            [% l("Previously Held Items") %]
+        <span style="float:left;">[% l("Previously Held Items") %]</span>
+        <span class='float-left' style='padding-left: 10px;'>
+            <a href='hold_history?limit=[% limit %]&offset=[% offset - limit %]'
+                [% IF offset == 0 %] class='invisible' [% END %]>[% l('Previous') %]</a>
+            [%# TODO: get total to prevent paging off then end of the list.. %]
+            <a href='hold_history?limit=[% limit %]&offset=[% offset + limit %]'
+               [% IF ctx.holds.size < limit %] class='invisible' [% END %] >[% l('Next') %]</a>
         </span>
         <span style="float:right;">
             <a class="hide_me" href="#">Export List</a>

commit ecb1ab8ec6c0709cc30f0af3b23f9b3e65fa6855
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 7 16:27:22 2011 -0400

    repaired circ history paging

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 9dee8b9..3bd5cc4 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -506,9 +506,12 @@ sub load_myopac_circ_history {
     my $self = shift;
     my $e = $self->editor;
     my $ctx = $self->ctx;
-    my $limit = $self->cgi->param('limit');
+    my $limit = $self->cgi->param('limit') || 15;
     my $offset = $self->cgi->param('offset') || 0;
 
+    $ctx->{circ_history_limit} = $limit;
+    $ctx->{circ_history_offset} = $offset;
+
     my $circs = $e->json_query({
         from => ['action.usr_visible_circs', $e->requestor->id],
         #limit => $limit || 25,
@@ -526,7 +529,7 @@ sub load_myopac_circ_history {
     @ids = @ids[$offset..($offset + $limit - 1)] if $limit;
     @ids = grep { defined $_ } @ids;
 
-    $ctx->{circs} = $self->fetch_user_circs(1, \@ids, $limit, $offset);
+    $ctx->{circs} = $self->fetch_user_circs(1, \@ids);
     #$ctx->{circs} = $self->fetch_user_circs(1, [map { $_->{id} } @$circs], $limit, $offset);
 
     return Apache2::Const::OK;
diff --git a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
index 28d4b2a..ed4b8ee 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
@@ -1,9 +1,9 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     PROCESS "default/opac/parts/marc_misc.tt2";
     WRAPPER "default/opac/parts/myopac/base.tt2";
-    myopac_page = "circs";
-    limit = CGI.param('limit') || 25;
-    offset = CGI.param('offset') || 0;
+    myopac_page = "circs"
+    limit = ctx.circ_history_limit;
+    offset = ctx.circ_history_offset;
 %]
 
 <div style="padding:0px;">
@@ -21,13 +21,11 @@
     <div class="header_middle">
         <span class="float-left">[% l('Previously Checked Out Items') %]</span>
         <span class='float-left' style='padding-left: 10px;'>
-            [% IF offset > 0 %]
-            <a href='circ_history?limit=[% limit %]&offset=[% offset - 1 %]'>[% l('Previous') %]</a>
-            [% END %]
-            [% IF ctx.circs.size == limit %]
+            <a href='circ_history?limit=[% limit %]&offset=[% offset - limit %]'
+                [% IF offset == 0 %] class='invisible' [% END %]>[% l('Previous') %]</a>
             [%# TODO: get total to prevent paging off then end of the list.. %]
-            <a href='circ_history?limit=[% limit %]&offset=[% offset + 1 %]'>[% l('Next') %]</a>
-            [% END %]
+            <a href='circ_history?limit=[% limit %]&offset=[% offset + limit %]'
+               [% IF ctx.circs.size < limit %] class='invisible' [% END %] >[% l('Next') %]</a>
         </span>
         <span class="float-right">
             <a class="hide_me" href="#">[% l('Export List') %]</a>

commit 7345d59117d7db7351537606bd02b2cfcd9e0726
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 7 15:10:24 2011 -0400

    Support for password update

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 9ba54a7..ad8ec8f 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -124,6 +124,7 @@ sub load {
     return $self->load_myopac_payments if $path =~ m|opac/myopac/main_payments|;
     return $self->load_myopac_main if $path =~ m|opac/myopac/main|;
     return $self->load_myopac_update_email if $path =~ m|opac/myopac/update_email|;
+    return $self->load_myopac_update_password if $path =~ m|opac/myopac/update_password|;
     return $self->load_myopac_update_username if $path =~ m|opac/myopac/update_username|;
     return $self->load_myopac_bookbags if $path =~ m|opac/myopac/lists|;
     return $self->load_myopac_bookbag_update if $path =~ m|opac/myopac/list/update|;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 3bde775..9dee8b9 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -652,6 +652,9 @@ sub load_myopac_update_email {
     my $ctx = $self->ctx;
     my $email = $self->cgi->param('email') || '';
 
+    return Apache2::Const::OK 
+        unless $self->cgi->request_method eq 'POST';
+
     unless($email =~ /.+\@.+\..+/) { # TODO better regex?
         $ctx->{invalid_email} = $email;
         return Apache2::Const::OK;
@@ -674,6 +677,9 @@ sub load_myopac_update_username {
     my $ctx = $self->ctx;
     my $username = $self->cgi->param('username') || '';
 
+    return Apache2::Const::OK 
+        unless $self->cgi->request_method eq 'POST';
+
     unless($username and $username !~ /\s/) { # any other username restrictions?
         $ctx->{invalid_username} = $username;
         return Apache2::Const::OK;
@@ -698,6 +704,47 @@ sub load_myopac_update_username {
     return $self->generic_redirect($url);
 }
 
+sub load_myopac_update_password {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+
+    return Apache2::Const::OK 
+        unless $self->cgi->request_method eq 'POST';
+
+    my $current_pw = $self->cgi->param('current_pw') || '';
+    my $new_pw = $self->cgi->param('new_pw') || '';
+    my $new_pw2 = $self->cgi->param('new_pw2') || '';
+
+    unless($new_pw eq $new_pw2) {
+        $ctx->{password_nomatch} = 1;
+        return Apache2::Const::OK;
+    }
+
+    my $pw_regex = $ctx->{get_org_setting}->($e->requestor->home_ou, 'global.password_regex');
+
+    if($pw_regex and $new_pw !~ /$pw_regex/) {
+        $ctx->{password_invalid} = 1;
+        return Apache2::Const::OK;
+    }
+
+    my $evt = $U->simplereq(
+        'open-ils.actor', 
+        'open-ils.actor.user.password.update', 
+        $e->authtoken, $new_pw, $current_pw);
+
+
+    if($U->event_equals($evt, 'INCORRECT_PASSWORD')) {
+        $ctx->{password_incorrect} = 1;
+        return Apache2::Const::OK;
+    }
+
+    my $url = $self->apache->unparsed_uri;
+    $url =~ s/update_password/prefs/;
+
+    return $self->generic_redirect($url);
+}
+
 sub load_myopac_bookbags {
     my $self = shift;
     my $e = $self->editor;
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
index 37cce3d..8ceeec3 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
@@ -157,75 +157,14 @@
                         </div>
                     </div>[% l("Username") %]
                 </td>
-
                 <td class='light_border'>[% ctx.user.usrname | html %]</td>
                 <td class='light_border'><a href='update_username'>[% l("Change") %]</a></td>
             </tr>
-
-            <tr id='myopac_update_username_row'
-                class='hide_me'>
-                <td class='myopac_update_cell'
-                    colspan='3'><span class=
-                    'myopac_update_span'>[% l("Enter new username:") %]</span>
-                    <input type='text' size='24' id='myopac_new_username' />
-                    <span class='myopac_update_span'><button><span class=
-                        'myopac_update_span'>[% l("Submit") %]</span></button></span>
-                    <span class='myopac_update_span'><button><span class=
-                        'myopac_update_span'>[% l("Cancel") %]</span></button></span>
-                </td>
-            </tr>
             <tr>
-                <td class='color_4 light_border'>
-                [% l("Password") %]</td>
-                <td class='light_border'
-                    id='myopac_summary_password'>
-                    [% l("(not shown)") %]</td>
-                <td class='light_border'><a href='#'
-                   class="hide_me"
-                   style='text-decoration: underline;'>[% l("Change") %]</a></td>
+                <td class='color_4 light_border'>[% l("Password") %]</td>
+                <td class='light_border'>[% l("(not shown)") %]</td>
+                <td class='light_border'><a href='update_password'>[% l("Change") %]</a></td>
             </tr>
-            <tr class='hide_me'>
-                <td class='myopac_update_cell'
-                    colspan='3'>
-                    <table>
-                        <tbody>
-                            <tr>
-                                <td>
-                                    <span class= 'myopac_update_span'>
-                                        [% l("Enter current password:") %]
-                                    </span>
-                                </td>
-
-                                <td>
-                                    <input type='password'
-                                       size='24' />
-                                   </td>
-                            </tr>
-                            <tr>
-                                <td><span class=
-                                'myopac_update_span'>[% l("Enter new password:") %]</span></td>
-
-                                <td><input type='password' size='24' />
-                                   </td>
-                            </tr>
-
-                            <tr>
-                                <td><span class=
-                                'myopac_update_span'>[% l("Re-enter new password:") %]</span></td>
-
-                                <td>
-                                    <input type='password' size='24' />
-                                </td>
-                            </tr>
-                        </tbody>
-                    </table><span class=
-                    'myopac_update_span'><button><span class=
-                    'myopac_update_span'>[% l("Submit") %]</span></button></span>
-                    <span class='myopac_update_span'><button><span class='myopac_update_span'>
-                    [% l("Cancel") %]</span></button></span>
-                </td>
-            </tr>
-
             <tr>
                 <td class='color_4 light_border'>[% l("Email Address") %]</td>
                 <td class='light_border'>[% ctx.user.email | html %]</td>
diff --git a/Open-ILS/web/templates/default/opac/myopac/update_password.tt2 b/Open-ILS/web/templates/default/opac/myopac/update_password.tt2
new file mode 100644
index 0000000..d248cdf
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/update_password.tt2
@@ -0,0 +1,33 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
+    WRAPPER "default/opac/parts/myopac/base.tt2";
+    myopac_page = "prefs"  %]
+
+<div id='myopac_summary_div' style="padding:0px;">
+
+[% IF ctx.password_invalid %]
+    <div id='account-update-email-error'> <!-- borrow css from update-email page -->
+        [% |l %] New password is invalid.  Please try a different password.  [% END %]
+    </div>
+
+[% ELSIF ctx.password_nomatch %]
+    <div id='account-update-email-error'>
+        [% |l %] Passwords do not match. [% END %]
+    </div>
+
+[% ELSIF ctx.password_incorrect %]
+    <div id='account-update-email-error'>
+        [% |l %] Your current password was not correct. [% END %]
+    </div>
+[% END %]
+
+<form method='POST' id='account-update-email'> 
+    <table> 
+        <tr><td>[% l('Current Password') %]</td><td><input type='password' name='current_pw'/></td></tr>
+        <tr><td>[% l('New Password') %]</td><td><input type='password' name='new_pw'/></td></tr>
+        <tr><td>[% l('New Password Again') %]</td><td><input type='password' name='new_pw2'/></td></tr>
+        <tr><td colspan='2' align='center'><input type='submit'/></td></tr>
+    </table>
+</form>
+
+[% END %]

commit d131cb1e0bc4d42612854195a9e77cee607d50f5
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 7 14:22:48 2011 -0400

    after clearing out a stale ses cookie, return user to originally requested resource instead directing home.  this prevents the case where going to 'my account' in presence of expired ses cookie redirects the user home

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index fbb61ac..9ba54a7 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -201,8 +201,10 @@ sub load_common {
 
         } else {
 
-            # authtoken is no longer valid, log out to clean up
-            return $self->load_logout;
+            # if we encounter a stale authtoken, call load_logout 
+            # to clean up the cookie, then redirect the user to the
+            # originally requested page
+            return $self->load_logout($self->apache->unparsed_uri);
         }
     }
 
@@ -274,13 +276,14 @@ sub load_login {
 # -----------------------------------------------------------------------------
 sub load_logout {
     my $self = shift;
+    my $redirect_to = shift;
 
     # If the user was adding anyting to an anonymous cache 
     # while logged in, go ahead and clear it out.
     $self->clear_anon_cache;
 
     return $self->generic_redirect(
-        $self->ctx->{home_page},
+        $redirect_to || $self->ctx->{home_page},
         $self->cgi->cookie(
             -name => COOKIE_SES,
             -path => '/',

commit 0b93bf6e29e4161f2e28e6f55bd3678fba73b00d
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 7 12:00:36 2011 -0400

    tie in select-all option in lists interfaces

diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index 70fc328..31144e2 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -84,14 +84,18 @@
                     </div>
                     <div class="clear-both pad-bottom-five"></div>
                 </div>
-                <form action="[% ctx.opac_root %]/myopac/list/update"
-                    method="POST">
+                <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
                 <input type="hidden" name="list" value="[% bbag.id %]" />
                 <table cellpadding='0' cellspacing='0' border='0'>
                     <thead id="acct_list_header">
                         <tr>
                             <td width="1%" style="padding-left: 10px;">
-                                <input type="checkbox" />
+                            <input type="checkbox" onclick="
+                                var inputs=document.getElementsByTagName('input'); 
+                                for (i = 0; i < inputs.length; i++) { 
+                                    if (inputs[i].name == 'del_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %]) 
+                                        inputs[i].checked = this.checked;}"/>
+
                             </td>
                             <td width="49%" style="padding-left: 5px;">[% l('Title') %]</td>
                             <td width="49%">[% l('Author(s)') %]</td>
@@ -116,7 +120,7 @@
                             attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
                             PROCESS get_marc_attrs args=attrs %]
                         <tr>
-                            <td class="opac-auto-097b" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" /></td>
+                            <td class="opac-auto-097b" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
                             <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title %]</td>
                             <td class="opac-auto-097b">[% attrs.author %]</td>
                         </tr>
diff --git a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2 b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
index 8fb8258..19a7440 100644
--- a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
@@ -20,7 +20,11 @@
             <table cellpadding='0' cellspacing='0' border='0'>
                 <thead id="acct_list_header_anon">
                     <tr>
-                        <td width="1%" style="padding-left:10px;"><input type="checkbox"/>
+                        <td width="1%" style="padding-left:10px;">
+                            <input type="checkbox" onclick="
+                                var inputs=document.getElementsByTagName('input'); 
+                                for (i = 0; i < inputs.length; i++) { 
+                                    if (inputs[i].name == 'record' && !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
                         </td>
                         <td width="49%" style="padding-left:5px;">[% l('Title') %]</td>
                         <td width="49%" style="padding-left:5px;">[% l('Author(s)') %]</td>

commit 9c62bc217dd13fc8b65c8bff04964f7c4fceb8d9
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 7 11:48:24 2011 -0400

    removed debug log line

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 493a1fc..fbb61ac 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -243,8 +243,6 @@ sub load_login {
     $args->{username} = delete $args->{barcode} 
         if $bc_regex and !($username =~ /$bc_regex/);
 
-    $self->apache->log->warn("regex = $bc_regex; username = $username; " .  ($username =~ /$bc_regex/));
-
 	my $response = $U->simplereq(
         'open-ils.auth', 'open-ils.auth.authenticate.complete', $args);
 

commit 658d9932693c82f7dd6996758ce87368c61044bb
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 7 11:46:18 2011 -0400

    consistent w/ previous opac, default to barcode login and jump to username only if there is a barcode regex (and regex does not match)

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 79ab04f..493a1fc 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -233,15 +233,17 @@ sub load_login {
 		'open-ils.auth.authenticate.init', $username);
 
     my $args = {	
-        username => $username, 
+        barcode => $username, 
         password => md5_hex($seed . md5_hex($password)), 
         type => ($persist) ? 'persist' : 'opac' 
     };
 
     my $bc_regex = $ctx->{get_org_setting}->($org_unit, 'opac.barcode_regex');
 
-    $args->{barcode} = delete $args->{username} 
-        if $bc_regex and $username =~ /$bc_regex/;
+    $args->{username} = delete $args->{barcode} 
+        if $bc_regex and !($username =~ /$bc_regex/);
+
+    $self->apache->log->warn("regex = $bc_regex; username = $username; " .  ($username =~ /$bc_regex/));
 
 	my $response = $U->simplereq(
         'open-ils.auth', 'open-ils.auth.authenticate.complete', $args);

commit e48cdc644763b2ffa001d6aa1c79971a400d89c2
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 7 11:45:24 2011 -0400

    oops, forgot to git-add w/ last commit

diff --git a/Open-ILS/web/templates/default/opac/myopac/update_username.tt2 b/Open-ILS/web/templates/default/opac/myopac/update_username.tt2
new file mode 100644
index 0000000..1294917
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/update_username.tt2
@@ -0,0 +1,30 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
+    WRAPPER "default/opac/parts/myopac/base.tt2";
+    myopac_page = "prefs"  %]
+<div id='myopac_summary_div' style="padding:0px;">
+
+[% IF ctx.invalid_username %]
+    <div id='account-update-email-error'> <!-- borrow css from update-email page -->
+        [% | l(ctx.invalid_username) %]
+        "<b>[_1]</b>" is not a valid username.  Usernames cannot have any spaces.  Please try a different username.
+        [% END %]
+    </div>
+
+[% ELSIF ctx.username_exists %]
+    <div id='account-update-email-error'>
+        [% | l(ctx.username_exists) %]
+        The username "<b>[_1]</b>" is taken.  Please try a different username.
+        [% END %]
+    </div>
+[% END %]
+
+<form method='POST' id='account-update-email'> 
+    <table> 
+        <tr><td>[% l('Current Username') %]</td><td>[% ctx.user.usrname | html %]</td></tr>
+        <tr><td>[% l('New Username') %]</td><td><input type='text' name='username' value='[% ctx.invalid_username | html %]'/></td></tr>
+        <tr><td colspan='2' align='center'><input type='submit'/></td></tr>
+    </table>
+</form>
+
+[% END %]

commit 2ff0d7d9dd635707b29874a5b215317339774260
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 7 11:18:23 2011 -0400

    implemented username update

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 33e2822..79ab04f 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -124,6 +124,7 @@ sub load {
     return $self->load_myopac_payments if $path =~ m|opac/myopac/main_payments|;
     return $self->load_myopac_main if $path =~ m|opac/myopac/main|;
     return $self->load_myopac_update_email if $path =~ m|opac/myopac/update_email|;
+    return $self->load_myopac_update_username if $path =~ m|opac/myopac/update_username|;
     return $self->load_myopac_bookbags if $path =~ m|opac/myopac/lists|;
     return $self->load_myopac_bookbag_update if $path =~ m|opac/myopac/list/update|;
     return $self->load_myopac_circ_history if $path =~ m|opac/myopac/circ_history|;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index e51ddd9..3bde775 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -668,6 +668,36 @@ sub load_myopac_update_email {
     return $self->generic_redirect($url);
 }
 
+sub load_myopac_update_username {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+    my $username = $self->cgi->param('username') || '';
+
+    unless($username and $username !~ /\s/) { # any other username restrictions?
+        $ctx->{invalid_username} = $username;
+        return Apache2::Const::OK;
+    }
+
+    if($username ne $e->requestor->usrname) {
+
+        my $evt = $U->simplereq(
+            'open-ils.actor', 
+            'open-ils.actor.user.username.update', 
+            $e->authtoken, $username);
+
+        if($U->event_equals($evt, 'USERNAME_EXISTS')) {
+            $ctx->{username_exists} = $username;
+            return Apache2::Const::OK;
+        }
+    }
+
+    my $url = $self->apache->unparsed_uri;
+    $url =~ s/update_username/prefs/;
+
+    return $self->generic_redirect($url);
+}
+
 sub load_myopac_bookbags {
     my $self = shift;
     my $e = $self->editor;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index 67e419d..36e6797 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -267,7 +267,7 @@ sub load_locale_handlers {
                     our %Lexicon = (%Lexicon, %{ Locale::Maketext::Lexicon::Gettext->parse(<F>) });
                     close F;
                 } else {
-                    warn "unable to open messages file: $messages"; 
+                    warn "EGWeb: unable to open messages file: $messages"; 
                 }
             }
 EVAL
diff --git a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
index 4b2f27b..28d4b2a 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
@@ -19,7 +19,7 @@
     </div>
 
     <div class="header_middle">
-        <span class="float-left">[% l('Current Items Checked Out') %]</span>
+        <span class="float-left">[% l('Previously Checked Out Items') %]</span>
         <span class='float-left' style='padding-left: 10px;'>
             [% IF offset > 0 %]
             <a href='circ_history?limit=[% limit %]&offset=[% offset - 1 %]'>[% l('Previous') %]</a>
@@ -37,22 +37,10 @@
 
     [% IF ctx.circs.size < 1 %]
     <div class="opac-auto-079">
-        <big><strong>[% l('You have no items checked out.') %]</strong></big>
+        <big><strong>[% l('There are no items in your circulation history.') %]</strong></big>
     </div>
     [% ELSE %]
 
-    [% IF ctx.success_renewals %]
-    <div class="renew-summary">
-        [% l("Successfully renewed [_1] item(s)", ctx.success_renewals) %]
-    </div>
-    [% END %]
-
-    [% IF ctx.failed_renewals %]
-    <div class="renew-summary red">
-        [% l("Failed to renew [_1] item(s)", ctx.failed_renewals) %]
-    </div>
-    [% END %]
-
     <div id='checked_main'>
         <table style='border-collapse:collapse;'>
             <thead id="acct_checked_main_header">
@@ -97,9 +85,12 @@
                             [% date.format(ctx.parse_datetime(circ.circ.due_date),DATE_FORMAT); %]
                         </td>
                         <td style="padding-left:5px;">
-                            [% IF circ.circ.checkin_time; 
-                                date.format(ctx.parse_datetime(circ.circ.checkin_time),DATE_FORMAT); 
-                            END; %]
+                            [% 
+                                IF circ.circ.checkin_time; 
+                                    date.format(ctx.parse_datetime(circ.circ.checkin_time),DATE_FORMAT); 
+                                ELSE; %]
+                                <span style='color:blue;'>*</span><!-- meh -->
+                            [% END; %]
                         </td>
                         <td>[% circ.circ.target_copy.barcode %]</td>
                         <td>[% circ.circ.target_copy.call_number.label %]</td>
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
index 5846c15..37cce3d 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
@@ -152,24 +152,14 @@
             <tr>
                 <td class='color_4 light_border'>
                     <div style="position:absolute">
-                        <div class="hide_me" style=
-                        "position:relative;left:70px;top:-3px;">
-                            <a href="#">
-                            <img alt="Username Help"
-                                 src=
-                                 "[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                        <div class="hide_me" style="position:relative;left:70px;top:-3px;">
+                            <a href="#"><img alt="Username Help" src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
                         </div>
                     </div>[% l("Username") %]
                 </td>
 
-                <td class='light_border'
-                    id='myopac_summary_username'>[% ctx.user.usrname | html %]</td>
-
-                <td class='light_border'><a href='#'
-                   class="hide_me"
-                   id='myopac_summary_username_change'
-                   style=
-                   'text-decoration: underline;'>[% l("Change") %]</a></td>
+                <td class='light_border'>[% ctx.user.usrname | html %]</td>
+                <td class='light_border'><a href='update_username'>[% l("Change") %]</a></td>
             </tr>
 
             <tr id='myopac_update_username_row'
@@ -242,26 +232,6 @@
                 <td class='light_border'><a href='update_email'>[% l('Change') %]</a></td>
             </tr>
 
-            <tr class='hide_me'>
-                <td class='myopac_update_cell' colspan='3'>
-                    <span class= 'myopac_update_span'>
-                        [% l("Enter new email address:") %]
-                    </span>
-                    <input type='text' size='24' />
-                    <span class='myopac_update_span'>
-                        <button>
-                            <span class= 'myopac_update_span'>
-                                [% l("Submit") %]</span>
-                        </button>
-                    </span>
-                    <span class='myopac_update_span'>
-                        <button>
-                            <span class='myopac_update_span'>
-                                [% l("Cancel") %]</span>
-                        </button>
-                    </span>
-                </td>
-            </tr>
             [% IF ctx.user.ident_value %]<tr class="hide_me">
                 <td class='color_4 light_border'>
                 [% l("Primary Identification") %]</td>
diff --git a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2 b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
index 92aed44..2261c29 100644
--- a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
@@ -1,7 +1,7 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     PROCESS "default/opac/parts/misc_util.tt2";
     WRAPPER "default/opac/parts/myopac/base.tt2";
-    myopac_page = "update_email"  %]
+    myopac_page = "prefs"  %]
 <div id='myopac_summary_div' style="padding:0px;">
 
 [% IF ctx.invalid_email %]

commit 7a715144023cf2818e6b0ba153613cbddbd5061c
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 7 11:14:29 2011 -0400

    speed up and clean up the user holds out/available count summary call

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
index 9b9bd13..864ef6e 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
@@ -1815,39 +1815,31 @@ __PACKAGE__->register_method(
 );
 	
 sub hold_request_count {
-	my( $self, $client, $login_session, $userid ) = @_;
-
-	my( $user_obj, $target, $evt ) = $apputils->checkses_requestor(
-		$login_session, $userid, 'VIEW_HOLD' );
-	return $evt if $evt;
-	
-
-	my $holds = $apputils->simple_scalar_request(
-			"open-ils.cstore",
-			"open-ils.cstore.direct.action.hold_request.search.atomic",
-			{ 
-				usr => $userid,
-				fulfillment_time => {"=" => undef },
-				cancel_time => undef,
-			}
-	);
+	my( $self, $client, $authtoken, $user_id ) = @_;
+    my $e = new_editor(authtoken => $authtoken);
+    return $e->event unless $e->checkauth;
 
-	my @ready;
-	for my $h (@$holds) {
-		next unless $h->capture_time and $h->current_copy;
+    $user_id = $e->requestor->id unless defined $user_id;
 
-		my $copy = $apputils->simple_scalar_request(
-			"open-ils.cstore",
-			"open-ils.cstore.direct.asset.copy.retrieve",
-			$h->current_copy
-		);
+    if($e->requestor->id ne $user_id) {
+        my $user = $e->retrieve_actor_user($user_id);
+        return $e->event unless $e->allowed('VIEW_HOLD', $user->home_ou);
+    }
 
-		if ($copy and $copy->status == 8) {
-			push @ready, $h;
-		}
-	}
+    my $holds = $e->json_query({
+        select => {ahr => ['shelf_time']},
+        from => 'ahr',
+        where => {
+            usr => $user_id,
+            fulfillment_time => {"=" => undef },
+            cancel_time => undef,
+        }
+    });
 
-	return { total => scalar(@$holds), ready => scalar(@ready) };
+	return { 
+        total => scalar(@$holds), 
+        ready => scalar(grep { $_->{shelf_time} } @$holds) 
+    };
 }
 
 __PACKAGE__->register_method(

commit 48dd9ca1f74f18b743a28c11e303580424315339
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 7 10:28:11 2011 -0400

    oops, missed a wrapper decl. fix; repaired

diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/prefs_base.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/prefs_base.tt2
index c26be3e..fb896ad 100644
--- a/Open-ILS/web/templates/default/opac/parts/myopac/prefs_base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/prefs_base.tt2
@@ -1,6 +1,5 @@
 [%  PROCESS "default/opac/parts/header.tt2";
-    WRAPPER "default/opac/parts/base.tt2" +
-        "default/opac/parts/myopac/base.tt2"; %]
+    WRAPPER "default/opac/parts/myopac/base.tt2"; %]
 
 <div id='myopac_prefs_div'>
     <div id="acct_prefs_tabs" style="padding-bottom: 12px;color:#666;">

commit 28551579d8422b9347fbe60fed67e5a5970d40d6
Merge: 212d6aa 5fcfd77
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 7 10:18:33 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 5fcfd7769aa745b3bb2adcbe7944b70eb602311e
Merge: 34e3fa8 ab820d4
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu Apr 7 10:16:26 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 34e3fa819eb813515ca5f405bb712855b854a20a
Merge: a9c6a44 7528f16
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu Apr 7 10:16:24 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 212d6aad09b7a2fc35d7e908910de59f3f25e38c
Author: berick <berick at esilibrary.com>
Date:   Thu Apr 7 10:15:42 2011 -0400

    More my-account cleanup/consistency
    
    For consistency, make new sub-pages (payments history, preferences) load
    as a separate page in the same path (prefs -> prefs_notify) instead of
    either an ?expand= option or a sub-path page (prefs -> prefs/notify).
    
    Let the my-account base page load the generic base page as a wrapper so
    that my-account page are not required to load both and (for me, anyway)
    make the inheritance more obvious.

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 342217c..33e2822 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -121,14 +121,15 @@ sub load {
     return $self->load_place_hold if $path =~ m|opac/place_hold|;
     return $self->load_myopac_holds if $path =~ m|opac/myopac/holds|;
     return $self->load_myopac_circs if $path =~ m|opac/myopac/circs|;
+    return $self->load_myopac_payments if $path =~ m|opac/myopac/main_payments|;
     return $self->load_myopac_main if $path =~ m|opac/myopac/main|;
     return $self->load_myopac_update_email if $path =~ m|opac/myopac/update_email|;
     return $self->load_myopac_bookbags if $path =~ m|opac/myopac/lists|;
     return $self->load_myopac_bookbag_update if $path =~ m|opac/myopac/list/update|;
     return $self->load_myopac_circ_history if $path =~ m|opac/myopac/circ_history|;
     return $self->load_myopac_hold_history if $path =~ m|opac/myopac/hold_history|;
-    return $self->load_myopac_prefs_notify if $path =~ m|opac/myopac/prefs/notify|;
-    return $self->load_myopac_prefs_settings if $path =~ m|opac/myopac/prefs/settings|;
+    return $self->load_myopac_prefs_notify if $path =~ m|opac/myopac/prefs_notify|;
+    return $self->load_myopac_prefs_settings if $path =~ m|opac/myopac/prefs_settings|;
     return $self->load_myopac_prefs if $path =~ m|opac/myopac/prefs|;
 
     return Apache2::Const::OK;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 552e5c5..e51ddd9 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -551,23 +551,11 @@ sub load_myopac_hold_history {
     return Apache2::Const::OK;
 }
 
-sub load_myopac_main {
-    my $self = shift;
-    my $limit = $self->cgi->param('limit') || 0;
-    my $offset = $self->cgi->param('offset') || 0;
-    my $expand = $self->cgi->param('expand') || '';
-
-    return $self->load_myopac_payments($limit, $offset) 
-        if $expand eq 'payments';
-
-    return $self->load_myopac_fines($limit, $offset);
-}
-
 # TODO: add other filter options as params/configs/etc.
 sub load_myopac_payments {
     my $self = shift;
-    my $limit = shift || 0;
-    my $offset = shift || 0;
+    my $limit = $self->cgi->param('limit') || 0;
+    my $offset = $self->cgi->param('offset') || 0;
     my $e = $self->editor;
 
     my $args = {};
@@ -584,10 +572,10 @@ sub load_myopac_payments {
 
 
 
-sub load_myopac_fines {
+sub load_myopac_main {
     my $self = shift;
-    my $limit = shift || 0;
-    my $offset = shift || 0;
+    my $limit = $self->cgi->param('limit') || 0;
+    my $offset = $self->cgi->param('offset') || 0;
     my $e = $self->editor;
     my $ctx = $self->ctx;
 
diff --git a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
index e21e67f..4b2f27b 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
@@ -1,7 +1,6 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     PROCESS "default/opac/parts/marc_misc.tt2";
-    WRAPPER "default/opac/parts/base.tt2" +
-        "default/opac/parts/myopac/base.tt2";
+    WRAPPER "default/opac/parts/myopac/base.tt2";
     myopac_page = "circs";
     limit = CGI.param('limit') || 25;
     offset = CGI.param('offset') || 0;
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 2e68ca1..c16d28c 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -1,7 +1,6 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/base.tt2" +
-        "default/opac/parts/myopac/base.tt2";
+    WRAPPER "default/opac/parts/myopac/base.tt2";
     myopac_page = "circs"  %]
 <div id='myopac_checked_div' style="padding:0px;">
 
diff --git a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
index e2151e2..62429fe 100644
--- a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
@@ -1,7 +1,6 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     PROCESS "default/opac/parts/marc_misc.tt2";
-    WRAPPER "default/opac/parts/base.tt2" +
-        "default/opac/parts/myopac/base.tt2";
+    WRAPPER "default/opac/parts/myopac/base.tt2";
     myopac_page = "holds"  
     limit = CGI.param('limit') || 25;
     offset = CGI.param('offset') || 0;
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index acced7f..ec18831 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -1,7 +1,6 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/base.tt2" +
-        "default/opac/parts/myopac/base.tt2";
+    WRAPPER "default/opac/parts/myopac/base.tt2";
     myopac_page = "holds"  %]
 <div id='myopac_holds_div'>
 
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index f661726..70fc328 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -1,7 +1,6 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/base.tt2" +
-        "default/opac/parts/myopac/base.tt2";
+    WRAPPER "default/opac/parts/myopac/base.tt2";
     myopac_page = "lists"  %]
 <div id='myopac_bookbag_div' style="padding:5px;">
     <!-- <div class="header_middle">
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 6b89717..6f2584b 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -1,118 +1,10 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/base.tt2" +
-        "default/opac/parts/myopac/base.tt2";
+    WRAPPER "default/opac/parts/myopac/main_base.tt2";
     myopac_page = "main";
-    show_payments = (CGI.param('expand') == 'payments');
+    myopac_main_page = "main";
 %]
 
-<div id='myopac_summary_div' style="padding:0px;">
-
-    <div style="width:742px;float:left;">
-        <div class="header_middle">[% l('Account Summary') %]</div>
-    </div>
-
-    <!-- fines summary along the right of the page -->
-    <div id="myopac_sum_fines">
-        <div style="position:absolute;">
-            <div style="position:relative;top:-15px;left:-23px;">
-                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tl.png" />
-            </div>
-        </div>
-        <div style="position:absolute;">
-            <div style="position:relative;top:-15px;left:172px;">
-                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tr.png" />
-            </div>
-        </div>
-        <div style="position:absolute;">
-            <div style="position:relative;top:161px;left:-23px;">
-                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_bl.png" />
-            </div>
-        </div>
-        <div style="position:absolute;">
-            <div style="position:relative;top:161px;left:172px;">
-                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_br.png" />
-            </div>
-        </div>
-        [% l('Fines:') %]
-        <span id="myopac_sum_fines_bal" class='[% ctx.user_stats.fines.balance_owed ? "red" : ""%]'>
-            [% money(ctx.user_stats.fines.balance_owed) %]
-        </span><br />
-        <a class="hide_me" href="#" id="pay_fines_btn1"><img
-            alt="[% l('Pay Fines') %]"
-            onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
-            onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
-            src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
-            style="position:relative;top:5px;" /></a>
-    </div>
-
-
-    <div style="width:662px;">
-        <div style="float:left;">
-            <div style="padding:10px 0px;" id="myopac_sum_name"></div>
-            <div class="acct_sum_row">
-                <table width="100%" cellspacing="0" cellpadding="0">
-                    <tr>
-                        <td>[% l("Items Currently Checked out ([_1])", ctx.user_stats.checkouts.total_out) %]</td>
-                        <td align="right">
-                            <a href="[% ctx.opac_root %]/myopac/circs">[% l("View All") %]</a>
-                        </td>
-                    </tr>
-                </table>
-            </div>
-            <div class="acct_sum_row">
-                <table width="100%" cellspacing="0" cellpadding="0">
-                    <tr>
-                        <td>[% l('Items Currently on Hold ([_1])', ctx.user_stats.holds.total) %]</td>
-                        <td align="right">
-                            <a href="[% ctx.opac_root %]/myopac/holds">[% l('View All') %]</a>
-                        </td>
-                    </tr>
-                </table>
-            </div>
-            <div class="acct_sum_row">
-                <table width="100%" cellspacing="0" cellpadding="0">
-                    <tr>
-                        <td>[% l('Items ready for pickup ([_1])', ctx.user_stats.holds.ready) %]</td>
-                        <td align="right">
-                            <a href="[% ctx.opac_root %]/myopac/holds?available=1">[% l('View All') %]</a>
-                        </td>
-                    </tr>
-                </table>
-            </div>
-
-            <!-- this is here to allow for hiding open transactions, but that 
-            also hides payments history, which we don't want.  perhaps this 
-            can be left out entirely
-            <div class="acct_sum_row" id="myopac_sum_fines_slim">
-                <table width="100%" cellspacing="0" cellpadding="0">
-                    <tr>
-                        <td>[% l('Fees &amp; Fines') %]</td>
-                        <td align="right">
-                            <a href="#">Show Overdue Materials</a>
-                        </td>
-                    </tr>
-                </table>
-            </div>
-            -->
-            
-        </div>
-    </div>
-    <div class="clear-both"></div>
-
-    <div id='fines_payments_wrapper'>
-        <div id='acct_fines_tabs'>
-            [% IF show_payments %]
-            <a href='main'><img src='[% ctx.media_prefix %]/images/acct_fines_off.jpg'/></a>
-            <a href=''><img src='[% ctx.media_prefix %]/images/acct_payments_on.jpg'/></a>
-            [% ELSE %]
-            <a href=''><img src='[% ctx.media_prefix %]/images/acct_fines_on.jpg'/></a>
-            <a href='?expand=payments'><img src='[% ctx.media_prefix %]/images/acct_payments_off.jpg'/></a>
-            [% END %]
-        </div>
-    </div>
-
-[% IF !show_payments %]
     [% IF ctx.fines.circulation.size > 0 %]
     <div id='myopac_circ_trans_div'>
         <table width='100%' class='data_grid'>
@@ -262,213 +154,177 @@
     </div>
     [% END %]
 
-    <!-- TODO: hidden until pay-fines is implemented
-    <a href="#"><img alt="[% l('Pay Fines') %]"
-        onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
-        src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
-        style="position:relative;top:5px;" /></a>
-    <br/>
-    -->
+<!-- TODO: move payment form to its own page -->
 
-[% ELSE %] <!-- show payments -->
-    <div>
-        <table id='myopac_payments_table' width='100%' class='data_grid'>
-            <thead><tr>
-                <th>[% l('Payment Date') %]</th>
-                <th>[% l('Payment For') %]</th>
-                <th>[% l('Amount') %]</th>
-                <th>[% l('Receipt') %]</th> 
-            </tr></thead>
-            <tbody>
-                [% FOR payment IN ctx.payments %]
-                <tr>
-                    <td>[% date.format(ctx.parse_datetime(payment.mp.payment_ts), DATE_FORMAT) %]</td>
-                    <td>[% (payment.xact_type == 'grocery') ? payment.last_billing_type : payment.title %]</td>
-                    <td>[% money(payment.mp.amount) %]</td>
-                    <td>
-                        [%# post to print/email form... %]
-                        <a href=''>[% l('Print') %]</a> / <a href=''>[% l('Email') %]</a>
-                    </td>
-                </tr>
-                [% END %]
-            </tbody>
-        </table>
-    </div>
-[% END %] 
-
-
-    <!-- TODO: move payment form to its own page -->
-
-    <div id="pay_fines_now" class="hide_me">
-        <table id='oils-selfck-cc-payment-table'>
-            <tbody>
-                <tr>
-                    <td><div style="width:129px;"></div></td>
-                    <td><div style="width:195px;"></div></td>
-                    <td><div style="width:324px;"></div></td>
-                </tr>
-                <tr>
-                    <td colspan='2'><strong>Billing Information</strong></td>
-                    <td rowspan='13' valign='top'>
-                        Selected fines you are paying for:
-                        <table cellpadding="0" cellspacing="5" border="0">
-                            <thead>
-                                <tr>
-                                    <td>
-                                        <strong>Name</strong>
-                                    </td>
-                                    <td>
-                                        <strong>Amount</strong>
-                                    </td>
-                                </tr>
-                            </thead>
-                            <tbody id="selectedFines">
-                            </tbody>
-                        </table>
-                        <br />
-                        <div id='oils-selfck-cc-payment-summary'>
-                            Total amount to pay:
-                            <strong>$<span></span></strong>
-                        </div>
-                        <br />
-                        Click <strong>Cancel</strong> to go back and (un)select
-                        other fines.
-                    </td>
-                </tr>
-                <tr>
-                    <td>First Name</td>
-                    <td><input jsId='oilsSelfckCCFName' /></td>
-                </tr>
-                <tr>
-                    <td>Last Name</td>
-                    <td><input jsId='oilsSelfckCCLName' /></td>
-                </tr>
-                <tr>
-                    <td>Street Address</td>
-                    <td><input jsId='oilsSelfckCCStreet' /></td>
-                </tr>
-                <tr>
-                    <td>City</td>
-                    <td><input jsId='oilsSelfckCCCity' /></td>
-                </tr>
-                <tr>
-                    <td>State or Province</td>
-                    <td><input jsId='oilsSelfckCCState' /></td>
-                </tr>
-                <tr>
-                    <td>ZIP or Postal Code</td>
-                    <td><input jsId='oilsSelfckCCZip' /></td>
-                </tr>
-                <tr>
-                  <td colspan='2'><strong>Credit Card Information</strong></td>
-                </tr>
-                <!-- Technically not needed since card type is derived from the CC number
-                <tr>
-                    <td>Type of Card</td>
-                    <td>
-                        <select jsId='oilsSelfckCCType' required='true'>
-                            <option value='VISA'>VISA</option>
-                            <option value='MasterCard'>MasterCard</option>
-                            <option value='American Express'>American Express</option>
-                        </select>
-                    </td>
-                </tr>
-                -->
-                <tr>
-                    <td>Credit Card #</td>
-                    <td><input jsId='oilsSelfckCCNumber' /></td>
-                </tr>
-                <tr>
-                    <td>
-                        <div style="position:absolute;">
-                            <div style="position:relative;left:80px;">
-                                <a href="#"><img
-                                    src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
-                            </div>
+<div id="pay_fines_now" class="hide_me">
+    <table id='oils-selfck-cc-payment-table'>
+        <tbody>
+            <tr>
+                <td><div style="width:129px;"></div></td>
+                <td><div style="width:195px;"></div></td>
+                <td><div style="width:324px;"></div></td>
+            </tr>
+            <tr>
+                <td colspan='2'><strong>Billing Information</strong></td>
+                <td rowspan='13' valign='top'>
+                    Selected fines you are paying for:
+                    <table cellpadding="0" cellspacing="5" border="0">
+                        <thead>
+                            <tr>
+                                <td>
+                                    <strong>Name</strong>
+                                </td>
+                                <td>
+                                    <strong>Amount</strong>
+                                </td>
+                            </tr>
+                        </thead>
+                        <tbody id="selectedFines">
+                        </tbody>
+                    </table>
+                    <br />
+                    <div id='oils-selfck-cc-payment-summary'>
+                        Total amount to pay:
+                        <strong>$<span></span></strong>
+                    </div>
+                    <br />
+                    Click <strong>Cancel</strong> to go back and (un)select
+                    other fines.
+                </td>
+            </tr>
+            <tr>
+                <td>First Name</td>
+                <td><input jsId='oilsSelfckCCFName' /></td>
+            </tr>
+            <tr>
+                <td>Last Name</td>
+                <td><input jsId='oilsSelfckCCLName' /></td>
+            </tr>
+            <tr>
+                <td>Street Address</td>
+                <td><input jsId='oilsSelfckCCStreet' /></td>
+            </tr>
+            <tr>
+                <td>City</td>
+                <td><input jsId='oilsSelfckCCCity' /></td>
+            </tr>
+            <tr>
+                <td>State or Province</td>
+                <td><input jsId='oilsSelfckCCState' /></td>
+            </tr>
+            <tr>
+                <td>ZIP or Postal Code</td>
+                <td><input jsId='oilsSelfckCCZip' /></td>
+            </tr>
+            <tr>
+              <td colspan='2'><strong>Credit Card Information</strong></td>
+            </tr>
+            <!-- Technically not needed since card type is derived from the CC number
+            <tr>
+                <td>Type of Card</td>
+                <td>
+                    <select jsId='oilsSelfckCCType' required='true'>
+                        <option value='VISA'>VISA</option>
+                        <option value='MasterCard'>MasterCard</option>
+                        <option value='American Express'>American Express</option>
+                    </select>
+                </td>
+            </tr>
+            -->
+            <tr>
+                <td>Credit Card #</td>
+                <td><input jsId='oilsSelfckCCNumber' /></td>
+            </tr>
+            <tr>
+                <td>
+                    <div style="position:absolute;">
+                        <div style="position:relative;left:80px;">
+                            <a href="#"><img
+                                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
                         </div>
-                        Security Code
-                    </td>
-                    <td>
-                        <input jsId='oilsSelfckCCCVV' />
-                    </td>
-                </tr>
-                <tr>
-                    <td>Exipration Month</td>
-                    <td>
-                        <select jsId='oilsSelfckCCMonth'>
-                            <option value='01' selected='selected'>January</option>
-                            <option value='02'>February</option>
-                            <option value='03'>March</option>
-                            <option value='04'>April</option>
-                            <option value='05'>May</option>
-                            <option value='06'>June</option>
-                            <option value='07'>July</option>
-                            <option value='08'>August</option>
-                            <option value='09'>September</option>
-                            <option value='10'>October</option>
-                            <option value='11'>November</option>
-                            <option value='12'>December</option>
-                        </select>
-                    </td>
-                </tr>
-                <tr>
-                    <td>Expiration Year</td>
-                    <td>
-                      <select jsId='oilsSelfckCCYear'>
-                        <option value='2011'>2011</option>
-                        <option value='2012'>2012</option>
-                        <option value='2013'>2013</option>
-                        <option value='2014'>2014</option>
-                        <option value='2015'>2015</option>
-                        <option value='2016'>2016</option>
-                        <option value='2017'>2017</option>
-                        <option value='2018'>2018</option>
-                        <option value='2019'>2019</option>
-                      </select>
-                    </td>
-                </tr>
-                <tr class="hide_me">
-                    <td>Edit Billing Address</td>
-                    <td>
-                        <input jsId='oilsSelfckEditDetails'/>
-                    </td>
-                </tr>
-                <tr>
-                    <td colspan='2' align="center">
-                        <button jsId='oilsSelfckCCSubmit'>
-                            Submit Payment
-                        </button>
-                        <button>
-                            Cancel
-                        </button>
-                    </td>
-                </tr>
-                <tr>
-                    <td colspan="3">
-                        <br />
-                        Important! You must have a printed receipt to be
-                        eligible for a refund on lost items (regulations allow
-                        for no exceptions).
-                        <br />
-                        <strong>
-                            To ensure your necessary receipt information is
-                            not lost, enter your email address above and a
-                            receipt will be emailed to you. Otherwise, make
-                            certain you have a printed receipt in hand before
-                            closing the payment receipt screen.
-                        </strong>
-                        <br />
-                        Refunds are not available for parts and pieces, overdue
-                        fines, or items that do not display a specific title in
-                        My Account. For a full list of refundable and
-                        non-refundable items, visit
-                        <a href="http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm">http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm</a><br /><br />
-                        This site uses VeriSign SSL encryption to ensure your
-                        privacy.
-                    </td>
-                </tr>
-            </tbody>
-        </table>
-    </div>
+                    </div>
+                    Security Code
+                </td>
+                <td>
+                    <input jsId='oilsSelfckCCCVV' />
+                </td>
+            </tr>
+            <tr>
+                <td>Exipration Month</td>
+                <td>
+                    <select jsId='oilsSelfckCCMonth'>
+                        <option value='01' selected='selected'>January</option>
+                        <option value='02'>February</option>
+                        <option value='03'>March</option>
+                        <option value='04'>April</option>
+                        <option value='05'>May</option>
+                        <option value='06'>June</option>
+                        <option value='07'>July</option>
+                        <option value='08'>August</option>
+                        <option value='09'>September</option>
+                        <option value='10'>October</option>
+                        <option value='11'>November</option>
+                        <option value='12'>December</option>
+                    </select>
+                </td>
+            </tr>
+            <tr>
+                <td>Expiration Year</td>
+                <td>
+                  <select jsId='oilsSelfckCCYear'>
+                    <option value='2011'>2011</option>
+                    <option value='2012'>2012</option>
+                    <option value='2013'>2013</option>
+                    <option value='2014'>2014</option>
+                    <option value='2015'>2015</option>
+                    <option value='2016'>2016</option>
+                    <option value='2017'>2017</option>
+                    <option value='2018'>2018</option>
+                    <option value='2019'>2019</option>
+                  </select>
+                </td>
+            </tr>
+            <tr class="hide_me">
+                <td>Edit Billing Address</td>
+                <td>
+                    <input jsId='oilsSelfckEditDetails'/>
+                </td>
+            </tr>
+            <tr>
+                <td colspan='2' align="center">
+                    <button jsId='oilsSelfckCCSubmit'>
+                        Submit Payment
+                    </button>
+                    <button>
+                        Cancel
+                    </button>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="3">
+                    <br />
+                    Important! You must have a printed receipt to be
+                    eligible for a refund on lost items (regulations allow
+                    for no exceptions).
+                    <br />
+                    <strong>
+                        To ensure your necessary receipt information is
+                        not lost, enter your email address above and a
+                        receipt will be emailed to you. Otherwise, make
+                        certain you have a printed receipt in hand before
+                        closing the payment receipt screen.
+                    </strong>
+                    <br />
+                    Refunds are not available for parts and pieces, overdue
+                    fines, or items that do not display a specific title in
+                    My Account. For a full list of refundable and
+                    non-refundable items, visit
+                    <a href="http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm">http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm</a><br /><br />
+                    This site uses VeriSign SSL encryption to ensure your
+                    privacy.
+                </td>
+            </tr>
+        </tbody>
+    </table>
 </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
new file mode 100644
index 0000000..3749bda
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
@@ -0,0 +1,30 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
+    WRAPPER "default/opac/parts/myopac/main_base.tt2";
+    myopac_page = "main";
+    myopac_main_page = "payments";
+%]
+<div>
+    <table id='myopac_payments_table' width='100%' class='data_grid'>
+        <thead><tr>
+            <th>[% l('Payment Date') %]</th>
+            <th>[% l('Payment For') %]</th>
+            <th>[% l('Amount') %]</th>
+            <th>[% l('Receipt') %]</th> 
+        </tr></thead>
+        <tbody>
+            [% FOR payment IN ctx.payments %]
+            <tr>
+                <td>[% date.format(ctx.parse_datetime(payment.mp.payment_ts), DATE_FORMAT) %]</td>
+                <td>[% (payment.xact_type == 'grocery') ? payment.last_billing_type : payment.title %]</td>
+                <td>[% money(payment.mp.amount) %]</td>
+                <td>
+                    [%# post to print/email form... %]
+                    <a href=''>[% l('Print') %]</a> / <a href=''>[% l('Email') %]</a>
+                </td>
+            </tr>
+            [% END %]
+        </tbody>
+    </table>
+</div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
index 1f40c0b..5846c15 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
@@ -1,67 +1,401 @@
 [%  PROCESS "default/opac/parts/header.tt2";
-    WRAPPER "default/opac/parts/base.tt2" +
-        "default/opac/parts/myopac/base.tt2";
-    myopac_page = "prefs" 
-    prefs_page = (ctx.path_info.match('/prefs$')) ? 'personal' : 
-        (ctx.path_info.match('/prefs/notify')) ? 'notify' : 'settings';
-%]
-
-<div id='myopac_prefs_div'>
-    <div id="acct_prefs_tabs" style="padding-bottom: 12px;color:#666;">
-        <div style="float:left;">
-
-        [% IF prefs_page == 'personal' %]
-            <div class="align">
-                <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_on.jpg" /></a>
-            </div>
-            <div class="align">
-                <a href='prefs/notify'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_off.jpg" /></a>
-            </div>
-            <div class="align">
-                <a href='prefs/settings'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_off.jpg" /></a>
-            </div>
-        [% ELSIF prefs_page == 'notify' %]
-            <div class="align">
-                <a href='../prefs'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_off.jpg" /></a>
-            </div>
-            <div class="align">
-                <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_on.jpg" /></a>
-            </div>
-            <div class="align" >
-                <a href='settings'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_off.jpg" /></a>
-            </div>
-        [% ELSE %]
-            <div class="align">
-                <a href='../prefs'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_off.jpg" /></a>
-            </div>
-            <div class="align">
-                <a href='notify'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_off.jpg" /></a>
-            </div>
-            <div class="align" >
-                <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_on.jpg" /></a>
-            </div>
-        [% END %]
-        </div>
-    </div> 
-
-    <div class="clear-both"></div> <br/>
-
-    <div class="header_middle">
-        <span id="acct_prefs_header">[% l('Account Information and Preferences') %]</span>
-        <span class="float-right"> 
-            <a class="hide_me" href="#">[% l('Export List') %]</a><!-- what does this do? -->
-        </span>
+    WRAPPER "default/opac/parts/myopac/prefs_base.tt2";
+    myopac_page = "prefs";
+    prefs_page = 'personal' %]
+
+<div id="acct_info_main">
+    <div id='myopac.expired.alert'
+         class='hide_me'
+         style='margin-bottom: 20px;'>
+        <table class='data_grid'
+               width='100%'>
+            <tbody>
+                <tr>
+                    <td width='100%' class='red'>
+                        [% l("Your account expired on") %]
+                        <span id='myopac.expired.date'></span>!
+                        [% l("Please see a librarian to renew your account.") %]</td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+
+    <div id='myopac.notes.div'
+         class='hide_me'>
+        <table class='data_grid'
+               width='100%'>
+            <thead>
+                <tr>
+                    <td colspan='2'>
+                    <b>[% l("* Staff Notes *") %]</b></td>
+                </tr>
+            </thead>
+
+            <tbody id='myopac.notes.tbody'>
+                <tr id='myopac.notes.tr'>
+                    <td><b name='title'></b> : <span name=
+                    'value'></span></td>
+                </tr>
+            </tbody>
+        </table><br />
     </div>
 
-    <div class="clear-both normal-height"></div>
+    <table width='70%'
+           class='light_border data_grid'>
+        <tbody id='myopac_summary_tbody'>
+            <tr>
+                <td width='30%'
+                    class='color_4 light_border'>[% l("Name") %]</td>
+
+                <td class='light_border'>[% l(
+                    HUMAN_NAME_FORMAT,
+                    ctx.user.prefix, ctx.user.first_given_name,
+                    ctx.user.second_given_name, ctx.user.family_name,
+                    ctx.user.suffix
+                ) | html %]</td>
+
+                <td></td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Day Phone") %]</td>
+
+                <td class='light_border'
+                    id='myopac_summary_dayphone'>[% ctx.user.day_phone | html %]</td>
+
+                <td class='light_border'><a href='#'
+                   class="hide_me"
+                   id='myopac_summary_phone1_change'
+                   style=
+                   'text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+
+            <tr id='myopac_update_phone1_row'
+                class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'>
+                    <span class='myopac_update_span'>
+                        Enter New [% l("Day Phone") %]:
+                    </span>
+
+                    <input type='text' size='24' id='myopac_new_phone1' />
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class='myopac_update_span'>
+                                [% l("Submit") %]</span>
+                        </button>
+                    </span>
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class='myopac_update_span'>
+                                [% l("Cancel") %]</span>
+                        </button>
+                    </span>
+                </td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Evening Phone") %]</td>
+
+                <td class='light_border'
+                    id='myopac_summary_eveningphone'>[% ctx.user.evening_phone | html %]</td>
+
+                <td class='light_border'><a href='#'
+                   class="hide_me"
+                   id='myopac_summary_phone2_change'
+                   style=
+                   'text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+
+            <tr id='myopac_update_phone2_row'
+                class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'><span class='myopac_update_span'>New
+                    [% l("Evening Phone") %]:</span>
+                    <input type='text' size='24' id='myopac_new_phone2' />
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Submit") %]</span></button></span>
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Cancel") %]</span></button></span>
+                </td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Other Phone") %]</td>
+
+                <td class='light_border'
+                    id='myopac_summary_otherphone'>[% ctx.user.other_phone | html %]</td>
+
+                <td class='light_border'><a href='#'
+                   class="hide_me"
+                   id='myopac_summary_phone3_change'
+                   style=
+                   'text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+
+            <tr id='myopac_update_phone3_row'
+                class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'><span class='myopac_update_span'>Enter
+                    New [% l("Other Phone") %]:</span>
+                    <input type='text' size='24' id='myopac_new_phone3' />
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Submit") %]</span></button></span>
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Cancel") %]</span></button></span>
+                </td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                    <div style="position:absolute">
+                        <div class="hide_me" style=
+                        "position:relative;left:70px;top:-3px;">
+                            <a href="#">
+                            <img alt="Username Help"
+                                 src=
+                                 "[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                        </div>
+                    </div>[% l("Username") %]
+                </td>
+
+                <td class='light_border'
+                    id='myopac_summary_username'>[% ctx.user.usrname | html %]</td>
 
-[% 
-    IF prefs_page == 'personal';
-        # By default, load the personal info page
-        INCLUDE 'default/opac/parts/myopac/personal.tt2';
-    ELSE;
-        content; 
-    END;
-%]
+                <td class='light_border'><a href='#'
+                   class="hide_me"
+                   id='myopac_summary_username_change'
+                   style=
+                   'text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+
+            <tr id='myopac_update_username_row'
+                class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'><span class=
+                    'myopac_update_span'>[% l("Enter new username:") %]</span>
+                    <input type='text' size='24' id='myopac_new_username' />
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Submit") %]</span></button></span>
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Cancel") %]</span></button></span>
+                </td>
+            </tr>
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Password") %]</td>
+                <td class='light_border'
+                    id='myopac_summary_password'>
+                    [% l("(not shown)") %]</td>
+                <td class='light_border'><a href='#'
+                   class="hide_me"
+                   style='text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+            <tr class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'>
+                    <table>
+                        <tbody>
+                            <tr>
+                                <td>
+                                    <span class= 'myopac_update_span'>
+                                        [% l("Enter current password:") %]
+                                    </span>
+                                </td>
+
+                                <td>
+                                    <input type='password'
+                                       size='24' />
+                                   </td>
+                            </tr>
+                            <tr>
+                                <td><span class=
+                                'myopac_update_span'>[% l("Enter new password:") %]</span></td>
+
+                                <td><input type='password' size='24' />
+                                   </td>
+                            </tr>
+
+                            <tr>
+                                <td><span class=
+                                'myopac_update_span'>[% l("Re-enter new password:") %]</span></td>
+
+                                <td>
+                                    <input type='password' size='24' />
+                                </td>
+                            </tr>
+                        </tbody>
+                    </table><span class=
+                    'myopac_update_span'><button><span class=
+                    'myopac_update_span'>[% l("Submit") %]</span></button></span>
+                    <span class='myopac_update_span'><button><span class='myopac_update_span'>
+                    [% l("Cancel") %]</span></button></span>
+                </td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>[% l("Email Address") %]</td>
+                <td class='light_border'>[% ctx.user.email | html %]</td>
+                <td class='light_border'><a href='update_email'>[% l('Change') %]</a></td>
+            </tr>
+
+            <tr class='hide_me'>
+                <td class='myopac_update_cell' colspan='3'>
+                    <span class= 'myopac_update_span'>
+                        [% l("Enter new email address:") %]
+                    </span>
+                    <input type='text' size='24' />
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class= 'myopac_update_span'>
+                                [% l("Submit") %]</span>
+                        </button>
+                    </span>
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class='myopac_update_span'>
+                                [% l("Cancel") %]</span>
+                        </button>
+                    </span>
+                </td>
+            </tr>
+            [% IF ctx.user.ident_value %]<tr class="hide_me">
+                <td class='color_4 light_border'>
+                [% l("Primary Identification") %]</td>
+
+                <td class='light_border'>
+                    [%
+                    # l('[_1] ([_2])', ctx.user.ident_value, ctx.user.ident_type.name) | html
+                    # XXX uncomment the above line to show primary
+                    # identification. With a minor tweak it could
+                    # alternatively be shown but partially obscured. 
+                    %]
+                </td>
+                <td></td>
+            </tr>[% END %]
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Active Barcode") %]</td>
+
+                <td class='light_border'>[% ctx.user.card.barcode %]</td>
+
+                <td></td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Home Library") %]</td>
+                <td class='light_border'>[% ctx.user.home_ou.name %]</td>
+                <td><a href='#'
+                   class="hide_me"
+                   style='text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+            <tr class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'>
+                    <span class='myopac_update_span'>
+                        New home library:</span>
+                    <select>
+                    </select>
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class= 'myopac_update_span'>
+                                [% l("Submit") %]</span>
+                        </button>
+                    </span>
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class= 'myopac_update_span'>
+                                [% l("Cancel") %]</span>
+                        </button>
+                    </span>
+                </td>
+            </tr>
+            <tr class="hide_me">
+                <td class='color_4 light_border'>
+                    [% l("Account Creation Date") %]
+                </td>
+                <td class='light_border'
+                    id='myopac_summary_create_date'></td>
+                <td></td>
+            </tr>
+        </tbody>
+    </table><br />
+    <hr class='opac-auto-013' color="#DCDBDB" />
+    <br />
+
+    <table width='100%' class='light_border data_grid'>
+        <thead>
+            <tr>
+                <td><strong>[% l("Addresses") %]</strong></td>
+
+            </tr>
+        </thead>
+        <tbody id='myopac_addr_tbody'>
+            [% FOR addr IN ctx.user.addresses %]
+            <tr class='[% addr.pending == "t" ? "pending-addr" : "light_border" %]'>
+                <td>
+                    <table>
+                        <tr>
+                            <td>[% l("Address Type") %]</td>
+                            <td name='myopac_addr_type'>[%
+                                IF addr.pending == "t";
+                                    "<strong>" _ l("*** PENDING ***") _ "</strong> ";
+                                END;
+                                addr.address_type | lower | ucfirst;
+                            %]</td>
+                        </tr>
+                        <tr>
+                            <td>[% l("Street") %]</td>
+                            <td name='myopac_addr_street'>[% addr.street1 | html %]</td>
+                        </tr>
+                        [% IF addr.street2 %]<tr>
+                            <td>[% l("Street") %]</td>
+                            <td name='myopac_addr_street2'>[% addr.street2 | html %]</td>
+                        </tr>[% END %]
+
+                        <tr>
+                            <td>[% l("City") %]</td>
+                            <td name='myopac_addr_city'>[% addr.city | html %]</td>
+                        </tr>
+
+                        <tr>
+                            <td>[% l("County") %]</td>
+                            <td name='myopac_addr_county'>[% addr.county| html  %]</td>
+                        </tr>
+
+                        <tr>
+                            <td>[% l("State") %]</td>
+                            <td name='myopac_addr_state'>[% addr.state | html %]</td>
+                        </tr>
+
+                        <tr>
+                            <td>[% l("Country") %]</td>
+                            <td name='myopac_addr_country'>[% addr.country | html %]</td>
+                        </tr>
+
+                        <tr>
+                            <td>[% l("Zip") %]</td>
+                            <td name='myopac_addr_zip'>[% addr.post_code | html %]</td>
+                        </tr>
+                        <tr>
+                            <td name='myopac_addr_edit_td'
+                                colspan='2' class='hide_me'>
+                                <a class='classic_link'
+                                    name='myopac_addr_edit_link'
+                                    href='#'>Edit Address</a>
+                            </td>
+                        </tr>
+                    </table>
+                </td>
+            </tr>
+            [% END %]
+        </tbody>
+    </table>
 </div>
+
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs/notify.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs_notify.tt2
similarity index 97%
rename from Open-ILS/web/templates/default/opac/myopac/prefs/notify.tt2
rename to Open-ILS/web/templates/default/opac/myopac/prefs_notify.tt2
index e848622..14a824e 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs/notify.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs_notify.tt2
@@ -1,6 +1,8 @@
 [%  PROCESS "default/opac/parts/header.tt2";
-    WRAPPER "default/opac/myopac/prefs.tt2";
-    myopac_page = "prefs/notify" %]
+    WRAPPER "default/opac/parts/myopac/prefs_base.tt2";
+    myopac_page = "prefs_notify";
+    prefs_page = 'notify' %]
+
 
 <form method='POST'>
 
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs/settings.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
similarity index 97%
rename from Open-ILS/web/templates/default/opac/myopac/prefs/settings.tt2
rename to Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
index 3e111ff..4267d3a 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs/settings.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs_settings.tt2
@@ -1,6 +1,7 @@
 [%  PROCESS "default/opac/parts/header.tt2";
-    WRAPPER "default/opac/myopac/prefs.tt2";
-    myopac_page = "prefs/notify" %]
+    WRAPPER "default/opac/parts/myopac/prefs_base.tt2";
+    myopac_page = "prefs_notify";
+    prefs_page = 'settings' %]
 
 USER SETTINGS
 
diff --git a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2 b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
index 7a9c014..92aed44 100644
--- a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
@@ -1,7 +1,6 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     PROCESS "default/opac/parts/misc_util.tt2";
-    WRAPPER "default/opac/parts/base.tt2" +
-        "default/opac/parts/myopac/base.tt2";
+    WRAPPER "default/opac/parts/myopac/base.tt2";
     myopac_page = "update_email"  %]
 <div id='myopac_summary_div' style="padding:0px;">
 
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
index f374db2..9e1125a 100644
--- a/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
@@ -1,3 +1,5 @@
+[%  WRAPPER "default/opac/parts/base.tt2" %]
+
 [% myopac_pages = [
         {url => "main", name => "Account Summary"},
         {url => "circs", name => "Items Checked Out"},
@@ -32,3 +34,4 @@
             <div class="common-full-pad"></div>
         </div>
     </div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
new file mode 100644
index 0000000..0676ee9
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/main_base.tt2
@@ -0,0 +1,97 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
+    WRAPPER "default/opac/parts/myopac/base.tt2";
+%]
+
+<div id='myopac_summary_div' style="padding:0px;">
+
+    <div style="width:742px;float:left;">
+        <div class="header_middle">[% l('Account Summary') %]</div>
+    </div>
+
+    <!-- fines summary along the right of the page -->
+    <div id="myopac_sum_fines">
+        <div style="position:absolute;">
+            <div style="position:relative;top:-15px;left:-23px;">
+                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tl.png" />
+            </div>
+        </div>
+        <div style="position:absolute;">
+            <div style="position:relative;top:-15px;left:172px;">
+                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tr.png" />
+            </div>
+        </div>
+        <div style="position:absolute;">
+            <div style="position:relative;top:161px;left:-23px;">
+                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_bl.png" />
+            </div>
+        </div>
+        <div style="position:absolute;">
+            <div style="position:relative;top:161px;left:172px;">
+                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_br.png" />
+            </div>
+        </div>
+        [% l('Fines:') %]
+        <span id="myopac_sum_fines_bal" class='[% ctx.user_stats.fines.balance_owed ? "red" : ""%]'>
+            [% money(ctx.user_stats.fines.balance_owed) %]
+        </span><br />
+
+        [%# TODO %]
+        <a class="hide_me" href="#" id="pay_fines_btn1"><img
+            alt="[% l('Pay Fines') %]"
+            onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
+            onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
+            src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
+            style="position:relative;top:5px;" /></a>
+    </div>
+
+    <div style="width:662px;">
+        <div style="float:left;">
+            <div style="padding:10px 0px;" id="myopac_sum_name"></div>
+            <div class="acct_sum_row">
+                <table width="100%" cellspacing="0" cellpadding="0">
+                    <tr>
+                        <td>[% l("Items Currently Checked out ([_1])", ctx.user_stats.checkouts.total_out) %]</td>
+                        <td align="right">
+                            <a href="[% ctx.opac_root %]/myopac/circs">[% l("View All") %]</a>
+                        </td>
+                    </tr>
+                </table>
+            </div>
+            <div class="acct_sum_row">
+                <table width="100%" cellspacing="0" cellpadding="0">
+                    <tr>
+                        <td>[% l('Items Currently on Hold ([_1])', ctx.user_stats.holds.total) %]</td>
+                        <td align="right">
+                            <a href="[% ctx.opac_root %]/myopac/holds">[% l('View All') %]</a>
+                        </td>
+                    </tr>
+                </table>
+            </div>
+            <div class="acct_sum_row">
+                <table width="100%" cellspacing="0" cellpadding="0">
+                    <tr>
+                        <td>[% l('Items ready for pickup ([_1])', ctx.user_stats.holds.ready) %]</td>
+                        <td align="right">
+                            <a href="[% ctx.opac_root %]/myopac/holds?available=1">[% l('View All') %]</a>
+                        </td>
+                    </tr>
+                </table>
+            </div>
+        </div>
+    </div>
+    <div class="clear-both"></div>
+    <div id='fines_payments_wrapper'>
+        <div id='acct_fines_tabs'>
+            [% IF myopac_main_page == 'main' %]
+            <a href='#'><img src='[% ctx.media_prefix %]/images/acct_fines_on.jpg'/></a>
+            <a href='main_payments'><img src='[% ctx.media_prefix %]/images/acct_payments_off.jpg'/></a>
+            [% ELSE %]
+            <a href='main'><img src='[% ctx.media_prefix %]/images/acct_fines_off.jpg'/></a>
+            <a href='#'><img src='[% ctx.media_prefix %]/images/acct_payments_on.jpg'/></a>
+            [% END %]
+        </div>
+    </div>
+    [% content %]
+</div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/personal.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/personal.tt2
deleted file mode 100644
index fe1be5c..0000000
--- a/Open-ILS/web/templates/default/opac/parts/myopac/personal.tt2
+++ /dev/null
@@ -1,395 +0,0 @@
-<div id="acct_info_main">
-    <div id='myopac.expired.alert'
-         class='hide_me'
-         style='margin-bottom: 20px;'>
-        <table class='data_grid'
-               width='100%'>
-            <tbody>
-                <tr>
-                    <td width='100%' class='red'>
-                        [% l("Your account expired on") %]
-                        <span id='myopac.expired.date'></span>!
-                        [% l("Please see a librarian to renew your account.") %]</td>
-                </tr>
-            </tbody>
-        </table>
-    </div>
-
-    <div id='myopac.notes.div'
-         class='hide_me'>
-        <table class='data_grid'
-               width='100%'>
-            <thead>
-                <tr>
-                    <td colspan='2'>
-                    <b>[% l("* Staff Notes *") %]</b></td>
-                </tr>
-            </thead>
-
-            <tbody id='myopac.notes.tbody'>
-                <tr id='myopac.notes.tr'>
-                    <td><b name='title'></b> : <span name=
-                    'value'></span></td>
-                </tr>
-            </tbody>
-        </table><br />
-    </div>
-
-    <table width='70%'
-           class='light_border data_grid'>
-        <tbody id='myopac_summary_tbody'>
-            <tr>
-                <td width='30%'
-                    class='color_4 light_border'>[% l("Name") %]</td>
-
-                <td class='light_border'>[% l(
-                    HUMAN_NAME_FORMAT,
-                    ctx.user.prefix, ctx.user.first_given_name,
-                    ctx.user.second_given_name, ctx.user.family_name,
-                    ctx.user.suffix
-                ) | html %]</td>
-
-                <td></td>
-            </tr>
-
-            <tr>
-                <td class='color_4 light_border'>
-                [% l("Day Phone") %]</td>
-
-                <td class='light_border'
-                    id='myopac_summary_dayphone'>[% ctx.user.day_phone | html %]</td>
-
-                <td class='light_border'><a href='#'
-                   class="hide_me"
-                   id='myopac_summary_phone1_change'
-                   style=
-                   'text-decoration: underline;'>[% l("Change") %]</a></td>
-            </tr>
-
-            <tr id='myopac_update_phone1_row'
-                class='hide_me'>
-                <td class='myopac_update_cell'
-                    colspan='3'>
-                    <span class='myopac_update_span'>
-                        Enter New [% l("Day Phone") %]:
-                    </span>
-
-                    <input type='text' size='24' id='myopac_new_phone1' />
-                    <span class='myopac_update_span'>
-                        <button>
-                            <span class='myopac_update_span'>
-                                [% l("Submit") %]</span>
-                        </button>
-                    </span>
-                    <span class='myopac_update_span'>
-                        <button>
-                            <span class='myopac_update_span'>
-                                [% l("Cancel") %]</span>
-                        </button>
-                    </span>
-                </td>
-            </tr>
-
-            <tr>
-                <td class='color_4 light_border'>
-                [% l("Evening Phone") %]</td>
-
-                <td class='light_border'
-                    id='myopac_summary_eveningphone'>[% ctx.user.evening_phone | html %]</td>
-
-                <td class='light_border'><a href='#'
-                   class="hide_me"
-                   id='myopac_summary_phone2_change'
-                   style=
-                   'text-decoration: underline;'>[% l("Change") %]</a></td>
-            </tr>
-
-            <tr id='myopac_update_phone2_row'
-                class='hide_me'>
-                <td class='myopac_update_cell'
-                    colspan='3'><span class='myopac_update_span'>New
-                    [% l("Evening Phone") %]:</span>
-                    <input type='text' size='24' id='myopac_new_phone2' />
-                    <span class='myopac_update_span'><button><span class=
-                        'myopac_update_span'>[% l("Submit") %]</span></button></span>
-                    <span class='myopac_update_span'><button><span class=
-                        'myopac_update_span'>[% l("Cancel") %]</span></button></span>
-                </td>
-            </tr>
-
-            <tr>
-                <td class='color_4 light_border'>
-                [% l("Other Phone") %]</td>
-
-                <td class='light_border'
-                    id='myopac_summary_otherphone'>[% ctx.user.other_phone | html %]</td>
-
-                <td class='light_border'><a href='#'
-                   class="hide_me"
-                   id='myopac_summary_phone3_change'
-                   style=
-                   'text-decoration: underline;'>[% l("Change") %]</a></td>
-            </tr>
-
-            <tr id='myopac_update_phone3_row'
-                class='hide_me'>
-                <td class='myopac_update_cell'
-                    colspan='3'><span class='myopac_update_span'>Enter
-                    New [% l("Other Phone") %]:</span>
-                    <input type='text' size='24' id='myopac_new_phone3' />
-                    <span class='myopac_update_span'><button><span class=
-                        'myopac_update_span'>[% l("Submit") %]</span></button></span>
-                    <span class='myopac_update_span'><button><span class=
-                        'myopac_update_span'>[% l("Cancel") %]</span></button></span>
-                </td>
-            </tr>
-
-            <tr>
-                <td class='color_4 light_border'>
-                    <div style="position:absolute">
-                        <div class="hide_me" style=
-                        "position:relative;left:70px;top:-3px;">
-                            <a href="#">
-                            <img alt="Username Help"
-                                 src=
-                                 "[% ctx.media_prefix %]/images/question-mark.png" /></a>
-                        </div>
-                    </div>[% l("Username") %]
-                </td>
-
-                <td class='light_border'
-                    id='myopac_summary_username'>[% ctx.user.usrname | html %]</td>
-
-                <td class='light_border'><a href='#'
-                   class="hide_me"
-                   id='myopac_summary_username_change'
-                   style=
-                   'text-decoration: underline;'>[% l("Change") %]</a></td>
-            </tr>
-
-            <tr id='myopac_update_username_row'
-                class='hide_me'>
-                <td class='myopac_update_cell'
-                    colspan='3'><span class=
-                    'myopac_update_span'>[% l("Enter new username:") %]</span>
-                    <input type='text' size='24' id='myopac_new_username' />
-                    <span class='myopac_update_span'><button><span class=
-                        'myopac_update_span'>[% l("Submit") %]</span></button></span>
-                    <span class='myopac_update_span'><button><span class=
-                        'myopac_update_span'>[% l("Cancel") %]</span></button></span>
-                </td>
-            </tr>
-            <tr>
-                <td class='color_4 light_border'>
-                [% l("Password") %]</td>
-                <td class='light_border'
-                    id='myopac_summary_password'>
-                    [% l("(not shown)") %]</td>
-                <td class='light_border'><a href='#'
-                   class="hide_me"
-                   style='text-decoration: underline;'>[% l("Change") %]</a></td>
-            </tr>
-            <tr class='hide_me'>
-                <td class='myopac_update_cell'
-                    colspan='3'>
-                    <table>
-                        <tbody>
-                            <tr>
-                                <td>
-                                    <span class= 'myopac_update_span'>
-                                        [% l("Enter current password:") %]
-                                    </span>
-                                </td>
-
-                                <td>
-                                    <input type='password'
-                                       size='24' />
-                                   </td>
-                            </tr>
-                            <tr>
-                                <td><span class=
-                                'myopac_update_span'>[% l("Enter new password:") %]</span></td>
-
-                                <td><input type='password' size='24' />
-                                   </td>
-                            </tr>
-
-                            <tr>
-                                <td><span class=
-                                'myopac_update_span'>[% l("Re-enter new password:") %]</span></td>
-
-                                <td>
-                                    <input type='password' size='24' />
-                                </td>
-                            </tr>
-                        </tbody>
-                    </table><span class=
-                    'myopac_update_span'><button><span class=
-                    'myopac_update_span'>[% l("Submit") %]</span></button></span>
-                    <span class='myopac_update_span'><button><span class='myopac_update_span'>
-                    [% l("Cancel") %]</span></button></span>
-                </td>
-            </tr>
-
-            <tr>
-                <td class='color_4 light_border'>[% l("Email Address") %]</td>
-                <td class='light_border'>[% ctx.user.email | html %]</td>
-                <td class='light_border'><a href='update_email'>[% l('Change') %]</a></td>
-            </tr>
-
-            <tr class='hide_me'>
-                <td class='myopac_update_cell' colspan='3'>
-                    <span class= 'myopac_update_span'>
-                        [% l("Enter new email address:") %]
-                    </span>
-                    <input type='text' size='24' />
-                    <span class='myopac_update_span'>
-                        <button>
-                            <span class= 'myopac_update_span'>
-                                [% l("Submit") %]</span>
-                        </button>
-                    </span>
-                    <span class='myopac_update_span'>
-                        <button>
-                            <span class='myopac_update_span'>
-                                [% l("Cancel") %]</span>
-                        </button>
-                    </span>
-                </td>
-            </tr>
-            [% IF ctx.user.ident_value %]<tr class="hide_me">
-                <td class='color_4 light_border'>
-                [% l("Primary Identification") %]</td>
-
-                <td class='light_border'>
-                    [%
-                    # l('[_1] ([_2])', ctx.user.ident_value, ctx.user.ident_type.name) | html
-                    # XXX uncomment the above line to show primary
-                    # identification. With a minor tweak it could
-                    # alternatively be shown but partially obscured. 
-                    %]
-                </td>
-                <td></td>
-            </tr>[% END %]
-
-            <tr>
-                <td class='color_4 light_border'>
-                [% l("Active Barcode") %]</td>
-
-                <td class='light_border'>[% ctx.user.card.barcode %]</td>
-
-                <td></td>
-            </tr>
-
-            <tr>
-                <td class='color_4 light_border'>
-                [% l("Home Library") %]</td>
-                <td class='light_border'>[% ctx.user.home_ou.name %]</td>
-                <td><a href='#'
-                   class="hide_me"
-                   style='text-decoration: underline;'>[% l("Change") %]</a></td>
-            </tr>
-            <tr class='hide_me'>
-                <td class='myopac_update_cell'
-                    colspan='3'>
-                    <span class='myopac_update_span'>
-                        New home library:</span>
-                    <select>
-                    </select>
-                    <span class='myopac_update_span'>
-                        <button>
-                            <span class= 'myopac_update_span'>
-                                [% l("Submit") %]</span>
-                        </button>
-                    </span>
-                    <span class='myopac_update_span'>
-                        <button>
-                            <span class= 'myopac_update_span'>
-                                [% l("Cancel") %]</span>
-                        </button>
-                    </span>
-                </td>
-            </tr>
-            <tr class="hide_me">
-                <td class='color_4 light_border'>
-                    [% l("Account Creation Date") %]
-                </td>
-                <td class='light_border'
-                    id='myopac_summary_create_date'></td>
-                <td></td>
-            </tr>
-        </tbody>
-    </table><br />
-    <hr class='opac-auto-013' color="#DCDBDB" />
-    <br />
-
-    <table width='100%' class='light_border data_grid'>
-        <thead>
-            <tr>
-                <td><strong>[% l("Addresses") %]</strong></td>
-
-            </tr>
-        </thead>
-        <tbody id='myopac_addr_tbody'>
-            [% FOR addr IN ctx.user.addresses %]
-            <tr class='[% addr.pending == "t" ? "pending-addr" : "light_border" %]'>
-                <td>
-                    <table>
-                        <tr>
-                            <td>[% l("Address Type") %]</td>
-                            <td name='myopac_addr_type'>[%
-                                IF addr.pending == "t";
-                                    "<strong>" _ l("*** PENDING ***") _ "</strong> ";
-                                END;
-                                addr.address_type | lower | ucfirst;
-                            %]</td>
-                        </tr>
-                        <tr>
-                            <td>[% l("Street") %]</td>
-                            <td name='myopac_addr_street'>[% addr.street1 | html %]</td>
-                        </tr>
-                        [% IF addr.street2 %]<tr>
-                            <td>[% l("Street") %]</td>
-                            <td name='myopac_addr_street2'>[% addr.street2 | html %]</td>
-                        </tr>[% END %]
-
-                        <tr>
-                            <td>[% l("City") %]</td>
-                            <td name='myopac_addr_city'>[% addr.city | html %]</td>
-                        </tr>
-
-                        <tr>
-                            <td>[% l("County") %]</td>
-                            <td name='myopac_addr_county'>[% addr.county| html  %]</td>
-                        </tr>
-
-                        <tr>
-                            <td>[% l("State") %]</td>
-                            <td name='myopac_addr_state'>[% addr.state | html %]</td>
-                        </tr>
-
-                        <tr>
-                            <td>[% l("Country") %]</td>
-                            <td name='myopac_addr_country'>[% addr.country | html %]</td>
-                        </tr>
-
-                        <tr>
-                            <td>[% l("Zip") %]</td>
-                            <td name='myopac_addr_zip'>[% addr.post_code | html %]</td>
-                        </tr>
-                        <tr>
-                            <td name='myopac_addr_edit_td'
-                                colspan='2' class='hide_me'>
-                                <a class='classic_link'
-                                    name='myopac_addr_edit_link'
-                                    href='#'>Edit Address</a>
-                            </td>
-                        </tr>
-                    </table>
-                </td>
-            </tr>
-            [% END %]
-        </tbody>
-    </table>
-</div>
-
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/prefs_base.tt2
similarity index 62%
copy from Open-ILS/web/templates/default/opac/myopac/prefs.tt2
copy to Open-ILS/web/templates/default/opac/parts/myopac/prefs_base.tt2
index 1f40c0b..c26be3e 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/prefs_base.tt2
@@ -1,10 +1,6 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     WRAPPER "default/opac/parts/base.tt2" +
-        "default/opac/parts/myopac/base.tt2";
-    myopac_page = "prefs" 
-    prefs_page = (ctx.path_info.match('/prefs$')) ? 'personal' : 
-        (ctx.path_info.match('/prefs/notify')) ? 'notify' : 'settings';
-%]
+        "default/opac/parts/myopac/base.tt2"; %]
 
 <div id='myopac_prefs_div'>
     <div id="acct_prefs_tabs" style="padding-bottom: 12px;color:#666;">
@@ -15,27 +11,27 @@
                 <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_on.jpg" /></a>
             </div>
             <div class="align">
-                <a href='prefs/notify'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_off.jpg" /></a>
+                <a href='prefs_notify'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_off.jpg" /></a>
             </div>
             <div class="align">
-                <a href='prefs/settings'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_off.jpg" /></a>
+                <a href='prefs_settings'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_off.jpg" /></a>
             </div>
         [% ELSIF prefs_page == 'notify' %]
             <div class="align">
-                <a href='../prefs'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_off.jpg" /></a>
+                <a href='prefs'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_off.jpg" /></a>
             </div>
             <div class="align">
                 <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_on.jpg" /></a>
             </div>
             <div class="align" >
-                <a href='settings'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_off.jpg" /></a>
+                <a href='prefs_settings'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_off.jpg" /></a>
             </div>
         [% ELSE %]
             <div class="align">
-                <a href='../prefs'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_off.jpg" /></a>
+                <a href='prefs'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_off.jpg" /></a>
             </div>
             <div class="align">
-                <a href='notify'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_off.jpg" /></a>
+                <a href='prefs_notify'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_off.jpg" /></a>
             </div>
             <div class="align" >
                 <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_on.jpg" /></a>
@@ -55,13 +51,7 @@
 
     <div class="clear-both normal-height"></div>
 
-[% 
-    IF prefs_page == 'personal';
-        # By default, load the personal info page
-        INCLUDE 'default/opac/parts/myopac/personal.tt2';
-    ELSE;
-        content; 
-    END;
-%]
+[% content; %]
+
 </div>
 [% END %]

commit ab820d400f0a42aa2d72719f2df2add3140bcfa6
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 6 17:52:10 2011 -0400

    circ history sorting newest to oldest, got paging working, but could use some work..

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index e7a961d..552e5c5 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -36,7 +36,7 @@ sub load_myopac_prefs_notify {
     $user_prefs = $self->update_optin_prefs($user_prefs)
         if $self->cgi->request_method eq 'POST';
 
-    $self->ctx->{opt_in_settings} = $user_prefs;
+    $self->ctx->{opt_in_settings} = $user_prefs; 
 
     return Apache2::Const::OK;
 }
@@ -507,15 +507,27 @@ sub load_myopac_circ_history {
     my $e = $self->editor;
     my $ctx = $self->ctx;
     my $limit = $self->cgi->param('limit');
-    my $offset = $self->cgi->param('offset');
+    my $offset = $self->cgi->param('offset') || 0;
 
     my $circs = $e->json_query({
         from => ['action.usr_visible_circs', $e->requestor->id],
-        limit => $limit || 25,
-        offset => $offset || 0
+        #limit => $limit || 25,
+        #offset => $offset || 0,
     });
 
-    $ctx->{circs} = $self->fetch_user_circs(1, [map { $_->{id} } @$circs], $limit, $offset);
+    # XXX: order-by in the json_query above appears to do nothing, so in-query 
+    # paging is not reallly an option.  do the sorting/paging here
+
+    # sort newest to oldest
+    $circs = [ sort { $b->{xact_start} cmp $a->{xact_start} } @$circs ];
+    my @ids = map { $_->{id} } @$circs;
+
+    # find the selected page and trim cruft
+    @ids = @ids[$offset..($offset + $limit - 1)] if $limit;
+    @ids = grep { defined $_ } @ids;
+
+    $ctx->{circs} = $self->fetch_user_circs(1, \@ids, $limit, $offset);
+    #$ctx->{circs} = $self->fetch_user_circs(1, [map { $_->{id} } @$circs], $limit, $offset);
 
     return Apache2::Const::OK;
 }

commit 1d3264b48059800017e015a6aa88891978adf071
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 6 16:03:28 2011 -0400

    minor cleanup

diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 119cf77..6b89717 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -115,9 +115,7 @@
 [% IF !show_payments %]
     [% IF ctx.fines.circulation.size > 0 %]
     <div id='myopac_circ_trans_div'>
-        <br/><hr/><br/>
-        <table width='100%' class='data_grid'
-            id='myopac_circ_trans_table'>
+        <table width='100%' class='data_grid'>
             <thead>
                 <tr>
                     <td colspan='10' style='padding: 6px'>
@@ -274,7 +272,6 @@
 
 [% ELSE %] <!-- show payments -->
     <div>
-        <div><b>[% l('Payments') %]</b></div>
         <table id='myopac_payments_table' width='100%' class='data_grid'>
             <thead><tr>
                 <th>[% l('Payment Date') %]</th>

commit 4bff85c5da3484abd509bb14508397194d18a7bd
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 6 15:54:44 2011 -0400

    added support for updating opt-in settings preferences

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index f210dfa..342217c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -199,10 +199,7 @@ sub load_common {
 
         } else {
 
-            # For now, keep an eye out for any pages being unceremoniously redirected to logout...
-            $self->apache->log->info("catloader: loading " . $ctx->{path_info} . 
-                "; auth session " .  $e->authtoken . " no longer valid; redirecting to logout");
-
+            # authtoken is no longer valid, log out to clean up
             return $self->load_logout;
         }
     }
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 8cec166..e7a961d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -5,6 +5,7 @@ use OpenSRF::Utils::Logger qw/$logger/;
 use OpenILS::Utils::CStoreEditor qw/:funcs/;
 use OpenILS::Utils::Fieldmapper;
 use OpenILS::Application::AppUtils;
+use OpenSRF::Utils::JSON;
 my $U = 'OpenILS::Application::AppUtils';
 
 
@@ -31,6 +32,19 @@ sub load_myopac_prefs_notify {
     my $self = shift;
     my $e = $self->editor;
 
+    my $user_prefs = $self->fetch_optin_prefs;
+    $user_prefs = $self->update_optin_prefs($user_prefs)
+        if $self->cgi->request_method eq 'POST';
+
+    $self->ctx->{opt_in_settings} = $user_prefs;
+
+    return Apache2::Const::OK;
+}
+
+sub fetch_optin_prefs {
+    my $self = shift;
+    my $e = $self->editor;
+
     # fetch all of the opt-in settings the user has access to
     # XXX: user's should in theory have options to opt-in to notices
     # for remote locations, but that opens the door for a large
@@ -49,8 +63,41 @@ sub load_myopac_prefs_notify {
         [map {$_->name} @$opt_ins]
     );
 
-    $self->ctx->{opt_in_settings} = [map { {cust => $_, value => $user_set->{$_->name} } } @$opt_ins];
-    return Apache2::Const::OK;
+    return [map { {cust => $_, value => $user_set->{$_->name} } } @$opt_ins];
+}
+
+sub update_optin_prefs {
+    my $self = shift;
+    my $user_prefs = shift;
+    my $e = $self->editor;
+    my @settings = $self->cgi->param('setting');
+    my %newsets;
+
+    # apply now-true settings
+    for my $applied (@settings) {
+        # see if setting is already applied to this user
+        next if grep { $_->{cust}->name eq $applied and $_->{value} } @$user_prefs;
+        $newsets{$applied} = OpenSRF::Utils::JSON->true;
+    }
+
+    # remove now-false settings
+    for my $pref (grep { $_->{value} } @$user_prefs) {
+        $newsets{$pref->{cust}->name} = undef 
+            unless grep { $_ eq $pref->{cust}->name } @settings;
+    }
+
+    $U->simplereq(
+        'open-ils.actor',
+        'open-ils.actor.patron.settings.update',
+        $e->authtoken, $e->requestor->id, \%newsets);
+
+    # update the local prefs to match reality
+    for my $pref (@$user_prefs) {
+        $pref->{value} = $newsets{$pref->{cust}->name} 
+            if exists $newsets{$pref->{cust}->name};
+    }
+
+    return $user_prefs;
 }
 
 sub load_myopac_prefs_settings {
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs/notify.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs/notify.tt2
index 5d1077a..e848622 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs/notify.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs/notify.tt2
@@ -2,117 +2,123 @@
     WRAPPER "default/opac/myopac/prefs.tt2";
     myopac_page = "prefs/notify" %]
 
-<table>
-    <thead><tr>
-        <th>[% l('Notifation Type') %]</th>
-        <th>[% l('Enabled') %]</th>
-    </tr></thead>
-    <tbody class='data_grid'>
-        [% IF optin.size == 0 %]
-            <strong>[% l('No notification preferences are configured') %]</strong>
-        [% END %]
-        [% FOR optin IN ctx.opt_in_settings %]
-            <tr>
-                <td>[% optin.cust.label %]</td>
-                <td>
-                    <input 
-                        type='checkbox' 
-                        name='[% optin.cust.name %]' 
-                        [% IF optin.value %] checked='checked' [% END %]/>
-                </td>
-            </tr>
-        [% END %]
-    </tbody>
-</table>
+<form method='POST'>
 
+    <div style="float:right;width:65px;">
+        <input type='image' alt="[% l('Save') %]" src="[% ctx.media_prefix %]/images/save-btn.png" />
+    </div>
 
-        <!-- NOTIFICATION PREFS / leaving here for reference
-        <table class="hide_me"
-               id="acct_notify_main">
-            <tbody>
-                <tr class="hide_me">
-                    <td><span>[% l("Default Hold Notification Method") %]</span> <a class=
-                    'classic_link'
-                       href='#'>[% l("(Help)") %]</a></td>
-
-                    <td style="padding-left:15px;"><select id=
-                    'prefs_hold_notify'>
-                        <option value='phone:email'
-                                selected='selected'>
-                            [% l("Use Phone and Email") %]
-                        </option>
-
-                        <option value='phone'>
-                            [% l("Use Phone Only") %]
-                        </option>
-
-                        <option value='email'>
-                            [% l("Use Email Only") %]
-                        </option>
-                    </select></td>
-                </tr>
-
+    <table>
+        <thead><tr>
+            <th>[% l('Notifation Type') %]</th>
+            <th>[% l('Enabled') %]</th>
+        </tr></thead>
+        <tbody class='data_grid'>
+            [% IF optin.size == 0 %]
+                <strong>[% l('No notification preferences are configured') %]</strong>
+            [% END %]
+            [% FOR optin IN ctx.opt_in_settings %]
                 <tr>
-                    <td style="padding-top:10px;"><strong>Pick Up Notice for
-                    Holds</strong><br />
-                    <input type="checkbox"
-                           id="opac.hold_notify.email"
-                           name="opac.hold_notify.email" /> <label for=
-                           "opac.hold_notify.email">Email</label><br />
-                    <input type="checkbox"
-                           id="opac.hold_notify.phone"
-                           name="opac.hold_notify.phone" /> <label for=
-                           "opac.hold_notify.phone">Phone</label>
-                           <b>(Temporarily phone notification will generate a
-                           mailed paper notice.)</b></td>
+                    <td>[% optin.cust.label %]</td>
+                    <td>
+                        <input type='checkbox' name='setting' 
+                            value='[% optin.cust.name %]' 
+                            [% IF optin.value %] checked='checked' [% END %]/>
+                    </td>
                 </tr>
+            [% END %]
+        </tbody>
+    </table>
+</form>
 
-                <tr>
-                    <td style="padding-top:10px;"><strong>Expire Notice for
-                    Holds</strong><br />
-                    <input type="checkbox"
-                           id="notification.hold.expire.email"
-                           name="notification.hold.expire.email" /> <label for=
-                           "notification.hold.expire.email">Email</label></td>
-                </tr>
 
-                <tr>
-                    <td style="padding-top:10px;"><strong>Cancel Notice for
-                    Holds</strong><br />
-                    <input type="checkbox"
-                           id="notification.hold.cancel.email"
-                           name="notification.hold.cancel.email" /> <label for=
-                           "notification.hold.cancel.email">Email</label></td>
-                </tr>
+<!-- NOTIFICATION PREFS / leaving here for reference
+<table class="hide_me"
+       id="acct_notify_main">
+    <tbody>
+        <tr class="hide_me">
+            <td><span>[% l("Default Hold Notification Method") %]</span> <a class=
+            'classic_link'
+               href='#'>[% l("(Help)") %]</a></td>
 
-                <tr>
-                    <td style="padding-top:10px;"><strong>Overdue First
-                    Notice</strong><br />
-                    <input type="checkbox"
-                           id="notification.overdue.first.email"
-                           name="notification.overdue.first.email" />
-                           <label for=
-                           "notification.overdue.first.email">Email</label><br />
-                    <input type="checkbox"
-                           id="notification.overdue.first.phone"
-                           name="notification.overdue.first.phone" />
-                           <label for=
-                           "notification.overdue.first.phone">Phone</label>
-                           <b>(Temporarily phone notification will generate a
-                           mailed paper notice.)</b></td>
-                </tr>
+            <td style="padding-left:15px;"><select id=
+            'prefs_hold_notify'>
+                <option value='phone:email'
+                        selected='selected'>
+                    [% l("Use Phone and Email") %]
+                </option>
 
-                <tr>
-                    <td style="padding-top:10px;"><strong>Courtesy
-                    Notice</strong><br />
-                    <input type="checkbox"
-                           id="notification.predue.email"
-                           name="notification.predue.email" /> <label for=
-                           "notification.predue.email">Email</label><br /></td>
-                </tr>
-            </tbody>
-        </table>
-        -->
+                <option value='phone'>
+                    [% l("Use Phone Only") %]
+                </option>
+
+                <option value='email'>
+                    [% l("Use Email Only") %]
+                </option>
+            </select></td>
+        </tr>
+
+        <tr>
+            <td style="padding-top:10px;"><strong>Pick Up Notice for
+            Holds</strong><br />
+            <input type="checkbox"
+                   id="opac.hold_notify.email"
+                   name="opac.hold_notify.email" /> <label for=
+                   "opac.hold_notify.email">Email</label><br />
+            <input type="checkbox"
+                   id="opac.hold_notify.phone"
+                   name="opac.hold_notify.phone" /> <label for=
+                   "opac.hold_notify.phone">Phone</label>
+                   <b>(Temporarily phone notification will generate a
+                   mailed paper notice.)</b></td>
+        </tr>
+
+        <tr>
+            <td style="padding-top:10px;"><strong>Expire Notice for
+            Holds</strong><br />
+            <input type="checkbox"
+                   id="notification.hold.expire.email"
+                   name="notification.hold.expire.email" /> <label for=
+                   "notification.hold.expire.email">Email</label></td>
+        </tr>
+
+        <tr>
+            <td style="padding-top:10px;"><strong>Cancel Notice for
+            Holds</strong><br />
+            <input type="checkbox"
+                   id="notification.hold.cancel.email"
+                   name="notification.hold.cancel.email" /> <label for=
+                   "notification.hold.cancel.email">Email</label></td>
+        </tr>
+
+        <tr>
+            <td style="padding-top:10px;"><strong>Overdue First
+            Notice</strong><br />
+            <input type="checkbox"
+                   id="notification.overdue.first.email"
+                   name="notification.overdue.first.email" />
+                   <label for=
+                   "notification.overdue.first.email">Email</label><br />
+            <input type="checkbox"
+                   id="notification.overdue.first.phone"
+                   name="notification.overdue.first.phone" />
+                   <label for=
+                   "notification.overdue.first.phone">Phone</label>
+                   <b>(Temporarily phone notification will generate a
+                   mailed paper notice.)</b></td>
+        </tr>
+
+        <tr>
+            <td style="padding-top:10px;"><strong>Courtesy
+            Notice</strong><br />
+            <input type="checkbox"
+                   id="notification.predue.email"
+                   name="notification.predue.email" /> <label for=
+                   "notification.predue.email">Email</label><br /></td>
+        </tr>
+    </tbody>
+</table>
+-->
 
 
 [% END %]

commit 1be8e55ed89bba55d02ae37fdbd60ca3261093bb
Merge: facb113 a9c6a44
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 6 12:17:12 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit facb1136a49e424d6cd4034044119680073f88f1
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 6 12:17:01 2011 -0400

    created inital notifications preference page; infrastructure for notify and search/settings preferences pages; prefs pages icons

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 7d56e6b..f210dfa 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -127,7 +127,9 @@ sub load {
     return $self->load_myopac_bookbag_update if $path =~ m|opac/myopac/list/update|;
     return $self->load_myopac_circ_history if $path =~ m|opac/myopac/circ_history|;
     return $self->load_myopac_hold_history if $path =~ m|opac/myopac/hold_history|;
-    return $self->load_myopac if $path =~ m|opac/myopac|;
+    return $self->load_myopac_prefs_notify if $path =~ m|opac/myopac/prefs/notify|;
+    return $self->load_myopac_prefs_settings if $path =~ m|opac/myopac/prefs/settings|;
+    return $self->load_myopac_prefs if $path =~ m|opac/myopac/prefs|;
 
     return Apache2::Const::OK;
 }
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index b510b43..8cec166 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -10,9 +10,51 @@ my $U = 'OpenILS::Application::AppUtils';
 
 # context additions: 
 #   user : au object, fleshed
-sub load_myopac {
+sub load_myopac_prefs {
+    my $self = shift;
+
+    $self->ctx->{user} = $self->editor->retrieve_actor_user([
+        $self->ctx->{user}->id,
+        {
+            flesh => 1,
+            flesh_fields => {
+                au => [qw/card home_ou addresses ident_type/]
+                # ...
+            }
+        }
+    ]);
+
+    return Apache2::Const::OK;
+}
+
+sub load_myopac_prefs_notify {
+    my $self = shift;
+    my $e = $self->editor;
+
+    # fetch all of the opt-in settings the user has access to
+    # XXX: user's should in theory have options to opt-in to notices
+    # for remote locations, but that opens the door for a large
+    # set of generally un-used opt-ins.. needs discussion
+    my $opt_ins =  $U->simplereq(
+        'open-ils.actor',
+        'open-ils.actor.event_def.opt_in.settings.atomic',
+        $e->authtoken, $e->requestor->home_ou);
+
+    # fetch user setting values for each of the opt-in settings
+    my $user_set = $U->simplereq(
+        'open-ils.actor',
+        'open-ils.actor.patron.settings.retrieve',
+        $e->authtoken, 
+        $e->requestor->id, 
+        [map {$_->name} @$opt_ins]
+    );
+
+    $self->ctx->{opt_in_settings} = [map { {cust => $_, value => $user_set->{$_->name} } } @$opt_ins];
+    return Apache2::Const::OK;
+}
+
+sub load_myopac_prefs_settings {
     my $self = shift;
-    $self->ctx->{page} = 'myopac';
 
     $self->ctx->{user} = $self->editor->retrieve_actor_user([
         $self->ctx->{user}->id,
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
index bb62854..1f40c0b 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
@@ -1,683 +1,67 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
-    myopac_page = "prefs"  %]
-    <div id='myopac_prefs_div'>
-        <!-- XXX TODO <div id="acct_prefs_tabs"
-             style="padding-bottom: 12px;color:#666;">
-            <div style="float:left;">
-                <div class="align selected"
-                     id="prefs_info_lbl"><img src=
-                     "[% ctx.media_prefix %]/images/sub_prefs_info_on.jpg" /></div>
-
-                <div class="align hide_me"
-                     id="prefs_info_link">
-                    <a href="#"><img src=
-                         "[% ctx.media_prefix %]/images/sub_prefs_info_off.jpg" /></a>
-                </div>
-
-                <div class="align"
-                     id="prefs_notify_link">
-                    <a href="#"><img src=
-                         "[% ctx.media_prefix %]/images/sub_prefs_notify_off.jpg" /></a>
-                </div>
-
-                <div class="align selected hide_me"
-                     id="prefs_notify_lbl"><img src=
-                     "[% ctx.media_prefix %]/images/sub_prefs_notify_on.jpg" /></div>
-
-                <div class="align"
-                     id="prefs_search_link">
-                    <a href="#"><img src=
-                         "[% ctx.media_prefix %]/images/sub_prefs_search_off.jpg" /></a>
-                </div>
-
-                <div class="align selected hide_me"
-                     id="prefs_search_lbl"><img src=
-                     "[% ctx.media_prefix %]/images/sub_prefs_search_on.jpg" /></div>
+    myopac_page = "prefs" 
+    prefs_page = (ctx.path_info.match('/prefs$')) ? 'personal' : 
+        (ctx.path_info.match('/prefs/notify')) ? 'notify' : 'settings';
+%]
+
+<div id='myopac_prefs_div'>
+    <div id="acct_prefs_tabs" style="padding-bottom: 12px;color:#666;">
+        <div style="float:left;">
+
+        [% IF prefs_page == 'personal' %]
+            <div class="align">
+                <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_on.jpg" /></a>
             </div>
-
-            <div style="float:right;width:65px;">
-                <div style="position:absolute">
-                    <div style="position:relative;top:75px;">
-                        <a id='acct_prefs_save'
-                             class='hide_me'
-                             href="#"><img alt="Save"
-                             src="[% ctx.media_prefix %]/images/save-btn.png" /></a>
-                    </div>
-                </div>
+            <div class="align">
+                <a href='prefs/notify'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_off.jpg" /></a>
             </div>
-
-            <div class="clear-both"></div>
-        </div> -->
-
-        <div class="header_middle">
-            <span id="acct_prefs_header">
-                Account Information and Preferences
-            </span>
-            <span class="float-right">
-                <a class="hide_me"
-                    href="#">Export List</a>
-            </span>
-        </div>
-
-        <div class="clear-both normal-height"></div>
-
-        <table class="hide_me full-width" id="acct_search_main">
-            <tbody id='myopac_prefs_tbody'>
-                <tr id='myopac_prefs_loading'>
-                    <td colspan='3'><b>[% l("Loading...") %]</b></td>
-                </tr>
-
-                <tr id='myopac_prefs_row'>
-                    <td width='20%'>[% l("Search hits per page") %]</td>
-
-                    <td>
-                        <div style="position:absolute">
-                            <div style="position:relative;top:0px;left:55px;">
-                                <a href="#">
-                                <img alt="Search Hits Help"
-                                     src=
-                                     "[% ctx.media_prefix %]/images/question-mark.png" /></a>
-                            </div>
-                        </div><select id='prefs_hits_per'
-                            style="position:relative;z-index:100;">
-                            <option value='5'>
-                                5
-                            </option>
-
-                            <option value='8'>
-                                8
-                            </option>
-
-                            <option value='10'>
-                                10
-                            </option>
-
-                            <option value='15'>
-                                15
-                            </option>
-
-                            <option value='20'>
-                                20
-                            </option>
-
-                            <option value='25'>
-                                25
-                            </option>
-
-                            <option value='50'>
-                                50
-                            </option>
-                        </select>
-                    </td>
-                </tr>
-
-                <tr>
-                    <td colspan="2"><label for="circHistStart">Keep history of
-                    checked out items?</label> <input type="checkbox"
-                           id="circHistStart" /></td>
-                </tr><!-- FONT size preference -->
-
-                <tr class="hide_me">
-                    <td>[% l("Default Font Size") %]</td>
-
-                    <td><select id='prefs_def_font'>
-                        <option value='regular'>
-                            [% l("Regular Font") %]
-                        </option>
-
-                        <option value='large'>
-                            [% l("Large Font") %]
-                        </option>
-                    </select></td>
-                </tr>
-
-                <tr class="hide_me">
-                    <td>[% l("Default Search Location") %]</td>
-                    <td>
-                        <div style='margin-bottom: 5px;'>
-                            <input type='checkbox' id='myopac_pref_home_lib' />
-                                 [% l("Always search my home library by default.") %]
-                        </div>
-                        <select id='prefs_def_location'></select>
-                    </td>
-                </tr>
-
-                <tr class="hide_me">
-                    <td>[% l("Default Search Range") %]</td>
-
-                    <td><select id='prefs_def_range'>
-                        </select></td>
-                </tr>
-            </tbody>
-        </table><a href=
-        "http://www.kcls.org/usingthelibrary/catalog_help/library_elf.cfm"><u>Try
-        Library Elf-to manage library materials!</u></a>
-
-        <table class="hide_me"
-               id="acct_notify_main">
-            <tbody>
-                <tr class="hide_me">
-                    <td><span>[% l("Default Hold Notification Method") %]</span> <a class=
-                    'classic_link'
-                       href='#'>[% l("(Help)") %]</a></td>
-
-                    <td style="padding-left:15px;"><select id=
-                    'prefs_hold_notify'>
-                        <option value='phone:email'
-                                selected='selected'>
-                            [% l("Use Phone and Email") %]
-                        </option>
-
-                        <option value='phone'>
-                            [% l("Use Phone Only") %]
-                        </option>
-
-                        <option value='email'>
-                            [% l("Use Email Only") %]
-                        </option>
-                    </select></td>
-                </tr>
-
-                <tr>
-                    <td style="padding-top:10px;"><strong>Pick Up Notice for
-                    Holds</strong><br />
-                    <input type="checkbox"
-                           id="opac.hold_notify.email"
-                           name="opac.hold_notify.email" /> <label for=
-                           "opac.hold_notify.email">Email</label><br />
-                    <input type="checkbox"
-                           id="opac.hold_notify.phone"
-                           name="opac.hold_notify.phone" /> <label for=
-                           "opac.hold_notify.phone">Phone</label>
-                           <b>(Temporarily phone notification will generate a
-                           mailed paper notice.)</b></td>
-                </tr>
-
-                <tr>
-                    <td style="padding-top:10px;"><strong>Expire Notice for
-                    Holds</strong><br />
-                    <input type="checkbox"
-                           id="notification.hold.expire.email"
-                           name="notification.hold.expire.email" /> <label for=
-                           "notification.hold.expire.email">Email</label></td>
-                </tr>
-
-                <tr>
-                    <td style="padding-top:10px;"><strong>Cancel Notice for
-                    Holds</strong><br />
-                    <input type="checkbox"
-                           id="notification.hold.cancel.email"
-                           name="notification.hold.cancel.email" /> <label for=
-                           "notification.hold.cancel.email">Email</label></td>
-                </tr>
-
-                <tr>
-                    <td style="padding-top:10px;"><strong>Overdue First
-                    Notice</strong><br />
-                    <input type="checkbox"
-                           id="notification.overdue.first.email"
-                           name="notification.overdue.first.email" />
-                           <label for=
-                           "notification.overdue.first.email">Email</label><br />
-                    <input type="checkbox"
-                           id="notification.overdue.first.phone"
-                           name="notification.overdue.first.phone" />
-                           <label for=
-                           "notification.overdue.first.phone">Phone</label>
-                           <b>(Temporarily phone notification will generate a
-                           mailed paper notice.)</b></td>
-                </tr>
-
-                <tr>
-                    <td style="padding-top:10px;"><strong>Courtesy
-                    Notice</strong><br />
-                    <input type="checkbox"
-                           id="notification.predue.email"
-                           name="notification.predue.email" /> <label for=
-                           "notification.predue.email">Email</label><br /></td>
-                </tr>
-            </tbody>
-        </table>
-
-        <div id="acct_info_main">
-            <div id='myopac.expired.alert'
-                 class='hide_me'
-                 style='margin-bottom: 20px;'>
-                <table class='data_grid'
-                       width='100%'>
-                    <tbody>
-                        <tr>
-                            <td width='100%' class='red'>
-                                [% l("Your account expired on") %]
-                                <span id='myopac.expired.date'></span>!
-                                [% l("Please see a librarian to renew your account.") %]</td>
-                        </tr>
-                    </tbody>
-                </table>
+            <div class="align">
+                <a href='prefs/settings'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_off.jpg" /></a>
             </div>
-
-            <div id='myopac.notes.div'
-                 class='hide_me'>
-                <table class='data_grid'
-                       width='100%'>
-                    <thead>
-                        <tr>
-                            <td colspan='2'>
-                            <b>[% l("* Staff Notes *") %]</b></td>
-                        </tr>
-                    </thead>
-
-                    <tbody id='myopac.notes.tbody'>
-                        <tr id='myopac.notes.tr'>
-                            <td><b name='title'></b> : <span name=
-                            'value'></span></td>
-                        </tr>
-                    </tbody>
-                </table><br />
+        [% ELSIF prefs_page == 'notify' %]
+            <div class="align">
+                <a href='../prefs'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_off.jpg" /></a>
             </div>
+            <div class="align">
+                <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_on.jpg" /></a>
+            </div>
+            <div class="align" >
+                <a href='settings'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_off.jpg" /></a>
+            </div>
+        [% ELSE %]
+            <div class="align">
+                <a href='../prefs'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_off.jpg" /></a>
+            </div>
+            <div class="align">
+                <a href='notify'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_off.jpg" /></a>
+            </div>
+            <div class="align" >
+                <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_on.jpg" /></a>
+            </div>
+        [% END %]
+        </div>
+    </div> 
 
-            <table width='70%'
-                   class='light_border data_grid'>
-                <tbody id='myopac_summary_tbody'>
-                    <tr>
-                        <td width='30%'
-                            class='color_4 light_border'>[% l("Name") %]</td>
-
-                        <td class='light_border'>[% l(
-                            HUMAN_NAME_FORMAT,
-                            ctx.user.prefix, ctx.user.first_given_name,
-                            ctx.user.second_given_name, ctx.user.family_name,
-                            ctx.user.suffix
-                        ) | html %]</td>
-
-                        <td></td>
-                    </tr>
-
-                    <tr>
-                        <td class='color_4 light_border'>
-                        [% l("Day Phone") %]</td>
-
-                        <td class='light_border'
-                            id='myopac_summary_dayphone'>[% ctx.user.day_phone | html %]</td>
-
-                        <td class='light_border'><a href='#'
-                           class="hide_me"
-                           id='myopac_summary_phone1_change'
-                           style=
-                           'text-decoration: underline;'>[% l("Change") %]</a></td>
-                    </tr>
-
-                    <tr id='myopac_update_phone1_row'
-                        class='hide_me'>
-                        <td class='myopac_update_cell'
-                            colspan='3'>
-                            <span class='myopac_update_span'>
-                                Enter New [% l("Day Phone") %]:
-                            </span>
-
-                            <input type='text' size='24' id='myopac_new_phone1' />
-                            <span class='myopac_update_span'>
-                                <button>
-                                    <span class='myopac_update_span'>
-                                        [% l("Submit") %]</span>
-                                </button>
-                            </span>
-                            <span class='myopac_update_span'>
-                                <button>
-                                    <span class='myopac_update_span'>
-                                        [% l("Cancel") %]</span>
-                                </button>
-                            </span>
-                        </td>
-                    </tr>
-
-                    <tr>
-                        <td class='color_4 light_border'>
-                        [% l("Evening Phone") %]</td>
-
-                        <td class='light_border'
-                            id='myopac_summary_eveningphone'>[% ctx.user.evening_phone | html %]</td>
-
-                        <td class='light_border'><a href='#'
-                           class="hide_me"
-                           id='myopac_summary_phone2_change'
-                           style=
-                           'text-decoration: underline;'>[% l("Change") %]</a></td>
-                    </tr>
-
-                    <tr id='myopac_update_phone2_row'
-                        class='hide_me'>
-                        <td class='myopac_update_cell'
-                            colspan='3'><span class='myopac_update_span'>New
-                            [% l("Evening Phone") %]:</span>
-                            <input type='text' size='24' id='myopac_new_phone2' />
-                            <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>[% l("Submit") %]</span></button></span>
-                            <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>[% l("Cancel") %]</span></button></span>
-                        </td>
-                    </tr>
-
-                    <tr>
-                        <td class='color_4 light_border'>
-                        [% l("Other Phone") %]</td>
-
-                        <td class='light_border'
-                            id='myopac_summary_otherphone'>[% ctx.user.other_phone | html %]</td>
-
-                        <td class='light_border'><a href='#'
-                           class="hide_me"
-                           id='myopac_summary_phone3_change'
-                           style=
-                           'text-decoration: underline;'>[% l("Change") %]</a></td>
-                    </tr>
-
-                    <tr id='myopac_update_phone3_row'
-                        class='hide_me'>
-                        <td class='myopac_update_cell'
-                            colspan='3'><span class='myopac_update_span'>Enter
-                            New [% l("Other Phone") %]:</span>
-                            <input type='text' size='24' id='myopac_new_phone3' />
-                            <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>[% l("Submit") %]</span></button></span>
-                            <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>[% l("Cancel") %]</span></button></span>
-                        </td>
-                    </tr>
-
-                    <tr>
-                        <td class='color_4 light_border'>
-                            <div style="position:absolute">
-                                <div class="hide_me" style=
-                                "position:relative;left:70px;top:-3px;">
-                                    <a href="#">
-                                    <img alt="Username Help"
-                                         src=
-                                         "[% ctx.media_prefix %]/images/question-mark.png" /></a>
-                                </div>
-                            </div>[% l("Username") %]
-                        </td>
-
-                        <td class='light_border'
-                            id='myopac_summary_username'>[% ctx.user.usrname | html %]</td>
-
-                        <td class='light_border'><a href='#'
-                           class="hide_me"
-                           id='myopac_summary_username_change'
-                           style=
-                           'text-decoration: underline;'>[% l("Change") %]</a></td>
-                    </tr>
-
-                    <tr id='myopac_update_username_row'
-                        class='hide_me'>
-                        <td class='myopac_update_cell'
-                            colspan='3'><span class=
-                            'myopac_update_span'>[% l("Enter new username:") %]</span>
-                            <input type='text' size='24' id='myopac_new_username' />
-                            <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>[% l("Submit") %]</span></button></span>
-                            <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>[% l("Cancel") %]</span></button></span>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='color_4 light_border'>
-                        [% l("Password") %]</td>
-                        <td class='light_border'
-                            id='myopac_summary_password'>
-                            [% l("(not shown)") %]</td>
-                        <td class='light_border'><a href='#'
-                           class="hide_me"
-                           style='text-decoration: underline;'>[% l("Change") %]</a></td>
-                    </tr>
-                    <tr class='hide_me'>
-                        <td class='myopac_update_cell'
-                            colspan='3'>
-                            <table>
-                                <tbody>
-                                    <tr>
-                                        <td>
-                                            <span class= 'myopac_update_span'>
-                                                [% l("Enter current password:") %]
-                                            </span>
-                                        </td>
-
-                                        <td>
-                                            <input type='password'
-                                               size='24' />
-                                           </td>
-                                    </tr>
-                                    <tr>
-                                        <td><span class=
-                                        'myopac_update_span'>[% l("Enter new password:") %]</span></td>
-
-                                        <td><input type='password' size='24' />
-                                           </td>
-                                    </tr>
-
-                                    <tr>
-                                        <td><span class=
-                                        'myopac_update_span'>[% l("Re-enter new password:") %]</span></td>
-
-                                        <td>
-                                            <input type='password' size='24' />
-                                        </td>
-                                    </tr>
-                                </tbody>
-                            </table><span class=
-                            'myopac_update_span'><button><span class=
-                            'myopac_update_span'>[% l("Submit") %]</span></button></span>
-                            <span class='myopac_update_span'><button><span class='myopac_update_span'>
-                            [% l("Cancel") %]</span></button></span>
-                        </td>
-                    </tr>
-
-                    <tr>
-                        <td class='color_4 light_border'>[% l("Email Address") %]</td>
-                        <td class='light_border'>[% ctx.user.email | html %]</td>
-                        <td class='light_border'><a href='update_email'>[% l('Change') %]</a></td>
-                    </tr>
-
-                    <tr class='hide_me'>
-                        <td class='myopac_update_cell' colspan='3'>
-                            <span class= 'myopac_update_span'>
-                                [% l("Enter new email address:") %]
-                            </span>
-                            <input type='text' size='24' />
-                            <span class='myopac_update_span'>
-                                <button>
-                                    <span class= 'myopac_update_span'>
-                                        [% l("Submit") %]</span>
-                                </button>
-                            </span>
-                            <span class='myopac_update_span'>
-                                <button>
-                                    <span class='myopac_update_span'>
-                                        [% l("Cancel") %]</span>
-                                </button>
-                            </span>
-                        </td>
-                    </tr>
-                    [% IF ctx.user.ident_value %]<tr class="hide_me">
-                        <td class='color_4 light_border'>
-                        [% l("Primary Identification") %]</td>
-
-                        <td class='light_border'>
-                            [%
-                            # l('[_1] ([_2])', ctx.user.ident_value, ctx.user.ident_type.name) | html
-                            # XXX uncomment the above line to show primary
-                            # identification. With a minor tweak it could
-                            # alternatively be shown but partially obscured. %]
-                        </td>
-                        <td></td>
-                    </tr>[% END %]
-
-                    <tr>
-                        <td class='color_4 light_border'>
-                        [% l("Active Barcode") %]</td>
-
-                        <td class='light_border'>[% ctx.user.card.barcode %]</td>
-
-                        <td></td>
-                    </tr>
-
-                    <tr>
-                        <td class='color_4 light_border'>
-                        [% l("Home Library") %]</td>
-                        <td class='light_border'>[% ctx.user.home_ou.name %]</td>
-                        <td><a href='#'
-                           class="hide_me"
-                           style='text-decoration: underline;'>[% l("Change") %]</a></td>
-                    </tr>
-                    <tr class='hide_me'>
-                        <td class='myopac_update_cell'
-                            colspan='3'>
-                            <span class='myopac_update_span'>
-                                New home library:</span>
-                            <select>
-                            </select>
-                            <span class='myopac_update_span'>
-                                <button>
-                                    <span class= 'myopac_update_span'>
-                                        [% l("Submit") %]</span>
-                                </button>
-                            </span>
-                            <span class='myopac_update_span'>
-                                <button>
-                                    <span class= 'myopac_update_span'>
-                                        [% l("Cancel") %]</span>
-                                </button>
-                            </span>
-                        </td>
-                    </tr>
-                    <tr class="hide_me">
-                        <td class='color_4 light_border'>
-                            [% l("Account Creation Date") %]
-                        </td>
-                        <td class='light_border'
-                            id='myopac_summary_create_date'></td>
-                        <td></td>
-                    </tr>
-                </tbody>
-            </table><br />
-            <hr class='opac-auto-013' color="#DCDBDB" />
-            <br />
-
-            <table width='100%' class='light_border data_grid'>
-                <thead>
-                    <tr>
-                        <td><strong>[% l("Addresses") %]</strong></td>
-
-                    </tr>
-                </thead>
-                <tbody id='myopac_addr_tbody'>
-                    [% FOR addr IN ctx.user.addresses %]
-                    <tr class='[% addr.pending == "t" ? "pending-addr" : "light_border" %]'>
-                        <td>
-                            <table>
-                                <tr>
-                                    <td>[% l("Address Type") %]</td>
-                                    <td name='myopac_addr_type'>[%
-                                        IF addr.pending == "t";
-                                            "<strong>" _ l("*** PENDING ***") _ "</strong> ";
-                                        END;
-                                        addr.address_type | lower | ucfirst;
-                                    %]</td>
-                                </tr>
-                                <tr>
-                                    <td>[% l("Street") %]</td>
-                                    <td name='myopac_addr_street'>[% addr.street1 | html %]</td>
-                                </tr>
-                                [% IF addr.street2 %]<tr>
-                                    <td>[% l("Street") %]</td>
-                                    <td name='myopac_addr_street2'>[% addr.street2 | html %]</td>
-                                </tr>[% END %]
-
-                                <tr>
-                                    <td>[% l("City") %]</td>
-                                    <td name='myopac_addr_city'>[% addr.city | html %]</td>
-                                </tr>
-
-                                <tr>
-                                    <td>[% l("County") %]</td>
-                                    <td name='myopac_addr_county'>[% addr.county| html  %]</td>
-                                </tr>
-
-                                <tr>
-                                    <td>[% l("State") %]</td>
-                                    <td name='myopac_addr_state'>[% addr.state | html %]</td>
-                                </tr>
-
-                                <tr>
-                                    <td>[% l("Country") %]</td>
-                                    <td name='myopac_addr_country'>[% addr.country | html %]</td>
-                                </tr>
+    <div class="clear-both"></div> <br/>
 
-                                <tr>
-                                    <td>[% l("Zip") %]</td>
-                                    <td name='myopac_addr_zip'>[% addr.post_code | html %]</td>
-                                </tr>
-                                <tr>
-                                    <td name='myopac_addr_edit_td'
-                                        colspan='2' class='hide_me'>
-                                        <a class='classic_link'
-                                            name='myopac_addr_edit_link'
-                                            href='#'>Edit Address</a>
-                                    </td>
-                                </tr>
-                            </table>
-                        </td>
-                    </tr>
-                    [% END %]
-                </tbody>
-            </table>
-        </div>
-        <div class='hide_me' id='myopac_username_error'>
-            [% l("Please enter a username") %]
-        </div>
-        <div class='hide_me' id='myopac_username_dup'>
-            [% l("The requested username is not available.  Please choose a different username.") %]
-        </div>
-        <div class='hide_me' id='myopac_username_success'>
-            [% l("Username successfully updated") %]
-        </div>
-        <div class='hide_me' id='myopac_username_failure'>
-            [% l("Username update failed") %]
-        </div>
-        <div class='hide_me' id='myopac_email_error'>
-            [% l("Please enter a valid email address") %]
-        </div>
-        <div class='hide_me' id='myopac_email_success'>
-            [% l("Email address successfully updated") %]
-        </div>
-        <div class='hide_me' id='myopac_email_failure'>
-            [% l("Email address update failed") %]
-        </div>
-        <div class='hide_me' id='myopac_password_error'>
-            [% l("Passwords are empty or do not match") %]
-        </div>
-        <div class='hide_me' id='myopac_password_success'>
-            [% l("Password successfully updated") %]
-        </div>
-        <div class='hide_me' id='myopac_password_failure'>
-            [% l("Password update failed") %]
-        </div>
-        <span class='hide_me' id= 'myopac_invalid_username'>
-            [% l("Username cannot contain spaces or have the same format as a barcode") %]
-        </span>
-        <span class='hide_me' id='myopac_addr_changes_saved'>
-            Address Saved
-        </span>
-        <div class='hide_me' id='prefs_update_success'>
-            [% l("Preferences successfully updated") %]
-        </div>
-        <div class='hide_me' id='prefs_update_failure'>
-            [% l("Preferences update failed!") %]
-        </div>
-        <span class='hide_me' id='myopac_pref_hold_notify_alert'>
-            [% l("This setting defines how you will be notified of holds that are ready to be picked up from the library.  By default, holds will use the notification style you choose here.  However, you will still have the option to change individual holds regardless of this setting.") %]
+    <div class="header_middle">
+        <span id="acct_prefs_header">[% l('Account Information and Preferences') %]</span>
+        <span class="float-right"> 
+            <a class="hide_me" href="#">[% l('Export List') %]</a><!-- what does this do? -->
         </span>
     </div>
+
+    <div class="clear-both normal-height"></div>
+
+[% 
+    IF prefs_page == 'personal';
+        # By default, load the personal info page
+        INCLUDE 'default/opac/parts/myopac/personal.tt2';
+    ELSE;
+        content; 
+    END;
+%]
+</div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs/notify.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs/notify.tt2
new file mode 100644
index 0000000..5d1077a
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs/notify.tt2
@@ -0,0 +1,120 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    WRAPPER "default/opac/myopac/prefs.tt2";
+    myopac_page = "prefs/notify" %]
+
+<table>
+    <thead><tr>
+        <th>[% l('Notifation Type') %]</th>
+        <th>[% l('Enabled') %]</th>
+    </tr></thead>
+    <tbody class='data_grid'>
+        [% IF optin.size == 0 %]
+            <strong>[% l('No notification preferences are configured') %]</strong>
+        [% END %]
+        [% FOR optin IN ctx.opt_in_settings %]
+            <tr>
+                <td>[% optin.cust.label %]</td>
+                <td>
+                    <input 
+                        type='checkbox' 
+                        name='[% optin.cust.name %]' 
+                        [% IF optin.value %] checked='checked' [% END %]/>
+                </td>
+            </tr>
+        [% END %]
+    </tbody>
+</table>
+
+
+        <!-- NOTIFICATION PREFS / leaving here for reference
+        <table class="hide_me"
+               id="acct_notify_main">
+            <tbody>
+                <tr class="hide_me">
+                    <td><span>[% l("Default Hold Notification Method") %]</span> <a class=
+                    'classic_link'
+                       href='#'>[% l("(Help)") %]</a></td>
+
+                    <td style="padding-left:15px;"><select id=
+                    'prefs_hold_notify'>
+                        <option value='phone:email'
+                                selected='selected'>
+                            [% l("Use Phone and Email") %]
+                        </option>
+
+                        <option value='phone'>
+                            [% l("Use Phone Only") %]
+                        </option>
+
+                        <option value='email'>
+                            [% l("Use Email Only") %]
+                        </option>
+                    </select></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Pick Up Notice for
+                    Holds</strong><br />
+                    <input type="checkbox"
+                           id="opac.hold_notify.email"
+                           name="opac.hold_notify.email" /> <label for=
+                           "opac.hold_notify.email">Email</label><br />
+                    <input type="checkbox"
+                           id="opac.hold_notify.phone"
+                           name="opac.hold_notify.phone" /> <label for=
+                           "opac.hold_notify.phone">Phone</label>
+                           <b>(Temporarily phone notification will generate a
+                           mailed paper notice.)</b></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Expire Notice for
+                    Holds</strong><br />
+                    <input type="checkbox"
+                           id="notification.hold.expire.email"
+                           name="notification.hold.expire.email" /> <label for=
+                           "notification.hold.expire.email">Email</label></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Cancel Notice for
+                    Holds</strong><br />
+                    <input type="checkbox"
+                           id="notification.hold.cancel.email"
+                           name="notification.hold.cancel.email" /> <label for=
+                           "notification.hold.cancel.email">Email</label></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Overdue First
+                    Notice</strong><br />
+                    <input type="checkbox"
+                           id="notification.overdue.first.email"
+                           name="notification.overdue.first.email" />
+                           <label for=
+                           "notification.overdue.first.email">Email</label><br />
+                    <input type="checkbox"
+                           id="notification.overdue.first.phone"
+                           name="notification.overdue.first.phone" />
+                           <label for=
+                           "notification.overdue.first.phone">Phone</label>
+                           <b>(Temporarily phone notification will generate a
+                           mailed paper notice.)</b></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Courtesy
+                    Notice</strong><br />
+                    <input type="checkbox"
+                           id="notification.predue.email"
+                           name="notification.predue.email" /> <label for=
+                           "notification.predue.email">Email</label><br /></td>
+                </tr>
+            </tbody>
+        </table>
+        -->
+
+
+[% END %]
+
+
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs/settings.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs/settings.tt2
new file mode 100644
index 0000000..3e111ff
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs/settings.tt2
@@ -0,0 +1,115 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    WRAPPER "default/opac/myopac/prefs.tt2";
+    myopac_page = "prefs/notify" %]
+
+USER SETTINGS
+
+        <!-- SEARCH PREFS SAVE, MOVE TO SUB-TEMPLATE
+        <div style="float:right;width:65px;">
+            <div style="position:absolute">
+                <div style="position:relative;top:75px;">
+                    <a id='acct_prefs_save'
+                         class='hide_me'
+                         href="#"><img alt="Save"
+                         src="[% ctx.media_prefix %]/images/save-btn.png" /></a>
+                </div>
+            </div>
+        </div>
+        -->
+
+
+        <!-- SEARCH PREFERENCES / leaving here for reference
+        <table class="hide_me full-width" id="acct_search_main">
+            <tbody id='myopac_prefs_tbody'>
+                <tr id='myopac_prefs_loading'>
+                    <td colspan='3'><b>[% l("Loading...") %]</b></td>
+                </tr>
+
+                <tr id='myopac_prefs_row'>
+                    <td width='20%'>[% l("Search hits per page") %]</td>
+
+                    <td>
+                        <div style="position:absolute">
+                            <div style="position:relative;top:0px;left:55px;">
+                                <a href="#">
+                                <img alt="Search Hits Help"
+                                     src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                            </div>
+                        </div><select id='prefs_hits_per'
+                            style="position:relative;z-index:100;">
+                            <option value='5'>
+                                5
+                            </option>
+
+                            <option value='8'>
+                                8
+                            </option>
+
+                            <option value='10'>
+                                10
+                            </option>
+
+                            <option value='15'>
+                                15
+                            </option>
+
+                            <option value='20'>
+                                20
+                            </option>
+
+                            <option value='25'>
+                                25
+                            </option>
+
+                            <option value='50'>
+                                50
+                            </option>
+                        </select>
+                    </td>
+                </tr>
+
+                <tr>
+                    <td colspan="2"><label for="circHistStart">Keep history of
+                    checked out items?</label> <input type="checkbox"
+                           id="circHistStart" /></td>
+                </tr>
+
+                <tr class="hide_me">
+                    <td>[% l("Default Font Size") %]</td>
+
+                    <td><select id='prefs_def_font'>
+                        <option value='regular'>
+                            [% l("Regular Font") %]
+                        </option>
+
+                        <option value='large'>
+                            [% l("Large Font") %]
+                        </option>
+                    </select></td>
+                </tr>
+
+                <tr class="hide_me">
+                    <td>[% l("Default Search Location") %]</td>
+                    <td>
+                        <div style='margin-bottom: 5px;'>
+                            <input type='checkbox' id='myopac_pref_home_lib' />
+                                 [% l("Always search my home library by default.") %]
+                        </div>
+                        <select id='prefs_def_location'></select>
+                    </td>
+                </tr>
+
+                <tr class="hide_me">
+                    <td>[% l("Default Search Range") %]</td>
+
+                    <td><select id='prefs_def_range'>
+                        </select></td>
+                </tr>
+            </tbody>
+        </table><a href=
+        "http://www.kcls.org/usingthelibrary/catalog_help/library_elf.cfm"><u>Try
+        Library Elf-to manage library materials!</u></a>
+
+        -->
+
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/personal.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/personal.tt2
new file mode 100644
index 0000000..fe1be5c
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/personal.tt2
@@ -0,0 +1,395 @@
+<div id="acct_info_main">
+    <div id='myopac.expired.alert'
+         class='hide_me'
+         style='margin-bottom: 20px;'>
+        <table class='data_grid'
+               width='100%'>
+            <tbody>
+                <tr>
+                    <td width='100%' class='red'>
+                        [% l("Your account expired on") %]
+                        <span id='myopac.expired.date'></span>!
+                        [% l("Please see a librarian to renew your account.") %]</td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+
+    <div id='myopac.notes.div'
+         class='hide_me'>
+        <table class='data_grid'
+               width='100%'>
+            <thead>
+                <tr>
+                    <td colspan='2'>
+                    <b>[% l("* Staff Notes *") %]</b></td>
+                </tr>
+            </thead>
+
+            <tbody id='myopac.notes.tbody'>
+                <tr id='myopac.notes.tr'>
+                    <td><b name='title'></b> : <span name=
+                    'value'></span></td>
+                </tr>
+            </tbody>
+        </table><br />
+    </div>
+
+    <table width='70%'
+           class='light_border data_grid'>
+        <tbody id='myopac_summary_tbody'>
+            <tr>
+                <td width='30%'
+                    class='color_4 light_border'>[% l("Name") %]</td>
+
+                <td class='light_border'>[% l(
+                    HUMAN_NAME_FORMAT,
+                    ctx.user.prefix, ctx.user.first_given_name,
+                    ctx.user.second_given_name, ctx.user.family_name,
+                    ctx.user.suffix
+                ) | html %]</td>
+
+                <td></td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Day Phone") %]</td>
+
+                <td class='light_border'
+                    id='myopac_summary_dayphone'>[% ctx.user.day_phone | html %]</td>
+
+                <td class='light_border'><a href='#'
+                   class="hide_me"
+                   id='myopac_summary_phone1_change'
+                   style=
+                   'text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+
+            <tr id='myopac_update_phone1_row'
+                class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'>
+                    <span class='myopac_update_span'>
+                        Enter New [% l("Day Phone") %]:
+                    </span>
+
+                    <input type='text' size='24' id='myopac_new_phone1' />
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class='myopac_update_span'>
+                                [% l("Submit") %]</span>
+                        </button>
+                    </span>
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class='myopac_update_span'>
+                                [% l("Cancel") %]</span>
+                        </button>
+                    </span>
+                </td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Evening Phone") %]</td>
+
+                <td class='light_border'
+                    id='myopac_summary_eveningphone'>[% ctx.user.evening_phone | html %]</td>
+
+                <td class='light_border'><a href='#'
+                   class="hide_me"
+                   id='myopac_summary_phone2_change'
+                   style=
+                   'text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+
+            <tr id='myopac_update_phone2_row'
+                class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'><span class='myopac_update_span'>New
+                    [% l("Evening Phone") %]:</span>
+                    <input type='text' size='24' id='myopac_new_phone2' />
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Submit") %]</span></button></span>
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Cancel") %]</span></button></span>
+                </td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Other Phone") %]</td>
+
+                <td class='light_border'
+                    id='myopac_summary_otherphone'>[% ctx.user.other_phone | html %]</td>
+
+                <td class='light_border'><a href='#'
+                   class="hide_me"
+                   id='myopac_summary_phone3_change'
+                   style=
+                   'text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+
+            <tr id='myopac_update_phone3_row'
+                class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'><span class='myopac_update_span'>Enter
+                    New [% l("Other Phone") %]:</span>
+                    <input type='text' size='24' id='myopac_new_phone3' />
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Submit") %]</span></button></span>
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Cancel") %]</span></button></span>
+                </td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                    <div style="position:absolute">
+                        <div class="hide_me" style=
+                        "position:relative;left:70px;top:-3px;">
+                            <a href="#">
+                            <img alt="Username Help"
+                                 src=
+                                 "[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                        </div>
+                    </div>[% l("Username") %]
+                </td>
+
+                <td class='light_border'
+                    id='myopac_summary_username'>[% ctx.user.usrname | html %]</td>
+
+                <td class='light_border'><a href='#'
+                   class="hide_me"
+                   id='myopac_summary_username_change'
+                   style=
+                   'text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+
+            <tr id='myopac_update_username_row'
+                class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'><span class=
+                    'myopac_update_span'>[% l("Enter new username:") %]</span>
+                    <input type='text' size='24' id='myopac_new_username' />
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Submit") %]</span></button></span>
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Cancel") %]</span></button></span>
+                </td>
+            </tr>
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Password") %]</td>
+                <td class='light_border'
+                    id='myopac_summary_password'>
+                    [% l("(not shown)") %]</td>
+                <td class='light_border'><a href='#'
+                   class="hide_me"
+                   style='text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+            <tr class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'>
+                    <table>
+                        <tbody>
+                            <tr>
+                                <td>
+                                    <span class= 'myopac_update_span'>
+                                        [% l("Enter current password:") %]
+                                    </span>
+                                </td>
+
+                                <td>
+                                    <input type='password'
+                                       size='24' />
+                                   </td>
+                            </tr>
+                            <tr>
+                                <td><span class=
+                                'myopac_update_span'>[% l("Enter new password:") %]</span></td>
+
+                                <td><input type='password' size='24' />
+                                   </td>
+                            </tr>
+
+                            <tr>
+                                <td><span class=
+                                'myopac_update_span'>[% l("Re-enter new password:") %]</span></td>
+
+                                <td>
+                                    <input type='password' size='24' />
+                                </td>
+                            </tr>
+                        </tbody>
+                    </table><span class=
+                    'myopac_update_span'><button><span class=
+                    'myopac_update_span'>[% l("Submit") %]</span></button></span>
+                    <span class='myopac_update_span'><button><span class='myopac_update_span'>
+                    [% l("Cancel") %]</span></button></span>
+                </td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>[% l("Email Address") %]</td>
+                <td class='light_border'>[% ctx.user.email | html %]</td>
+                <td class='light_border'><a href='update_email'>[% l('Change') %]</a></td>
+            </tr>
+
+            <tr class='hide_me'>
+                <td class='myopac_update_cell' colspan='3'>
+                    <span class= 'myopac_update_span'>
+                        [% l("Enter new email address:") %]
+                    </span>
+                    <input type='text' size='24' />
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class= 'myopac_update_span'>
+                                [% l("Submit") %]</span>
+                        </button>
+                    </span>
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class='myopac_update_span'>
+                                [% l("Cancel") %]</span>
+                        </button>
+                    </span>
+                </td>
+            </tr>
+            [% IF ctx.user.ident_value %]<tr class="hide_me">
+                <td class='color_4 light_border'>
+                [% l("Primary Identification") %]</td>
+
+                <td class='light_border'>
+                    [%
+                    # l('[_1] ([_2])', ctx.user.ident_value, ctx.user.ident_type.name) | html
+                    # XXX uncomment the above line to show primary
+                    # identification. With a minor tweak it could
+                    # alternatively be shown but partially obscured. 
+                    %]
+                </td>
+                <td></td>
+            </tr>[% END %]
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Active Barcode") %]</td>
+
+                <td class='light_border'>[% ctx.user.card.barcode %]</td>
+
+                <td></td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Home Library") %]</td>
+                <td class='light_border'>[% ctx.user.home_ou.name %]</td>
+                <td><a href='#'
+                   class="hide_me"
+                   style='text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+            <tr class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'>
+                    <span class='myopac_update_span'>
+                        New home library:</span>
+                    <select>
+                    </select>
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class= 'myopac_update_span'>
+                                [% l("Submit") %]</span>
+                        </button>
+                    </span>
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class= 'myopac_update_span'>
+                                [% l("Cancel") %]</span>
+                        </button>
+                    </span>
+                </td>
+            </tr>
+            <tr class="hide_me">
+                <td class='color_4 light_border'>
+                    [% l("Account Creation Date") %]
+                </td>
+                <td class='light_border'
+                    id='myopac_summary_create_date'></td>
+                <td></td>
+            </tr>
+        </tbody>
+    </table><br />
+    <hr class='opac-auto-013' color="#DCDBDB" />
+    <br />
+
+    <table width='100%' class='light_border data_grid'>
+        <thead>
+            <tr>
+                <td><strong>[% l("Addresses") %]</strong></td>
+
+            </tr>
+        </thead>
+        <tbody id='myopac_addr_tbody'>
+            [% FOR addr IN ctx.user.addresses %]
+            <tr class='[% addr.pending == "t" ? "pending-addr" : "light_border" %]'>
+                <td>
+                    <table>
+                        <tr>
+                            <td>[% l("Address Type") %]</td>
+                            <td name='myopac_addr_type'>[%
+                                IF addr.pending == "t";
+                                    "<strong>" _ l("*** PENDING ***") _ "</strong> ";
+                                END;
+                                addr.address_type | lower | ucfirst;
+                            %]</td>
+                        </tr>
+                        <tr>
+                            <td>[% l("Street") %]</td>
+                            <td name='myopac_addr_street'>[% addr.street1 | html %]</td>
+                        </tr>
+                        [% IF addr.street2 %]<tr>
+                            <td>[% l("Street") %]</td>
+                            <td name='myopac_addr_street2'>[% addr.street2 | html %]</td>
+                        </tr>[% END %]
+
+                        <tr>
+                            <td>[% l("City") %]</td>
+                            <td name='myopac_addr_city'>[% addr.city | html %]</td>
+                        </tr>
+
+                        <tr>
+                            <td>[% l("County") %]</td>
+                            <td name='myopac_addr_county'>[% addr.county| html  %]</td>
+                        </tr>
+
+                        <tr>
+                            <td>[% l("State") %]</td>
+                            <td name='myopac_addr_state'>[% addr.state | html %]</td>
+                        </tr>
+
+                        <tr>
+                            <td>[% l("Country") %]</td>
+                            <td name='myopac_addr_country'>[% addr.country | html %]</td>
+                        </tr>
+
+                        <tr>
+                            <td>[% l("Zip") %]</td>
+                            <td name='myopac_addr_zip'>[% addr.post_code | html %]</td>
+                        </tr>
+                        <tr>
+                            <td name='myopac_addr_edit_td'
+                                colspan='2' class='hide_me'>
+                                <a class='classic_link'
+                                    name='myopac_addr_edit_link'
+                                    href='#'>Edit Address</a>
+                            </td>
+                        </tr>
+                    </table>
+                </td>
+            </tr>
+            [% END %]
+        </tbody>
+    </table>
+</div>
+

commit a9c6a44a2f132afce4ebd3122217be35b4a5c908
Merge: e9b90c6 fe30b6b
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 6 11:40:54 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit e9b90c69c7c984a224685fc162391781181f2b54
Merge: fde9a0d 35ce3ab
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Apr 6 11:40:51 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit fe30b6b729535b1f9c899845963fec69d14d25b4
Merge: fde9a0d 39523da
Author: berick <berick at esilibrary.com>
Date:   Wed Apr 6 09:41:00 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit fde9a0dad06a47a41061997dd50e5a3fd1d85edf
Merge: 77fb7ae 5349a85
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Apr 5 17:16:34 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 5349a858315df2c16c0516dea647ce68735391cb
Author: berick <berick at esilibrary.com>
Date:   Tue Apr 5 17:14:25 2011 -0400

    initial payments history tab; I18n; some general cleanup

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index a95b8be..7d56e6b 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -121,7 +121,7 @@ sub load {
     return $self->load_place_hold if $path =~ m|opac/place_hold|;
     return $self->load_myopac_holds if $path =~ m|opac/myopac/holds|;
     return $self->load_myopac_circs if $path =~ m|opac/myopac/circs|;
-    return $self->load_myopac_fines if $path =~ m|opac/myopac/main|;
+    return $self->load_myopac_main if $path =~ m|opac/myopac/main|;
     return $self->load_myopac_update_email if $path =~ m|opac/myopac/update_email|;
     return $self->load_myopac_bookbags if $path =~ m|opac/myopac/lists|;
     return $self->load_myopac_bookbag_update if $path =~ m|opac/myopac/list/update|;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index ebf8f19..b510b43 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -450,10 +450,46 @@ sub load_myopac_hold_history {
     return Apache2::Const::OK;
 }
 
+sub load_myopac_main {
+    my $self = shift;
+    my $limit = $self->cgi->param('limit') || 0;
+    my $offset = $self->cgi->param('offset') || 0;
+    my $expand = $self->cgi->param('expand') || '';
+
+    return $self->load_myopac_payments($limit, $offset) 
+        if $expand eq 'payments';
+
+    return $self->load_myopac_fines($limit, $offset);
+}
+
+# TODO: add other filter options as params/configs/etc.
+sub load_myopac_payments {
+    my $self = shift;
+    my $limit = shift || 0;
+    my $offset = shift || 0;
+    my $e = $self->editor;
+
+    my $args = {};
+    $args->{limit} = $limit if $limit;
+    $args->{offset} = $offset if $offset;
+
+    $self->ctx->{payments} = $U->simplereq(
+        'open-ils.actor',
+        'open-ils.actor.user.payments.retrieve.atomic',
+        $e->authtoken, $e->requestor->id, $args);
+
+    return Apache2::Const::OK;
+}
+
+
+
 sub load_myopac_fines {
     my $self = shift;
+    my $limit = shift || 0;
+    my $offset = shift || 0;
     my $e = $self->editor;
     my $ctx = $self->ctx;
+
     $ctx->{"fines"} = {
         "circulation" => [],
         "grocery" => [],
@@ -462,8 +498,6 @@ sub load_myopac_fines {
         "balance_owed" => 0
     };
 
-    my $limit = $self->cgi->param('limit') || 0;
-    my $offset = $self->cgi->param('offset') || 0;
 
     my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
 
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 6559ab5..e903350 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -301,13 +301,13 @@ div.select-wrapper:hover {
 	background:url('/images/expert_search_off.gif') no-repeat bottom;
 }
 
-#acct_tabs {
+#acct_tabs, #acct_fines_tabs {
 	height:33px;
 	width:974px;
 	margin:auto;
 }
 
-#acct_tabs a {
+#acct_tabs a, #acct_fines_tabs a {
 	float: left;
 	display: block;
 	height:33px;
@@ -860,13 +860,20 @@ div.select-wrapper:hover {
 	top:3px;
 }
 
-#myopac_tabs, #adv_search_parent {
+#myopac_tabs, #adv_search_parent, #fines_payments_wrapper {
 	background: #929292;
 	border-top:1px solid #8b8b8b;
 	padding-top:5px;
 	margin-bottom:20px;
 }
 
+#fines_payments_wrapper {
+    padding-left: 5px; 
+    padding-right: 5px;
+}
+
+#myopac_payments_table th { text-align: left; }
+
 #adv_search_parent {
 	margin-bottom:0px;
 }
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 8f756e4..119cf77 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -2,301 +2,306 @@
     PROCESS "default/opac/parts/misc_util.tt2";
     WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
-    myopac_page = "main"  %]
+    myopac_page = "main";
+    show_payments = (CGI.param('expand') == 'payments');
+%]
+
 <div id='myopac_summary_div' style="padding:0px;">
-    <div id="acct_sum">
-        <div style="width:742px;float:left;">
-            <div class="header_middle">Account Summary</div>
-        </div>
-        <div id="myopac_sum_fines">
-            <div style="position:absolute;">
-                <div style="position:relative;top:-15px;left:-23px;">
-                    <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tl.png" />
-                </div>
-            </div>
-            <div style="position:absolute;">
-                <div style="position:relative;top:-15px;left:172px;">
-                    <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tr.png" />
-                </div>
+
+    <div style="width:742px;float:left;">
+        <div class="header_middle">[% l('Account Summary') %]</div>
+    </div>
+
+    <!-- fines summary along the right of the page -->
+    <div id="myopac_sum_fines">
+        <div style="position:absolute;">
+            <div style="position:relative;top:-15px;left:-23px;">
+                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tl.png" />
             </div>
-            <div style="position:absolute;">
-                <div style="position:relative;top:161px;left:-23px;">
-                    <img src="[% ctx.media_prefix %]/images/acct_sum_fines_bl.png" />
-                </div>
+        </div>
+        <div style="position:absolute;">
+            <div style="position:relative;top:-15px;left:172px;">
+                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tr.png" />
             </div>
-            <div style="position:absolute;">
-                <div style="position:relative;top:161px;left:172px;">
-                    <img src="[% ctx.media_prefix %]/images/acct_sum_fines_br.png" />
-                </div>
+        </div>
+        <div style="position:absolute;">
+            <div style="position:relative;top:161px;left:-23px;">
+                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_bl.png" />
             </div>
-            [% l('Fines:') %]
-            <span id="myopac_sum_fines_bal" class='[% ctx.fines.balance_owed ? "red" : ""%]'>
-                [% money(ctx.fines.balance_owed) %]
-            </span><br />
-            <a class="hide_me" href="#" id="pay_fines_btn1"><img
-                alt="[% l('Pay Fines') %]"
-                onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
-                onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
-                src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
-                style="position:relative;top:5px;" /></a>
         </div>
-        <div style="width:662px;">
-            <div style="float:left;">
-                <div style="padding:10px 0px;" id="myopac_sum_name"></div>
-                <div class="acct_sum_row">
-                    <table width="100%" cellspacing="0" cellpadding="0">
-                        <tr>
-                            <td>
-                                [% l("Items Currently Checked out") %]
-                                <span id="myopac_sum_checked" class="view_link">
-                                    ([% ctx.user_stats.checkouts.total_out %])
-                                </span>
-                            </td>
-                            <td align="right" class="view_link">
-                                <a href="[% ctx.opac_root %]/myopac/circs">[% l("View All") %]</a>
-                            </td>
-                        </tr>
-                    </table>
-                </div>
-                <div class="acct_sum_row">
-                    <table width="100%" cellspacing="0" cellpadding="0">
-                        <tr>
-                            <td>
-                                Items Currently on Hold
-                                <span id="myopac_sum_holds" class="view_link">
-                                    ([% ctx.user_stats.holds.total %])
-                                </span>
-                            </td>
-                            <td align="right" class="view_link">
-                                <a href="[% ctx.opac_root %]/myopac/holds">View All</a>
-                            </td>
-                        </tr>
-                    </table>
-                </div>
-                <div class="acct_sum_row">
-                    <table width="100%" cellspacing="0" cellpadding="0">
-                        <tr>
-                            <td>
-                                Items ready for pickup
-                                <span id="myopac_sum_pickup" class="view_link">
-                                    ([% ctx.user_stats.holds.ready %])
-                                </span>
-                            </td>
-                            <td align="right" class="view_link">
-                                <a href="[% ctx.opac_root %]/myopac/holds?available=1">View All</a>
-                            </td>
-                        </tr>
-                    </table>
-                </div>
-                <div class="acct_sum_row" id="myopac_sum_fines_slim">
-                    <table width="100%" cellspacing="0" cellpadding="0">
-                        <tr>
-                            <td>Fees &amp; Fines</td>
-                            <td align="right" class="view_link">
-                                <a class="hide_me"
-                                    id="show_fines_link"
-                                    href="#">Show Overdue Materials</a>
-                            </td>
-                        </tr>
-                    </table>
-                </div>
+        <div style="position:absolute;">
+            <div style="position:relative;top:161px;left:172px;">
+                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_br.png" />
             </div>
         </div>
-        <div class="clear-both"></div>
+        [% l('Fines:') %]
+        <span id="myopac_sum_fines_bal" class='[% ctx.user_stats.fines.balance_owed ? "red" : ""%]'>
+            [% money(ctx.user_stats.fines.balance_owed) %]
+        </span><br />
+        <a class="hide_me" href="#" id="pay_fines_btn1"><img
+            alt="[% l('Pay Fines') %]"
+            onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
+            onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
+            src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
+            style="position:relative;top:5px;" /></a>
+    </div>
 
-        <!-- open transaction summary;  
-        <div id='myopac_fines_div'>
-            <table width='100%' class='data_grid data_grid_center'>
-                <thead class='color_3'>
+
+    <div style="width:662px;">
+        <div style="float:left;">
+            <div style="padding:10px 0px;" id="myopac_sum_name"></div>
+            <div class="acct_sum_row">
+                <table width="100%" cellspacing="0" cellpadding="0">
                     <tr>
-                        <td colspan='3' style='padding: 6px'>
-                            <b>[% l("Summary") %]</b>
+                        <td>[% l("Items Currently Checked out ([_1])", ctx.user_stats.checkouts.total_out) %]</td>
+                        <td align="right">
+                            <a href="[% ctx.opac_root %]/myopac/circs">[% l("View All") %]</a>
                         </td>
                     </tr>
+                </table>
+            </div>
+            <div class="acct_sum_row">
+                <table width="100%" cellspacing="0" cellpadding="0">
                     <tr>
-                        <td width='33%'>[% l("Total Owed") %]</td>
-                        <td width='33%'>[% l("Total Paid") %]</td>
-                        <td width='33%'>[% l("Balance Owed") %]</td>
+                        <td>[% l('Items Currently on Hold ([_1])', ctx.user_stats.holds.total) %]</td>
+                        <td align="right">
+                            <a href="[% ctx.opac_root %]/myopac/holds">[% l('View All') %]</a>
+                        </td>
                     </tr>
-                </thead>
-                <tbody id='myopac_fines_summary_tbody'>
-                    <tr id='myopac_fines_summary_row'>
-                        <td id='myopac_fines_summary_total'>[% money(ctx.fines.total_owed) %]</td>
-                        <td id='myopac_fines_summary_paid'>[% money(ctx.fines.total_paid) %]</td>
-                        <td id='myopac_fines_summary_balance' class='bold-red'>[% money(ctx.fines.balance_owed) %]</td>
+                </table>
+            </div>
+            <div class="acct_sum_row">
+                <table width="100%" cellspacing="0" cellpadding="0">
+                    <tr>
+                        <td>[% l('Items ready for pickup ([_1])', ctx.user_stats.holds.ready) %]</td>
+                        <td align="right">
+                            <a href="[% ctx.opac_root %]/myopac/holds?available=1">[% l('View All') %]</a>
+                        </td>
                     </tr>
-                </tbody>
-            </table>
-        -->
-
-        <!--
-        <div id='accrue_explanation' class='hide_me'>
-            <span>Transactions whose balances are marked with a</span>
-            <span class='bold-red'>*</span>
-            <span>will continue to accrue fines until the checked out item is returned.</span>
-        </div>
-        -->
-        [% IF ctx.fines.circulation.size > 0 %]
-            <div id='myopac_circ_trans_div'>
-                <br/><hr/><br/>
-                <table width='100%' class='data_grid data_grid_center'
-                    id='myopac_circ_trans_table'>
-                    <thead>
-                        <tr>
-                            <td colspan='10' style='padding: 6px'>
-                                <strong>[% l("Fines") %]</strong>
-                            </td>
-                        </tr>
-                        <tr>
-                            <td>[% l("Title") %]</td>
-                            <td>[% l("Author") %]</td>
-                            <td>[% l("Checkout Date") %]</td>
-                            <td>[% l("Due Date") %]</td>
-                            <td>[% l("Date Returned") %]</td>
-                            <td>[% l("Balance Owed") %]</td>
-                            <!-- TODO: hidden until pay-fines is implemented
-                            <td nowrap="nowrap" style="white-space:nowrap;">
-                                <input id="pay_fines_box1" checked="checked"
-                                    type="checkbox" title="[% l('Click to (un)select all fines') %]" />
-                                <label for="pay_fines_box1">[% l('Pay Fines') %]</label>
-                            </td>
-                            -->
-                        </tr>
-                    </thead>
-                    <tbody id='myopac_circ_trans_tbody'>
-                        [% FOR f IN ctx.fines.circulation;
-                            attrs = {marc_xml => f.marc_xml};
-                            PROCESS get_marc_attrs args=attrs %]
-                        <tr id='myopac_circ_trans_row'>
-                            <td>
-                                <a class='classic_link'
-                                    href="[% ctx.opac_root %]/record/[% f.xact.circulation.target_copy.call_number.record.id %]">[% attrs.title %]</a>
-                            </td>
-                            <td>
-                                <a class="classic_link"
-                                    href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
-                            </td>
-                            <td name='myopac_circ_trans_start'>
-                                [% date.format(
-                                    ctx.parse_datetime(
-                                        f.xact.circulation.xact_start
-                                    ), DATE_FORMAT
-                                ) %]
-                            </td>
-                            <td name='myopac_circ_trans_due'>
-                                [% date.format(
-                                    ctx.parse_datetime(
-                                        f.xact.circulation.due_date
-                                    ), DATE_FORMAT
-                                ) %]
-                            </td>
-                            <td name='myopac_circ_trans_finished'>
-                                [%  IF f.xact.circulation.checkin_time;
-                                        date.format(
-                                            ctx.parse_datetime(
-                                                f.xact.circulation.checkin_time
-                                            ), DATE_FORMAT
-                                        );
-                                    ELSE %]
-                                    <!-- XXX TODO fines aren't really accruing
-                                        if circ has hit maxfines. more clarity
-                                        here? -->
-                                    <span class="red">[% l('(fines accruing)') %]</span>
-                                [%  END %]
-                            </td>
-                            <td>
-                                <strong class="red">
-                                    [% money(f.xact.balance_owed) %]
-                                </strong>
-                            </td>
-                            <!-- TODO: hidden until pay-fines is implemented
-                            <td>
-                                <input type="checkbox" name="selector" title="[% l('Pay this fine') %]" />
-                            </td>
-                            -->
-                        </tr>
-                        [% END %]
-                    </tbody>
                 </table>
             </div>
-        [% END %]
 
-        [% IF ctx.fines.grocery.size > 0 %]
-            <!-- Table for all non-circulation transactions -->
-            <div id='myopac_trans_div'>
-                <br/>
-                <hr class='opac-auto-013'  color="#dcdbdb" />
-                <br/>
-                <table width='100%' class='data_grid data_grid_center'
-                    id='myopac_trans_table'>
-                    <thead>
-                        <tr>
-                            <td colspan='8' style='padding: 6px'>
-                                <b>[% l("Other Fees") %]</b>
-                            </td>
-                        </tr>
-                        <tr>
-                            <td width='16%'>[% l("Transaction Start Time") %]</td>
-                            <td width='16%'>[% l("Last Payment Time") %]</td>
-                            <td width='16%'>[% l("Initial Amount Owed") %]</td>
-                            <td width='16%'>[% l("Total Amount Paid") %]</td>
-                            <td width='16%'>[% l("Balance Owed") %]</td>
-                            <td width='16%'>[% l("Billing Type") %]</td>
-                            <!-- TODO: hidden until pay-fines is implemented
-                            <td width='4%' align="center" nowrap="nowrap"
-                                style="white-space:nowrap;">
-                                <input id="pay_fines_box2" checked="checked"
-                                    type="checkbox"
-                                    title="[% l('Click to (un)select all fines') %]" />
-                                <label for="pay_fines_box2">[% l("Pay Fines") %]</label>
-                            </td>
-                            -->
-                        </tr>
-                    </thead>
-                    <tbody id='myopac_trans_tbody'>
-                        [% FOR f IN ctx.fines.grocery %]
-                        <tr id='myopac_trans_row'>
-                            <td>[% date.format(
-                                    ctx.parse_datetime(f.xact.xact_start),
-                                    DATE_FORMAT
-                            ) %]</td>
-                            <td>
-                                [%  IF f.xact.last_payment_ts;
-                                        date.format(
-                                            ctx.parse_datetime(
-                                                f.xact.last_payment_ts
-                                            ), DATE_FORMAT
-                                        );
-                                    END %]
-                            </td>
-                            <td>[% money(f.xact.total_owed) %]</td>
-                            <td>[% money(f.xact.total_paid) %]</td>
-                            <td class="red">
-                                <strong>
-                                    [% money(f.xact.balance_owed) %]
-                                </strong>
-                            </td>
-                            <td>[% f.xact.last_billing_type %]</td>
-                            <!-- TODO: hidden until pay-fines is implemented
-                            <td>
-                                <input type="checkbox" name='selector' title='[% l("Pay this fine") %]'/>
-                            </td>
-                            -->
-                        </tr>
-                        [% END %]
-                    </tbody>
+            <!-- this is here to allow for hiding open transactions, but that 
+            also hides payments history, which we don't want.  perhaps this 
+            can be left out entirely
+            <div class="acct_sum_row" id="myopac_sum_fines_slim">
+                <table width="100%" cellspacing="0" cellpadding="0">
+                    <tr>
+                        <td>[% l('Fees &amp; Fines') %]</td>
+                        <td align="right">
+                            <a href="#">Show Overdue Materials</a>
+                        </td>
+                    </tr>
                 </table>
             </div>
-            [% END %]
-            <!-- TODO: hidden until pay-fines is implemented
-            <a href="#"><img alt="[% l('Pay Fines') %]"
-                onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
-                src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
-                style="position:relative;top:5px;" /></a>
-            <br/>
             -->
+            
         </div>
     </div>
+    <div class="clear-both"></div>
+
+    <div id='fines_payments_wrapper'>
+        <div id='acct_fines_tabs'>
+            [% IF show_payments %]
+            <a href='main'><img src='[% ctx.media_prefix %]/images/acct_fines_off.jpg'/></a>
+            <a href=''><img src='[% ctx.media_prefix %]/images/acct_payments_on.jpg'/></a>
+            [% ELSE %]
+            <a href=''><img src='[% ctx.media_prefix %]/images/acct_fines_on.jpg'/></a>
+            <a href='?expand=payments'><img src='[% ctx.media_prefix %]/images/acct_payments_off.jpg'/></a>
+            [% END %]
+        </div>
+    </div>
+
+[% IF !show_payments %]
+    [% IF ctx.fines.circulation.size > 0 %]
+    <div id='myopac_circ_trans_div'>
+        <br/><hr/><br/>
+        <table width='100%' class='data_grid'
+            id='myopac_circ_trans_table'>
+            <thead>
+                <tr>
+                    <td colspan='10' style='padding: 6px'>
+                        <strong>[% l("Fines") %]</strong>
+                    </td>
+                </tr>
+                <tr>
+                    <td>[% l("Title") %]</td>
+                    <td>[% l("Author") %]</td>
+                    <td>[% l("Checkout Date") %]</td>
+                    <td>[% l("Due Date") %]</td>
+                    <td>[% l("Date Returned") %]</td>
+                    <td>[% l("Balance Owed") %]</td>
+                    <!-- TODO: hidden until pay-fines is implemented
+                    <td nowrap="nowrap" style="white-space:nowrap;">
+                        <input id="pay_fines_box1" checked="checked"
+                            type="checkbox" title="[% l('Click to (un)select all fines') %]" />
+                        <label for="pay_fines_box1">[% l('Pay Fines') %]</label>
+                    </td>
+                    -->
+                </tr>
+            </thead>
+            <tbody id='myopac_circ_trans_tbody'>
+                [% FOR f IN ctx.fines.circulation;
+                    attrs = {marc_xml => f.marc_xml};
+                    PROCESS get_marc_attrs args=attrs %]
+                <tr id='myopac_circ_trans_row'>
+                    <td>
+                        <a href="[% ctx.opac_root %]/record/[% f.xact.circulation.target_copy.call_number.record.id %]">[% attrs.title %]</a>
+                    </td>
+                    <td>
+                        <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                    </td>
+                    <td name='myopac_circ_trans_start'>
+                        [% date.format(
+                            ctx.parse_datetime(
+                                f.xact.circulation.xact_start
+                            ), DATE_FORMAT
+                        ) %]
+                    </td>
+                    <td name='myopac_circ_trans_due'>
+                        [% date.format(
+                            ctx.parse_datetime(
+                                f.xact.circulation.due_date
+                            ), DATE_FORMAT
+                        ) %]
+                    </td>
+                    <td name='myopac_circ_trans_finished'>
+                        [%  IF f.xact.circulation.checkin_time;
+                                date.format(
+                                    ctx.parse_datetime(
+                                        f.xact.circulation.checkin_time
+                                    ), DATE_FORMAT
+                                );
+                            ELSE %]
+                            <!-- XXX TODO fines aren't really accruing
+                                if circ has hit maxfines. more clarity
+                                here? -->
+                            <span class="red">[% l('(fines accruing)') %]</span>
+                        [%  END %]
+                    </td>
+                    <td>
+                        <strong class="red">
+                            [% money(f.xact.balance_owed) %]
+                        </strong>
+                    </td>
+                    <!-- TODO: hidden until pay-fines is implemented
+                    <td>
+                        <input type="checkbox" name="selector" title="[% l('Pay this fine') %]" />
+                    </td>
+                    -->
+                </tr>
+                [% END %]
+            </tbody>
+        </table>
+    </div>
+    [% END %]
+
+    [% IF ctx.fines.grocery.size > 0 %]
+    <!-- Table for all non-circulation transactions -->
+    <div id='myopac_trans_div'>
+        <br/>
+        <hr class='opac-auto-013'  color="#dcdbdb" />
+        <br/>
+        <table width='100%' class='data_grid data_grid_center'
+            id='myopac_trans_table'>
+            <thead>
+                <tr>
+                    <td colspan='8' style='padding: 6px'>
+                        <b>[% l("Other Fees") %]</b>
+                    </td>
+                </tr>
+                <tr>
+                    <td width='16%'>[% l("Transaction Start Time") %]</td>
+                    <td width='16%'>[% l("Last Payment Time") %]</td>
+                    <td width='16%'>[% l("Initial Amount Owed") %]</td>
+                    <td width='16%'>[% l("Total Amount Paid") %]</td>
+                    <td width='16%'>[% l("Balance Owed") %]</td>
+                    <td width='16%'>[% l("Billing Type") %]</td>
+                    <!-- TODO: hidden until pay-fines is implemented
+                    <td width='4%' align="center" nowrap="nowrap"
+                        style="white-space:nowrap;">
+                        <input id="pay_fines_box2" checked="checked"
+                            type="checkbox"
+                            title="[% l('Click to (un)select all fines') %]" />
+                        <label for="pay_fines_box2">[% l("Pay Fines") %]</label>
+                    </td>
+                    -->
+                </tr>
+            </thead>
+            <tbody id='myopac_trans_tbody'>
+                [% FOR f IN ctx.fines.grocery %]
+                <tr id='myopac_trans_row'>
+                    <td>[% date.format(
+                            ctx.parse_datetime(f.xact.xact_start),
+                            DATE_FORMAT
+                    ) %]</td>
+                    <td>
+                        [%  IF f.xact.last_payment_ts;
+                                date.format(
+                                    ctx.parse_datetime(
+                                        f.xact.last_payment_ts
+                                    ), DATE_FORMAT
+                                );
+                            END %]
+                    </td>
+                    <td>[% money(f.xact.total_owed) %]</td>
+                    <td>[% money(f.xact.total_paid) %]</td>
+                    <td class="red">
+                        <strong>
+                            [% money(f.xact.balance_owed) %]
+                        </strong>
+                    </td>
+                    <td>[% f.xact.last_billing_type %]</td>
+                    <!-- TODO: hidden until pay-fines is implemented
+                    <td>
+                        <input type="checkbox" name='selector' title='[% l("Pay this fine") %]'/>
+                    </td>
+                    -->
+                </tr>
+                [% END %]
+            </tbody>
+        </table>
+    </div>
+    [% END %]
+
+    <!-- TODO: hidden until pay-fines is implemented
+    <a href="#"><img alt="[% l('Pay Fines') %]"
+        onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
+        src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
+        style="position:relative;top:5px;" /></a>
+    <br/>
+    -->
+
+[% ELSE %] <!-- show payments -->
+    <div>
+        <div><b>[% l('Payments') %]</b></div>
+        <table id='myopac_payments_table' width='100%' class='data_grid'>
+            <thead><tr>
+                <th>[% l('Payment Date') %]</th>
+                <th>[% l('Payment For') %]</th>
+                <th>[% l('Amount') %]</th>
+                <th>[% l('Receipt') %]</th> 
+            </tr></thead>
+            <tbody>
+                [% FOR payment IN ctx.payments %]
+                <tr>
+                    <td>[% date.format(ctx.parse_datetime(payment.mp.payment_ts), DATE_FORMAT) %]</td>
+                    <td>[% (payment.xact_type == 'grocery') ? payment.last_billing_type : payment.title %]</td>
+                    <td>[% money(payment.mp.amount) %]</td>
+                    <td>
+                        [%# post to print/email form... %]
+                        <a href=''>[% l('Print') %]</a> / <a href=''>[% l('Email') %]</a>
+                    </td>
+                </tr>
+                [% END %]
+            </tbody>
+        </table>
+    </div>
+[% END %] 
+
+
+    <!-- TODO: move payment form to its own page -->
+
     <div id="pay_fines_now" class="hide_me">
         <table id='oils-selfck-cc-payment-table'>
             <tbody>

commit 77fb7ae17d8ca8e92d46d32b2973952146421c95
Merge: 0c22c34 f6f578d
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Apr 5 16:14:18 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 0c22c34e68861e60b1141b6cb3e8ce57e7e74f04
Merge: 56f5b70 bd8c1cc
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Apr 5 14:35:12 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 56f5b70aff671a1ae4043ee1365d609366062eb0
Merge: 4745b9d cce75ff
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Apr 4 15:57:31 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 4745b9dd4419f9df650b0ff4c3690834f876c1c0
Merge: 52bf4e3 2c24c04
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Apr 4 13:17:27 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 52bf4e3902bda36217f2cf72a4d542585f96b41d
Merge: 3f73ce6 fc58b4f
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Apr 4 11:59:41 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 3f73ce6c242156b57c46bfa6822d0975a8b57445
Merge: a84278c 26fdc6f
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sun Apr 3 11:36:52 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit a84278cd457a3a94dca106045a2cbc25bbc090d8
Merge: 39312eb 762ecaa
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sat Apr 2 16:41:50 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 39312ebb7ba41f97c80dc306c0bace3162d27087
Merge: fa0c3e2 9ff0f16
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sat Apr 2 12:39:37 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit fa0c3e2472429be9e1d7434bdb0123cd6512a991
Merge: 4bfc1ba d3f30c6
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sat Apr 2 12:39:34 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 9ff0f1663bccec2017b4e53c80bfcb54db560085
Author: berick <berick at esilibrary.com>
Date:   Sat Apr 2 09:21:37 2011 -0400

    make next/prev search links not-visible instead of removing entirely to keep page position of links consistent

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index ff9153b..6559ab5 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -980,3 +980,5 @@ a.dash-link:hover { text-decoration: underline !important; }
 
 #rdetail_cn_browse_div { text-align: center; }
 .rdetail-author-div { padding-bottom: 10px; }
+
+.invisible { visibility: hidden; }
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index a46784b..ca1961f 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -22,24 +22,26 @@
             </td>
             <td align="right" valign="bottom">
                 <span class='start_end_links_span'>
-                    [% IF page > 0 %]
-                    <a class='search_page_nav_link'
-                        href="[% propagator _ '&page=' _ (page - 1) %]"
-                        title='[% l("Previous page") %]'>
-                        <span class="nav_arrow_fix">&#9668;</span> Previous
-                    </a>
-                    [% END %]
+                    [%  class = 'search_page_nav_link';
+                        href = '#';
+                        IF page > 0;
+                            href = propagator _ '&page=' _ (page - 1);
+                        ELSE; class = class _ ' invisible'; END;
+                    %]
+                    <a class='[% class %]' href='[% href %]' 
+                        title='[% l("Previous page") %]'><span class="nav_arrow_fix">&#9668;</span> Previous </a>
                     <span class='hide_me'
                         style='padding-left: 11px; padding-right:11px;'>
                         <span></span>
                     </span>
-                    [% IF (page + 1) < page_count %]
-                    <a class='search_page_nav_link'
-                        href="[% propagator _ '&page=' _ (page + 1) %]"
-                        title='[% l("Next page") %]'>
-                        Next <span class="nav_arrow_fix">&#9658;</span>
-                    </a>
-                    [% END %]
+                    [%  class = 'search_page_nav_link';
+                        href = '#';
+                        IF (page + 1) < page_count;
+                            href = propagator _ '&page=' _ (page + 1);
+                        ELSE; class = class _ ' invisible'; END;
+                    %]
+                    <a class='[% class %]' href='[% href %]' 
+                        title='[% l("Next page") %]'> Next <span class="nav_arrow_fix">&#9658;</span></a>
                 </span>
             </td>
         </tr>

commit ca04ff63962a2f07bf464a37bed0cf108fffaee4
Merge: 04e6499 d3f30c6
Author: berick <berick at esilibrary.com>
Date:   Sat Apr 2 09:07:04 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 04e64995d7cef5c175d22bf69c776e1e9236cb50
Author: berick <berick at esilibrary.com>
Date:   Sat Apr 2 09:06:11 2011 -0400

    Use MultiSession for parallel sessions
    
    In unapi.bre record retrieval, leverage OpenSRF::MultiSession for
    fetching batches of records in parallel.

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 361261e..e951fef 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -5,6 +5,7 @@ use OpenSRF::Utils::Logger qw/$logger/;
 use OpenILS::Utils::CStoreEditor qw/:funcs/;
 use OpenILS::Utils::Fieldmapper;
 use OpenILS::Application::AppUtils;
+use OpenSRF::MultiSession;
 my $U = 'OpenILS::Application::AppUtils';
 
 my $ro_object_subs; # cached subs
@@ -152,36 +153,38 @@ sub get_records_and_facets {
     $unapi_args->{depth} ||= $self->ctx->{aou_tree}->()->ou_type->depth;
     $unapi_args->{flesh_depth} ||= 5;
 
-    # XXX Fire in fixed-size batches to prevent larger display limits abusing cstore
-    my @reqs;
-    for my $id (@$rec_ids) {
-        my $ses = OpenSRF::AppSession->create('open-ils.cstore');
-        my $r = $ses->request(
-            'open-ils.cstore.json_query',
-             {from => [
-                'unapi.bre', $id, 'marcxml','record', 
-                $unapi_args->{flesh}, 
-                $unapi_args->{loc}, 
-                $unapi_args->{depth}, 
-                $unapi_args->{flesh_depth}, 
-            ]}
-        );
-        push(@reqs, {req => $r, ses => $ses});
-    }
+    my @data;
+    my $ses = OpenSRF::MultiSession->new(
+        app => 'open-ils.cstore',
+        cap => 10, # XXX config
+        success_handler => sub {
+            my($self, $req) = @_;
+            my $data = $req->{response}->[0]->content;
+            my $xml = XML::LibXML->new->parse_string($data->{'unapi.bre'})->documentElement;
+            my $bre_id =  $xml->find('*[@tag="901"]/*[@code="c"]')->[0]->textContent;
+            push(@data, {id => $bre_id, marc_xml => $xml});
+        }
+    );
 
+    $ses->request(
+        'open-ils.cstore.json_query',
+         {from => [
+            'unapi.bre', $_, 'marcxml','record', 
+            $unapi_args->{flesh}, 
+            $unapi_args->{loc}, 
+            $unapi_args->{depth}, 
+            $unapi_args->{flesh_depth}, 
+        ]}
+    ) for @$rec_ids;
+
+    # collect the facet data
     my $search = OpenSRF::AppSession->create('open-ils.search');
     my $facet_req = $search->request(
         'open-ils.search.facet_cache.retrieve', $facet_key, 10
     ) if $facet_key;
 
-    my @data;
-    for my $req (@reqs) {
-        my $data = $req->{req}->gather(1);
-        $req->{ses}->kill_me;
-        my $xml = XML::LibXML->new->parse_string($data->{'unapi.bre'})->documentElement;
-        my $rec_id =  $xml->find('*[@tag="901"]/*[@code="c"]')->[0]->textContent;
-        push(@data, {id => $rec_id, marc_xml => $xml});
-    }
+    # gather up the unapi recs
+    $ses->session_wait(1);
 
     my $facets;
     if ($facet_key) {

commit cecfad2e2d66f7de4f9d75a3c88fd03c6ce06b49
Author: berick <berick at esilibrary.com>
Date:   Fri Apr 1 17:45:12 2011 -0400

    move to unapi.bre for bib/copy-count/slim-holdings retrieval on record results page

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 272a3fc..fe61149 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -139,13 +139,14 @@ sub load_rresults {
 
     return Apache2::Const::OK if @$rec_ids == 0;
 
-    my ($facets, @data) = $self->get_records_and_facets($rec_ids, $results->{facet_key});
+    my ($facets, @data) = $self->get_records_and_facets(
+        $rec_ids, $results->{facet_key}, {flesh => '{holdings_xml}'});
 
     # shove recs into context in search results order
     for my $rec_id (@$rec_ids) {
         push(
             @{$ctx->{records}},
-            grep { $_->{bre}->id == $rec_id } @data
+            grep { $_->{id} == $rec_id } @data
         );
     }
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 18fc5ce..361261e 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -145,12 +145,29 @@ sub generic_redirect {
 }
 
 sub get_records_and_facets {
-    my ($self, $rec_ids, $facet_key) = @_;
-
-    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
-    my $bre_req = $cstore->request(
-        'open-ils.cstore.direct.biblio.record_entry.search', {id => $rec_ids}
-    );
+    my ($self, $rec_ids, $facet_key, $unapi_args) = @_;
+
+    $unapi_args ||= {};
+    $unapi_args->{loc} ||= $self->ctx->{aou_tree}->()->shortname;
+    $unapi_args->{depth} ||= $self->ctx->{aou_tree}->()->ou_type->depth;
+    $unapi_args->{flesh_depth} ||= 5;
+
+    # XXX Fire in fixed-size batches to prevent larger display limits abusing cstore
+    my @reqs;
+    for my $id (@$rec_ids) {
+        my $ses = OpenSRF::AppSession->create('open-ils.cstore');
+        my $r = $ses->request(
+            'open-ils.cstore.json_query',
+             {from => [
+                'unapi.bre', $id, 'marcxml','record', 
+                $unapi_args->{flesh}, 
+                $unapi_args->{loc}, 
+                $unapi_args->{depth}, 
+                $unapi_args->{flesh_depth}, 
+            ]}
+        );
+        push(@reqs, {req => $r, ses => $ses});
+    }
 
     my $search = OpenSRF::AppSession->create('open-ils.search');
     my $facet_req = $search->request(
@@ -158,28 +175,17 @@ sub get_records_and_facets {
     ) if $facet_key;
 
     my @data;
-    while (my $resp = $bre_req->recv) {
-        my $bre = $resp->content;
-
-        # XXX farm out to multiple cstore sessions before loop,
-        # then collect after
-        my $copy_counts = $self->editor->json_query(
-            {from => ['asset.record_copy_count', 1, $bre->id, 0]}
-        )->[0];
-
-        push @data, {
-            bre => $bre,
-            marc_xml => XML::LibXML->new->parse_string($bre->marc),
-            copy_counts => $copy_counts
-        };
+    for my $req (@reqs) {
+        my $data = $req->{req}->gather(1);
+        $req->{ses}->kill_me;
+        my $xml = XML::LibXML->new->parse_string($data->{'unapi.bre'})->documentElement;
+        my $rec_id =  $xml->find('*[@tag="901"]/*[@code="c"]')->[0]->textContent;
+        push(@data, {id => $rec_id, marc_xml => $xml});
     }
 
-    $cstore->kill_me;
-
     my $facets;
     if ($facet_key) {
         $facets = $facet_req->gather(1);
-
         $facets->{$_} = {
             cmf => $self->ctx->{find_cmf}->($_),
             data => $facets->{$_}
@@ -191,6 +197,7 @@ sub get_records_and_facets {
     return ($facets, @data);
 }
 
+# TODO: blend this code w/ ^-- get_records_and_facets
 sub fetch_marc_xml_by_id {
     my ($self, $id_list) = @_;
     $id_list = [$id_list] unless ref($id_list);
diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index 482481d..284b0a3 100644
--- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -23,6 +23,23 @@
         # clean up the ISBN
         args.isbn_clean = args.isbn.replace('\ .*', '');
 
+        args.holdsing = [];
+        FOR holding IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
+            args.holdings.push({
+                # TODO
+            });
+        END;
+
+        # Extract the copy count summary
+        count_type = (ctx.is_staff) ? 'staff' : 'public';
+        xpath = '//*[local-name()="counts"]/*[local-name()="count"][@type="' _ count_type _ '"]';
+        FOR node IN xml.findnodes(xpath);
+            args.copy_counts = {};
+            FOR attr IN ['count', 'available', 'unshadow', 'transcendant']; 
+                args.copy_counts.$attr = node.getAttribute(attr);
+            END;
+        END;
+
         # KCLS-specific stuff; needs to change
         args.mattype = xml.findnodes('//*[@tag="998"]/*[@code="d"]').textContent;
         args.kcls_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent;
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index ddafce5..a46784b 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -76,7 +76,7 @@
                                             <td class='result_table_pic_header'
                                                 width="78" nowrap="nowrap" valign="top">
                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
-                                                <a href="[% ctx.opac_root %]/record/[% rec.bre.id _ propagator %]"><img alt="Image of item"
+                                                <a href="[% ctx.opac_root %]/record/[% rec.id _ propagator %]"><img alt="Image of item"
                                                         name='item_jacket' class='result_table_pic' width="55"
                                                         src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a><br />
                                                 [% END %]
@@ -86,7 +86,7 @@
                                                 valign="top">
                                                 <div class="bold">
                                                     <a title="[% attrs.title %]" name='item_title'
-                                                        href="[% ctx.opac_root %]/record/[% rec.bre.id _ propagator %]"
+                                                        href="[% ctx.opac_root %]/record/[% rec.id _ propagator %]"
                                                         class='search_link'>[% attrs.title %]</a>
                                                 </div>
                                                 <span style="font-size:11px;">
@@ -136,7 +136,9 @@
                                                     </table>
                                                     <div>
                                                         [% l('[_1] of [quant,_2,copy,copies] available',
-                                                            rec.copy_counts.available, rec.copy_counts.visible) %]
+                                                            attrs.copy_counts.available, attrs.copy_counts.count) # XXX s/count/nshadow/ ?
+                                                            #rec.copy_counts.available, rec.copy_counts.visible) 
+                                                        %]
                                                     </div>
                                                 </span>
                                                 <div class="hide_me">
@@ -180,16 +182,16 @@
                                                 <div style="width:250px;text-align:left;">
                                                     <div style="float:right;">
                                                         <div class="results_aux_utils opac-auto-010"><a
-                                                                href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% rec.bre.id %]&hold_type=T" name="place_hold_link" class="no-dec"><img
+                                                                href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% rec.id %]&hold_type=T" name="place_hold_link" class="no-dec"><img
                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
                                                                 alt="place hold" /><span
                                                                     style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
                                                         </div>
                                                         <div class="results_aux_utils opac-auto-011">
-                                                            [%  operation = ctx.mylist.grep(rec.bre.id).size ? "delete" : "add";
+                                                            [%  operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
                                                                 label = (operation == "add") ? "Add to" : "Remove from"; %]
                                                             <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
-                                                                <input type="hidden" name="record" value="[% rec.bre.id %]" />
+                                                                <input type="hidden" name="record" value="[% rec.id %]" />
                                                             <div style="position:absolute;">
                                                                 <div style="position:relative;top:5px; left: 25px;">
                                                                     <input type="submit" title="[% l(label _ ' my list') %]" value="[% l(label _ ' my list') %]" class="subtle-button" />

commit 5c1cd414a367d25174db7a4c33ab5b8ba8ec5db2
Author: berick <berick at esilibrary.com>
Date:   Fri Apr 1 16:26:12 2011 -0400

    more rdetail extras cleanup; added support for authors display

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index c58e2cf..a95b8be 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -173,6 +173,7 @@ sub load_common {
 
     $ctx->{referer} = $self->cgi->referer;
     $ctx->{path_info} = $self->cgi->path_info;
+    $ctx->{full_path} = $ctx->{base_path} . $self->cgi->path_info;
     $ctx->{unparsed_uri} = $self->apache->unparsed_uri;
     $ctx->{opac_root} = $ctx->{base_path} . "/opac"; # absolute base url
     $ctx->{is_staff} = ($self->apache->headers_in->get('User-Agent') =~ 'oils_xulrunner');
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 27f36a7..ff9153b 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -979,3 +979,4 @@ a.dash-link:hover { text-decoration: underline !important; }
 .hold-editor-controls a { padding-left: 2em; }
 
 #rdetail_cn_browse_div { text-align: center; }
+.rdetail-author-div { padding-bottom: 10px; }
diff --git a/Open-ILS/web/templates/default/opac/parts/record/authors.tt2 b/Open-ILS/web/templates/default/opac/parts/record/authors.tt2
new file mode 100644
index 0000000..5d9db77
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/record/authors.tt2
@@ -0,0 +1,51 @@
+[%  
+
+authors = [
+    {
+        type => 'author', 
+        label => l('Authors: '),
+        xpath => '//*[@tag="100"]|//*[@tag="110"]|//*[@tag="111"]'
+    }, {
+        type => 'added', 
+        label => l('Added Authors: '),
+        xpath => '//*[@tag="700"]|//*[@tag="710"]|//*[@tag="711"]'
+    }, {
+        type => 'credits', 
+        label => l('Credits: '),
+        xpath => '//*[@tag="100"]|//*[@tag="110"]|//*[@tag="111"]'
+    }, {
+        type => 'cast', 
+        label => l('Cast: '),
+        xpath => '//*[@tag="508"]'
+    }, {
+        type => 'notes', 
+        label => l('Author Notes: '),
+        xpath => '' # Comes from added content...
+    }
+];
+
+BLOCK build_author_links;
+    FOR node IN ctx.marc_xml.findnodes(xpath);
+        FOR subfield IN node.childNodes;
+            NEXT UNLESS subfield.nodeName == "subfield";
+            code = subfield.getAttribute('code');
+            NEXT UNLESS code.match('[a-z]');
+            term = subfield.textContent | html;
+            '<br/><a href="' _ ctx.opac_root _ '/results?qtype=author&query=' _ term _ '&loc=' _ loc _ '">' _ term _ '</a>';
+        END;
+    END;
+END;
+%]
+
+<div id='rdetail_authors_div' class='rdetail_extras_div'>
+[% FOREACH author IN authors;
+    NEXT UNLESS author.xpath; 
+    links = PROCESS build_author_links(xpath=author.xpath);
+    IF links.match('\S') %]
+    <strong>[% author.label %]</strong>
+    <div class='rdetail-author-div'>[% links %]</div>
+    [% END %]
+[% END %]
+</div>
+
+
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index f66b77b..a87248b 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -1,34 +1,5 @@
-[% 
-    # Builds a link like so: $orig_link&expand=$tab#$tab
-    # use of 'SET foo =' prevents unintended inline rendering of values
-    BLOCK rdetail_extras_tab_link;
-        cgi = CGI();
-        SET foo = cgi.param('expand', tab);
-        url = ctx.unparsed_uri.replace('\?.*', '?' _ cgi.query_string);
-        SET foo = url.replace('#.*', ''); # clear any existing anchor
-        url _ '#' _ tab; # anchor on the tab name
-    END;
-%]
-
 <div id="rdetail_main_div">
-
     <div id='rdetail_extras_div' style='width: 100%;'> 
-        
-        <!-- SAMPLE AUTHORS LAYOUT / MOVE TO INCLUDE'D TEMPLATE
-        <div id='rdetail_authors_div' class='rdetail_extras_div hide_me'>
-            <strong>Authors:</strong>
-            <div id="rdetail_authors_inner" style="padding-bottom:10px;"></div>
-            <strong>Added Authors:</strong>
-            <div id="rdetail_moar_authors" style="padding-bottom:10px;"></div>
-            <strong>Credits:</strong>
-            <div id="rdetail_credits" style="padding-bottom:10px;"></div>
-            <strong>Cast:</strong>
-            <div id="rdetail_cast" style="padding-bottom:10px;"></div>
-            <strong>Author Notes:</strong>
-            <div id='rdetail_anotes_div' class='rdetail_extras_div'> </div>
-        </div>
-        -->
-        
         <!-- SAMPLE AWARDS LAYOUT / MOVE TO INCLUDE'D TEMPLATE
         <div id='rdetail_awards_div' class='rdetail_extras_div hide_me'> 
             <strong>Awards:</strong>
@@ -53,50 +24,46 @@
         </div>
         -->
 
-        [%
-            # Hidden extras are not yet implemented.  Some may require JS
-            extras = [
-                {name => 'summary',  label => l('Summary &amp; More'), hide => 1}, # Content Cafe
-                {name => 'content',  label => l('Contents'), hide => 1}, # ToC
-                {name => 'authors',  label => l('Authors'), hide => 1}, 
-                {name => 'series',   label => l('Series'), hide => 1}, 
-                {name => 'awards',   label => l('Series'), hide => 1}, 
-                {name => 'subject',  label => l('Subject')}, 
-                {name => 'annotation',  label => l('Annotation'), hide => 1}, 
-                {name => 'reviews',  label => l('Reviews'), hide => 1}, 
-                {name => 'excerpt',  label => l('Excerpt'), hide => 1},
-                {name => 'preview',  label => l('Preview'), hide => 1}, 
-                {name => 'novelist', label => l('Suggestions by NoveList'), hide => 1},
-                {name => 'cnbrowse', label => l('Shelf Browser'), hide => 1},
-                {name => 'copyinfo', label => l('Copy Summary'), hide => 1}, 
-                {name => 'marchtml', label => l('MARC Record')}
-            ];
+        [%  # Hidden extras are not yet implemented.  Some may require JS
+
+        extras = [
+            {name => 'summary',  label => l('Summary &amp; More'), hide => 1}, # Content Cafe
+            {name => 'content',  label => l('Contents'), hide => 1}, # ToC
+            {name => 'authors',  label => l('Authors')}, 
+            {name => 'series',   label => l('Series'), hide => 1}, 
+            {name => 'awards',   label => l('Series'), hide => 1}, 
+            {name => 'subjects', label => l('Subject')}, 
+            {name => 'annotation', label => l('Annotation'), hide => 1}, 
+            {name => 'reviews',  label => l('Reviews'), hide => 1}, 
+            {name => 'excerpt',  label => l('Excerpt'), hide => 1},
+            {name => 'preview',  label => l('Preview'), hide => 1}, 
+            {name => 'novelist', label => l('Suggestions by NoveList'), hide => 1},
+            {name => 'cnbrowse', label => l('Shelf Browser'), hide => 1},
+            {name => 'copyinfo', label => l('Copy Summary'), hide => 1}, 
+            {name => 'marchtml', label => l('MARC Record')}
+        ];
+
+        FOREACH extra IN extras;
+            IF extra.hide; NEXT; END; 
+            name = extra.name;
         %]
-        [% FOREACH extra IN extras %]
-            [% IF extra.hide; NEXT; END; %]
         <div class="rdetail_extras">
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
-                [% href = PROCESS rdetail_extras_tab_link(tab=extra.name) %]
-                <a name='[% extra.name %]' href='[% href %]'><img
+                [% href = ctx.full_path _ '?expand=' _ name _ '#' _ name; %]
+                <a name='[% name %]' href='[% href %]'><img
                     alt='[% extra.label %]' src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='[% href %]' class="rdetail_extras_lbl">[% extra.label %]</a>
             </div>
         </div>
         <div class='rdetail_extras_div'>
-            [%  name = extra.name; 
-                exp_name = 'expand_' _ name;
+            [%  exp_name = 'expand_' _ name;
                 IF ctx.$exp_name;
-                    IF name == 'subject';
-                        INCLUDE "default/opac/parts/record/subjects.tt2";
-                    ELSIF name == 'reviews';
-                    ELSIF name == 'excerpt';
-                    ELSIF name == 'preview';
-                    ELSIF name == 'novelist';
-                    ELSIF name == 'cnbrowse';
-                    ELSIF name == 'copyinfo';
-                    ELSIF name == 'marchtml';
+                    IF name == 'marchtml';
                         ctx.marchtml;
+                    ELSE;
+                        # Load the template for the selected extra
+                        INCLUDE "default/opac/parts/record/${name}.tt2";
                     END;
                 END; 
             %]

commit a130393bf4c33a0e5277f710567ffe0abe2dfc56
Author: berick <berick at esilibrary.com>
Date:   Fri Apr 1 14:37:52 2011 -0400

    consistent w/ seed skin (and to avoid total vertical domination), default to showing 10 copies-per-page on detail page

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index 1400aef..0290d88 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -15,7 +15,7 @@ sub load_record {
 
     my $org = $self->cgi->param('loc') || $self->ctx->{aou_tree}->()->id;
     my $depth = $self->cgi->param('depth') || 0;
-    my $copy_limit = int($self->cgi->param('copy_limit') || 20);
+    my $copy_limit = int($self->cgi->param('copy_limit') || 10);
     my $copy_offset = int($self->cgi->param('copy_offset') || 0);
 
     my $rec_id = $self->ctx->{page_args}->[0]

commit 12f19f14d958ea53f4272368e3ec763e11ad0464
Author: berick <berick at esilibrary.com>
Date:   Fri Apr 1 14:34:49 2011 -0400

    fixed odd bug w/ href attrs rendering the copyright symbol for &copy_limit=

diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index eaa77a4..5e81b8e 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -164,14 +164,16 @@
             new_offset = ctx.copy_offset - ctx.copy_limit;
             IF new_offset < 0; new_offset = 0; END %]
             <td>
-                <a href="[% ctx.opac_root %]/record/[% record.id %]?copy_offset=[% new_offset %]&copy_limit=[% ctx.copy_limit %]">&laquo; [%
+                [%# For some reason, browsers render &copy (as in, &copy_limit=foo) as the copyright 
+                    symbol, even though it's inside inside the href attribute string.  Use ; instead %]
+                <a href="[% ctx.opac_root %]/record/[% record.id %]?copy_offset=[% new_offset %];copy_limit=[% ctx.copy_limit %]">&laquo; [%
                     l('Previous [_1]', ctx.copy_offset - new_offset)
                 %]</a>
             </td>
         [% END %]
         [% IF ctx.copies.size >= ctx.copy_limit %]
             <td>
-                <a href="[% ctx.opac_root %]/record/[% record.id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %]&copy_limit=[% ctx.copy_limit %]">[%
+                <a href="[% ctx.opac_root %]/record/[% record.id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %];copy_limit=[% ctx.copy_limit %]">[%
                     l('Next [_1]', ctx.copy_limit)
                 %] &raquo;</a>
             </td>

commit 4bfc1ba66b70e7a15eab4b27830f6c304e9ce805
Merge: b4b8a2f 7b9b0a5
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Apr 1 13:41:25 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit b4b8a2fc9e9f52f23f5549e2ae7322e4899a8c34
Merge: 9515bb7 df424b2
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Apr 1 13:41:21 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 7b9b0a50c4ce7dd03c475a221c8d642673c1ad2e
Author: berick <berick at esilibrary.com>
Date:   Fri Apr 1 11:47:09 2011 -0400

    More work on record details 'extras'
    
    When an extra is chosen, anchor the page on the selected extra for focus
    Lots of cleanup to create a consistent system for selecting and
    displaying extras

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index c2da192..1400aef 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -34,11 +34,10 @@ sub load_record {
     $self->ctx->{copy_offset} = $copy_offset;
 
     for my $expand ($self->cgi->param('expand')) {
+        $self->ctx->{"expand_$expand"} = 1;
         if($expand eq 'marchtml') {
             $self->ctx->{marchtml} = $self->mk_marc_html($rec_id);
-        } elsif($expand eq 'subject') {
-            $self->ctx->{expand_subject} = 1;
-        }
+        } 
     }
 
     return Apache2::Const::OK;
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 32a3c82..27f36a7 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -977,3 +977,5 @@ a.dash-link:hover { text-decoration: underline !important; }
 .fmt-note { vertical-align: middle; padding-left: 1em !important; }
 .hold-editor-controls { text-align: center; padding-top: 1em !important; }
 .hold-editor-controls a { padding-left: 2em; }
+
+#rdetail_cn_browse_div { text-align: center; }
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index 292ed79..f66b77b 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -1,77 +1,20 @@
 [% 
-    # Augments/alters the current URL to set expand=$tab
-    # for displaying expanded detail content. 
+    # Builds a link like so: $orig_link&expand=$tab#$tab
+    # use of 'SET foo =' prevents unintended inline rendering of values
     BLOCK rdetail_extras_tab_link;
-        SET foo = CGI.param('expand', tab);
-        ctx.unparsed_uri.replace('\?.*', '?' _ CGI.query_string);
+        cgi = CGI();
+        SET foo = cgi.param('expand', tab);
+        url = ctx.unparsed_uri.replace('\?.*', '?' _ cgi.query_string);
+        SET foo = url.replace('#.*', ''); # clear any existing anchor
+        url _ '#' _ tab; # anchor on the tab name
     END;
 %]
 
 <div id="rdetail_main_div">
-    <table class='rdetails_extra_links'>
-        <thead>
-            <tr>
-                <td id='rdetail_annotation_link' class='hide_me rdetail_extras_td'
-                    style='padding-right: 15px; padding-left: 15px;' >
-                    <a href='javascript:rdetailShowExtra("annotation");' 
-                        class='classic_link'>[% l("Annotation") %]</a>
-                </td>
-            </tr>
-        </thead>
-    </table>
 
     <div id='rdetail_extras_div' style='width: 100%;'> 
-
-        <div rel="rdetail_summary_div" rel2="summary" class="rdetail_extras hide_me" id="rdetail_summary_link">
-            <div class="rdetail_extras_hr"></div>
-            <div class="rdetail_extras_link">
-                <a href='javascript:rdetailShowExtra("summary");'><img
-                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
-                <a href='javascript:rdetailShowExtra("summary");'
-                    class="rdetail_extras_lbl">Summary</a>
-            </div>
-        </div>
-        <div id='rdetail_summary_div' class='rdetail_extras_div hide_me'> 
-            <table style="margin-bottom:10px;" cellpadding="0" cellspacing="0" border="0">
-                <tr>
-                    <td width="1" style="padding-right:7px;" valign="top">
-                        <strong>Summary: </strong>
-                    </td>
-                    <td>
-                        <div id='rdetail_summary_container'></div>
-                    </td>
-                </tr>
-            </table>
-            <iframe width="100%" height="500" id="content_cafe_summary" frameborder="0"></iframe>
-        </div>
-
-        [% INCLUDE "default/opac/parts/record/subjects.tt2" %]
         
-        <div rel="rdetail_content_div" rel2="content"
-            class="rdetail_extras hide_me" id="rdetail_content_link">
-            <div class="rdetail_extras_hr"></div>
-            <div class="rdetail_extras_link">
-                <a href='javascript:rdetailShowExtra("content");'><img alt=""
-                    src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
-                <a href='javascript:rdetailShowExtra("content");' class="rdetail_extras_lbl">Contents</a>
-            </div>
-        </div>
-
-        <div id='rdetail_content_div' class='rdetail_extras_div hide_me'>
-            <strong>Contents:</strong>
-            <div id='rdetail_content_div_inner' style="padding-bottom:10px;"></div>
-            <strong>[% l("Table of Contents") %]:</strong>
-            <div id='rdetail_toc_div' class='rdetail_extras_div'></div>
-        </div>
-        
-        <div rel="rdetail_authors_div" rel2="authors"
-            class="rdetail_extras hide_me" id="rdetail_authors_link"><div class="rdetail_extras_hr"></div>
-            <div class="rdetail_extras_link">
-                <a href='javascript:rdetailShowExtra("authors");'><img
-                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
-                <a href='javascript:rdetailShowExtra("authors");' class="rdetail_extras_lbl">Author</a>
-            </div>
-        </div>
+        <!-- SAMPLE AUTHORS LAYOUT / MOVE TO INCLUDE'D TEMPLATE
         <div id='rdetail_authors_div' class='rdetail_extras_div hide_me'>
             <strong>Authors:</strong>
             <div id="rdetail_authors_inner" style="padding-bottom:10px;"></div>
@@ -84,33 +27,9 @@
             <strong>Author Notes:</strong>
             <div id='rdetail_anotes_div' class='rdetail_extras_div'> </div>
         </div>
+        -->
         
-        <div rel="rdetail_series_div" rel2="series"
-            class="rdetail_extras hide_me" id="rdetail_series_link"><div class="rdetail_extras_hr"></div>
-            <div class="rdetail_extras_link">
-                <a href='javascript:rdetailShowExtra("series");'><img
-                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
-                <a href='javascript:rdetailShowExtra("series");'
-                    class="rdetail_extras_lbl">series</a>
-            </div>
-        </div>
-
-        <div id='rdetail_series_div' class='rdetail_extras_div hide_me'> 
-            <strong>Series:</strong>
-            <div id='rdetail_series_container'></div>
-        </div>
-        
-        <div rel="rdetail_awards_div" rel2="awards"
-            class="rdetail_extras hide_me" id="rdetail_awards_link">
-            <div class="rdetail_extras_hr"></div>
-            <div class="rdetail_extras_link">
-                <a href='javascript:rdetailShowExtra("awards");'><img
-                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
-                <a href='javascript:rdetailShowExtra("awards");'
-                    class="rdetail_extras_lbl">awards, reviews &amp; suggested reads</a>
-            </div>
-        </div>
-
+        <!-- SAMPLE AWARDS LAYOUT / MOVE TO INCLUDE'D TEMPLATE
         <div id='rdetail_awards_div' class='rdetail_extras_div hide_me'> 
             <strong>Awards:</strong>
             <div id='rdetail_awards_cont' style="margin-bottom:20px;"></div>
@@ -132,112 +51,61 @@
                 </div>
             </div>
         </div>
-        
-        <div rel="rdetail_reviews_div" rel2="reviews" class="rdetail_extras hide_me"
-            id="rdetail_reviews_link">
+        -->
+
+        [%
+            # Hidden extras are not yet implemented.  Some may require JS
+            extras = [
+                {name => 'summary',  label => l('Summary &amp; More'), hide => 1}, # Content Cafe
+                {name => 'content',  label => l('Contents'), hide => 1}, # ToC
+                {name => 'authors',  label => l('Authors'), hide => 1}, 
+                {name => 'series',   label => l('Series'), hide => 1}, 
+                {name => 'awards',   label => l('Series'), hide => 1}, 
+                {name => 'subject',  label => l('Subject')}, 
+                {name => 'annotation',  label => l('Annotation'), hide => 1}, 
+                {name => 'reviews',  label => l('Reviews'), hide => 1}, 
+                {name => 'excerpt',  label => l('Excerpt'), hide => 1},
+                {name => 'preview',  label => l('Preview'), hide => 1}, 
+                {name => 'novelist', label => l('Suggestions by NoveList'), hide => 1},
+                {name => 'cnbrowse', label => l('Shelf Browser'), hide => 1},
+                {name => 'copyinfo', label => l('Copy Summary'), hide => 1}, 
+                {name => 'marchtml', label => l('MARC Record')}
+            ];
+        %]
+        [% FOREACH extra IN extras %]
+            [% IF extra.hide; NEXT; END; %]
+        <div class="rdetail_extras">
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
-                <a href='javascript:rdetailShowExtra("reviews");'><img
-                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
-                <a href='javascript:rdetailShowExtra("reviews");'
-                    class="rdetail_extras_lbl">[% l("Reviews") %]</a>
+                [% href = PROCESS rdetail_extras_tab_link(tab=extra.name) %]
+                <a name='[% extra.name %]' href='[% href %]'><img
+                    alt='[% extra.label %]' src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
+                <a href='[% href %]' class="rdetail_extras_lbl">[% extra.label %]</a>
             </div>
         </div>
-
-        <div id='rdetail_reviews_div' class='rdetail_extras_div hide_me'> </div>
-
-        <div rel="rdetail_excerpt_div" rel2="excerpt"
-            class="rdetail_extras hide_me" id="rdetail_excerpt_link">
-            <div class="rdetail_extras_hr"></div>
-            <div class="rdetail_extras_link">
-                <a href='javascript:rdetailShowExtra("excerpt");'><img
-                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
-                <a href='javascript:rdetailShowExtra("excerpt");'
-                    class="rdetail_extras_lbl">[% l("Excerpt") %]</a>
-            </div>
-        </div>
-
-        <div id='rdetail_excerpt_div' class='rdetail_extras_div hide_me'> </div>
-        
-        <div rel="rdetail_preview_div" rel2="preview"
-            class="rdetail_extras hide_me" id="rdetail_preview_link">
-            <div class="rdetail_extras_hr"></div>
-            <div class="rdetail_extras_link">
-                <a href='javascript:rdetailShowExtra("preview");'><img
-                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
-                <a href='javascript:rdetailShowExtra("preview");'
-                    class="rdetail_extras_lbl">[% l("Preview") %]</a>
-            </div>
-        </div>
-
-        <div id='rdetail_preview_div' class='rdetail_extras_div hide_me'> </div>
-        
-        <div rel="rdetail_novelist_div" rel2="novelist"
-            class="rdetail_extras hide_me" id="rdetail_novelist_link">
-            <div class="rdetail_extras_hr"></div>
-            <div class="rdetail_extras_link">
-                <a href='javascript:rdetailShowExtra("novelist");'><img
-                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
-                <a href='javascript:rdetailShowExtra("novelist");'
-                    class="rdetail_extras_lbl">[% l("Suggestions by NoveList") %]</a>
-            </div>
-        </div>
-
-        <div rel="rdetail_cn_browse_div" rel2="cn" class="rdetail_extras hide_me"
-            id="rdetail_viewcn_link">
-            <div class="rdetail_extras_hr"></div>
-            <div class="rdetail_extras_link">
-                <a href='javascript:rdetailShowExtra("cn");'><img
-                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
-                <a href='javascript:rdetailShowExtra("cn");'
-                    class="rdetail_extras_lbl">[% l("Shelf Browser") %]</a>
-           </div>
-        </div>
-
-        <div id='rdetail_cn_browse_div' style='text-align: center;' class='hide_me'>
-            <div id='cn_browse_none' class='hide_me color_4'
-                style='width: 90%; text-align: center; margin: 10px;'>
-                [% l("There are no call numbers for this item at this location.") %]
-            </div>
-
-            <div id='rdetail_cn_browse_select_div' 
-                style='width: 100%; border: 1px solid black; padding: 6px; margin-top: 5px;'>
-                <span>[% l("Local Call Numbers:") %] </span>
-                <select id='cn_browse_selector'> </select>
-            </div>
-            [% INCLUDE "default/opac/parts/cn_browse.tt2" %]
-        </div>
-
-        [% INCLUDE "default/opac/parts/record/cn_details.tt2" %]
-
-        <div rel="rdetail_copy_info_div" rel2="copyinfo"
-            class="hide_me rdetail_extras" id="rdetail_copy_info_link">
-            <div class="rdetail_extras_hr"></div>
-            <div class="rdetail_extras_link">
-                <a href='javascript:rdetailShowExtra("copyinfo");'><img
-                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
-                <a href='javascript:rdetailShowExtra("copyinfo");'
-                    class="rdetail_extras_lbl">[% l("Copy Summary") %]</a>
-            </div>
-        </div>
-
-        [% INCLUDE "default/opac/parts/record/copyinfo.tt2" %]
-
-        <div name='marchtml' rel="rdetail_marc_div" rel2="marc" class="rdetail_extras" id="rdetail_viewmarc_link">
-            <div class="rdetail_extras_hr"></div>
-            <div class="rdetail_extras_link">
-                [% marc_href = PROCESS rdetail_extras_tab_link(tab='marchtml') %]
-                <a href='[% marc_href %]'><img
-                    alt="[% l('MARC Record') %]" src="[% ctx.media_prefix %]/images/rdetail_arrow.png"/></a>
-                <a href='[% marc_href %]' class="rdetail_extras_lbl">[% l("MARC Record") %]</a>
-            </div>
+        <div class='rdetail_extras_div'>
+            [%  name = extra.name; 
+                exp_name = 'expand_' _ name;
+                IF ctx.$exp_name;
+                    IF name == 'subject';
+                        INCLUDE "default/opac/parts/record/subjects.tt2";
+                    ELSIF name == 'reviews';
+                    ELSIF name == 'excerpt';
+                    ELSIF name == 'preview';
+                    ELSIF name == 'novelist';
+                    ELSIF name == 'cnbrowse';
+                    ELSIF name == 'copyinfo';
+                    ELSIF name == 'marchtml';
+                        ctx.marchtml;
+                    END;
+                END; 
+            %]
         </div>
-        [% IF ctx.marchtml %]
-        <div class='rdetail_extras_div'>[% ctx.marchtml %]</div>
         [% END %]
     </div>
+    <!--
     <div id='rdetail_preview_full_text' class='hide_me'>[% l("Full text") %]</div>
     <div id='rdetail_preview_title' class='hide_me'>[% l("See the full text of this book.") %]</div>
     <div id='rdetail_preview_badge' class='hide_me'>[% l("Show a preview of this book from Google Book Search") %]</div>
+    -->
 </div>
-<!-- XXX TODO Novelist stuff here? -->
diff --git a/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2 b/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
index 50a83f6..64cc3c4 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
@@ -1,16 +1,4 @@
-<div name='subject' rel="rdetail_subject_div" rel2="subject" class="rdetail_extras" id="rdetail_subject_link">
-    <div class="rdetail_extras_hr"></div>
-    <div class="rdetail_extras_link">
-        [% subj_href = PROCESS rdetail_extras_tab_link(tab='subject') %]
-        <a href='[% subj_href %]'><img
-            alt="[% l('Subject') %]" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
-        <a href='[% subj_href %]' class="rdetail_extras_lbl">[% l('Subject') %]</a>
-    </div>
-</div>
-
-[% IF ctx.expand_subject %]
-
-<div id='rdetail_subject_div' class='rdetail_extras_div'>
+<div id='rdetail_subject_div'>
     <table cellpadding="0" cellspacing="0" border="0">
         <tr>
             <td width="1" style="padding-right:7px;" valign="top">
@@ -87,6 +75,3 @@
         [% END; END; %]
     </table>
 </div>
-
-[% END %]
-

commit 8f8c17ef8cd701dc6251acb2653123ba60be213d
Author: berick <berick at esilibrary.com>
Date:   Fri Apr 1 08:44:02 2011 -0400

    update flesh depth

diff --git a/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl b/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
index ee4cf0a..5b38b28 100755
--- a/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
+++ b/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
@@ -277,7 +277,7 @@ sub direct {
     my ($req1, $req2, $req3);
 
     my $query = {
-        flesh => 4, 
+        flesh => 5, 
         flesh_fields => {
             bre => ['call_numbers'], 
             acn => ['copies', 'uris'], 

commit 715508c7e1c5daa1c20ad3995834924810b2dc55
Merge: 4acc271 7aa2c56
Author: berick <berick at esilibrary.com>
Date:   Thu Mar 31 18:10:38 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 4acc27155bcb2f4a4fce70d4ff58ccb01aee3bac
Author: berick <berick at esilibrary.com>
Date:   Thu Mar 31 17:48:47 2011 -0400

    Fleshed out View MARC / Subjects Tabs
    
    Record detail page has support for showing the 'extras' tabs.  Currently
    supported tabs are View MARC (html) and extended subject info.  For
    consistency w/ seed skin, subjects are now only shown in expanded
    subjects area.

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index b947908..c58e2cf 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -173,6 +173,7 @@ sub load_common {
 
     $ctx->{referer} = $self->cgi->referer;
     $ctx->{path_info} = $self->cgi->path_info;
+    $ctx->{unparsed_uri} = $self->apache->unparsed_uri;
     $ctx->{opac_root} = $ctx->{base_path} . "/opac"; # absolute base url
     $ctx->{is_staff} = ($self->apache->headers_in->get('User-Agent') =~ 'oils_xulrunner');
 
@@ -252,7 +253,7 @@ sub load_login {
     # login succeeded, redirect as necessary
 
     my $acct = $self->apache->unparsed_uri;
-    $acct =~ s#/login#/myopac/main#;
+    $acct =~ s|/login|/myopac/main|;
 
     return $self->generic_redirect(
         $cgi->param('redirect_to') || $acct,
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index c3716d5..c2da192 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -33,6 +33,14 @@ sub load_record {
     $self->ctx->{copy_limit} = $copy_limit;
     $self->ctx->{copy_offset} = $copy_offset;
 
+    for my $expand ($self->cgi->param('expand')) {
+        if($expand eq 'marchtml') {
+            $self->ctx->{marchtml} = $self->mk_marc_html($rec_id);
+        } elsif($expand eq 'subject') {
+            $self->ctx->{expand_subject} = 1;
+        }
+    }
+
     return Apache2::Const::OK;
 }
 
@@ -121,8 +129,10 @@ sub mk_copy_query {
 sub mk_marc_html {
     my($self, $rec_id) = @_;
 
-    $self->ctx->{marc_html} = $U->simplereq(
-        'open-ils.search', 'open-ils.search.biblio.record.html', $rec_id);
+    # could be optimized considerably by performing the xslt on the already fetched record
+    return $U->simplereq(
+        'open-ils.search', 
+        'open-ils.search.biblio.record.html', $rec_id);
 }
 
 1;
diff --git a/Open-ILS/web/templates/default/opac/parts/record/body.tt2 b/Open-ILS/web/templates/default/opac/parts/record/body.tt2
index f36182a..9de517d 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/body.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/body.tt2
@@ -38,84 +38,12 @@
         <div class="clear-both"></div>
     </div>
 
-    <table width='100%' id='np_table' border='0' class="hide_me">
-        <tbody>
-            <tr class='color_4'>
-                <td style='vertical-align: top;' align="center">
-                    <span style="float:left"><a href="javascript:;"
-                        onclick="history.go(-1);">&laquo; Back</a></span>
-                    <span></span>
-                </td>
-            </tr>
-        </tbody>
-    </table>
-
-    <table style='' class='rdetail_header color_1 hide_me' width='100%'
-        border="0" cellspacing="0" cellpadding="0">
-        <tbody>
-            <tr>
-                <td width='33%' align='left' class="hide_me">
-                    <span>[% l("Record Summary") %]</span>
-                </td>
-                <td align='right' style='padding-right: 7px;' width='33%'>
-                    <span id='rdetail_exp_refworks_span' class='hide_me'
-                        style='padding-right: 7px;'>
-                        <a id='rdetail_exp_refworks'>[% l("Export to RefWorks") %]</a>
-                    </span>
-                    <span style='padding-right: 7px;' class='hide_me'
-                        id='rdetail_more_actions'>
-                        <select id='rdetail_more_actions_selector'
-                            style='max-width: 11em;' class="hide_me">
-                            <option value='start'>
-                                [% l("More Actions...") %]
-                            </option>
-                            <option disabled='disabled'>
-                                --------------
-                            </option>
-                            <option disabled='disabled'>
-                                [% l("Add to bookbag") %]
-                            </option>
-                            <option disabled='disabled'>
-                                --------------
-                            </option>
-                            <option value='new_bookbag'>
-                                [% l("Create a new bookbag") %]
-                            </option>
-                        </select>
-                    </span>
-                </td>
-            </tr>
-        </tbody>
-    </table>
-
     <div style='font-weight: bold; padding: 5px; margin: 5px; width: 100%;'
         class='hide_me color_4' id='rdetail_deleted_exp'>
         [% l("This record has been deleted from the database.  We recommend that you remove this title from any bookbags it may have been added to.") %]
     </div>
-
     [% INCLUDE "default/opac/parts/record/summary.tt2" %]
     <br />
-    <div style="width:100%;" class="hide_me">
-        <div style="float:right;" class="hide_me" id="lib_info_more">
-            <button>More...</button>
-        </div>
-        <div style="float:right;" class="hide_me" id="lib_info_less">
-            <button>...Less</button>
-        </div>
-    </div>
     [% INCLUDE "default/opac/parts/record/extras.tt2" %]
-
-    <div class='hide_me' id='rdetail_bb_none'>
-        [% l("(none)") %]
-    </div>
-    <div class='hide_me' id='rdetail_bb_item_success'>
-        [% l("Item successfully added to bookbag") %]
-    </div>
-    <div class='hide_me' id='rdetail_bb_new'>
-        [% l("Enter the name of the new bookbag") %]
-    </div>
-    <div class='hide_me' id='rdetail_bb_success'>
-        [% l("Bookbag successfully created") %]
-    </div>
 </div>
 <!-- ****************** end; page_rdetail.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index 6db9b6e..292ed79 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -1,5 +1,14 @@
+[% 
+    # Augments/alters the current URL to set expand=$tab
+    # for displaying expanded detail content. 
+    BLOCK rdetail_extras_tab_link;
+        SET foo = CGI.param('expand', tab);
+        ctx.unparsed_uri.replace('\?.*', '?' _ CGI.query_string);
+    END;
+%]
+
 <div id="rdetail_main_div">
-    <table class='hide_me rdetails_extra_links'>
+    <table class='rdetails_extra_links'>
         <thead>
             <tr>
                 <td id='rdetail_annotation_link' class='hide_me rdetail_extras_td'
@@ -12,8 +21,6 @@
     </table>
 
     <div id='rdetail_extras_div' style='width: 100%;'> 
-        <div id='rdetail_extras_loading' class='hide_me' 
-            style='padding: 10px;'>[% l("Loading...") %]</div>
 
         <div rel="rdetail_summary_div" rel2="summary" class="rdetail_extras hide_me" id="rdetail_summary_link">
             <div class="rdetail_extras_hr"></div>
@@ -37,90 +44,9 @@
             </table>
             <iframe width="100%" height="500" id="content_cafe_summary" frameborder="0"></iframe>
         </div>
-        
-        <div rel="rdetail_subject_div" rel2="subject" class="rdetail_extras hide_me" id="rdetail_subject_link">
-            <div class="rdetail_extras_hr"></div>
-            <div class="rdetail_extras_link">
-                <a href='javascript:rdetailShowExtra("subject");'><img
-                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
-                <a href='javascript:rdetailShowExtra("subject");' class="rdetail_extras_lbl">subject</a>
-            </div>
-        </div>
-
-        <div id='rdetail_subject_div' class='rdetail_extras_div hide_me'> 
-            <table cellpadding="0" cellspacing="0" border="0">
-                <tr>
-                    <td width="1" style="padding-right:7px;" valign="top">
-                        <strong>Subject: </strong>
-                    </td>
-                    <td>
-                        <div id='rdetail_subject_container'></div>
-                    </td>
-                </tr>
-                <tr>
-                    <td width="1" style="padding:5px 7px 0px 0px;" valign="top">
-                        <strong>Genre: </strong>
-                    </td>
-                    <td style="padding-top:5px;">
-                        <div id='rdetail_genre_cont'></div>
-                    </td>
-                </tr>
-                <tr>
-                    <td width="1" style="padding:5px 7px 0px 0px;white-space:nowrap;"
-                        nowrap="nowrap" valign="top">
-                        <strong>Topic Heading: </strong>
-                    </td>
-                    <td style="padding-top:5px;">
-                        <div id='rdetail_topic_cont'></div>
-                    </td>
-                </tr>
-                <tr>
-                    <td width="1" style="padding:5px 7px 0px 0px;white-space:nowrap;"
-                        nowrap="nowrap" valign="top">
-                        <strong>Geographic Setting: </strong>
-                    </td>
-                    <td style="padding-top:5px;">
-                        <div id='rdetail_geo_cont'></div>
-                    </td>
-                </tr>
-                <tr>
-                    <td width="1" style="padding:5px 7px 0px 0px;white-space:nowrap;"
-                        nowrap="nowrap" valign="top">
-                        <strong>Biographical Subject: </strong>
-                    </td>
-                    <td style="padding-top:5px;">
-                        <div id='rdetail_bio_cont'></div>
-                    </td>
-                </tr>
-                <tr>
-                    <td width="1" style="padding:5px 7px 0px 0px;white-space:nowrap;"
-                        nowrap="nowrap" valign="top">
-                        <strong>Character Attributes: </strong>
-                    </td>
-                    <td style="padding-top:5px;">
-                        <div id='rdetail_attrib_cont'></div>
-                    </td>
-                </tr>
-                <tr>
-                    <td width="1" style="padding:5px 7px 0px 0px;" valign="top">
-                        <strong>Setting: </strong>
-                    </td>
-                    <td style="padding-top:5px;">
-                        <div id='rdetail_setting_cont'></div>
-                    </td>
-                </tr>
-                <tr>
-                    <td width="1" style="padding:5px 7px 0px 0px;white-space:nowrap;"
-                        nowrap="nowrap" valign="top">
-                        <strong>Time Period: </strong>
-                    </td>
-                    <td style="padding-top:5px;">
-                        <div id='rdetail_time_cont'></div>
-                    </td>
-                </tr>
-            </table>
-        </div>
 
+        [% INCLUDE "default/opac/parts/record/subjects.tt2" %]
+        
         <div rel="rdetail_content_div" rel2="content"
             class="rdetail_extras hide_me" id="rdetail_content_link">
             <div class="rdetail_extras_hr"></div>
@@ -265,7 +191,7 @@
                     alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("cn");'
                     class="rdetail_extras_lbl">[% l("Shelf Browser") %]</a>
-            </div>
+           </div>
         </div>
 
         <div id='rdetail_cn_browse_div' style='text-align: center;' class='hide_me'>
@@ -297,18 +223,18 @@
 
         [% INCLUDE "default/opac/parts/record/copyinfo.tt2" %]
 
-        <div rel="rdetail_marc_div" rel2="marc" class="rdetail_extras hide_me" id="rdetail_viewmarc_link">
+        <div name='marchtml' rel="rdetail_marc_div" rel2="marc" class="rdetail_extras" id="rdetail_viewmarc_link">
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
-                <a href='javascript:rdetailShowExtra("marc");'><img
-                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
-                <a href='javascript:rdetailShowExtra("marc");'
-                    class="rdetail_extras_lbl">[% l("MARC Record") %]</a>
+                [% marc_href = PROCESS rdetail_extras_tab_link(tab='marchtml') %]
+                <a href='[% marc_href %]'><img
+                    alt="[% l('MARC Record') %]" src="[% ctx.media_prefix %]/images/rdetail_arrow.png"/></a>
+                <a href='[% marc_href %]' class="rdetail_extras_lbl">[% l("MARC Record") %]</a>
             </div>
         </div>
-        <div id='rdetail_marc_div' class='rdetail_extras_div hide_me'>
-            <div id='rdetail_view_marc_box'></div>
-        </div>
+        [% IF ctx.marchtml %]
+        <div class='rdetail_extras_div'>[% ctx.marchtml %]</div>
+        [% END %]
     </div>
     <div id='rdetail_preview_full_text' class='hide_me'>[% l("Full text") %]</div>
     <div id='rdetail_preview_title' class='hide_me'>[% l("See the full text of this book.") %]</div>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2 b/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
new file mode 100644
index 0000000..50a83f6
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2
@@ -0,0 +1,92 @@
+<div name='subject' rel="rdetail_subject_div" rel2="subject" class="rdetail_extras" id="rdetail_subject_link">
+    <div class="rdetail_extras_hr"></div>
+    <div class="rdetail_extras_link">
+        [% subj_href = PROCESS rdetail_extras_tab_link(tab='subject') %]
+        <a href='[% subj_href %]'><img
+            alt="[% l('Subject') %]" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
+        <a href='[% subj_href %]' class="rdetail_extras_lbl">[% l('Subject') %]</a>
+    </div>
+</div>
+
+[% IF ctx.expand_subject %]
+
+<div id='rdetail_subject_div' class='rdetail_extras_div'>
+    <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+            <td width="1" style="padding-right:7px;" valign="top">
+                <strong>[% l('Subject:') %] </strong>
+            </td>
+            <td>
+                [% BLOCK render_subject;
+                loc = CGI.param('loc') | uri;
+                xpath = xpath || '//*[starts-with(@tag,"6")]';
+                FOR node IN ctx.marc_xml.findnodes(xpath);
+                    all_terms = [];
+                    FOR subfield IN node.childNodes;
+                        NEXT UNLESS subfield.nodeName == "subfield";
+                        code = 0;
+                        FOR a IN subfield.attributes;
+                            IF a.nodeName == "code";
+                                code = a.nodeValue;
+                            END;
+                        END;
+                        NEXT UNLESS code.match('[a-z]');
+
+                        IF code.match('[vxyz]');
+                            " &mdash; ";
+                        END;
+                        # at this point, we actually have a partial term to use.
+                        single_term = subfield.textContent | html;
+                        all_terms.push(subfield.textContent);
+                        total_term = all_terms.join(" ").replace('\s+$', '') ; # XXX need to take care of any &'s, right?
+                        '<a href="' _ ctx.opac_root _ '/results?qtype=subject&query=' _ total_term _ '&loc=' _ loc _ '">' _ single_term _ '</a>';
+                    END;
+                    "<br />";
+                END %]
+                [% END %]
+                [% s = PROCESS render_subject; IF s.match('\S'); s; END; %]
+            </td>
+        </tr>
+
+        [%
+            subjects = [
+                {
+                    label => l('Genre: '),
+                    xpath => '//*[@tag="655"]|//*[@tag="659"]'
+                }, {
+                    label => l('Topic Heading: '),
+                    xpath => '//*[@tag="690"]'
+                }, {
+                    label => l('Geographic Setting: '),
+                    xpath => '//*[@tag="691"]'
+                }, {
+                    label => l('Biographical Subject: '),
+                    xpath => '//*[@tag="692"]'
+                }, {
+                    label => l('Character Attributes: '),
+                    xpath => '//*[@tag="693"]'
+                }, {
+                    label => l('Setting: '),
+                    xpath => '//*[@tag="698"]'
+                }, {
+                    label => l('Time Period: '),
+                    xpath => '//*[@tag="699"]'
+                }
+            ];
+
+            FOREACH subj IN subjects;
+                '<!-- SUBJECT = ' _ subj.label _ ' : xpath = ' _ subj.xpath _ ' -->';
+                content = PROCESS render_subject(xpath=subj.xpath);
+                IF content.match('\S') %]
+                <tr>
+                    <td width="1" style="padding:5px 7px 0px 0px;" valign="top">
+                        <strong>[% subj.label %]</strong>
+                    </td>
+                    <td style="padding-top:5px;"><div>[% content %] </div></td>
+                </tr>
+        [% END; END; %]
+    </table>
+</div>
+
+[% END %]
+
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index a62508d..eaa77a4 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -96,45 +96,6 @@
                             </td>
                             <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
                         </tr>
-                        <tr>
-                            <!--<td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_sum_lbl">Summary</strong>
-                            </td>
-                            <td valign="top" id='rdetail_abstract'></td>-->
-                            [% BLOCK render_subject;
-                            loc = CGI.param('loc') | uri;
-                            FOR node IN ctx.marc_xml.findnodes('//*[starts-with(@tag,"6")]');
-                                all_terms = [];
-                                FOR subfield IN node.childNodes;
-                                    NEXT UNLESS subfield.nodeName == "subfield";
-                                    code = 0;
-                                    FOR a IN subfield.attributes;
-                                        IF a.nodeName == "code";
-                                            code = a.nodeValue;
-                                        END;
-                                    END;
-                                    NEXT UNLESS code.match('[a-z]');
-
-                                    IF code.match('[vxyz]');
-                                        " &mdash; ";
-                                    END;
-                                    # at this point, we actually have a partial
-                                    # term to use.
-                                    single_term = subfield.textContent | html;
-                                    all_terms.push(subfield.textContent);
-                                    total_term = all_terms.join(" ").replace('\s+$', '') ; # XXX need to take care of any &'s, right?
-                                    '<a href="' _ ctx.opac_root _ '/results?qtype=subject&query=' _ total_term _ '&loc=' _ loc _ '">' _ single_term _ '</a>';
-                                END;
-                                "<br />";
-                            END %]
-                            [% END %]
-                            [% s = PROCESS render_subject; IF s.match('\S') %]
-                            <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_sub_lbl">[% l("Subjects") %]</strong>
-                            </td>
-                            <td valign="top" colspan="3">[% s %]</td>
-                            [% END %]
-                        </tr>
                     </table>
                 </div>
             </td>

commit aa0c363b49277f5fb8b64138ae11edeb93220992
Author: berick <berick at esilibrary.com>
Date:   Thu Mar 31 14:41:28 2011 -0400

    added fully-parallized (send 10 reqs simultaneously) versions of unapi.bre and direc

diff --git a/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl b/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
index 656330f..ee4cf0a 100755
--- a/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
+++ b/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
@@ -122,6 +122,61 @@ sub unapi {
     print "\nunapi 'unapi.bre' duration is $duration\n\n";
 }
 
+sub unapi_spread {
+    my @recs = @_;
+    my %records;
+    my $start = time();
+
+    my @reqs;
+    for my $rec_id (@recs) {
+
+        my $ses = OpenSRF::AppSession->create('open-ils.cstore');
+        my $req = $ses->request(
+            'open-ils.cstore.json_query', 
+            {from => ['unapi.bre', $rec_id, 'marcxml', 'record', '{holdings_xml,acp}', 'CONS']});
+
+        push(@reqs, $req);
+    }
+
+    for my $req (@reqs) {
+
+        my $data = $req->gather(1);
+        my $xml = XML::LibXML->new->parse_string($data->{'unapi.bre'});
+        $xml = $xml->documentElement;
+        my $attrs = get_bib_attrs($xml);
+        my $rec_id =  xptext($xml,'*[@tag="901"]/*[@code="c"]');
+        $records{$rec_id}{$_} = $attrs->{$_} for keys %$attrs;
+
+        my $rvols = [];
+        for my $volnode ($xml->findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]')) {
+            my $vol = {}; 
+            $vol->{copies} = [];
+            $vol->{label} = $volnode->getAttribute('label');
+            for my $copynode ($volnode->getElementsByLocalName('copy')) {
+                my $copy = {};   
+                $copy->{barcode} = $copynode->getAttribute('barcode');
+                push(@{$vol->{copies}}, $copy);
+            }
+            push(@{$records{$rec_id}->{volumes}}, $vol);
+        }
+    }
+
+    my $duration = time() - $start;
+
+    for my $rec_id (keys %records) {
+        my $rec = $records{$rec_id};
+        print sprintf("%d [%s] has %d volumes and %d copies\n",
+            $rec_id, $rec->{title}, 
+            scalar(@{$rec->{volumes}}),
+            scalar(map { @{$_->{copies}} } @{$rec->{volumes}}));
+    }
+
+    #note, unapi.biblio_record_entry_feed per record performs the same as unapi.bre pre record
+    print "\nunapi 'unapi.bre' spread duration is $duration\n\n";
+}
+
+
+
 sub unapi_batch {
     my @recs = @_;
     my $start = time();
@@ -163,6 +218,53 @@ sub unapi_batch {
     print "\nunapi 'batch feed' duration is $duration\n\n";
 }
 
+sub direct_spread {
+    my @recs = @_;
+    my %records;
+    my $start = time();
+
+    my $query = {
+        flesh => 4, 
+        flesh_fields => {
+            bre => ['call_numbers'], 
+            acn => ['copies', 'uris'], 
+            acp => ['location', 'stat_cat_entries', 'parts'],
+            ascecm => ['stat_cat', 'stat_cat_entry'],
+            acpm => ['part']
+        }
+    };
+
+    my @reqs;
+    for my $rec_id (@recs) {
+        my $ses = OpenSRF::AppSession->create('open-ils.cstore');
+        my $req = $ses->request(
+            'open-ils.cstore.direct.biblio.record_entry.search', {id => $rec_id}, $query);
+        push(@reqs, $req);
+    }
+
+    $records{$_}{counts} = $e->json_query({from => ['asset.record_copy_count', 1, $_, 0]})->[0] for @recs;
+    for my $req (@reqs) {
+        my $bre = $req->gather(1);
+        my $xml = XML::LibXML->new->parse_string($bre->marc)->documentElement;
+        my $attrs = get_bib_attrs($xml);
+        $records{$bre->id}{record} = $bre;
+        $records{$bre->id}{$_} = $attrs->{$_} for keys %$attrs;
+    }
+
+    my $duration = time() - $start;
+
+    for my $rec_id (keys %records) {
+        my $rec = $records{$rec_id};
+        print sprintf("%d [%s] has %d volumes and %d copies\n",
+            $rec_id, $rec->{title}, 
+            scalar(@{$rec->{record}->call_numbers}), 
+            scalar(map { @{$_->copies} } @{$rec->{record}->call_numbers}));
+    }
+
+    print "\n'direct' spread calls processing duration is $duration\n\n";
+}
+
+
 sub direct {
     my @recs = @_;
     my %records;
@@ -228,8 +330,7 @@ sub direct {
             scalar(map { @{$_->copies} } @{$rec->{record}->call_numbers}));
     }
 
-    print "\ndirect calls processing duration is $duration\n\n";
+    print "\n'direct' calls processing duration is $duration\n\n";
 }
 
-for (0..1) { direct(@recs); unapi(@recs); unapi_batch(@recs); }
-#unapi_batch(@recs); 
+for (0..1) { direct(@recs); unapi(@recs); unapi_batch(@recs); unapi_spread(@recs); direct_spread(@recs); }

commit cc723ab0f686fe561f9637d5ce81b0008e8b0ffd
Author: berick <berick at esilibrary.com>
Date:   Thu Mar 31 13:53:20 2011 -0400

    do some basic parallelizing optimization

diff --git a/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl b/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
index 9e1e205..656330f 100755
--- a/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
+++ b/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
@@ -43,27 +43,68 @@ sub unapi {
     my @recs = @_;
     my $start = time();
 
+    my $ses1 = OpenSRF::AppSession->create('open-ils.cstore');
+    my $ses2 = OpenSRF::AppSession->create('open-ils.cstore');
+    my $ses3 = OpenSRF::AppSession->create('open-ils.cstore');
+    my ($req1, $req2, $req3);
+
     my %records;
-    for my $rec_id (@recs) {
-        #my $data = $e->json_query({from => ['unapi.biblio_record_entry_feed', "{$rec_id}", 'marcxml', '{holdings_xml,acp}', 'CONS']})->[0];
-        my $data = $e->json_query({from => ['unapi.bre', $rec_id, 'marcxml', 'record', '{holdings_xml,acp}', 'CONS']})->[0];
-        my $xml = XML::LibXML->new->parse_string($data->{'unapi.bre'});
-        #$xml = $xml->documentElement->getElementsByLocalName('record')->[0];
-        $xml = $xml->documentElement;
-        my $attrs = get_bib_attrs($xml);
-        $records{$rec_id}{$_} = $attrs->{$_} for keys %$attrs;
+    while(@recs) {
+        my ($id1, $id2, $id3) = (pop @recs, pop @recs, pop @recs);
+
+        for my $r ($req1, $req2, $req3) {
+            if($r) {
+                my $data = $r->gather(1);
+                my $xml = XML::LibXML->new->parse_string($data->{'unapi.bre'});
+                $xml = $xml->documentElement;
+                my $attrs = get_bib_attrs($xml);
+                my $rec_id =  xptext($xml,'*[@tag="901"]/*[@code="c"]');
+                $records{$rec_id}{$_} = $attrs->{$_} for keys %$attrs;
+
+                my $rvols = [];
+                for my $volnode ($xml->findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]')) {
+                    my $vol = {}; 
+                    $vol->{copies} = [];
+                    $vol->{label} = $volnode->getAttribute('label');
+                    for my $copynode ($volnode->getElementsByLocalName('copy')) {
+                        my $copy = {};   
+                        $copy->{barcode} = $copynode->getAttribute('barcode');
+                        push(@{$vol->{copies}}, $copy);
+                    }
+                    push(@{$records{$rec_id}->{volumes}}, $vol);
+                }
 
-        my $rvols = [];
-        for my $volnode ($xml->findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]')) {
-            my $vol = {}; 
-            $vol->{copies} = [];
-            $vol->{label} = $volnode->getAttribute('label');
-            for my $copynode ($volnode->getElementsByLocalName('copy')) {
-                my $copy = {};   
-                $copy->{barcode} = $copynode->getAttribute('barcode');
-                push(@{$vol->{copies}}, $copy);
             }
-            push(@{$records{$rec_id}->{volumes}}, $vol);
+        }
+
+        $req1 = ($id1) ? $ses1->request('open-ils.cstore.json_query', {from => ['unapi.bre', $id1, 'marcxml', 'record', '{holdings_xml,acp}', 'CONS']}) : undef;
+        $req2 = ($id2) ? $ses1->request('open-ils.cstore.json_query', {from => ['unapi.bre', $id2, 'marcxml', 'record', '{holdings_xml,acp}', 'CONS']}) : undef;
+        $req3 = ($id3) ? $ses1->request('open-ils.cstore.json_query', {from => ['unapi.bre', $id3, 'marcxml', 'record', '{holdings_xml,acp}', 'CONS']}) : undef;
+    }
+
+
+    for my $r ($req1, $req2, $req3) {
+        if($r) {
+            my $data = $r->gather(1);
+            my $xml = XML::LibXML->new->parse_string($data->{'unapi.bre'});
+            $xml = $xml->documentElement;
+            my $attrs = get_bib_attrs($xml);
+            my $rec_id =  xptext($xml,'*[@tag="901"]/*[@code="c"]');
+            $records{$rec_id}{$_} = $attrs->{$_} for keys %$attrs;
+
+            my $rvols = [];
+            for my $volnode ($xml->findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]')) {
+                my $vol = {}; 
+                $vol->{copies} = [];
+                $vol->{label} = $volnode->getAttribute('label');
+                for my $copynode ($volnode->getElementsByLocalName('copy')) {
+                    my $copy = {};   
+                    $copy->{barcode} = $copynode->getAttribute('barcode');
+                    push(@{$vol->{copies}}, $copy);
+                }
+                push(@{$records{$rec_id}->{volumes}}, $vol);
+            }
+
         }
     }
 
@@ -128,42 +169,55 @@ sub direct {
 
     my $start = time();
 
-    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
-    my $cstore2 = OpenSRF::AppSession->create('open-ils.cstore');
-    my $bre_req = $cstore->request(
-        'open-ils.cstore.direct.biblio.record_entry.search', 
-        {id => \@recs},
-        {
-            flesh => 4, 
-            flesh_fields => {
-                bre => ['call_numbers'], 
-                acn => ['copies', 'uris'], 
-                acp => ['location', 'stat_cat_entries', 'parts'],
-                ascecm => ['stat_cat', 'stat_cat_entry'],
-                acpm => ['part']
-            }
+    my $ses1 = OpenSRF::AppSession->create('open-ils.cstore');
+    my $ses2 = OpenSRF::AppSession->create('open-ils.cstore');
+    my $ses3 = OpenSRF::AppSession->create('open-ils.cstore');
+    my ($req1, $req2, $req3);
+
+    my $query = {
+        flesh => 4, 
+        flesh_fields => {
+            bre => ['call_numbers'], 
+            acn => ['copies', 'uris'], 
+            acp => ['location', 'stat_cat_entries', 'parts'],
+            ascecm => ['stat_cat', 'stat_cat_entry'],
+            acpm => ['part']
         }
-        # in practice, ^-- this might be a separate, paged json_query
-        # note, not fleshing copy status since copy statuses will always be cached in the ML
-    );
+    };
 
-    my @data;
-    while (my $resp = $bre_req->recv) {
-        my $bre = $resp->content;
+    my $first = 1;
+    while(@recs) {
+        my ($id1, $id2, $id3) = (pop @recs, pop @recs, pop @recs);
+
+        for my $r ($req1, $req2, $req3) {
+            last unless $r;
+            my $bre = $r->gather(1);
+            my $xml = XML::LibXML->new->parse_string($bre->marc)->documentElement;
+            my $attrs = get_bib_attrs($xml);
+            $records{$bre->id}{record} = $bre;
+            $records{$bre->id}{$_} = $attrs->{$_} for keys %$attrs;
+        }
 
-        my $cc_req = $cstore2->request(
-            'open-ils.cstore.json_query', 
-            {from => ['asset.record_copy_count', 1, $bre->id, 0]}
-        );
+        $req1 = ($id1) ? $ses1->request('open-ils.cstore.direct.biblio.record_entry.search', {id => $id1}, $query) : undef;
+        $req2 = ($id2) ? $ses1->request('open-ils.cstore.direct.biblio.record_entry.search', {id => $id2}, $query) : undef;
+        $req3 = ($id3) ? $ses1->request('open-ils.cstore.direct.biblio.record_entry.search', {id => $id3}, $query) : undef;
+        
+        if($first) {
+            $records{$_}{counts} = $e->json_query({from => ['asset.record_copy_count', 1, $_, 0]})->[0] for @recs;
+            $first = 0;
+        }
+    }
 
+    for my $r ($req1, $req2, $req3) {
+        last unless $r;
+        my $bre = $r->gather(1);
         my $xml = XML::LibXML->new->parse_string($bre->marc)->documentElement;
         my $attrs = get_bib_attrs($xml);
         $records{$bre->id}{record} = $bre;
         $records{$bre->id}{$_} = $attrs->{$_} for keys %$attrs;
-
-        $records{$bre->id}->{counts} = $cc_req->gather(1);
     }
 
+
     my $duration = time() - $start;
 
     for my $rec_id (keys %records) {

commit 631561e04ee18e8546ba336781e3f3e854bc9537
Author: berick <berick at esilibrary.com>
Date:   Thu Mar 31 11:51:51 2011 -0400

    more test options
    
    Now fleshing copy parts, uris, and copy stat cats in 'direct' version
    Added a full-feed version
    Added an unapi.bre version

diff --git a/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl b/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
index d916873..9e1e205 100755
--- a/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
+++ b/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
@@ -19,7 +19,8 @@ my $e = OpenILS::Utils::CStoreEditor->new;
 
 sub xptext {
     my($node, $path) = @_;
-    my $res = $node->findnodes($path);
+    #my $res = $node->findnodes($path);
+    my $res = $node->find($path);
     return '' unless $res and $res->[0];
     return $res->[0]->textContent;
 }
@@ -27,14 +28,14 @@ sub xptext {
 sub get_bib_attrs {
     my $xml = shift;
     return {
-        isbn => xptext($xml, '//*[@tag="020"]/*[@code="a"]'),
-        upc => xptext($xml,'//*[@tag="024"]/*[@code="a"]'),
-        issn => xptext($xml,'//*[@tag="022"]/*[@code="a"]'),
-        title => xptext($xml,'//*[@tag="245"]/*[@code="a"]'),
-        author => xptext($xml,'//*[@tag="100"]/*[@code="a"]'),
-        publisher => xptext($xml,'//*[@tag="260"]/*[@code="b"]'),
-        pubdate => xptext($xml,'//*[@tag="260"]/*[@code="c"]'),
-        edition => xptext($xml,'//*[@tag="250"]/*[@code="a"]'),
+        isbn => xptext($xml, '*[@tag="020"]/*[@code="a"]'),
+        upc => xptext($xml,'*[@tag="024"]/*[@code="a"]'),
+        issn => xptext($xml,'*[@tag="022"]/*[@code="a"]'),
+        title => xptext($xml,'*[@tag="245"]/*[@code="a"]'),
+        author => xptext($xml,'*[@tag="100"]/*[@code="a"]'),
+        publisher => xptext($xml,'*[@tag="260"]/*[@code="b"]'),
+        pubdate => xptext($xml,'*[@tag="260"]/*[@code="c"]'),
+        edition => xptext($xml,'*[@tag="250"]/*[@code="a"]'),
     };
 }
 
@@ -44,11 +45,11 @@ sub unapi {
 
     my %records;
     for my $rec_id (@recs) {
-        #my $ustart = time;
-        # Note, fetching all 10 recs from unapi.biblio_record_entry_feed in 1 feed takes considerably longer (2+ seconds)
-        my $data = $e->json_query({from => ['unapi.biblio_record_entry_feed', "{$rec_id}", 'marcxml', '{holdings_xml,acp}', 'CONS']})->[0];
-        #print "unapi query duration " . (time() - $ustart) . "\n";
-        my $xml = XML::LibXML->new->parse_string($data->{'unapi.biblio_record_entry_feed'});
+        #my $data = $e->json_query({from => ['unapi.biblio_record_entry_feed', "{$rec_id}", 'marcxml', '{holdings_xml,acp}', 'CONS']})->[0];
+        my $data = $e->json_query({from => ['unapi.bre', $rec_id, 'marcxml', 'record', '{holdings_xml,acp}', 'CONS']})->[0];
+        my $xml = XML::LibXML->new->parse_string($data->{'unapi.bre'});
+        #$xml = $xml->documentElement->getElementsByLocalName('record')->[0];
+        $xml = $xml->documentElement;
         my $attrs = get_bib_attrs($xml);
         $records{$rec_id}{$_} = $attrs->{$_} for keys %$attrs;
 
@@ -75,7 +76,50 @@ sub unapi {
             scalar(@{$rec->{volumes}}),
             scalar(map { @{$_->{copies}} } @{$rec->{volumes}}));
     }
-    print "\nunapi processing duration is $duration\n\n";
+
+    #note, unapi.biblio_record_entry_feed per record performs the same as unapi.bre pre record
+    print "\nunapi 'unapi.bre' duration is $duration\n\n";
+}
+
+sub unapi_batch {
+    my @recs = @_;
+    my $start = time();
+
+    my $data = $e->json_query({from => ['unapi.biblio_record_entry_feed', "{".join(',', at recs)."}", 'marcxml', '{holdings_xml,acp}', 'CONS']})->[0];
+    my $xml = XML::LibXML->new->parse_string($data->{'unapi.biblio_record_entry_feed'});
+
+    my %records;
+    for my $rec_xml ($xml->documentElement->getElementsByLocalName('record')) { 
+
+        my $attrs = get_bib_attrs($rec_xml);
+        my $rec_id =  xptext($rec_xml,'*[@tag="901"]/*[@code="c"]');
+        #print "REC = $rec_xml : $rec_id : " . $attrs->{title} . "\n" . $rec_xml->toString . "\n";
+        $records{$rec_id}{$_} = $attrs->{$_} for keys %$attrs;
+
+        my $rvols = [];
+        for my $volnode ($rec_xml->findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]')) {
+            my $vol = {}; 
+            $vol->{copies} = [];
+            $vol->{label} = $volnode->getAttribute('label');
+            for my $copynode ($volnode->getElementsByLocalName('copy')) {
+                my $copy = {};   
+                $copy->{barcode} = $copynode->getAttribute('barcode');
+                push(@{$vol->{copies}}, $copy);
+            }
+            push(@{$records{$rec_id}->{volumes}}, $vol);
+        }
+    }
+
+    my $duration = time() - $start;
+
+    for my $rec_id (keys %records) {
+        my $rec = $records{$rec_id};
+        print sprintf("%d [%s] has %d volumes and %d copies\n",
+            $rec_id, $rec->{title}, 
+            scalar(@{$rec->{volumes}}),
+            scalar(map { @{$_->{copies}} } @{$rec->{volumes}}));
+    }
+    print "\nunapi 'batch feed' duration is $duration\n\n";
 }
 
 sub direct {
@@ -89,7 +133,16 @@ sub direct {
     my $bre_req = $cstore->request(
         'open-ils.cstore.direct.biblio.record_entry.search', 
         {id => \@recs},
-        {flesh => 3, flesh_fields => {bre => ['call_numbers'], acn => ['copies'], acp => ['location']}}
+        {
+            flesh => 4, 
+            flesh_fields => {
+                bre => ['call_numbers'], 
+                acn => ['copies', 'uris'], 
+                acp => ['location', 'stat_cat_entries', 'parts'],
+                ascecm => ['stat_cat', 'stat_cat_entry'],
+                acpm => ['part']
+            }
+        }
         # in practice, ^-- this might be a separate, paged json_query
         # note, not fleshing copy status since copy statuses will always be cached in the ML
     );
@@ -103,7 +156,7 @@ sub direct {
             {from => ['asset.record_copy_count', 1, $bre->id, 0]}
         );
 
-        my $xml = XML::LibXML->new->parse_string($bre->marc);
+        my $xml = XML::LibXML->new->parse_string($bre->marc)->documentElement;
         my $attrs = get_bib_attrs($xml);
         $records{$bre->id}{record} = $bre;
         $records{$bre->id}{$_} = $attrs->{$_} for keys %$attrs;
@@ -124,4 +177,5 @@ sub direct {
     print "\ndirect calls processing duration is $duration\n\n";
 }
 
-for (0..3) { direct(@recs); unapi(@recs); }
+for (0..1) { direct(@recs); unapi(@recs); unapi_batch(@recs); }
+#unapi_batch(@recs); 

commit 919dcc6f99322256139341a1bd5402c1060852a8
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Mar 30 17:41:17 2011 -0400

    essentially functioning hold editor
    
    Still needs a way to report failures to the user

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 3ad5525..ebf8f19 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -125,7 +125,7 @@ sub handle_hold_update {
     my $self = shift;
     my $action = shift;
     my $e = $self->editor;
-
+    my $url;
 
     my @hold_ids = $self->cgi->param('hold_id'); # for non-_all actions
     @hold_ids = @{$self->fetch_user_holds(undef, 1)} if $action =~ /_all/;
@@ -139,7 +139,7 @@ sub handle_hold_update {
                 'open-ils.circ.hold.cancel', $e->authtoken, $hold_id, 6 )->gather(1); # 6 == patron-cancelled-via-opac
         }
 
-    } else {
+    } elsif ($action =~ /activate|suspend/) {
         
         my $vlist = [];
         for my $hold_id (@hold_ids) {
@@ -157,10 +157,32 @@ sub handle_hold_update {
         }
 
         $circ->request('open-ils.circ.hold.update.batch.atomic', $e->authtoken, undef, $vlist)->gather(1);
+    } elsif ($action eq 'edit') {
+
+        my @vals = map {
+            my $val = {"id" => $_};
+            $val->{"frozen"} = $self->cgi->param("frozen");
+            $val->{"pickup_lib"} = $self->cgi->param("pickup_lib");
+
+            for my $field (qw/expire_time thaw_date/) {
+                # XXX TODO make this support other date formats, not just
+                # MM/DD/YYYY.
+                next unless $self->cgi->param($field) =~
+                    m:^(\d{2})/(\d{2})/(\d{4})$:;
+                $val->{$field} = "$3-$1-$2";
+            }
+            $val;
+        } @hold_ids;
+
+        $circ->request(
+            'open-ils.circ.hold.update.batch.atomic',
+            $e->authtoken, undef, \@vals
+        )->gather(1);   # LFW XXX test for failure
+        $url = 'https://' . $self->apache->hostname . $self->ctx->{opac_root} . '/myopac/holds';
     }
 
     $circ->kill_me;
-    return undef;
+    return defined($url) ? $self->generic_redirect($url) : undef;
 }
 
 sub load_myopac_holds {
@@ -174,11 +196,12 @@ sub load_myopac_holds {
     my $action = $self->cgi->param('action') || '';
     my $available = int($self->cgi->param('available') || 0);
 
-    $self->handle_hold_update($action) if $action;
+    my $hold_handle_result;
+    $hold_handle_result = $self->handle_hold_update($action) if $action;
 
     $ctx->{holds} = $self->fetch_user_holds(undef, 0, 1, $available, $limit, $offset);
 
-    return Apache2::Const::OK;
+    return defined($hold_handle_result) ? $hold_handle_result : Apache2::Const::OK;
 }
 
 sub load_place_hold {
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 6b40404..32a3c82 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -971,4 +971,9 @@ a.dash-link:hover { text-decoration: underline !important; }
 #hold_editor h1 { font-size: 120%; font-weight: bold; }
 #hold_editor h2 { font-size: 111%; font-weight: normal; text-indent: 2em; font-style: italic; }
 #hold_editor h1, #hold_editor h2 { margin: 2px 0; }
+#hold_editor_table { background-color: #ddd; padding: 0.5em; }
 #hold_editor_table th { text-align: right; padding-right: 1em; }
+#hold_editor_table td { padding: 0.25em 0; }
+.fmt-note { vertical-align: middle; padding-left: 1em !important; }
+.hold-editor-controls { text-align: center; padding-top: 1em !important; }
+.hold-editor-controls a { padding-left: 2em; }
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2
index bf30913..53e12c9 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2
@@ -24,6 +24,8 @@
 <div class="pad-bottom-five">
     <div class="header_middle">
         <span id="acct_holds_header float-left">[% l('Editing Hold') %]</span>
+        &nbsp; &nbsp; &nbsp; &nbsp;
+        <a href="[% ctx.opac_root %]/myopac/holds">[% l('List all holds') %]</a>
     </div>
     <div id="hold_editor">
         [% IF hold %]
@@ -36,11 +38,12 @@
             <p>
                 <strong>[% l('Status') %]</strong>: [% hold.human_status %]
             </p>
-            <form>
+            <form method="POST">
                 <table id="hold_editor_table">
                     <tr>
                         <th>
-                            <input type="hidden" name="hold"
+                            <input type="hidden" name="action" value="edit" />
+                            <input type="hidden" name="hold_id"
                                 value="[% ahr.id %]" />
                             [% l('Pickup library') %]
                         </th>
@@ -57,15 +60,52 @@
                             <input type="text" name="expire_time"
                                 value="[% expire_time | html %]" />
                         </td>
+                        <td class="fmt-note">
+                            <em>[% l('Enter date in MM/DD/YYYY format') %]</em>
+                            <!-- XXX TODO pick out a minimal, simple, reliable
+                            calendar widget that's not part of some giant,
+                            bloated framework and doesn't do anything at onload.
+                            -->
+                        </td>
                     </tr>
                     <tr>
                         <th>
-                            [% l('Activate on') %]
+                            [% l('Active?') %]
+                        </th>
+                        <td>
+                            <select name="frozen">
+                                <option value="f"[% ahr.frozen == 't' ? '' :' selected="selected"' %]>
+                                    [% l('Yes, this hold is active now') %]
+                                </option>
+                                <option value="t"[% ahr.frozen == 't' ? ' selected="selected"' : '' %]>
+                                    [% l('No, this hold is suspended') %]
+                                </option>
+                            </select>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th>
+                            [% l('If suspended, activate on') %]
                         </th>
                         <td>
                             <input type="text" name="thaw_date"
                                 value="[% thaw_date | html %]" />
                         </td>
+                        <td class="fmt-note">
+                            <em>[% l('Enter date in MM/DD/YYYY format') %]</em>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td colspan="2" class="hold-editor-controls">
+                            <input type="image"
+                                src="[% ctx.media_prefix %]/images/btnSubmit.png"
+                                alt="[% l('Submit') %]"
+                                title="[% l('Submit') %]" />
+                            <a href="[% ctx.opac_root %]/myopac/holds"><img
+                                src="[% ctx.media_prefix %]/images/btnCancel.png"
+                                alt="[% l('Cancel') %]"
+                                title="[% l('Cancel') %]" /></a>
+                        </td>
                     </tr>
                 </table>
             </form>
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
index d41caa1..f374db2 100644
--- a/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
@@ -22,7 +22,7 @@
                     ELSE;
                         cls_which = "off";
                     END -%]
-                <a href="[% page.url %]"
+                <a href="[% ctx.opac_root _ '/myopac/' _ page.url %]"
                     class="acct-[% page.url; '-'; cls_which %] acct-tab"></a>
                 [% END %]
             </div>

commit 929089a2f1e64729729167ab929d358dfafe7db3
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Mar 30 17:26:57 2011 -0400

    link to editor from myopac/holds

diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 4ffe75e..acced7f 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -190,11 +190,7 @@
                         </div>
                     </td>
                     <td class="opac-auto-161">
-                        <!-- XXX TODO <a name="hold_edit_link" href="#">Edit</a>
-                        <a href="#" name="hold_save_link"
-                            class="hide_me">Save</a>
-                        <a href="#" name="hold_cancel_link"
-                            class="hide_me">Back</a> -->
+                        <a href="[% ctx.opac_root %]/myopac/holds/edit?id=[% ahr.id %]">Edit</a>
                     </td>
                 </tr>
                 [% END %]

commit 9515bb77c2b704dae3749f9b78cf9387a9d141ad
Merge: 38e7694 953fd15
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Mar 30 16:12:38 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 38e76948586600c578af5a274ac8f70f2dbbb4e0
Merge: 4ac152c 1944b2c
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Mar 30 16:12:35 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 8d73eaf773bd8d5bc6f4ca6044a7b5e9d5975e05
Merge: b134448 953fd15
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Mar 30 16:02:24 2011 -0400

    Merge branch 'opac-tt-poc' of ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 953fd15e9f2a0bfb01a26d2501646c410c21aaca
Author: berick <berick at esilibrary.com>
Date:   Wed Mar 30 13:35:25 2011 -0400

    annoying typo

diff --git a/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl b/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
index 2c6713d..d916873 100755
--- a/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
+++ b/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
@@ -121,7 +121,7 @@ sub direct {
             scalar(map { @{$_->copies} } @{$rec->{record}->call_numbers}));
     }
 
-    print "\ndurect calls processing duration is $duration\n\n";
+    print "\ndirect calls processing duration is $duration\n\n";
 }
 
 for (0..3) { direct(@recs); unapi(@recs); }

commit 6a4851db9702efaba71deabaa43fd7f6fe99b6c0
Author: berick <berick at esilibrary.com>
Date:   Wed Mar 30 13:32:19 2011 -0400

    flesh copy loc. for closer match to unapi

diff --git a/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl b/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
index 9f4979e..2c6713d 100755
--- a/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
+++ b/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
@@ -89,8 +89,9 @@ sub direct {
     my $bre_req = $cstore->request(
         'open-ils.cstore.direct.biblio.record_entry.search', 
         {id => \@recs},
-        {flesh => 2, flesh_fields => {bre => ['call_numbers'], acn => ['copies']}}
+        {flesh => 3, flesh_fields => {bre => ['call_numbers'], acn => ['copies'], acp => ['location']}}
         # in practice, ^-- this might be a separate, paged json_query
+        # note, not fleshing copy status since copy statuses will always be cached in the ML
     );
 
     my @data;

commit 1e21bfcf685055bb4b2368c2bd29bb2ab7d079ec
Merge: ccf193c 4ac152c
Author: berick <berick at esilibrary.com>
Date:   Wed Mar 30 13:26:37 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit ccf193c0666c30ac3b0716e1b68430322d3d1d6f
Author: berick <berick at esilibrary.com>
Date:   Wed Mar 30 13:26:29 2011 -0400

    unapi test code

diff --git a/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl b/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
new file mode 100755
index 0000000..9f4979e
--- /dev/null
+++ b/Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
@@ -0,0 +1,126 @@
+#!/usr/bin/perl
+require '../oils_header.pl';
+use strict; use warnings;
+use Time::HiRes qw/time usleep/;
+use Data::Dumper;
+use OpenSRF::Utils::JSON;
+use OpenILS::Utils::CStoreEditor;
+use XML::LibXML;
+
+#-----------------------------------------------------------------------------
+# Does a checkout, renew, and checkin 
+#-----------------------------------------------------------------------------
+
+my @recs = (1,2,3,4,5,6,7,8,9,10);
+
+osrf_connect(shift() || '/openils/conf/opensrf_core.xml');
+
+my $e = OpenILS::Utils::CStoreEditor->new;
+
+sub xptext {
+    my($node, $path) = @_;
+    my $res = $node->findnodes($path);
+    return '' unless $res and $res->[0];
+    return $res->[0]->textContent;
+}
+
+sub get_bib_attrs {
+    my $xml = shift;
+    return {
+        isbn => xptext($xml, '//*[@tag="020"]/*[@code="a"]'),
+        upc => xptext($xml,'//*[@tag="024"]/*[@code="a"]'),
+        issn => xptext($xml,'//*[@tag="022"]/*[@code="a"]'),
+        title => xptext($xml,'//*[@tag="245"]/*[@code="a"]'),
+        author => xptext($xml,'//*[@tag="100"]/*[@code="a"]'),
+        publisher => xptext($xml,'//*[@tag="260"]/*[@code="b"]'),
+        pubdate => xptext($xml,'//*[@tag="260"]/*[@code="c"]'),
+        edition => xptext($xml,'//*[@tag="250"]/*[@code="a"]'),
+    };
+}
+
+sub unapi {
+    my @recs = @_;
+    my $start = time();
+
+    my %records;
+    for my $rec_id (@recs) {
+        #my $ustart = time;
+        # Note, fetching all 10 recs from unapi.biblio_record_entry_feed in 1 feed takes considerably longer (2+ seconds)
+        my $data = $e->json_query({from => ['unapi.biblio_record_entry_feed', "{$rec_id}", 'marcxml', '{holdings_xml,acp}', 'CONS']})->[0];
+        #print "unapi query duration " . (time() - $ustart) . "\n";
+        my $xml = XML::LibXML->new->parse_string($data->{'unapi.biblio_record_entry_feed'});
+        my $attrs = get_bib_attrs($xml);
+        $records{$rec_id}{$_} = $attrs->{$_} for keys %$attrs;
+
+        my $rvols = [];
+        for my $volnode ($xml->findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]')) {
+            my $vol = {}; 
+            $vol->{copies} = [];
+            $vol->{label} = $volnode->getAttribute('label');
+            for my $copynode ($volnode->getElementsByLocalName('copy')) {
+                my $copy = {};   
+                $copy->{barcode} = $copynode->getAttribute('barcode');
+                push(@{$vol->{copies}}, $copy);
+            }
+            push(@{$records{$rec_id}->{volumes}}, $vol);
+        }
+    }
+
+    my $duration = time() - $start;
+
+    for my $rec_id (keys %records) {
+        my $rec = $records{$rec_id};
+        print sprintf("%d [%s] has %d volumes and %d copies\n",
+            $rec_id, $rec->{title}, 
+            scalar(@{$rec->{volumes}}),
+            scalar(map { @{$_->{copies}} } @{$rec->{volumes}}));
+    }
+    print "\nunapi processing duration is $duration\n\n";
+}
+
+sub direct {
+    my @recs = @_;
+    my %records;
+
+    my $start = time();
+
+    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
+    my $cstore2 = OpenSRF::AppSession->create('open-ils.cstore');
+    my $bre_req = $cstore->request(
+        'open-ils.cstore.direct.biblio.record_entry.search', 
+        {id => \@recs},
+        {flesh => 2, flesh_fields => {bre => ['call_numbers'], acn => ['copies']}}
+        # in practice, ^-- this might be a separate, paged json_query
+    );
+
+    my @data;
+    while (my $resp = $bre_req->recv) {
+        my $bre = $resp->content;
+
+        my $cc_req = $cstore2->request(
+            'open-ils.cstore.json_query', 
+            {from => ['asset.record_copy_count', 1, $bre->id, 0]}
+        );
+
+        my $xml = XML::LibXML->new->parse_string($bre->marc);
+        my $attrs = get_bib_attrs($xml);
+        $records{$bre->id}{record} = $bre;
+        $records{$bre->id}{$_} = $attrs->{$_} for keys %$attrs;
+
+        $records{$bre->id}->{counts} = $cc_req->gather(1);
+    }
+
+    my $duration = time() - $start;
+
+    for my $rec_id (keys %records) {
+        my $rec = $records{$rec_id};
+        print sprintf("%d [%s] has %d volumes and %d copies\n",
+            $rec_id, $rec->{title}, 
+            scalar(@{$rec->{record}->call_numbers}), 
+            scalar(map { @{$_->copies} } @{$rec->{record}->call_numbers}));
+    }
+
+    print "\ndurect calls processing duration is $duration\n\n";
+}
+
+for (0..3) { direct(@recs); unapi(@recs); }

commit 4ac152cf8a4f4292e1ceafc7dfd09a732239e50e
Merge: 47d61fb 4f3cbf4
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Mar 30 09:35:03 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 47d61fb265265b852c0a8af7951dd8a4ff5eca4a
Merge: ec7ff3e 9454a2d
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Mar 29 10:31:11 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 9454a2da7ea7e74217a7e61c26891db4c996a2ba
Author: berick <berick at esilibrary.com>
Date:   Tue Mar 29 10:29:27 2011 -0400

    implemented holds history template w/ links to/from active holds page;  TODO: verify history call is returning the holds we want it to..

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 99223c1..3ad5525 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -408,6 +408,7 @@ sub load_myopac_circ_history {
     return Apache2::Const::OK;
 }
 
+# TODO: action.usr_visible_holds does not return cancelled holds.  Should it?
 sub load_myopac_hold_history {
     my $self = shift;
     my $e = $self->editor;
diff --git a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
new file mode 100644
index 0000000..e2151e2
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
@@ -0,0 +1,123 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/marc_misc.tt2";
+    WRAPPER "default/opac/parts/base.tt2" +
+        "default/opac/parts/myopac/base.tt2";
+    myopac_page = "holds"  
+    limit = CGI.param('limit') || 25;
+    offset = CGI.param('offset') || 0;
+%]
+
+<div id='myopac_holds_div'>
+
+    <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;">
+        <div class="align selected">
+            <a href='holds'><img src="[% ctx.media_prefix %]/images/sub_holds_off.jpg"/></a>
+        </div>
+        <div class="align">
+            <img src="[% ctx.media_prefix %]/images/sub_holds_hist_on.jpg"/>
+        </div>
+        <div class="clear-both"></div>
+    </div>
+
+    <div class="header_middle">
+        <span id="acct_holds_header" style="float:left;">
+            [% l("Previously Held Items") %]
+        </span>
+        <span style="float:right;">
+            <a class="hide_me" href="#">Export List</a>
+        </span>
+    </div>
+    <div class="clear-both"></div>
+
+    <div id='holds_main'>
+        [% IF ctx.holds.size < 1 %]
+        <div class="opac-auto-079">
+            <big><strong>[% l('No holds found.') %]</strong></big>
+        </div>
+        [% ELSE %]
+        <table style='border-collapse:collapse; width: 100%;'>
+            <thead id='acct_holds_main_header'>
+                <tr>
+                    <td width="138"><span>[% l('Title') %]</span></td>
+                    <td width="123"><span>[% l('Author') %]</span></td>
+                    <td width="64"> <span>[% l('Format') %]</span></td>
+                    <td width="136"><span>[% l('Pickup Location') %]</span> </td>
+                    <td width="104">[% l('Active On') %]</td>
+                    <td width="95">[% l('Active') %]</td>
+                    <td width="106">[% l('Date Fulfilled') %]</td>
+                    <td width="172"><span>[% l('Status') %]</span></td>
+                </tr>
+            </thead>
+            <tbody>
+                [% FOR hold IN ctx.holds;
+                    attrs = {marc_xml => hold.marc_xml};
+                    PROCESS get_marc_attrs args=attrs;
+                    ahr = hold.hold.hold %]
+
+                <tr id="acct_holds_temp" name="acct_holds_temp" class="acct_holds_temp">
+
+                    <td width="138">
+                        <div style="margin-top:10px;margin-bottom:10px;">
+                            <a href="[% ctx.opac_root %]/record/[% hold.hold.bre.id %]">[% attrs.title | html %]</a>
+                        </div>
+                    </td>
+                    <td width="123">
+                        <div style="margin-top:10px;margin-bottom:10px;">
+                            <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
+                        </div>
+                    </td>
+                    <td width="64">
+                        <div style="width:26px;height:23px;margin-top:6px;margin-bottom:6px;">
+                            [% IF attrs.format_icon %]
+                            <img src="[% ctx.media_prefix %]/images/[% attrs.form_icon %]"
+                                title="[% attrs.format %]" alt="[% attrs.format %]" />
+                            [% ELSE;
+                                attrs.format;
+                               END %]
+                        </div>
+                    </td>
+                    <td width="136">
+                        [% ctx.find_aou(ahr.pickup_lib).name %]
+                    </td>
+                    <td width="104">
+                        [% IF ahr.frozen == 't' AND ahr.thaw_date;
+                            date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT);
+                        END %]
+                    </td>
+                    <td width="95">
+                        [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %]
+                    </td>
+                    <td width="106">
+                        [% IF ahr.fulfillment_time;
+                            date.format(ctx.parse_datetime(ahr.fulfillment_time), DATE_FORMAT);
+                        END %]
+                    </td>
+                    <td width="110">
+                        <div name="acct_holds_status"
+                            style="margin-top:10px;margin-bottom:10px;">
+                            [%
+                                IF hold.hold.status == 4;
+                                    l("Available");
+                                    IF ahr.shelf_expire_time;
+                                        l('<br/>Expires [_1]', 
+                                            date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT));
+                                    END;
+                                ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
+                                    # estimated wait is delivered as seconds.
+                                    SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);
+                                    l("Estimated wait: [quant,_1,day,days]", hwait);
+                                ELSIF hold.hold.status == 3;
+                                    l("In Transit");
+                                ELSIF hold.hold.status < 3;
+                                    l("Waiting for copy");
+                                END;
+                            %]
+                        </div>
+                    </td>
+                </tr>
+                [% END %]
+            </tbody>
+        </table>
+        [% END %]
+    </div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index cd4ce31..f0691de 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -4,23 +4,17 @@
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "holds"  %]
 <div id='myopac_holds_div'>
-    <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;" class="hide_me">
-        <div class="align selected" id="holds_label">
-            <img src="[% ctx.media_prefix %]/images/sub_holds_on.jpg" />
-        </div>
-        <div class="align hide_me" id="holds_hist_link">
-            <a href="#"><img
-                src="[% ctx.media_prefix %]/images/sub_holds_hist_off.jpg" /></a>
+
+    <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;">
+        <div class="align selected">
+            <img src="[% ctx.media_prefix %]/images/sub_holds_on.jpg"/>
         </div>
-        <div class="align hide_me" id="holds_link">
-            <a href="#"><img
-                src="[% ctx.media_prefix %]/images/sub_holds_off.jpg" /></a>
+        <div class="align">
+            <a href='hold_history'><img src="[% ctx.media_prefix %]/images/sub_holds_hist_off.jpg"/></a>
         </div>
-        <div class="align selected hide_me" id="holds_hist_label">
-            <img src="[% ctx.media_prefix %]/images/sub_holds_hist_on.jpg" />
-        </div>	
         <div class="clear-both"></div>
     </div>
+
     <div class="header_middle">
         <span id="acct_holds_header" style="float:left;">
             [%  IF CGI.param("available");

commit ec7ff3e4f273bd202e08e60de99fd3be6378f85d
Merge: 5405d36 cae2a46
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Mar 29 10:29:16 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 5405d36625ac5358821900e0cab9a42871249e6f
Merge: 270ac10 b35bd6b
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Mar 29 10:29:15 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit cae2a462d6e1591b2ba2cb34f92b863739cca41b
Author: berick <berick at esilibrary.com>
Date:   Mon Mar 28 17:26:36 2011 -0400

    added circulation history backend and template; use |-style regex containers to reduce escapes in path checking

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 7ddec2e..b947908 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -87,25 +87,25 @@ sub load {
     (undef, $self->ctx->{mylist}) = $self->fetch_mylist unless
         $path =~ /opac\/my(opac\/lists|list)/;
 
-    return $self->load_simple("home") if $path =~ /opac\/home/;
-    return $self->load_simple("advanced") if $path =~ /opac\/advanced/;
-    return $self->load_rresults if $path =~ /opac\/results/;
-    return $self->load_record if $path =~ /opac\/record/;
+    return $self->load_simple("home") if $path =~ m|opac/home|;
+    return $self->load_simple("advanced") if $path =~ m|opac/advanced|;
+    return $self->load_rresults if $path =~ m|opac/results|;
+    return $self->load_record if $path =~ m|opac/record|;
 
-    return $self->load_mylist_add if $path =~ /opac\/mylist\/add/;
-    return $self->load_mylist_move if $path =~ /opac\/mylist\/move/;
-    return $self->load_mylist if $path =~ /opac\/mylist/;
-    return $self->load_cache_clear if $path =~ /opac\/cache\/clear/;
+    return $self->load_mylist_add if $path =~ m|opac/mylist/add|;
+    return $self->load_mylist_move if $path =~ m|opac/mylist/move|;
+    return $self->load_mylist if $path =~ m|opac/mylist|;
+    return $self->load_cache_clear if $path =~ m|opac/cache/clear|;
 
     # ----------------------------------------------------------------
     # Logout and login require SSL
     # ----------------------------------------------------------------
-    if($path =~ /opac\/login/) {
+    if($path =~ m|opac/login|) {
         return $self->redirect_ssl unless $self->cgi->https;
         return $self->load_login;
     }
 
-    if($path =~ /opac\/logout/) {
+    if($path =~ m|opac/logout|) {
         #return Apache2::Const::FORBIDDEN unless $self->cgi->https; 
         $self->apache->log->warn("catloader: logout called in non-secure context from " . 
             ($self->ctx->{referer} || '<no referer>')) unless $self->cgi->https;
@@ -118,14 +118,16 @@ sub load {
     return $self->redirect_auth
         unless $self->cgi->https and $self->editor->requestor;
 
-    return $self->load_place_hold if $path =~ /opac\/place_hold/;
-    return $self->load_myopac_holds if $path =~ /opac\/myopac\/holds/;
-    return $self->load_myopac_circs if $path =~ /opac\/myopac\/circs/;
-    return $self->load_myopac_fines if $path =~ /opac\/myopac\/main/;
-    return $self->load_myopac_update_email if $path =~ /opac\/myopac\/update_email/;
-    return $self->load_myopac_bookbags if $path =~ /opac\/myopac\/lists/;
-    return $self->load_myopac_bookbag_update if $path =~ /opac\/myopac\/list\/update/;
-    return $self->load_myopac if $path =~ /opac\/myopac/;
+    return $self->load_place_hold if $path =~ m|opac/place_hold|;
+    return $self->load_myopac_holds if $path =~ m|opac/myopac/holds|;
+    return $self->load_myopac_circs if $path =~ m|opac/myopac/circs|;
+    return $self->load_myopac_fines if $path =~ m|opac/myopac/main|;
+    return $self->load_myopac_update_email if $path =~ m|opac/myopac/update_email|;
+    return $self->load_myopac_bookbags if $path =~ m|opac/myopac/lists|;
+    return $self->load_myopac_bookbag_update if $path =~ m|opac/myopac/list/update|;
+    return $self->load_myopac_circ_history if $path =~ m|opac/myopac/circ_history|;
+    return $self->load_myopac_hold_history if $path =~ m|opac/myopac/hold_history|;
+    return $self->load_myopac if $path =~ m|opac/myopac|;
 
     return Apache2::Const::OK;
 }
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index bed70d4..99223c1 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -390,6 +390,42 @@ sub load_myopac_circs {
     return Apache2::Const::OK;
 }
 
+sub load_myopac_circ_history {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+    my $limit = $self->cgi->param('limit');
+    my $offset = $self->cgi->param('offset');
+
+    my $circs = $e->json_query({
+        from => ['action.usr_visible_circs', $e->requestor->id],
+        limit => $limit || 25,
+        offset => $offset || 0
+    });
+
+    $ctx->{circs} = $self->fetch_user_circs(1, [map { $_->{id} } @$circs], $limit, $offset);
+
+    return Apache2::Const::OK;
+}
+
+sub load_myopac_hold_history {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+    my $limit = $self->cgi->param('limit');
+    my $offset = $self->cgi->param('offset');
+
+    my $holds = $e->json_query({
+        from => ['action.usr_visible_holds', $e->requestor->id],
+        limit => $limit || 25,
+        offset => $offset || 0
+    });
+
+    $ctx->{holds} = $self->fetch_user_holds([map { $_->{id} } @$holds], 0, 1, 0, $limit, $offset);
+
+    return Apache2::Const::OK;
+}
+
 sub load_myopac_fines {
     my $self = shift;
     my $e = $self->editor;
diff --git a/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
new file mode 100644
index 0000000..e21e67f
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
@@ -0,0 +1,114 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/marc_misc.tt2";
+    WRAPPER "default/opac/parts/base.tt2" +
+        "default/opac/parts/myopac/base.tt2";
+    myopac_page = "circs";
+    limit = CGI.param('limit') || 25;
+    offset = CGI.param('offset') || 0;
+%]
+
+<div style="padding:0px;">
+    
+    <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;">
+        <div class="align selected">
+            <a href='circs'><img src="[% ctx.media_prefix %]/images/sub_checked_out_off.jpg"/></a>
+        </div>
+        <div class="align">
+            <img src="[% ctx.media_prefix %]/images/sub_checked_hist_on.jpg"/>
+        </div>
+        <div class="clear-both"></div>
+    </div>
+
+    <div class="header_middle">
+        <span class="float-left">[% l('Current Items Checked Out') %]</span>
+        <span class='float-left' style='padding-left: 10px;'>
+            [% IF offset > 0 %]
+            <a href='circ_history?limit=[% limit %]&offset=[% offset - 1 %]'>[% l('Previous') %]</a>
+            [% END %]
+            [% IF ctx.circs.size == limit %]
+            [%# TODO: get total to prevent paging off then end of the list.. %]
+            <a href='circ_history?limit=[% limit %]&offset=[% offset + 1 %]'>[% l('Next') %]</a>
+            [% END %]
+        </span>
+        <span class="float-right">
+            <a class="hide_me" href="#">[% l('Export List') %]</a>
+        </span>
+    </div>
+    <div class="clear-both"></div>
+
+    [% IF ctx.circs.size < 1 %]
+    <div class="opac-auto-079">
+        <big><strong>[% l('You have no items checked out.') %]</strong></big>
+    </div>
+    [% ELSE %]
+
+    [% IF ctx.success_renewals %]
+    <div class="renew-summary">
+        [% l("Successfully renewed [_1] item(s)", ctx.success_renewals) %]
+    </div>
+    [% END %]
+
+    [% IF ctx.failed_renewals %]
+    <div class="renew-summary red">
+        [% l("Failed to renew [_1] item(s)", ctx.failed_renewals) %]
+    </div>
+    [% END %]
+
+    <div id='checked_main'>
+        <table style='border-collapse:collapse;'>
+            <thead id="acct_checked_main_header">
+                <tr>
+                    <td width="32%" style="padding-left:5px;">
+                        <span title="Click to sort" class='pointer'>[% l('Title') %]</span> /
+                        <span title="Click to sort" class='pointer'>[% l('Author') %]</span>
+                    </td>
+                    <td width="10%" style="padding-left:5px;">
+                        <span title="Click to sort" class='pointer'>[% l('Checkout Date') %]</span>
+                    </td>
+                    <td width="10%" style="padding-left:5px;">
+                        <span title="Click to sort" class='pointer'>[% l('Due Date') %]</span>
+                    </td>
+                    <td width="10%" style="padding-left:5px;">
+                        <span title="Click to sort" class='pointer'>[% l('Date Returned') %]</span>
+                    </td>
+                    <td width="16%">
+                        <span title="Click to sort" class='pointer'>[% l('Barcode') %]</span>
+                    </td>
+                    <td width="22%">
+                        <span title="Click to sort" class='pointer'>[% l('Call Number') %]</span>
+                    </td>
+                </tr>
+            </thead>
+            <tbody>
+                [% FOR circ IN ctx.circs;
+                    attrs = {marc_xml => circ.marc_xml};
+                    PROCESS get_marc_attrs args=attrs; %]
+                    <tr>
+                        <td style="padding-left:5px;padding-bottom:10px;">
+                            <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" 
+                                name="[% l('Catalog record') %]">[% attrs.title %]</a>
+                            [% IF attrs.author %] /
+                            <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                            [% END %]
+                        </td>
+                        <td style="padding-left:5px;">
+                            [% date.format(ctx.parse_datetime(circ.circ.xact_start),DATE_FORMAT); %]
+                        </td>
+                        <td style="padding-left:5px;">
+                            [% date.format(ctx.parse_datetime(circ.circ.due_date),DATE_FORMAT); %]
+                        </td>
+                        <td style="padding-left:5px;">
+                            [% IF circ.circ.checkin_time; 
+                                date.format(ctx.parse_datetime(circ.circ.checkin_time),DATE_FORMAT); 
+                            END; %]
+                        </td>
+                        <td>[% circ.circ.target_copy.barcode %]</td>
+                        <td>[% circ.circ.target_copy.call_number.label %]</td>
+                    </tr>
+                [% END %]
+            </tbody>
+        </table>
+    </div>
+    [% END %]
+</div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 8846bdf..20c6dbf 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -4,25 +4,18 @@
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "circs"  %]
 <div id='myopac_checked_div' style="padding:0px;">
-    <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;" class="hide_me">
-        <div class="align selected" id="checked_label">
+
+    <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;">
+        <div class="align selected">
             <img src="[% ctx.media_prefix %]/images/sub_checked_out_on.jpg" />
         </div>
-        <div class="align" id="checked_hist_link">
-            <a class="" href="#"><img
+        <div class="align">
+            <a href="circ_history"><img
                 src="[% ctx.media_prefix %]/images/sub_checked_hist_off.jpg" /></a>
         </div>
-        <div class="align hide_me" id="checked_link">
-            <a href="#">
-                <img src="[% ctx.media_prefix %]/images/sub_checked_out_off.jpg" />
-            </a>
-        </div>
-        <div class="align selected hide_me" id="checked_hist_label">
-            <img src="[% ctx.media_prefix %]/images/sub_checked_hist_on.jpg" />
-        </div>    
         <div class="clear-both"></div>
     </div>
-    
+
     <div class="header_middle">
         <span class="float-left">[% l('Current Items Checked Out') %]</span>
         <span class="float-right">
@@ -150,48 +143,6 @@
         </form>
     </div>
     [% END %]
-    <div id='checked_hist' class="hide_me" style="padding-top:8px;">
-        <table id="acct_checked_hist_header" cellpadding='0' cellspacing='0'
-            border='0' width='100%'>
-            <tr>
-                <td width="45%" style="padding-left:15px;">
-                    <span title="Click to sort" class='pointer'>Title</span> /
-                    <span title="Click to sort" class='pointer'>Author</span>
-                </td>
-                <td width="22%"
-                    style="white-space:nowrap;padding-left:5px;">
-                    <span title="Click to sort" class='pointer'>Call Number</span>
-                </td>
-                <td width="11%">
-                    <span title="Click to sort" class='pointer'>Checkout</span>
-                </td>
-                <td width="11%">
-                    <span title="Click to sort" class='pointer'>Due Date</span>
-                </td>
-                <td width="11%">
-                    <span title="Click to sort" class='pointer'>Returned</span>
-                </td>
-            </tr>
-        </table>
-        <table cellpadding='0' cellspacing='0' border='0'
-            style="margin-top:5px;" width="100%">
-            <tbody id="acct_checked_hist_parent">
-                <tr id="acct_checked_hist_temp">
-                    <td width="45%"
-                        style="padding-left:15px;padding-bottom:10px;">
-                        <a href="#" name="title"></a> /
-                        <span name="author"></span>
-                    </td>
-                    <td width="22%" style="padding-left:5px;"
-                        name="call_number"></td>
-                    <td width="11%" name="checkout"></td>
-                    <td width="11%" name="due_date"></td>
-                    <td width="11%" name="returned"
-                        nowrap="nowrap" style="white-space:nowrap;"></td>
-                </tr>
-            </tbody>
-        </table>
-    </div>
     <div id='non_cat_circs_div' class='hide_me'>
         <br/>
         <div style='text-align: center'><b>[% l("Other Circulations") %]</b></div>
@@ -211,7 +162,6 @@
                 </tr>
             </tbody>
         </table>
-    <span class='hide_me' id='myopac_renew_fail'>[% l("The system is unable to renew the selected item at this time.  This usually means the item is needed to fulfill a hold.  Please see a librarian for further help.") %]</span>
-   <span class='hide_me' id='myopac_renew_fail2'>[% l("Library policy prevents the renewal of this item at this time.  Please see a librarian for further details.") %]</span>
+    </div>
 </div>
 [% END %]

commit 270ac10170d6919981e16180ccfa26b004c19ce0
Merge: 447b966 1ea8298
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Mar 28 16:34:14 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 447b966c244c51f29c18e1ba222034cac4fa69b2
Merge: 1422488 b83a77a
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Mar 25 14:40:37 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit b134448c9c5747f1e55629ed760ebe9f6a836e0e
Merge: f2e40eb 1422488
Author: senator <lebbeous at esilibrary.com>
Date:   Fri Mar 25 11:54:11 2011 -0400

    Merge branch 'opac-tt-poc' of ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 1422488dd8ba28c2d0ae7b7273f28d4dcd88f02d
Merge: 171f3ca ee225ee
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Mar 25 11:07:05 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit f2e40eb1df75dc0215965033f44473898f04dd9c
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Mar 24 18:51:09 2011 -0400

    towards an opac hold editor

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 5d402f9..6b40404 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -968,3 +968,7 @@ a.dash-link:hover { text-decoration: underline !important; }
 }
 .list-create-table-buttons input[type=image] { margin-top: 2px; }
 .result_table_format_cell { padding: 0px 10px; text-align: center; }
+#hold_editor h1 { font-size: 120%; font-weight: bold; }
+#hold_editor h2 { font-size: 111%; font-weight: normal; text-indent: 2em; font-style: italic; }
+#hold_editor h1, #hold_editor h2 { margin: 2px 0; }
+#hold_editor_table th { text-align: right; padding-right: 1em; }
diff --git a/Open-ILS/web/templates/default/opac/mylist.tt2 b/Open-ILS/web/templates/default/opac/mylist.tt2
index daccdb7..2152b52 100644
--- a/Open-ILS/web/templates/default/opac/mylist.tt2
+++ b/Open-ILS/web/templates/default/opac/mylist.tt2
@@ -1,5 +1,5 @@
 [%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/marc_misc.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
     WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = l("Record Detail") %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 8846bdf..9ef034d 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -1,5 +1,5 @@
 [%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/marc_misc.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
     WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "circs"  %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index cd4ce31..7000f30 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -1,5 +1,5 @@
 [%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/marc_misc.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
     WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "holds"  %]
@@ -192,23 +192,7 @@
                     <td width="110">
                         <div name="acct_holds_status"
                             style="margin-top:10px;margin-bottom:10px;">
-                            [%
-                                IF hold.hold.status == 4;
-                                    l("Available");
-                                    IF ahr.shelf_expire_time;
-                                        l('<br/>Expires [_1]', 
-                                            date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT));
-                                    END;
-                                ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
-                                    # estimated wait is delivered as seconds.
-                                    SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);
-                                    l("Estimated wait: [quant,_1,day,days]", hwait);
-                                ELSIF hold.hold.status == 3;
-                                    l("In Transit");
-                                ELSIF hold.hold.status < 3;
-                                    l("Waiting for copy");
-                                END;
-                            %]
+                            [% PROCESS get_hold_status hold=hold; %]
                         </div>
                     </td>
                     <td class="opac-auto-161">
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2
new file mode 100644
index 0000000..bf30913
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2
@@ -0,0 +1,77 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
+    PROCESS "default/opac/parts/org_selector.tt2";
+    WRAPPER "default/opac/parts/base.tt2" +
+        "default/opac/parts/myopac/base.tt2";
+    myopac_page = "holds"; # in this case, just for tab coloring.
+
+    hold = 0;
+    FOR h IN ctx.holds;
+        IF h.hold.hold.id == CGI.param('id');
+            hold = h;
+            ahr = hold.hold.hold;
+            attrs = {marc_xml => hold.marc_xml};
+            PROCESS get_marc_attrs args=attrs;
+            hold.human_status = PROCESS get_hold_status hold=hold;
+
+            # Do this up front to avoid verbosity later
+            expire_time = ahr.expire_time ? date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT) : '';
+            thaw_date = ahr.thaw_date ? date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT) : '';
+            LAST;
+        END;
+    END;
+%]
+<div class="pad-bottom-five">
+    <div class="header_middle">
+        <span id="acct_holds_header float-left">[% l('Editing Hold') %]</span>
+    </div>
+    <div id="hold_editor">
+        [% IF hold %]
+            <h1>[% attrs.title %]</h1>
+            <h2>[% attrs.author %]</h2>
+            [% IF attrs.format_icon %]<p>
+                <strong>[% l('Format:') %]</strong>
+                <img src="[% ctx.media_prefix %]/images/[% attrs.format_icon %]" alt="[% attrs.format %]" title="[% attrs.title %]" />
+            </p>[% END %]
+            <p>
+                <strong>[% l('Status') %]</strong>: [% hold.human_status %]
+            </p>
+            <form>
+                <table id="hold_editor_table">
+                    <tr>
+                        <th>
+                            <input type="hidden" name="hold"
+                                value="[% ahr.id %]" />
+                            [% l('Pickup library') %]
+                        </th>
+                        <td>
+                            [% PROCESS build_org_selector
+                                name='pickup_lib' value=ahr.pickup_lib %]
+                        </td>
+                    </tr>
+                    <tr>
+                        <th>
+                            [% l('Cancel unless filled by') %]
+                        </th>
+                        <td>
+                            <input type="text" name="expire_time"
+                                value="[% expire_time | html %]" />
+                        </td>
+                    </tr>
+                    <tr>
+                        <th>
+                            [% l('Activate on') %]
+                        </th>
+                        <td>
+                            <input type="text" name="thaw_date"
+                                value="[% thaw_date | html %]" />
+                        </td>
+                    </tr>
+                </table>
+            </form>
+        [% ELSE;
+            l('Hold not found');
+        END %]
+    </div>
+</div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index 1fa28f9..f661726 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -1,5 +1,5 @@
 [%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/marc_misc.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
     WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "lists"  %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index e92e17c..8f756e4 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -1,5 +1,5 @@
 [%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/marc_misc.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
     WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "main"  %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2 b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
index 22b089a..7a9c014 100644
--- a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
@@ -1,5 +1,5 @@
 [%  PROCESS "default/opac/parts/header.tt2";
-    PROCESS "default/opac/parts/marc_misc.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
     WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "update_email"  %]
diff --git a/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
similarity index 70%
rename from Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
rename to Open-ILS/web/templates/default/opac/parts/misc_util.tt2
index 8c1c4a7..482481d 100644
--- a/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2
@@ -30,4 +30,22 @@
         args.format = ctx.find_citm(mattype).value;
         args.format_icon = icon_by_format.$mattype;
     END;
+
+    BLOCK get_hold_status;
+        IF hold.hold.status == 4;
+            l("Available");
+            IF ahr.shelf_expire_time;
+                l('<br/>Expires [_1]', 
+                    date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT));
+            END;
+        ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
+            # estimated wait is delivered as seconds.
+            SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);
+            l("Estimated wait: [quant,_1,day,days]", hwait);
+        ELSIF hold.hold.status == 3;
+            l("In Transit");
+        ELSIF hold.hold.status < 3;
+            l("Waiting for copy");
+        END;
+    END;
 %]
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index f3d8ef3..1c2f8b5 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -1,4 +1,4 @@
-[%  PROCESS "default/opac/parts/marc_misc.tt2";
+[%  PROCESS "default/opac/parts/misc_util.tt2";
     attrs = {marc_xml => ctx.marc_xml};
     PROCESS get_marc_attrs args=attrs;
 %]
diff --git a/Open-ILS/web/templates/default/opac/parts/record/body.tt2 b/Open-ILS/web/templates/default/opac/parts/record/body.tt2
index 93d2bf7..f36182a 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/body.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/body.tt2
@@ -1,7 +1,7 @@
 <!-- ****************** page_rdetail.xml ***************************** -->
 [%  record = ctx.record;
     attrs = {marc_xml => ctx.marc_xml};
-    PROCESS "default/opac/parts/marc_misc.tt2";
+    PROCESS "default/opac/parts/misc_util.tt2";
     PROCESS get_marc_attrs args=attrs %]
 <div id='canvas_main' class='canvas'>
     <div id="rdetail_header" class="hide_me">[%#
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 6dfb7b8..ddafce5 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -1,4 +1,4 @@
-[%  PROCESS "default/opac/parts/marc_misc.tt2";
+[%  PROCESS "default/opac/parts/misc_util.tt2";
 
     ctx.result_start = 1 + ctx.page_size * page;
     ctx.result_stop = 1 + ctx.page_size * (page + 1);

commit 0ca8eba0ea24cc7189562ddc12e6bb94d8b2ddd2
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Mar 24 17:16:21 2011 -0400

    KCLS doesn't show an abstract high on the record detail page.
    
    This is just a little juggling to reflect that

diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index c60c248..a62508d 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -88,19 +88,19 @@
                         </tr>
                         <tr>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
+                                <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
                             </td>
-                            <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
+                            <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_sum_lbl">Summary</strong>
+                                <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
                             </td>
-                            <td valign="top" id='rdetail_abstract'></td>
+                            <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
                         </tr>
                         <tr>
-                            <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
+                            <!--<td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_sum_lbl">Summary</strong>
                             </td>
-                            <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
+                            <td valign="top" id='rdetail_abstract'></td>-->
                             [% BLOCK render_subject;
                             loc = CGI.param('loc') | uri;
                             FOR node IN ctx.marc_xml.findnodes('//*[starts-with(@tag,"6")]');
@@ -132,7 +132,7 @@
                             <td nowrap='nowrap' valign="top">
                                 <strong id="rdetail_sub_lbl">[% l("Subjects") %]</strong>
                             </td>
-                            <td valign="top">[% s %]</td>
+                            <td valign="top" colspan="3">[% s %]</td>
                             [% END %]
                         </tr>
                     </table>

commit 171f3cabec25b6fe2473dede7fbda64f2092cbcb
Merge: 48805c1 4ea25cc
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu Mar 24 10:32:45 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 4ea25cce411e9df166bbef255fed6086994b7f69
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Mar 23 16:57:37 2011 -0400

    Ability to move records from temp list to bookbag

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index ebfbbec..7ddec2e 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -93,7 +93,7 @@ sub load {
     return $self->load_record if $path =~ /opac\/record/;
 
     return $self->load_mylist_add if $path =~ /opac\/mylist\/add/;
-    return $self->load_mylist_del if $path =~ /opac\/mylist\/del/;
+    return $self->load_mylist_move if $path =~ /opac\/mylist\/move/;
     return $self->load_mylist if $path =~ /opac\/mylist/;
     return $self->load_cache_clear if $path =~ /opac\/cache\/clear/;
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index e92a4bd..bed70d4 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -508,26 +508,30 @@ sub load_myopac_bookbags {
     # get unique record IDs
     my %rec_ids = ();
     foreach my $bbag (@{$ctx->{bookbags}}) {
-        foreach my $item_id (map { $_->id } @{$bbag->items}) {
-            $rec_ids{$item_id} = 1;
+        foreach my $rec_id (
+            map { $_->target_biblio_record_entry } @{$bbag->items}
+        ) {
+            $rec_ids{$rec_id} = 1;
         }
     }
 
-    $ctx->{bookbags_marc_xml} = $self->fetch_marc_xml_by_id(keys %rec_ids);
+    $ctx->{bookbags_marc_xml} = $self->fetch_marc_xml_by_id([keys %rec_ids]);
 
     return Apache2::Const::OK;
 }
 
 
 # actions are create, delete, show, hide, rename, add_rec, delete_item
-# CGI is action, list=list_id, add_rec=bre_id, del_item=bucket_item_id, name=new_bucket_name
+# CGI is action, list=list_id, add_rec/record=bre_id, del_item=bucket_item_id, name=new_bucket_name
 sub load_myopac_bookbag_update {
-    my $self = shift;
+    my ($self, $action, $list_id) = @_;
     my $e = $self->editor;
     my $cgi = $self->cgi;
-    my $action = $cgi->param('action');
-    my $list_id = $cgi->param('list');
-    my $add_rec = $cgi->param('add_rec');
+
+    $action ||= $cgi->param('action');
+    $list_id ||= $cgi->param('list');
+
+    my @add_rec = $cgi->param('add_rec') || $cgi->param('record');
     my @del_item = $cgi->param('del_item');
     my $shared = $cgi->param('shared');
     my $name = $cgi->param('name');
@@ -577,11 +581,14 @@ sub load_myopac_bookbag_update {
         }
 
     } elsif($action eq 'add_rec') {
-        my $item = Fieldmapper::container::biblio_record_entry_bucket_item->new;
-        $item->bucket($list_id);
-        $item->target_biblio_record_entry($add_rec);
-        $success = $U->simplereq('open-ils.actor', 
-            'open-ils.actor.container.item.create', $e->authtoken, 'biblio', $item);
+        foreach my $add_rec (@add_rec) {
+            my $item = Fieldmapper::container::biblio_record_entry_bucket_item->new;
+            $item->bucket($list_id);
+            $item->target_biblio_record_entry($add_rec);
+            $success = $U->simplereq('open-ils.actor', 
+                'open-ils.actor.container.item.create', $e->authtoken, 'biblio', $item);
+            last unless $success;
+        }
 
     } elsif($action eq 'del_item') {
         foreach (@del_item) {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
index 38a1664..7f87104 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
@@ -56,8 +56,8 @@ sub load_mylist_add {
     return $self->mylist_action_redirect($cache_key);
 }
 
-# Removes a record ID from My List
-sub load_mylist_del {
+# Removes a record ID from My List, or moves to an actual bookbag
+sub load_mylist_move {
     my $self = shift;
     my @rec_ids = $self->cgi->param('record');
 
@@ -73,6 +73,12 @@ sub load_mylist_del {
         $cache_key, ANON_CACHE_MYLIST, \@keep
     );
 
+    if ($self->ctx->{user} and $self->cgi->param('action') =~ /^\d+$/) {
+        # in this case, action becomes list_id
+        $self->load_myopac_bookbag_update('add_rec', $self->cgi->param('action'));
+        # XXX TODO: test for failure of above
+    }
+
     return $self->mylist_action_redirect($cache_key);
 }
 
diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index db43f54..81d8632 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -161,6 +161,8 @@
 #search_box { width: 162px; }
 .opac-auto-178 { width: 174px; }
 .opac-auto-179 { width: 175px; margin-right: 11px; }
+.opac-auto-179 optgroup { margin-left: 1em; font-weight: normal; font-style: italic; }
+.opac-auto-179-inner-option { margin-left: 2em; } /* XXX ".opac-auto-179 optgroup option" doesn't work!? */
 .opac-auto-180 { width: 182px; color: black; padding: 5px 25px; }
 .opac-auto-181 { width: 195px; }
 .opac-auto-182 { width: 230px; text-align: left; margin-top: 3px; }
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index b72a97f..1fa28f9 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -113,11 +113,11 @@
                         </td></tr>
                         [% END %]
                         [% FOR item IN bbag.items;
-                            item_id = item.id;
-                            attrs = {marc_xml => ctx.bookbags_marc_xml.$item_id};
+                            rec_id = item.target_biblio_record_entry;
+                            attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
                             PROCESS get_marc_attrs args=attrs %]
                         <tr>
-                            <td class="opac-auto-097b" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item_id %]" /></td>
+                            <td class="opac-auto-097b" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" /></td>
                             <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title %]</td>
                             <td class="opac-auto-097b">[% attrs.author %]</td>
                         </tr>
diff --git a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2 b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
index cc06a0d..8fb8258 100644
--- a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
@@ -1,5 +1,5 @@
         [% IF ctx.mylist.size %]
-        <form action="[% ctx.opac_root %]/mylist/del" method="POST">
+        <form action="[% ctx.opac_root %]/mylist/move" method="POST">
         <div id='acct_list_template2'>
             <div style="width:100%">
                 <table cellpadding="0" cellspacing="0" border="0">
@@ -29,6 +29,13 @@
                                 <option>[% l('-- Actions for this list --') %]</option>
                                 <!-- XXX not ready <option value="hold">[% l('Place Hold') %]</option> -->
                                 <option value="delete">[% l('Remove Items') %]</option>
+                                [% IF ctx.user AND ctx.bookbags.size %]
+                                <optgroup label="Move selected items to">
+                                    [% FOR bbag IN ctx.bookbags %]]
+                                    <option value="[% bbag.id %]" class="opac-auto-179-inner-option">[% bbag.name %]</option>
+                                    [% END %]
+                                </optgroup>
+                                [% END %]
                             </select>
                             <input type="submit" value="[% l('Go') %]" />
                         </td>

commit 6919cad45f384eaa6936082635c52a3fb796f5cb
Merge: f9c5ccd c8fa709
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Mar 23 10:32:49 2011 -0400

    Merge branch 'master' of ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 48805c1e437c9f8cc2198e2d4dac60fdd8ccc2b8
Merge: 58c7e68 f9c5ccd
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Mar 23 10:10:25 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 58c7e684448c0c0f6e85b8f8ff546f21931098e6
Merge: 5266e8e c8fa709
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Mar 23 10:10:24 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit f9c5ccdc2d5c2c60d9cd0f632eb34de0671bf601
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Mar 22 18:00:11 2011 -0400

    Show format icons in results and record detail pages

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 33040f4..5d402f9 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -967,3 +967,4 @@ a.dash-link:hover { text-decoration: underline !important; }
     border-bottom: 1px dotted #666;
 }
 .list-create-table-buttons input[type=image] { margin-top: 2px; }
+.result_table_format_cell { padding: 0px 10px; text-align: center; }
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index aa34ab5..10788fa 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -22,31 +22,31 @@
     is_advanced = CGI.param("_adv").size;
 
     formats = [  # XXX KCLS-specific
-        {'code' => 'a', 'name' => 'Book', 'image' => 'media_book.jpg'},
-        {'code' => 'i', 'name' => 'Book on cassette', 'image' => 'media_bookoncasset.jpg'},
-        {'code' => 'n', 'name' => 'Book on CD', 'image' => 'media_bookoncd.jpg'},
+        {'code' => 'a', 'name' => 'Book', 'image' => 'media_book.png'},
+        {'code' => 'i', 'name' => 'Book on cassette', 'image' => 'media_bookoncassette.png'},
+        {'code' => 'n', 'name' => 'Book on CD', 'image' => 'media_bookoncd.png'},
         {'code' => 'x', 'name' => 'Download music', 'image' => 'media_downloadmusic.jpg'},
         {'code' => 'y', 'name' => 'Download video', 'image' => 'media_downloadvideo.jpg'},
         {'code' => 'h', 'name' => 'DVD', 'image' => 'media_dvd.jpg'},
-        {'code' => 'w', 'name' => 'eBook - Audio', 'image' => 'media_eaudio.jpg'},
-        {'code' => 'v', 'name' => 'eBook - Text', 'image' => 'media_ebooktext.jpg'},
-        {'code' => 'e', 'name' => 'Equipment', 'image' => 'media_equipment.jpg'},
-        {'code' => 'f', 'name' => 'Films', 'image' => 'media_films.jpg'},
+        {'code' => 'w', 'name' => 'eBook - Audio', 'image' => 'media_eaudio.png'},
+        {'code' => 'v', 'name' => 'eBook - Text', 'image' => 'media_ebooktext.png'},
+        {'code' => 'e', 'name' => 'Equipment', 'image' => 'media_equipment.png'},
+        {'code' => 'f', 'name' => 'Films', 'image' => 'media_films.png'},
         {'code' => 'o', 'name' => 'Kit', 'image' => 'media_kit.jpg'},
         {'code' => 'q', 'name' => 'Large print', 'image' => 'media_largeprint.jpg'},
-        {'code' => 'b', 'name' => 'Magazine', 'image' => 'media_magazines.jpg'},
+        {'code' => 'b', 'name' => 'Magazine', 'image' => 'media_magazines.png'},
         {'code' => 'd', 'name' => 'Microform', 'image' => 'media_microform.jpg'},
         {'code' => 'k', 'name' => 'Music cassette', 'image' => 'media_musiccassette.jpg'},
-        {'code' => 'j', 'name' => 'Music CD', 'image' => 'media_musiccd.jpg'},
-        {'code' => 'l', 'name' => 'Music LP', 'image' => 'media_musicrecord.jpg'},
+        {'code' => 'j', 'name' => 'Music CD', 'image' => 'media_musiccd.png'},
+        {'code' => 'l', 'name' => 'Music LP', 'image' => 'media_musicrecord.png'},
         {'code' => 'p', 'name' => 'Newspaper', 'image' => 'media_newspaper.jpg'},
         {'code' => 't', 'name' => 'Online', 'image' => 'media_online.jpg'},
         {'code' => 'u', 'name' => 'Player', 'image' => 'media_eaudio.jpg'},
         {'code' => 'c', 'name' => 'Printed music / scores', 'image' => 'media_printedmusic.jpg'},
-        {'code' => '2', 'name' => 'Read along with cassette', 'image' => 'media_cassettewithbook.jpg'},
-        {'code' => '5', 'name' => 'Read along with CD', 'image' => 'media_cdwithbook.jpg'},
+        {'code' => '2', 'name' => 'Read along with cassette', 'image' => 'media_cassettewithbook.png'},
+        {'code' => '5', 'name' => 'Read along with CD', 'image' => 'media_cdwithbook.png'},
         {'code' => 'm', 'name' => 'Software', 'image' => 'media_software.jpg'},
-        {'code' => 'g', 'name' => 'Video', 'image' => ''},
+        {'code' => 'g', 'name' => 'Video', 'image' => 'media_films.png'},
         {'code' => 'r', 'name' => '3-D Object', 'image' => 'media_3dobject.jpg'},
         {'code' => 'z', 'name' => 'Map', 'image' => 'media_map.jpg'},
         {'code' => 's', 'name' => 'Slide set', 'image' => 'media_slide.jpg'}
diff --git a/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2 b/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
index 8f56196..8c1c4a7 100644
--- a/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
@@ -26,8 +26,8 @@
         # KCLS-specific stuff; needs to change
         args.mattype = xml.findnodes('//*[@tag="998"]/*[@code="d"]').textContent;
         args.kcls_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent;
-        mattype = attrs.mattype;
+        mattype = args.mattype;
         args.format = ctx.find_citm(mattype).value;
-        args.format_icon = icon_by_mattype.$mattype;
+        args.format_icon = icon_by_format.$mattype;
     END;
 %]
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index f151888..c60c248 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -59,7 +59,10 @@
                                     </div>
                                 </div>
                                 <div style="float:right;margin-right:17px;">
-                                    <img id="rdetail_tor_pic" alt="[% l('Format') %]" class="hide_me" src="" />
+                                    [% IF attrs.format %]
+                                    <img alt="[% attrs.format %]"
+                                        src="[% ctx.media_prefix %]/images/[% attrs.format_icon %]" />
+                                    [% END %]
                                 </div>
                             </div>
                         </td>
@@ -82,16 +85,6 @@
                                 <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
                             </td>
                             <td valign="top" id='rdetail_edition'>[% attrs.edition %]</td>
-                            <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_form_lbl">[% IF attrs.format; l("Format"); END %]</strong>
-                            </td>
-                            <td valign="top">
-                                [% IF attrs.format %]
-                                <img alt="[% l('Format') %]" class='tor_pic'
-                                    title="[% attrs.format %]"
-                                    src="[% ctx.media_prefix _ '/images/' _ attrs.format_icon %]" />
-                                [%  END %]
-                            </td>
                         </tr>
                         <tr>
                             <td nowrap='nowrap' valign="top">
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 90b2548..6dfb7b8 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -155,9 +155,10 @@
                                             <td nowrap='nowrap' name="copy_count_cell"
                                                 class='copy_count_cell hide_me' width="1"> </td>
                                             <td name='result_table_format_cell'
-                                                class='result_table_format_cell' align="center" width="1"
-                                                style="padding:0px 10px;">
-                                                <img alt="Format" src="" class="hide_me" name="" />
+                                                class='result_table_format_cell' width="1">
+                                                [% IF attrs.format %]
+                                                <img alt="[% attrs.format %]" src="[% ctx.media_prefix %]/images/[% attrs.format_icon %]" />
+                                                [% END %]
                                                 <span class='hide_me opac-auto-031'>
                                                     <span>[% l("Match Score: ") %] </span>
                                                     <span name='relevancy_span'> </span>

commit 5266e8e22f5d8da51d8b00bccb35a559fa971267
Merge: 8271d64 eb78a8d
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Mar 22 11:12:41 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 8271d64b043b72c963d1aa009689abac7cf0151d
Merge: 2e8e4b1 e66e834
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Mar 21 12:51:56 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 2e8e4b1691cbb7f1373f6800f35aac5ac7a08962
Merge: 974f17f 8489b8e
Author: Mike Rylander <mrylander at gmail.com>
Date:   Sat Mar 19 09:38:22 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 974f17f7b1f6075f7d68c00c0e09b72c084ec8e3
Merge: a0537b4 893e821
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Mar 18 16:13:10 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit a0537b400481d99866172108221e0d64b8ae448d
Merge: 091c8f4 e6335c2
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Mar 18 16:13:07 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 893e821b784327fd8bb1d0dd2a7422b9dc45e4c6
Author: berick <berick at esilibrary.com>
Date:   Fri Mar 18 14:38:59 2011 -0400

    updated code comments

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
index fdf5abc..9e67dda 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
@@ -1800,7 +1800,7 @@ sub create_circ_chain_summary {
 
 # Returns "mra" attribute key/value pairs for a set of bre's
 # Takes a list of bre IDs, returns a hash of hashes,
-# {bre1=> {key1 => value1, key2 => value2, ...}, bre2 => {...}, ...}
+# {bre_id1 => {key1 => {code => value1, label => label1}, ...}...}
 my $ccvm_cache;
 sub get_bre_attrs {
     my ($class, $bre_ids, $e) = @_;

commit 57dbda297636895f2b9d715ba868c25a05c5fe9e
Author: berick <berick at esilibrary.com>
Date:   Fri Mar 18 14:31:07 2011 -0400

    in bib attr (mra) fetcher, get the display label from the ccvm where appropriate and add to response object

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
index e2b967f..fdf5abc 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
@@ -1801,6 +1801,7 @@ sub create_circ_chain_summary {
 # Returns "mra" attribute key/value pairs for a set of bre's
 # Takes a list of bre IDs, returns a hash of hashes,
 # {bre1=> {key1 => value1, key2 => value2, ...}, bre2 => {...}, ...}
+my $ccvm_cache;
 sub get_bre_attrs {
     my ($class, $bre_ids, $e) = @_;
     $e = $e || OpenILS::Utils::CStoreEditor->new;
@@ -1834,8 +1835,19 @@ sub get_bre_attrs {
 
     return $attrs unless $mra;
 
+    $ccvm_cache = $ccvm_cache || $e->search_config_coded_value_map({id => {'!=' => undef}});
+
     for my $id (@$bre_ids) {
-        $attrs->{$id} = { map {$_->{key} => $_->{value}} grep { $_->{bre} eq $id } @$mra };
+        $attrs->{$id} = {};
+        for my $mra (grep { $_->{bre} eq $id } @$mra) {
+            my $ctype = $mra->{key};
+            my $code = $mra->{value};
+            $attrs->{$id}->{$ctype} = {code => $code};
+            if($code) {
+                my ($ccvm) = grep { $_->ctype eq $ctype and $_->code eq $code } @$ccvm_cache;
+                $attrs->{$id}->{$ctype}->{label} = $ccvm->value if $ccvm;
+            }
+        }
     }
 
     return $attrs;

commit 091c8f47fd12b16a8edeca0148d503fd682b6404
Merge: b6e0083 d733893
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Mar 18 14:11:20 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit b6e0083d4f6bee54c65af34d25fe6c5a20f96cfa
Merge: 0e098c9 a14e797
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Mar 18 14:11:18 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit d733893311a7e6551404c87dc95460d7273742e4
Merge: 2e26706 0e098c9
Author: berick <berick at esilibrary.com>
Date:   Fri Mar 18 12:08:26 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 2e26706f639964f7c9471b90c79f05b1f941867b
Author: berick <berick at esilibrary.com>
Date:   Fri Mar 18 12:08:20 2011 -0400

    removed debug log message

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
index 38a9755..38a1664 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
@@ -31,7 +31,6 @@ sub fetch_mylist {
         }
     }
 
-    $self->apache->log->info("Found anon-cache list [@$list]");
     my $marc_xml;
     if ($with_marc_xml) {
         $marc_xml = $self->fetch_marc_xml_by_id($list);

commit 22691a46b80494eb459003da63b37f7fd2677dee
Author: berick <berick at esilibrary.com>
Date:   Fri Mar 18 12:08:06 2011 -0400

    make all field_safe classes accessible via fetch/cache by default.  reduce page churn by creating then caching the fetch/cache and org-tree generator funcs and simply inserting them into the page context on each page load.  IOW, no need to redefine the funcs on each page load

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 35e41fc..18fc5ce 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -7,7 +7,8 @@ use OpenILS::Utils::Fieldmapper;
 use OpenILS::Application::AppUtils;
 my $U = 'OpenILS::Application::AppUtils';
 
-our %cache = (
+my $ro_object_subs; # cached subs
+our %cache = ( # cached data
     map => {aou => {}}, # others added dynamically as needed
     list => {},
     org_settings => {}
@@ -18,42 +19,46 @@ sub init_ro_object_cache {
     my $e = $self->editor;
     my $ctx = $self->ctx;
 
-    # fetch-on-demand-and-cache subs for commonly used public data
-    my @public_classes = qw/ccs aout cifm citm clm cmf crahp/;
+    if($ro_object_subs) {
+        # subs have been built.  insert into the context then move along.
+        $ctx->{$_} = $ro_object_subs->{$_} for keys %$ro_object_subs;
+        return;
+    }
 
-    for my $hint (@public_classes) {
+    # make all "field_safe" classes accesible by default in the template context
+    my @classes = grep {
+        ($Fieldmapper::fieldmap->{$_}->{field_safe} || '') =~ /true/i
+    } keys %{ $Fieldmapper::fieldmap };
 
-        my ($class) = grep {
-            $Fieldmapper::fieldmap->{$_}->{hint} eq $hint
-        } keys %{ $Fieldmapper::fieldmap };
+    for my $class (@classes) {
 
-        my $ident_field =  $Fieldmapper::fieldmap->{$class}->{identity};
+        my $hint = $Fieldmapper::fieldmap->{$class}->{hint};
+        next if $hint eq 'aou'; # handled separately
 
-	    $class =~ s/Fieldmapper:://o;
-	    $class =~ s/::/_/g;
+        my $ident_field =  $Fieldmapper::fieldmap->{$class}->{identity};
+        (my $eclass = $class) =~ s/Fieldmapper:://o;
+        $eclass =~ s/::/_/g;
 
-        # copy statuses
-        my $list_key = $hint . '_list';
+        my $list_key = "${hint}_list";
         my $find_key = "find_$hint";
 
-        $ctx->{$list_key} = sub {
-            my $method = "retrieve_all_$class";
+        $ro_object_subs->{$list_key} = sub {
+            my $method = "retrieve_all_$eclass";
             $cache{list}{$hint} = $e->$method() unless $cache{list}{$hint};
             return $cache{list}{$hint};
         };
     
         $cache{map}{$hint} = {} unless $cache{map}{$hint};
 
-        $ctx->{$find_key} = sub {
+        $ro_object_subs->{$find_key} = sub {
             my $id = shift;
             return $cache{map}{$hint}{$id} if $cache{map}{$hint}{$id}; 
-            ($cache{map}{$hint}{$id}) = grep { $_->$ident_field eq $id } @{$ctx->{$list_key}->()};
+            ($cache{map}{$hint}{$id}) = grep { $_->$ident_field eq $id } @{$ro_object_subs->{$list_key}->()};
             return $cache{map}{$hint}{$id};
         };
-
     }
 
-    $ctx->{aou_tree} = sub {
+    $ro_object_subs->{aou_tree} = sub {
 
         # fetch the org unit tree
         unless($cache{aou_tree}) {
@@ -69,12 +74,12 @@ sub init_ro_object_cache {
             # and simultaneously set the id => aou map cache
             sub flesh_aout {
                 my $node = shift;
-                my $ctx = shift;
-                $node->ou_type( $ctx->{find_aout}->($node->ou_type) );
+                my $ro_object_subs = shift;
+                $node->ou_type( $ro_object_subs->{find_aout}->($node->ou_type) );
                 $cache{map}{aou}{$node->id} = $node;
-                flesh_aout($_, $ctx) foreach @{$node->children};
+                flesh_aout($_, $ro_object_subs) foreach @{$node->children};
             };
-            flesh_aout($tree, $ctx);
+            flesh_aout($tree, $ro_object_subs);
 
             $cache{aou_tree} = $tree;
         }
@@ -83,14 +88,14 @@ sub init_ro_object_cache {
     };
 
     # Add a special handler for the tree-shaped org unit cache
-    $ctx->{find_aou} = sub {
+    $ro_object_subs->{find_aou} = sub {
         my $org_id = shift;
-        $ctx->{aou_tree}->(); # force the org tree to load
+        $ro_object_subs->{aou_tree}->(); # force the org tree to load
         return $cache{map}{aou}{$org_id};
     };
 
     # turns an ISO date into something TT can understand
-    $ctx->{parse_datetime} = sub {
+    $ro_object_subs->{parse_datetime} = sub {
         my $date = shift;
         $date = DateTime::Format::ISO8601->new->parse_datetime(cleanse_ISO8601($date));
         return sprintf(
@@ -105,7 +110,7 @@ sub init_ro_object_cache {
     };
 
     # retrieve and cache org unit setting values
-    $ctx->{get_org_setting} = sub {
+    $ro_object_subs->{get_org_setting} = sub {
         my($org_id, $setting) = @_;
 
         $cache{org_settings}{$org_id} = {} 
@@ -117,6 +122,8 @@ sub init_ro_object_cache {
 
         return $cache{org_settings}{$org_id}{$setting};
     };
+
+    $ctx->{$_} = $ro_object_subs->{$_} for keys %$ro_object_subs;
 }
 
 sub generic_redirect {

commit 7613709693666000135290861d04c0c0c8d4ecac
Author: berick <berick at esilibrary.com>
Date:   Fri Mar 18 12:05:34 2011 -0400

    added field_safe attr to ccs, aout, and crahp classes;  capture field_safe attr during IDL parsing

diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml
index 3047e2a..6d3cf94 100644
--- a/Open-ILS/examples/fm_IDL.xml
+++ b/Open-ILS/examples/fm_IDL.xml
@@ -2568,7 +2568,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
             </actions>
         </permacrud>
 	</class>
-	<class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status">
+	<class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
 		<fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
 			<field name="holdable" reporter:datatype="bool"/>
 			<field name="id" reporter:selector="name" reporter:datatype="id"/>
@@ -4330,7 +4330,7 @@ SELECT  usr,
 			<link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
 		</links>
 	</class>
-	<class id="aout" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type" reporter:label="Organizational Unit Type">
+	<class id="aout" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type" reporter:label="Organizational Unit Type" oils_persist:field_safe="true">
 		<fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
 			<field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
 			<field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
@@ -4757,7 +4757,7 @@ SELECT  usr,
 		</permacrud>
 	</class>
 
-	<class id="crahp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::age_hold_protect" oils_persist:tablename="config.rule_age_hold_protect" reporter:label="Age Hold Protection Rule">
+	<class id="crahp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::age_hold_protect" oils_persist:tablename="config.rule_age_hold_protect" reporter:label="Age Hold Protection Rule" oils_persist:field_safe="true">
 		<fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
 			<field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
 			<field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/Fieldmapper.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/Fieldmapper.pm
index bb582dc..e1bebb7 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/Fieldmapper.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/Fieldmapper.pm
@@ -160,6 +160,7 @@ sub load_class {
 		$tablename = '';
 	}
 	my $restrict_primary = get_attribute( $attribute_list, 'oils_persist:restrict_primary' );
+	my $field_safe = get_attribute( $attribute_list, 'oils_persist:field_safe' );
 
 	# Load the attributes into the Fieldmapper --------------------
 
@@ -170,6 +171,7 @@ sub load_class {
 	$$fieldmap{$fm}{ table }            = $tablename;
 	$$fieldmap{$fm}{ controller }       = [ split ' ', $controller ];
 	$$fieldmap{$fm}{ restrict_primary } = $restrict_primary;
+	$$fieldmap{$fm}{ field_safe }       = $field_safe;
 
 	# Load fields and links
 

commit 0e098c97a3edf4cb077f23f1c8d00831069195e0
Merge: 4d2aac0 254a9ff
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Mar 18 11:55:17 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 4d2aac0b70aeae76f38833601991e27822a2e682
Merge: 5cf8694 096f547
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Mar 18 11:20:39 2011 -0400

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 5cf869492d4a0d651314873bb6cfcd0726d40519
Merge: e46f316 79eec7c
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Mar 18 11:20:38 2011 -0400

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 096f54787a69c1460861a8803a579616d844b401
Author: berick <berick at esilibrary.com>
Date:   Fri Mar 18 11:05:48 2011 -0400

    added utility func for fetching extracted bre svf attributes (mra's)

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
index ec5c56f..e2b967f 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
@@ -1797,5 +1797,49 @@ sub create_circ_chain_summary {
     return $obj;
 }
 
+
+# Returns "mra" attribute key/value pairs for a set of bre's
+# Takes a list of bre IDs, returns a hash of hashes,
+# {bre1=> {key1 => value1, key2 => value2, ...}, bre2 => {...}, ...}
+sub get_bre_attrs {
+    my ($class, $bre_ids, $e) = @_;
+    $e = $e || OpenILS::Utils::CStoreEditor->new;
+
+    my $attrs = {};
+    return $attrs unless defined $bre_ids;
+    $bre_ids = [$bre_ids] unless ref $bre_ids;
+
+    my $mra = $e->json_query({
+        select => {
+            mra => [
+                {
+                    column => 'id',
+                    alias => 'bre'
+                }, {
+                    column => 'attrs',
+                    transform => 'each',
+                    result_field => 'key',
+                    alias => 'key'
+                },{
+                    column => 'attrs',
+                    transform => 'each',
+                    result_field => 'value',
+                    alias => 'value'
+                }
+            ]
+        },
+        from => 'mra',
+        where => {id => $bre_ids}
+    });
+
+    return $attrs unless $mra;
+
+    for my $id (@$bre_ids) {
+        $attrs->{$id} = { map {$_->{key} => $_->{value}} grep { $_->{bre} eq $id } @$mra };
+    }
+
+    return $attrs;
+}
+
 1;
 

commit 050ad318805e2ef1db0bca8e7401e9e867e4aaa5
Author: berick <berick at esilibrary.com>
Date:   Thu Mar 17 16:32:06 2011 -0400

    as was recently done w/ existing kcls skin; hide the open transaction summary info in my-account, citing confusion and unnecessary additional information.  note, you can still see total balance owed

diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index b2e4a2f..e92e17c 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -103,6 +103,8 @@
             </div>
         </div>
         <div class="clear-both"></div>
+
+        <!-- open transaction summary;  
         <div id='myopac_fines_div'>
             <table width='100%' class='data_grid data_grid_center'>
                 <thead class='color_3'>
@@ -125,6 +127,8 @@
                     </tr>
                 </tbody>
             </table>
+        -->
+
         <!--
         <div id='accrue_explanation' class='hide_me'>
             <span>Transactions whose balances are marked with a</span>

commit f4c865e90b88ad5d2d24212e7d41b60ff1a16a88
Author: berick <berick at esilibrary.com>
Date:   Thu Mar 17 16:22:31 2011 -0400

    avoid adding site() to query if loc param is empty string

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 7a4d491..272a3fc 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -78,7 +78,7 @@ sub _prepare_biblio_search {
     }
 
     my $site = $cgi->param('loc');
-    if (defined($site) and ($site ne $ctx->{aou_tree}->()->id) and not $query =~ /site\(\d+\)/) {
+    if (defined($site) and $site ne '' and ($site ne $ctx->{aou_tree}->()->id) and not $query =~ /site\(\d+\)/) {
         $query .= " site($site)";
     }
     if (defined($cgi->param('depth')) and not $query =~ /depth\(\d+\)/) {

commit d60a6f262a786676ec9bff38dad3cb247b104222
Author: berick <berick at esilibrary.com>
Date:   Thu Mar 17 16:03:48 2011 -0400

    if there, show shelf expire date for available holds; minor var cleanup

diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index d0dd325..cd4ce31 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -133,11 +133,12 @@
             <tbody id="holds_temp_parent">
                 [% FOR hold IN ctx.holds;
                     attrs = {marc_xml => hold.marc_xml};
-                    PROCESS get_marc_attrs args=attrs %]
+                    PROCESS get_marc_attrs args=attrs;
+                    ahr = hold.hold.hold %]
                 <tr id="acct_holds_temp" name="acct_holds_temp"
                     class="acct_holds_temp">
                     <td width="36" align="center" style="text-align:center;">
-                        <input type="checkbox" name="hold_id" value="[% hold.hold.hold.id %]" />
+                        <input type="checkbox" name="hold_id" value="[% ahr.id %]" />
                     </td>
                     <td width="138">
                         <div style="margin-top:10px;margin-bottom:10px;">
@@ -160,24 +161,24 @@
                         </div>
                     </td>
                     <td width="136">
-                        [% ctx.find_aou(hold.hold.hold.pickup_lib).name %]
+                        [% ctx.find_aou(ahr.pickup_lib).name %]
                     </td>
                     <td width="104">
                         <!-- <input
                             title="Enter a date (e.g. 10/21/2010)"
                             class="hide_me" style="width:91px;"
                             name="activate_box" type="text" /> -->
-                        [% IF hold.hold.hold.frozen == 't' AND
-                                hold.hold.hold.thaw_date;
-                            date.format(ctx.parse_datetime(hold.hold.hold.thaw_date), DATE_FORMAT);
+                        [% IF ahr.frozen == 't' AND
+                                ahr.thaw_date;
+                            date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT);
                         END %]
                     </td>
                     <td width="106">
                         <!-- <input title="[% l('Enter a date (e.g. 10/21/2010)') %]"
                             class="hide_me" style="width:91px;"
                             name="hold_expires_box" type="text" />-->
-                        [% IF hold.hold.hold.expire_time;
-                            date.format(ctx.parse_datetime(hold.hold.hold.expire_time), DATE_FORMAT);
+                        [% IF ahr.expire_time;
+                            date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT);
                         END %]
                     </td>
                     <td width="95">
@@ -186,7 +187,7 @@
                             <option value="f">Active</option>
                             <option value="t">Suspended</option>
                         </select> -->
-                        [% l(hold.hold.hold.frozen == 'f' ? 'Active' : 'Suspended') %]
+                        [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %]
                     </td>
                     <td width="110">
                         <div name="acct_holds_status"
@@ -194,6 +195,10 @@
                             [%
                                 IF hold.hold.status == 4;
                                     l("Available");
+                                    IF ahr.shelf_expire_time;
+                                        l('<br/>Expires [_1]', 
+                                            date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT));
+                                    END;
                                 ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
                                     # estimated wait is delivered as seconds.
                                     SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);

commit 0c881d042d6ec48f09a3da13ca1593267367ce2e
Author: berick <berick at esilibrary.com>
Date:   Thu Mar 17 15:55:39 2011 -0400

    pile of updated icons

diff --git a/Open-ILS/web/images/media_3dobject.png b/Open-ILS/web/images/media_3dobject.png
new file mode 100644
index 0000000..65a2de2
Binary files /dev/null and b/Open-ILS/web/images/media_3dobject.png differ
diff --git a/Open-ILS/web/images/media_book.png b/Open-ILS/web/images/media_book.png
new file mode 100644
index 0000000..57ee12c
Binary files /dev/null and b/Open-ILS/web/images/media_book.png differ
diff --git a/Open-ILS/web/images/media_bookoncassette.png b/Open-ILS/web/images/media_bookoncassette.png
new file mode 100644
index 0000000..f36fe75
Binary files /dev/null and b/Open-ILS/web/images/media_bookoncassette.png differ
diff --git a/Open-ILS/web/images/media_bookoncd.png b/Open-ILS/web/images/media_bookoncd.png
new file mode 100644
index 0000000..62b1af2
Binary files /dev/null and b/Open-ILS/web/images/media_bookoncd.png differ
diff --git a/Open-ILS/web/images/media_cassettewithbook.png b/Open-ILS/web/images/media_cassettewithbook.png
new file mode 100644
index 0000000..b874f44
Binary files /dev/null and b/Open-ILS/web/images/media_cassettewithbook.png differ
diff --git a/Open-ILS/web/images/media_cdwithbook.png b/Open-ILS/web/images/media_cdwithbook.png
new file mode 100644
index 0000000..dba509d
Binary files /dev/null and b/Open-ILS/web/images/media_cdwithbook.png differ
diff --git a/Open-ILS/web/images/media_downloadableebook.png b/Open-ILS/web/images/media_downloadableebook.png
new file mode 100644
index 0000000..82f66ba
Binary files /dev/null and b/Open-ILS/web/images/media_downloadableebook.png differ
diff --git a/Open-ILS/web/images/media_downloadablemovie.png b/Open-ILS/web/images/media_downloadablemovie.png
new file mode 100644
index 0000000..a5db067
Binary files /dev/null and b/Open-ILS/web/images/media_downloadablemovie.png differ
diff --git a/Open-ILS/web/images/media_downloadablemusic.png b/Open-ILS/web/images/media_downloadablemusic.png
new file mode 100644
index 0000000..bcd621c
Binary files /dev/null and b/Open-ILS/web/images/media_downloadablemusic.png differ
diff --git a/Open-ILS/web/images/media_dvd.png b/Open-ILS/web/images/media_dvd.png
new file mode 100644
index 0000000..8afcef9
Binary files /dev/null and b/Open-ILS/web/images/media_dvd.png differ
diff --git a/Open-ILS/web/images/media_ebook.png b/Open-ILS/web/images/media_ebook.png
new file mode 100644
index 0000000..53a192e
Binary files /dev/null and b/Open-ILS/web/images/media_ebook.png differ
diff --git a/Open-ILS/web/images/media_ebookaudio.png b/Open-ILS/web/images/media_ebookaudio.png
new file mode 100644
index 0000000..1270685
Binary files /dev/null and b/Open-ILS/web/images/media_ebookaudio.png differ
diff --git a/Open-ILS/web/images/media_electronicgames.png b/Open-ILS/web/images/media_electronicgames.png
new file mode 100644
index 0000000..b696a7a
Binary files /dev/null and b/Open-ILS/web/images/media_electronicgames.png differ
diff --git a/Open-ILS/web/images/media_equipment.png b/Open-ILS/web/images/media_equipment.png
new file mode 100644
index 0000000..96d0eed
Binary files /dev/null and b/Open-ILS/web/images/media_equipment.png differ
diff --git a/Open-ILS/web/images/media_evideo.png b/Open-ILS/web/images/media_evideo.png
new file mode 100644
index 0000000..09a7ea6
Binary files /dev/null and b/Open-ILS/web/images/media_evideo.png differ
diff --git a/Open-ILS/web/images/media_films.png b/Open-ILS/web/images/media_films.png
new file mode 100644
index 0000000..dcfd893
Binary files /dev/null and b/Open-ILS/web/images/media_films.png differ
diff --git a/Open-ILS/web/images/media_kit.png b/Open-ILS/web/images/media_kit.png
new file mode 100644
index 0000000..c60d039
Binary files /dev/null and b/Open-ILS/web/images/media_kit.png differ
diff --git a/Open-ILS/web/images/media_largeprint.png b/Open-ILS/web/images/media_largeprint.png
new file mode 100644
index 0000000..0949630
Binary files /dev/null and b/Open-ILS/web/images/media_largeprint.png differ
diff --git a/Open-ILS/web/images/media_magazine.png b/Open-ILS/web/images/media_magazine.png
new file mode 100644
index 0000000..c227660
Binary files /dev/null and b/Open-ILS/web/images/media_magazine.png differ
diff --git a/Open-ILS/web/images/media_map.png b/Open-ILS/web/images/media_map.png
new file mode 100644
index 0000000..ccf1fed
Binary files /dev/null and b/Open-ILS/web/images/media_map.png differ
diff --git a/Open-ILS/web/images/media_microform.png b/Open-ILS/web/images/media_microform.png
new file mode 100644
index 0000000..9f4b0f9
Binary files /dev/null and b/Open-ILS/web/images/media_microform.png differ
diff --git a/Open-ILS/web/images/media_musiccd.png b/Open-ILS/web/images/media_musiccd.png
new file mode 100644
index 0000000..84cc188
Binary files /dev/null and b/Open-ILS/web/images/media_musiccd.png differ
diff --git a/Open-ILS/web/images/media_musiconcassette.png b/Open-ILS/web/images/media_musiconcassette.png
new file mode 100644
index 0000000..96a9f35
Binary files /dev/null and b/Open-ILS/web/images/media_musiconcassette.png differ
diff --git a/Open-ILS/web/images/media_musicrecord.png b/Open-ILS/web/images/media_musicrecord.png
new file mode 100644
index 0000000..4ba36f1
Binary files /dev/null and b/Open-ILS/web/images/media_musicrecord.png differ
diff --git a/Open-ILS/web/images/media_newspaper.png b/Open-ILS/web/images/media_newspaper.png
new file mode 100644
index 0000000..009d292
Binary files /dev/null and b/Open-ILS/web/images/media_newspaper.png differ
diff --git a/Open-ILS/web/images/media_online.png b/Open-ILS/web/images/media_online.png
new file mode 100644
index 0000000..437f91f
Binary files /dev/null and b/Open-ILS/web/images/media_online.png differ
diff --git a/Open-ILS/web/images/media_onlinejournal.png b/Open-ILS/web/images/media_onlinejournal.png
new file mode 100644
index 0000000..65cac4c
Binary files /dev/null and b/Open-ILS/web/images/media_onlinejournal.png differ
diff --git a/Open-ILS/web/images/media_player.png b/Open-ILS/web/images/media_player.png
new file mode 100644
index 0000000..64197e1
Binary files /dev/null and b/Open-ILS/web/images/media_player.png differ
diff --git a/Open-ILS/web/images/media_podcasts.png b/Open-ILS/web/images/media_podcasts.png
new file mode 100644
index 0000000..d563fbb
Binary files /dev/null and b/Open-ILS/web/images/media_podcasts.png differ
diff --git a/Open-ILS/web/images/media_sheetmusic.png b/Open-ILS/web/images/media_sheetmusic.png
new file mode 100644
index 0000000..26f4818
Binary files /dev/null and b/Open-ILS/web/images/media_sheetmusic.png differ
diff --git a/Open-ILS/web/images/media_slideset.png b/Open-ILS/web/images/media_slideset.png
new file mode 100644
index 0000000..94cebfb
Binary files /dev/null and b/Open-ILS/web/images/media_slideset.png differ
diff --git a/Open-ILS/web/images/media_software.png b/Open-ILS/web/images/media_software.png
new file mode 100644
index 0000000..95e6652
Binary files /dev/null and b/Open-ILS/web/images/media_software.png differ
diff --git a/Open-ILS/web/images/media_streamingaudio.png b/Open-ILS/web/images/media_streamingaudio.png
new file mode 100644
index 0000000..51c31c3
Binary files /dev/null and b/Open-ILS/web/images/media_streamingaudio.png differ
diff --git a/Open-ILS/web/images/media_streamingvideo.png b/Open-ILS/web/images/media_streamingvideo.png
new file mode 100644
index 0000000..3fe2cbe
Binary files /dev/null and b/Open-ILS/web/images/media_streamingvideo.png differ
diff --git a/Open-ILS/web/images/media_vhs.png b/Open-ILS/web/images/media_vhs.png
new file mode 100644
index 0000000..11c1e42
Binary files /dev/null and b/Open-ILS/web/images/media_vhs.png differ

commit f5d39122dcdb2692b97763861065429202a9494c
Author: berick <berick at esilibrary.com>
Date:   Thu Mar 17 15:53:28 2011 -0400

    implemented bookbag rss link

diff --git a/Open-ILS/web/images/small-rss.png b/Open-ILS/web/images/small-rss.png
new file mode 100644
index 0000000..67d0f37
Binary files /dev/null and b/Open-ILS/web/images/small-rss.png differ
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index 95c720c..b72a97f 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -77,11 +77,10 @@
                     </form>
                     <div class="bookbag-controls"><big><strong>[% bbag.name %]</strong></big></div>
                     <div class="bookbag-controls">
-                        [% IF bbag.pub == 't'; # XXX TODO %]
-                        <!-- <a target='_blank' name='share_list_rss'><img
+                        [% IF bbag.pub == 't'; %]
+                        <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
                             alt="[% l('RSS Feed') %]" border="0"
-                            src="[% ctx.media_prefix %]/images/small-rss.png"
-                            title="[% l('You are sharing this list') %]" /></a> -->
+                            src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
                         [% END %]
                     </div>
                     <div class="clear-both pad-bottom-five"></div>

commit e46f316f3cbdd055a02b0935578a2092617a55ae
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Mar 17 12:23:13 2011 -0400

    make presentation better by hiding as-yet-unready features, etc
    
    also, made links out of the dashboard counts, but oddly the first one
    ("checked out") only works in IE, not Chrome or Firefox.  I suspect that
    the complications of all the "position: absolute"-this and "position:
    relative"-that make for fluky layout.

diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index 60fd1df..db43f54 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -24,8 +24,8 @@
 
 #lib_selector_span { display: none }
 .float-left { float: left; }
-.bookbag-name { float: left; font-weight: bold; padding-top: 5px; }
-.bookbag-share { float: left; padding: 5px 0px 0px 10px; }
+.bookbag-share { float: left; padding: 5px 0; }
+.bookbag-controls { float: left; padding: 5px 0px 0px 10px; }
 .left-corner { float: left; width: 163px; height: 30px; background: url('/images/utils-corner-mid.png') repeat-x top; }
 .float-right { float: right; }
 .opac-auto-045 { float: right; margin-right: 17px; }
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 219a338..33040f4 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -958,4 +958,12 @@ div.select-wrapper:hover {
 #account-update-email table { text-align: center; padding: 20px; margin-top: 30px; border-collapse: collapse; }
 #account-update-email table td { padding: 5px 15px 5px 15px; border-bottom: 1px solid #ddd; text-align: left;}
 #account-update-email-error { font-size: 1.5em; padding: 10px; border:1px solid #e9ebf3;}
-
+a.dash-link:hover { text-decoration: underline !important; }
+#list_create_table td { vertical-align: middle; padding: 0 8px; }
+#list_create_table {
+    background-color: #ccc;
+    padding-bottom: 4px;
+    margin-bottom: 10px;
+    border-bottom: 1px dotted #666;
+}
+.list-create-table-buttons input[type=image] { margin-top: 2px; }
diff --git a/Open-ILS/web/templates/default/opac/advanced.tt2 b/Open-ILS/web/templates/default/opac/advanced.tt2
index adb1807..8d9e125 100644
--- a/Open-ILS/web/templates/default/opac/advanced.tt2
+++ b/Open-ILS/web/templates/default/opac/advanced.tt2
@@ -7,8 +7,8 @@
         <div id="adv_search_parent">
             <div id="adv_search_tabs">
                 <a href="#" alt="[% l('Advanced Search') %]" id="adv_search"></a>
-                <a href="#" alt="[% l('Numeric Search') %]" id="num_search"></a>
-                <a href="#" alt="[% l('Expert Search') %]" id="expert_search"></a>
+<!--                <a href="#" alt="[% l('Numeric Search') %]" id="num_search"></a>
+                    <a href="#" alt="[% l('Expert Search') %]" id="expert_search"></a> -->
             </div>
         </div>
     </div>
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index 85cf1c0..95c720c 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -18,21 +18,42 @@
         </div>
     </div> -->
     <div id="temp_wrapper">
+<!-- new list creation -->
+<form action="[% ctx.opac_root %]/myopac/list/update" method="POST" id="create_form">
+    <h2>[% l('Create new list') %]</h2><a name="createnewlist"></a>
+<table cellpadding="0" border="0" id="list_create_table">
+    <tr>
+        <td>
+            <label for="list_create_name">[% l('Enter the name of the new list:') %]</label>
+            <input id="list_create_name" type="text" name="name" />
+            <input type="hidden" name="action" value="create" />
+        </td>
+        <td>
+            <label for="list_create_shared">[% l('Share this list?') %]</label>
+            <select name="shared" id="list_create_shared">
+                <option value="0">[% l('No') %]
+                <option value="1">[% l('Yes') %]
+            </select>
+            <a href="javascript:void(0);" onclick="alert(document.getElementById('bb_publish_text').innerHTML);"><img alt="[% l('Sharing Help') %]"
+                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+        </td>
+        <td class="list-create-table-buttons">
+            <input type="image" alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png"/>
+            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            <a href="javascript:void(0);"
+                onclick="document.getElementById('create_form').reset(); return false"><img
+                alt="[% l('Cancel') %]"
+                src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+        </td>
+    </tr>
+</table>
+            </form>
         [% INCLUDE "default/opac/parts/anon_list.tt2" %]
         [% IF ctx.bookbags.size %]
         <div id='acct_lists_prime'>
             [% FOR bbag IN ctx.bookbags %]
             <div id='acct_list_template'>
                 <div style="width:100%">
-                    <div class="bookbag-name">[% bbag.name %]</div>
-                    <div class="bookbag-share">
-                        [% IF bbag.pub == 't'; # XXX TODO %]
-                        <!-- <a target='_blank' name='share_list_rss'><img
-                            alt="[% l('RSS Feed') %]" border="0"
-                            src="[% ctx.media_prefix %]/images/small-rss.png"
-                            title="[% l('You are sharing this list') %]" /></a> -->
-                        [% END %]
-                    </div>
                     <form action="[% ctx.opac_root %]/myopac/list/update"
                         method="POST">
                         <div class="bookbag-share">
@@ -48,12 +69,21 @@
                     </form>
                     <form action="[% ctx.opac_root %]/myopac/list/update"
                         method="POST">
-                        <div class="bookbag-share">
+                        <div class="bookbag-controls">
                             <input type="hidden" name="list" value="[% bbag.id %]" />
                             <input type="hidden" name="action" value="delete" />
                             <input type="submit" value="[% l('Delete List') %]" />
                         </div>
                     </form>
+                    <div class="bookbag-controls"><big><strong>[% bbag.name %]</strong></big></div>
+                    <div class="bookbag-controls">
+                        [% IF bbag.pub == 't'; # XXX TODO %]
+                        <!-- <a target='_blank' name='share_list_rss'><img
+                            alt="[% l('RSS Feed') %]" border="0"
+                            src="[% ctx.media_prefix %]/images/small-rss.png"
+                            title="[% l('You are sharing this list') %]" /></a> -->
+                        [% END %]
+                    </div>
                     <div class="clear-both pad-bottom-five"></div>
                 </div>
                 <form action="[% ctx.opac_root %]/myopac/list/update"
@@ -133,34 +163,4 @@
         [% l("Bookbag successfully updated") %]
     </span>
 </div>
-<!-- new list creation -->
-<form action="[% ctx.opac_root %]/myopac/list/update" method="POST" id="create_form">
-<div style="padding-bottom: 7px;">
-    <h2>[% l('Create new list') %]</h2><a name="createnewlist"></a>
-    [% l('Enter the name of the new list:') %]<br/>
-    <input type="hidden" name="action" value="create" />
-    <input type="text" name="name" />
-</div>
-
-<table cellpadding="0" cellspacing="10" border="0">
-    <tr>
-        <td>
-            [% l('Share this list?') %]
-            <a href="#"><img alt="[% l('Sharing Help') %]"
-                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
-        </td>
-        <td>
-            <input type="radio" value="0" name="shared" id="shared_0" checked="checked" /><label for="shared_0">[% l('No') %]</label>
-            <br/>
-            <input type="radio" value="1" name="shared" id="shared_1"/><label for="shared_1">[% l('Yes') %]</label>
-        </td>
-    </tr>
-</table>
-<input type="image" alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png"/>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<a href="javascript:void(0);"
-    onclick="document.getElementById('create_form').reset(); return false"><img
-    alt="[% l('Cancel') %]"
-    src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
-</form>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2 b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
index e1e72fe..cc06a0d 100644
--- a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
@@ -8,9 +8,9 @@
                             [% l('Temporary List') %]
                         </td>
                         <td>
-                            <a href="#"><img
+                            <!-- <a href="#"><img
                                 alt="[% l('Anonymous List Help') %]"
-                                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>-->
                         </td>
                     </tr>
                 </table>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 4b14e04..90b2548 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -199,13 +199,13 @@
                                                                 src="[% ctx.media_prefix %]/images/clipboard.png" />
                                                         </form>
                                                         </div>
-                                                        <div style="padding-top:7px;" class="results_aux_utils">
+                                                        <!-- <div style="padding-top:7px;" class="results_aux_utils">
                                                             <a title="Reviews and More" target="_blank" class="no-dec"
                                                                 name="reviews_and_more" href="javascript:;"><img
                                                                 alt="reviews &amp; more"
                                                                 src="[% ctx.media_prefix %]/images/starz.png" /> <span
                                                                     style="position:relative;top:-5px;">Reviews &amp; More</span></a>
-                                                        </div>
+                                                        </div> -->
                                                     </div>
                                                     <div style="float:right;margin-right:17px;">
                                                     [%  key = attrs.mattype;
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
index f2401d8..15a98af 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@ -62,28 +62,28 @@
                                         <div class="pos-abs">
                                             <div class="dash-pos-out">
                                                 <div class="dash-align-out">
-                                                    <span id="dash_checked">[% ctx.user_stats.checkouts.total_out %]</span> [% l("Checked Out") %]
+                                                    <a class="dash-link" href="[% ctx.opac_root %]/myopac/circs"><span id="dash_checked">[% ctx.user_stats.checkouts.total_out %]</span> [% l("Checked Out") %]</a>
                                                 </div>
                                             </div>
                                         </div>
                                         <div class="pos-abs">
                                             <div class="dash-pos-holds">
                                                 <div class="dash-align-holds">
-                                                    <span id="dash_holds">[% ctx.user_stats.holds.total %]</span> [% l("On Hold") %]
+                                                    <a class="dash-link" href="[% ctx.opac_root %]/myopac/holds"><span id="dash_holds">[% ctx.user_stats.holds.total %]</span> [% l("On Hold") %]</a>
                                                 </div>
                                             </div>
                                         </div>
                                         <div class="pos-abs">
                                             <div class="dash-pos-pickup">
                                                 <div class="dash-align-pickup">
-                                                    <span id="dash_pickup">[% ctx.user_stats.holds.ready %]</span> [% l("Ready for Pickup") %]
+                                                    <a class="dash-link" href="[% ctx.opac_root %]/myopac/holds?available=1"><span id="dash_pickup">[% ctx.user_stats.holds.ready %]</span> [% l("Ready for Pickup") %]</a>
                                                 </div>
                                             </div>
                                         </div>
                                         <div class="pos-abs">
                                             <div class="dash-pos-fines">
                                                 <div class="dash-align-fines">
-                                                    <span id="dash_fines">[% money(ctx.user_stats.fines.balance_owed) %]</span> [% l("Fines") %]
+                                                    <a class="dash-link" href="[% ctx.opac_root %]/myopac/main"><span id="dash_fines">[% money(ctx.user_stats.fines.balance_owed) %]</span> [% l("Fines") %]</a>
                                                 </div>
                                             </div>
                                         </div>

commit e742256f65eba3caa1479000ab2f1370b0860fda
Merge: 5abbce2 cf7fabd
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Mar 16 15:20:19 2011 -0400

    Merge branch 'master' of ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 5abbce2bb9efd84f4a5e189c204d7abf24fcbbc1
Merge: 6abbb51 87d3c28
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Mar 16 14:50:14 2011 -0400

    Merge branch 'master' of ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 6abbb515957102518457e0d07784b3219f20c15b
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Mar 16 14:48:52 2011 -0400

    "Add to my list" becomes "remove from my list", and
    
    it now works on the record detail page as well as the results page.
    Also, I fixed a bug by which an HTML form was rendered wrongly, totally
    breaking the display of the results page in IE and preventing the first
    result on any page of search results from adding to the anonymous list.

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index a6e408d..35e41fc 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -187,7 +187,14 @@ sub get_records_and_facets {
 sub fetch_marc_xml_by_id {
     my ($self, $id_list) = @_;
     $id_list = [$id_list] unless ref($id_list);
-    return {} if scalar(grep { defined $_ } @$id_list) < 1;
+
+    {
+        no warnings qw/numeric/;
+        $id_list = [map { int $_ } @$id_list];
+        $id_list = [grep { $_ > 0} @$id_list];
+    };
+
+    return {} if scalar(@$id_list) < 1;
 
     # I'm just sure there needs to be some more efficient way to get all of
     # this.
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index ce35479..219a338 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -556,6 +556,10 @@ div.select-wrapper:hover {
     left:2px;
 }
 
+.almost-content-wrapper {
+	background: white;
+}
+
 #content-wrapper {
 	background: white;
 	min-height: 260px;
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index ab4da64..f151888 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -38,20 +38,24 @@
                             <div style="width:230px;text-align:left;margin-top:3px;">
                                 <div style="float:right;">
                                     <div class="rdetail_aux_utils opac-auto-010">
-                                        <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% record.id %]&hold_type=T" id="rdetail_place_hold"><img
+                                        <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% record.id %]&hold_type=T" id="rdetail_place_hold" class="no-dec"><img
                                             src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" />
                                             <span style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
                                     </div>
-                                    <div style="padding-top:6px;" class="rdetail_aux_utils">
-                                        <div style="position:absolute;">
-                                            <div style="position:relative;top:5px; left: 25px;">
-                                                <a title="Add to my list" id="add_mylist"
-                                                    href="#">Add to my list</a>
+                                    <div class="rdetail_aux_utils opac-auto-121">
+                                        [%  operation = ctx.mylist.grep(record.id).size ? "delete" : "add";
+                                            label = (operation == "add") ? "Add to" : "Remove from"; %]
+                                        <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
+                                            <input type="hidden" name="record" value="[% record.id %]" />
+                                            <div class="pos-abs">
+                                                <div class="opac-auto-149">
+                                                    <input type="submit" title="[% l(label _ ' my list') %]" value="[% l(label _ ' my list') %]" class="subtle-button" />
+                                                </div>
                                             </div>
-                                        </div>
-                                        <a href="#"><img
-                                            alt="[% l('add to my list') %]"
-                                            src="[% ctx.media_prefix %]/images/clipboard.png" /></a>
+                                            <input type="image"
+                                                alt="[% l(label _ ' my list') %]"
+                                                src="[% ctx.media_prefix %]/images/clipboard.png" />
+                                        </form>
                                     </div>
                                 </div>
                                 <div style="float:right;margin-right:17px;">
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index b4ef916..4b14e04 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -185,15 +185,17 @@
                                                                     style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
                                                         </div>
                                                         <div class="results_aux_utils opac-auto-011">
-                                                            <form action="[% ctx.opac_root %]/mylist/add" method="POST">
+                                                            [%  operation = ctx.mylist.grep(rec.bre.id).size ? "delete" : "add";
+                                                                label = (operation == "add") ? "Add to" : "Remove from"; %]
+                                                            <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
                                                                 <input type="hidden" name="record" value="[% rec.bre.id %]" />
                                                             <div style="position:absolute;">
                                                                 <div style="position:relative;top:5px; left: 25px;">
-                                                                    <input type="submit" title="[% l('Add to my list') %]" value="[% l('Add to my list') %]" class="subtle-button" />
+                                                                    <input type="submit" title="[% l(label _ ' my list') %]" value="[% l(label _ ' my list') %]" class="subtle-button" />
                                                                 </div>
                                                             </div>
                                                                 <input type="image"
-                                                                alt="[% l('Add to my list') %]"
+                                                                alt="[% l(label _ ' my list') %]"
                                                                 src="[% ctx.media_prefix %]/images/clipboard.png" />
                                                         </form>
                                                         </div>
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 3b06cae..db1f298 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -13,7 +13,7 @@
         [% INCLUDE "default/opac/parts/utils.tt2" %]
         [% INCLUDE "default/opac/parts/searchbar.tt2" took_care_of_form=1 %]
     </div>
-    <div id="content-wrapper">
+    <div class="almost-content-wrapper">
         <div id="results_header_bar">
             <div id="results_header_inner">
                 <div class="results_header_btns">
@@ -59,6 +59,9 @@
                 <div class="clear-both"></div>
             </div>
         </div>
+    </div>
+    </form>
+    <div id="content-wrapper">
         <div id="main-content">
             <div id="tehResultsPage">
                 [% path = "default/opac/parts/result/" _
@@ -68,5 +71,4 @@
             <div class="common-full-pad"></div>    
         </div>
     </div>
-    </form>
 [% END %]

commit ec6e65c27441e45e5e1fa8d1a6e0a2ff435cf55d
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Mar 15 17:53:58 2011 -0400

    smarter search term propagation, should avoid ARRAY(0xdeadbeef) type ...
    
    ... stuff in search boxes

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 84c68a7..7a4d491 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -77,11 +77,11 @@ sub _prepare_biblio_search {
         }
     }
 
-    my $site = $cgi->param('loc') || $ctx->{aou_tree}->()->id;
-    if (defined($cgi->param('loc')) or not $query =~ /site\(\d+\)/) {
+    my $site = $cgi->param('loc');
+    if (defined($site) and ($site ne $ctx->{aou_tree}->()->id) and not $query =~ /site\(\d+\)/) {
         $query .= " site($site)";
     }
-    if (defined($cgi->param('depth')) or not $query =~ /depth\(\d+\)/) {
+    if (defined($cgi->param('depth')) and not $query =~ /depth\(\d+\)/) {
         my $depth = defined $cgi->param('depth') ?
             $cgi->param('depth') : $ctx->{find_aou}->($site)->ou_type->depth;
         $query .= " depth($depth)";
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index fa775b2..aa34ab5 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -19,6 +19,8 @@
 
     propagator = '?' _ query_string;
 
+    is_advanced = CGI.param("_adv").size;
+
     formats = [  # XXX KCLS-specific
         {'code' => 'a', 'name' => 'Book', 'image' => 'media_book.jpg'},
         {'code' => 'i', 'name' => 'Book on cassette', 'image' => 'media_bookoncasset.jpg'},
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 84ab264..158a93f 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -20,8 +20,9 @@
             <td>
             [% INCLUDE "default/opac/parts/qtype_selector.tt2" %]
             </td>
-            <td>
             [% END %]
+            [% IF ctx.processed_search_query OR NOT is_advanced %]
+            <td>
                 <div id="search_box_wrapper">
                     <!-- Note: when common browsers support HTML5 placeholder text, we can remove the JS -->
                     <input type="text" id="search_box" name="query" value="[% is_advanced ? ctx.processed_search_query : CGI.param('query') || l("Search Keyword") | html %]"
@@ -40,6 +41,7 @@
                     </div>
                 </div>
             </td>
+            [% END %]
         </tr>
         [% UNLESS is_advanced %]
         <tr>
@@ -59,10 +61,10 @@
         [% END %]
     </table>
     [% UNLESS took_care_of_form %]</form>[% END %]
-    [% IF is_advanced %]
+    [% IF is_advanced AND CGI.param('qtype') %]
     <div class="opac-auto-102">
         [ <a href="[% ctx.opac_root %]/advanced?[% query_string %]">[%
-            l('Click to Refine Your Search')
+            l('Click to Refine Your Original Search')
         %]</a> ]
     </div>
     [% END %]
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 19735e2..3b06cae 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -4,7 +4,6 @@
     WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = l("Search Results");
-    is_advanced = CGI.param("_adv").size;
 
     page = CGI.param('page') || 0;
     page_count = POSIX.ceil(ctx.hit_count / ctx.page_size);
@@ -39,7 +38,7 @@
                 </div>
                 [% END %]
                 <div class="results_header_div"></div>
-                [% UNLESS CGI.param('_adv') %]
+                [% UNLESS is_advanced %]
                     <div class="results_header_lbl">Sort by</div>
                     [% INCLUDE "default/opac/parts/filtersort.tt2" value=CGI.param('sort') %]
                     <div class="results_header_div"></div>

commit 7c873d78ed31db2a6cb7bd3b7e992407076561a5
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Mar 15 15:16:23 2011 -0400

    bib record subject search terms: painstaking translation of BibTemplate to TT
    
    the reference implementation I used is in
    Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml starting
    at line 93 as of this commit.
    
    Only now that I've imitated the default skin's behavior exactly, I note
    that the subject search links produced don't actually work on my test server.
    Seems to be a local configuration issue though; will investigate.

diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 9a6ed0b..ab4da64 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -105,19 +105,31 @@
                             </td>
                             <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
                             [% BLOCK render_subject;
-                            FOR node IN ctx.marc_xml.findnodes('//*[@tag="650"]');
-                                s0 = node.childNodes.0.textContent;
-                                s1 = node.childNodes.1.textContent;
-                                IF s0;
-                                    IF s0.match('\S') %]
-                                    <a href="[% ctx.opac_root %]/results?query=su:[% s0 | url %]">[% s0 %]</a>
-                                    &mdash;
-                                    [% END; IF s1 %]
-                                    <a href="[% ctx.opac_root %]/results?query=su:[% s1 | url %]">[% s1 %]</a>
-                                    <br/>
-                                    [% END %]
-                                [% END %]
-                            [% END %]
+                            loc = CGI.param('loc') | uri;
+                            FOR node IN ctx.marc_xml.findnodes('//*[starts-with(@tag,"6")]');
+                                all_terms = [];
+                                FOR subfield IN node.childNodes;
+                                    NEXT UNLESS subfield.nodeName == "subfield";
+                                    code = 0;
+                                    FOR a IN subfield.attributes;
+                                        IF a.nodeName == "code";
+                                            code = a.nodeValue;
+                                        END;
+                                    END;
+                                    NEXT UNLESS code.match('[a-z]');
+
+                                    IF code.match('[vxyz]');
+                                        " &mdash; ";
+                                    END;
+                                    # at this point, we actually have a partial
+                                    # term to use.
+                                    single_term = subfield.textContent | html;
+                                    all_terms.push(subfield.textContent);
+                                    total_term = all_terms.join(" ").replace('\s+$', '') ; # XXX need to take care of any &'s, right?
+                                    '<a href="' _ ctx.opac_root _ '/results?qtype=subject&query=' _ total_term _ '&loc=' _ loc _ '">' _ single_term _ '</a>';
+                                END;
+                                "<br />";
+                            END %]
                             [% END %]
                             [% s = PROCESS render_subject; IF s.match('\S') %]
                             <td nowrap='nowrap' valign="top">

commit f866ef090fa39ab5b1e5f3a29a78dd284399a59c
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Mar 15 13:47:10 2011 -0400

    Improve search term propagation from page to page
    
    Also, for things like the author link on the record detail page, build a
    link with 'qtype=author&query=JK Rowling' instead of 'query=au:JK Rowling'
    
    The latter works, but causes the search form to look stupid.
    Query type dropdown will be set to keyword by default, and the term will
    be "au:JK Rowling", which will be a head scratcher for 99% of real
    users.

diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index d5602be..8846bdf 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -116,7 +116,7 @@
                             name="author">
                             <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" name="[% l('Catalog record') %]">[% attrs.title %]</a>
                             [% IF attrs.author %] /
-                            <a href="[% ctx.opac_root %]/results?query=au:[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                            <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
                             [% END %]
                         </td>
                         <td width="8%" name="renewals" align="center">
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 79e3044..d0dd325 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -146,7 +146,7 @@
                     </td>
                     <td width="123">
                         <div style="margin-top:10px;margin-bottom:10px;">
-                            <a href="[% ctx.opac_root %]/results?query=au:[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
+                            <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
                         </div>
                     </td>
                     <td width="64">
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 0c307f0..b2e4a2f 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -170,7 +170,7 @@
                             </td>
                             <td>
                                 <a class="classic_link"
-                                    href="[% ctx.opac_root %]/results?query=au:[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                                    href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
                             </td>
                             <td name='myopac_circ_trans_start'>
                                 [% date.format(
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 03dbcf1..fa775b2 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -8,6 +8,17 @@
     # Don't wrap in l() here; do that where this format string is actually used.
     SET HUMAN_NAME_FORMAT = '[_1] [_2] [_3] [_4] [_5]';
 
+    # x and y are artifacts of using <input type="image" /> tags instead of
+    # true submit buttons, and their values are never used. page is used, but
+    # currently none of the use cases for rendering the query_string back
+    # into page output call for propagating the value of the page variable.
+
+    query_string = CGI.query_string |
+        replace(';x=\d+','') | replace(';y=\d+','') | replace(';page=\d*', '') |
+        replace(';', '&');
+
+    propagator = '?' _ query_string;
+
     formats = [  # XXX KCLS-specific
         {'code' => 'a', 'name' => 'Book', 'image' => 'media_book.jpg'},
         {'code' => 'i', 'name' => 'Book on cassette', 'image' => 'media_bookoncasset.jpg'},
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 63c1daf..9a6ed0b 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -30,7 +30,7 @@
                             <span class='opac-auto-030'>[% l("Author") %]:</span>
                             <em><a title='[% l("Perform an author search") %]'
                                     id='rdetail_author'
-                                    href="[% ctx.opac_root %]/results?query=author%3a[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% loc %]">[% attrs.author %]</a>
+                                    href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% CGI.param('loc') | uri %]">[% attrs.author %]</a>
                             </em>
                             [% END %]
                         </td>
@@ -38,7 +38,7 @@
                             <div style="width:230px;text-align:left;margin-top:3px;">
                                 <div style="float:right;">
                                     <div class="rdetail_aux_utils opac-auto-010">
-                                        <a href="[% ctx.opac_root %]/place_hold?hold_target=[% record.id %]&hold_type=T" id="rdetail_place_hold"><img
+                                        <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% record.id %]&hold_type=T" id="rdetail_place_hold"><img
                                             src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" />
                                             <span style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
                                     </div>
@@ -248,7 +248,7 @@
                                 </div>
                             </td>
                             <td width="1" valign="top" align="right" style="white-space:nowrap;">
-                                <a href="[% ctx.opac_root %]/place_hold?hold_target=[% record.id %]&hold_type=T"><img alt="[% l('Place Hold') %]"
+                                <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% record.id %]&hold_type=T"><img alt="[% l('Place Hold') %]"
                                     src="[% ctx.media_prefix %]/images/place_hold.gif" /></a>
                                 <a href="#" id="rd_reviews_and_more" target="_blank"><img
                                     alt="[% l('Reviews and More') %]" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 1358ecb..b4ef916 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -1,7 +1,5 @@
 [%  PROCESS "default/opac/parts/marc_misc.tt2";
 
-    np_link = '?' _ query_string;
-
     ctx.result_start = 1 + ctx.page_size * page;
     ctx.result_stop = 1 + ctx.page_size * (page + 1);
     IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
@@ -26,7 +24,7 @@
                 <span class='start_end_links_span'>
                     [% IF page > 0 %]
                     <a class='search_page_nav_link'
-                        href="[% np_link _ '&page=' _ (page - 1) %]"
+                        href="[% propagator _ '&page=' _ (page - 1) %]"
                         title='[% l("Previous page") %]'>
                         <span class="nav_arrow_fix">&#9668;</span> Previous
                     </a>
@@ -37,7 +35,7 @@
                     </span>
                     [% IF (page + 1) < page_count %]
                     <a class='search_page_nav_link'
-                        href="[% np_link _ '&page=' _ (page + 1) %]"
+                        href="[% propagator _ '&page=' _ (page + 1) %]"
                         title='[% l("Next page") %]'>
                         Next <span class="nav_arrow_fix">&#9658;</span>
                     </a>
@@ -78,7 +76,7 @@
                                             <td class='result_table_pic_header'
                                                 width="78" nowrap="nowrap" valign="top">
                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
-                                                <a href="[% ctx.opac_root %]/record/[% rec.bre.id %]"><img alt="Image of item"
+                                                <a href="[% ctx.opac_root %]/record/[% rec.bre.id _ propagator %]"><img alt="Image of item"
                                                         name='item_jacket' class='result_table_pic' width="55"
                                                         src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a><br />
                                                 [% END %]
@@ -88,7 +86,7 @@
                                                 valign="top">
                                                 <div class="bold">
                                                     <a title="[% attrs.title %]" name='item_title'
-                                                        href="[% ctx.opac_root %]/record/[% rec.bre.id %]"
+                                                        href="[% ctx.opac_root %]/record/[% rec.bre.id _ propagator %]"
                                                         class='search_link'>[% attrs.title %]</a>
                                                 </div>
                                                 <span style="font-size:11px;">
@@ -96,7 +94,7 @@
                                                         <em>
                                                             <a title="[% l("Perform an Author Search") %]"
                                                                 name='item_author'
-                                                                href="[% ctx.opac_root %]/results?query=author%3a[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% loc %]"
+                                                                href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% CGI.param('loc') | uri %]"
                                                                 class='search_link'>[% attrs.author %]</a>
                                                         </em> &nbsp;&nbsp;
                                                         [% attrs.pubdate %]
@@ -181,7 +179,7 @@
                                                 <div style="width:250px;text-align:left;">
                                                     <div style="float:right;">
                                                         <div class="results_aux_utils opac-auto-010"><a
-                                                                href="[% ctx.opac_root %]/place_hold?hold_target=[% rec.bre.id %]&hold_type=T" name="place_hold_link" class="no-dec"><img
+                                                                href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% rec.bre.id %]&hold_type=T" name="place_hold_link" class="no-dec"><img
                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
                                                                 alt="place hold" /><span
                                                                     style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 8e9d787..84ab264 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -48,7 +48,7 @@
             </td>
             <td>
                 <span id='depth_selector_span'>
-                    [% PROCESS build_org_selector name='loc' value=loc %]
+                    [% PROCESS build_org_selector name='loc' value=CGI.param('loc') %]
                 </span>
                 <span id='lib_selector_span'>
                     <a id='lib_selector_link' class='classic_link'
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 444995a..19735e2 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -6,11 +6,7 @@
     ctx.page_title = l("Search Results");
     is_advanced = CGI.param("_adv").size;
 
-    query_string = CGI.query_string |
-        replace(';x=\d+','') | replace(';y=\d+','') | replace(';page=\d*', '') |
-        replace(';', '&');
     page = CGI.param('page') || 0;
-    loc = CGI.param('loc');
     page_count = POSIX.ceil(ctx.hit_count / ctx.page_size);
 %]
     <form action="[% ctx.opac_root %]/results" method="GET">

commit 669c9f34aeceb0e012cf907cfa4aa489524e6f45
Merge: e576b2e 284468d
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Mar 14 17:57:04 2011 -0400

    Merge branch 'opac-tt-poc' of ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc

diff --cc Open-ILS/web/templates/default/opac/parts/header.tt2
index 069dbef,b09ae69..03dbcf1
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@@ -1,7 -1,8 +1,8 @@@
  [%- USE money = format(l('$%.2f'));
      USE date;
 -    USE CGI = CGIUTF8;
 +    USE CGI = CGI_utf8;
      USE EGI18N;
+     USE POSIX;
      SET DATE_FORMAT = l('%m/%d/%Y');
  
      # Don't wrap in l() here; do that where this format string is actually used.

commit e576b2e34fb9f0dbeeb72b1ee93ea2955bd7cf9e
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Mar 14 17:48:25 2011 -0400

    If the TT stuff loads CGI w/o -utf8, that "instance" (not really instance)...
    
    ... will compete with use CGI in EGCatloader.pm. Really. Normally I enjoy
    perl but the awful, horrendous, unspeakable black magic used in CGI.pm
    has given me a great deal of trouble today.
    
    Specifically, I could not really succeed in subclassing it. I had a kind
    of half success before, but I could only really replace methods in my
    subclass, but not call the methods unchanged from the original base
    class (CGI).  This manifested in a bug where I had been using
    the query_string() method preserve search terms across some pages, but
    that method had stopped working since I introduced the CGI subclass.
    
    In an attempt to fix that, I discovered this document
    http://stein.cshl.org/WWW/CGI/#subclassing
    and tried the advice therein, and several variations thereof, but
    everything I produced caused mod_perl to consume memory until it keeled
    over from OOM.
    
    Finally, I discovered that I never really needed the subclass in the
    first place, so long as 'use CGI' with no module parameters doesn't
    happen in the same process as 'use CGI qw/-utf8/'.

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 178f4d8..ebfbbec 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -13,7 +13,7 @@ use OpenILS::Application::AppUtils;
 use OpenILS::Utils::CStoreEditor qw/:funcs/;
 use OpenILS::Utils::Fieldmapper;
 use DateTime::Format::ISO8601;
-use CGI qw(-utf8);
+use CGI qw(:all -utf8);
 
 # EGCatLoader sub-modules 
 use OpenILS::WWW::EGCatLoader::Util;
@@ -35,10 +35,6 @@ sub new {
     $self->ctx($ctx);
     $self->cgi(new CGI);
 
-    my $msg1 = "LFW XXX: param('query') is " . $self->cgi->param('query');
-    $logger->info("LFW XXX: msg1 is " . $msg1);
-    $logger->info("LFW XXX: query_string is " . $self->cgi->query_string());
-
     OpenILS::Utils::CStoreEditor->init; # just in case
     $self->editor(new_editor());
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index 6a7f49a..67e419d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -53,7 +53,7 @@ sub handler {
         DEBUG => $ctx->{debug_template},
         PLUGINS => {
             EGI18N => 'OpenILS::WWW::EGWeb::I18NFilter',
-            CGIUTF8 => 'OpenILS::WWW::EGWeb::CGIUTF8'
+            CGI_utf8 => 'OpenILS::WWW::EGWeb::CGI_utf8'
         }
     });
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/CGI_utf8.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/CGI_utf8.pm
new file mode 100644
index 0000000..0239e1b
--- /dev/null
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/CGI_utf8.pm
@@ -0,0 +1,44 @@
+package OpenILS::WWW::EGWeb::CGI_utf8;
+
+# The code in this module is copied from (except for a tiny modification)
+# Template::Plugin::CGI, which is written by:
+#
+# Andy Wardley E<lt>abw at wardley.orgE<gt> L<http://wardley.org/>
+#
+# Copyright (C) 1996-2007 Andy Wardley.  All Rights Reserved.
+#
+# This module is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+
+use strict;
+use warnings;
+use base 'Template::Plugin';
+use CGI qw(:all -utf8);
+
+sub new {
+    my $class   = shift;
+    my $context = shift;
+    new CGI(@_);
+}
+
+# monkeypatch CGI::params() method to Do The Right Thing in TT land
+
+sub CGI::params {
+    my $self = shift;
+    local $" = ', ';
+
+    return $self->{ _TT_PARAMS } ||= do {
+        # must call Vars() in a list context to receive
+        # plain list of key/vals rather than a tied hash
+        my $params = { $self->Vars() };
+
+        # convert any null separated values into lists
+        @$params{ keys %$params } = map { 
+            /\0/ ? [ split /\0/ ] : $_ 
+        } values %$params;
+
+        $params;
+    };
+}
+
+1;
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 29a938f..069dbef 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -1,6 +1,6 @@
 [%- USE money = format(l('$%.2f'));
     USE date;
-    USE CGI;
+    USE CGI = CGI_utf8;
     USE EGI18N;
     SET DATE_FORMAT = l('%m/%d/%Y');
 

commit 284468da04d903467c3be92230d5195f65c03bd5
Author: berick <berick at esilibrary.com>
Date:   Mon Mar 14 17:46:13 2011 -0400

    integrated update-email address action into account prefs

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 54c1803..e92a4bd 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -480,7 +480,7 @@ sub load_myopac_update_email {
         $e->authtoken, $email);
 
     my $url = $self->apache->unparsed_uri;
-    $url =~ s/update_email/main/;
+    $url =~ s/update_email/prefs/;
 
     return $self->generic_redirect($url);
 }
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index d095b1d..ce35479 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -950,3 +950,8 @@ div.select-wrapper:hover {
 .subtle-button:hover { text-decoration: underline; cursor: pointer; }
 .no-dec:hover { text-decoration: none; }
 .pending-addr td { background-color: #ffcccc !important; border: 0 !important; }
+
+#account-update-email table { text-align: center; padding: 20px; margin-top: 30px; border-collapse: collapse; }
+#account-update-email table td { padding: 5px 15px 5px 15px; border-bottom: 1px solid #ddd; text-align: left;}
+#account-update-email-error { font-size: 1.5em; padding: 10px; border:1px solid #e9ebf3;}
+
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
index ebfbebd..bb62854 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
@@ -475,14 +475,9 @@
                     </tr>
 
                     <tr>
-                        <td class='color_4 light_border'>
-                        [% l("Email Address") %]</td>
-
+                        <td class='color_4 light_border'>[% l("Email Address") %]</td>
                         <td class='light_border'>[% ctx.user.email | html %]</td>
-
-                        <td class='light_border'><a href='#'
-                           class="hide_me"
-                           style='text-decoration: underline;'>[% l("Change") %]</a></td>
+                        <td class='light_border'><a href='update_email'>[% l('Change') %]</a></td>
                     </tr>
 
                     <tr class='hide_me'>
diff --git a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2 b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
new file mode 100644
index 0000000..22b089a
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
@@ -0,0 +1,24 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/marc_misc.tt2";
+    WRAPPER "default/opac/parts/base.tt2" +
+        "default/opac/parts/myopac/base.tt2";
+    myopac_page = "update_email"  %]
+<div id='myopac_summary_div' style="padding:0px;">
+
+[% IF ctx.invalid_email %]
+    <div id='account-update-email-error'>
+        [% | l(ctx.invalid_email) %]
+        The email address "<b>[_1]</b>" is invalid.  Please try a different email address.
+        [% END %]
+    </div>
+[% END %]
+
+<form method='POST' id='account-update-email'>
+    <table> 
+        <tr><td>[% l('Current Email') %]</td><td>[% ctx.user.email | html %]</td></tr>
+        <tr><td>[% l('New Email') %]</td><td><input type='text' name='email' value='[% ctx.invalid_email | html %]'/></td></tr>
+        <tr><td colspan='2' align='center'><input type='submit'/></td></tr>
+    </table>
+</form>
+
+[% END %]

commit 4213b223849b7b4144d6658863b87adec77af135
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Mar 14 17:31:05 2011 -0400

    CGIUTF8 was a horrible, subtle, dark failure
    
    and I don't want to talk about it. Also, 'use CGI qw/-utf8/' suddenly
    works.  Maybe it always did.

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/CGIUTF8.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/CGIUTF8.pm
deleted file mode 100644
index baa43eb..0000000
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/CGIUTF8.pm
+++ /dev/null
@@ -1,20 +0,0 @@
-package OpenILS::WWW::CGIUTF8;
-use strict;
-use warnings;
-use base qw(CGI);
-use Encode;
-
-sub param {
-    my ($self, $k) = @_;
-
-    return map { Encode::decode_utf8($_) } CGI::param($k) if wantarray;
-    return Encode::decode_utf8(CGI::param($k));
-}
-
-sub param_bin {
-    my $self = shift;
-
-    return CGI::param(@_);
-}
-
-1;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 941efa1..178f4d8 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -13,7 +13,7 @@ use OpenILS::Application::AppUtils;
 use OpenILS::Utils::CStoreEditor qw/:funcs/;
 use OpenILS::Utils::Fieldmapper;
 use DateTime::Format::ISO8601;
-use OpenILS::WWW::CGIUTF8;
+use CGI qw(-utf8);
 
 # EGCatLoader sub-modules 
 use OpenILS::WWW::EGCatLoader::Util;
@@ -33,7 +33,11 @@ sub new {
 
     $self->apache($apache);
     $self->ctx($ctx);
-    $self->cgi(new OpenILS::WWW::CGIUTF8);
+    $self->cgi(new CGI);
+
+    my $msg1 = "LFW XXX: param('query') is " . $self->cgi->param('query');
+    $logger->info("LFW XXX: msg1 is " . $msg1);
+    $logger->info("LFW XXX: query_string is " . $self->cgi->query_string());
 
     OpenILS::Utils::CStoreEditor->init; # just in case
     $self->editor(new_editor());
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/CGIUTF8.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/CGIUTF8.pm
deleted file mode 100644
index e90d5d9..0000000
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/CGIUTF8.pm
+++ /dev/null
@@ -1,17 +0,0 @@
-package OpenILS::WWW::EGWeb::CGIUTF8;
-
-# This is just a wrapper for TT around the real package,
-# which is OpenILS::WWW::CGIUTF8
-
-use strict;
-use warnings;
-use base 'Template::Plugin';
-use OpenILS::WWW::CGIUTF8;
-
-sub new {
-    my $class   = shift;
-    my $context = shift;
-    new OpenILS::WWW::CGIUTF8(@_);
-}
-
-1;
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index ca33722..29a938f 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -1,6 +1,6 @@
 [%- USE money = format(l('$%.2f'));
     USE date;
-    USE CGI = CGIUTF8;
+    USE CGI;
     USE EGI18N;
     SET DATE_FORMAT = l('%m/%d/%Y');
 

commit 6b82af4f8ab8b8c1eaa6e31a699d7e9ab7b896f8
Author: berick <berick at esilibrary.com>
Date:   Mon Mar 14 16:43:57 2011 -0400

    i18n and repaired holds estimated wait calculation.

diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index fc56d54..79e3044 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -194,9 +194,10 @@
                             [%
                                 IF hold.hold.status == 4;
                                     l("Available");
-                                ELSIF hold.hold.estimated_wait;
-                                    l("Estimated wait (days): ");
-                                    hold.hold.estimated_wait;
+                                ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
+                                    # estimated wait is delivered as seconds.
+                                    SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);
+                                    l("Estimated wait: [quant,_1,day,days]", hwait);
                                 ELSIF hold.hold.status == 3;
                                     l("In Transit");
                                 ELSIF hold.hold.status < 3;
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index ca33722..b09ae69 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -2,6 +2,7 @@
     USE date;
     USE CGI = CGIUTF8;
     USE EGI18N;
+    USE POSIX;
     SET DATE_FORMAT = l('%m/%d/%Y');
 
     # Don't wrap in l() here; do that where this format string is actually used.

commit 7391bf1940803d95c54b40d9695ec6a9739e0e0a
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Mar 14 12:02:39 2011 -0400

    hide edit link in myopac/holds. show basic user info in myopac/prefs

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 5195b8d..54c1803 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -19,7 +19,7 @@ sub load_myopac {
         {
             flesh => 1,
             flesh_fields => {
-                au => ['card']
+                au => [qw/card home_ou addresses ident_type/]
                 # ...
             }
         }
diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index 602c9d2..60fd1df 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -143,7 +143,7 @@
 .opac-auto-158 { text-align: center; margin-top: 6px; margin-bottom: 6px }
 .opac-auto-159 { text-align: center; padding: 20px; width: 100% }
 .opac-auto-160 { text-align: center; padding-bottom: 8px; }
-.opac-auto-161 { text-align: right; padding-right: 7px; }
+.opac-auto-161 { text-align: right; padding-right: 7px; width: 62px; }
 .opac-auto-162 { vertical-align: top; }
 .nowrap { white-space: nowrap; }
 .opac-auto-164 { white-space: nowrap; padding-left: 5px; }
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 324e2ff..d095b1d 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -949,3 +949,4 @@ div.select-wrapper:hover {
 }
 .subtle-button:hover { text-decoration: underline; cursor: pointer; }
 .no-dec:hover { text-decoration: none; }
+.pending-addr td { background-color: #ffcccc !important; border: 0 !important; }
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 8babf82..fc56d54 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -205,13 +205,12 @@
                             %]
                         </div>
                     </td>
-                    <td width="62" align="right"
-                        style="text-align:right;padding-right:7px;">
-                        <a name="hold_edit_link" href="#">Edit</a>
+                    <td class="opac-auto-161">
+                        <!-- XXX TODO <a name="hold_edit_link" href="#">Edit</a>
                         <a href="#" name="hold_save_link"
                             class="hide_me">Save</a>
                         <a href="#" name="hold_cancel_link"
-                            class="hide_me">Back</a>
+                            class="hide_me">Back</a> -->
                     </td>
                 </tr>
                 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
index 9f6177a..ebfbebd 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
@@ -3,7 +3,7 @@
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "prefs"  %]
     <div id='myopac_prefs_div'>
-        <div id="acct_prefs_tabs"
+        <!-- XXX TODO <div id="acct_prefs_tabs"
              style="padding-bottom: 12px;color:#666;">
             <div style="float:left;">
                 <div class="align selected"
@@ -49,7 +49,7 @@
             </div>
 
             <div class="clear-both"></div>
-        </div>
+        </div> -->
 
         <div class="header_middle">
             <span id="acct_prefs_header">
@@ -285,16 +285,12 @@
                         <td width='30%'
                             class='color_4 light_border'>[% l("Name") %]</td>
 
-                        <td class='light_border'><span id=
-                        'myopac_summary_prefix'
-                              style='padding-right: 5px;'></span> <span id=
-                              'myopac_summary_first'
-                              style='padding-right: 5px;'></span> <span id=
-                              'myopac_summary_middle'
-                              style='padding-right: 5px;'></span> <span id=
-                              'myopac_summary_last'
-                              style='padding-right: 5px;'></span> <span id=
-                              'myopac_summary_suffix'></span></td>
+                        <td class='light_border'>[% l(
+                            HUMAN_NAME_FORMAT,
+                            ctx.user.prefix, ctx.user.first_given_name,
+                            ctx.user.second_given_name, ctx.user.family_name,
+                            ctx.user.suffix
+                        ) | html %]</td>
 
                         <td></td>
                     </tr>
@@ -304,7 +300,7 @@
                         [% l("Day Phone") %]</td>
 
                         <td class='light_border'
-                            id='myopac_summary_dayphone'></td>
+                            id='myopac_summary_dayphone'>[% ctx.user.day_phone | html %]</td>
 
                         <td class='light_border'><a href='#'
                            class="hide_me"
@@ -342,7 +338,7 @@
                         [% l("Evening Phone") %]</td>
 
                         <td class='light_border'
-                            id='myopac_summary_eveningphone'></td>
+                            id='myopac_summary_eveningphone'>[% ctx.user.evening_phone | html %]</td>
 
                         <td class='light_border'><a href='#'
                            class="hide_me"
@@ -369,7 +365,7 @@
                         [% l("Other Phone") %]</td>
 
                         <td class='light_border'
-                            id='myopac_summary_otherphone'></td>
+                            id='myopac_summary_otherphone'>[% ctx.user.other_phone | html %]</td>
 
                         <td class='light_border'><a href='#'
                            class="hide_me"
@@ -394,7 +390,7 @@
                     <tr>
                         <td class='color_4 light_border'>
                             <div style="position:absolute">
-                                <div style=
+                                <div class="hide_me" style=
                                 "position:relative;left:70px;top:-3px;">
                                     <a href="#">
                                     <img alt="Username Help"
@@ -405,7 +401,7 @@
                         </td>
 
                         <td class='light_border'
-                            id='myopac_summary_username'></td>
+                            id='myopac_summary_username'>[% ctx.user.usrname | html %]</td>
 
                         <td class='light_border'><a href='#'
                            class="hide_me"
@@ -434,12 +430,9 @@
                             [% l("(not shown)") %]</td>
                         <td class='light_border'><a href='#'
                            class="hide_me"
-                           id='myopac_summary_password_change'
-                           style=
-                           'text-decoration: underline;'>[% l("Change") %]</a></td>
+                           style='text-decoration: underline;'>[% l("Change") %]</a></td>
                     </tr>
-                    <tr id='myopac_update_password_row'
-                        class='hide_me'>
+                    <tr class='hide_me'>
                         <td class='myopac_update_cell'
                             colspan='3'>
                             <table>
@@ -453,17 +446,14 @@
 
                                         <td>
                                             <input type='password'
-                                               size='24'
-                                               id='myopac_current_password' />
+                                               size='24' />
                                            </td>
                                     </tr>
                                     <tr>
                                         <td><span class=
                                         'myopac_update_span'>[% l("Enter new password:") %]</span></td>
 
-                                        <td><input type='password'
-                                               size='24'
-                                               id='myopac_new_password' />
+                                        <td><input type='password' size='24' />
                                            </td>
                                     </tr>
 
@@ -472,9 +462,7 @@
                                         'myopac_update_span'>[% l("Re-enter new password:") %]</span></td>
 
                                         <td>
-                                            <input type='password'
-                                                size='24'
-                                                id='myopac_new_password2' />
+                                            <input type='password' size='24' />
                                         </td>
                                     </tr>
                                 </tbody>
@@ -490,23 +478,19 @@
                         <td class='color_4 light_border'>
                         [% l("Email Address") %]</td>
 
-                        <td class='light_border'
-                            id='myopac_summary_email'></td>
+                        <td class='light_border'>[% ctx.user.email | html %]</td>
 
                         <td class='light_border'><a href='#'
                            class="hide_me"
-                           id='myopac_summary_email_change'
-                           style=
-                           'text-decoration: underline;'>[% l("Change") %]</a></td>
+                           style='text-decoration: underline;'>[% l("Change") %]</a></td>
                     </tr>
 
-                    <tr id='myopac_update_email_row'
-                        class='hide_me'>
+                    <tr class='hide_me'>
                         <td class='myopac_update_cell' colspan='3'>
                             <span class= 'myopac_update_span'>
                                 [% l("Enter new email address:") %]
                             </span>
-                            <input type='text' size='24' id='myopac_new_email' />
+                            <input type='text' size='24' />
                             <span class='myopac_update_span'>
                                 <button>
                                     <span class= 'myopac_update_span'>
@@ -521,22 +505,25 @@
                             </span>
                         </td>
                     </tr>
-                    <tr class="hide_me">
+                    [% IF ctx.user.ident_value %]<tr class="hide_me">
                         <td class='color_4 light_border'>
                         [% l("Primary Identification") %]</td>
 
-                        <td class='light_border'
-                            id='myopac_summary_ident1'></td>
-
+                        <td class='light_border'>
+                            [%
+                            # l('[_1] ([_2])', ctx.user.ident_value, ctx.user.ident_type.name) | html
+                            # XXX uncomment the above line to show primary
+                            # identification. With a minor tweak it could
+                            # alternatively be shown but partially obscured. %]
+                        </td>
                         <td></td>
-                    </tr>
+                    </tr>[% END %]
 
                     <tr>
                         <td class='color_4 light_border'>
                         [% l("Active Barcode") %]</td>
 
-                        <td class='light_border'
-                            id='myopac_summary_barcode'></td>
+                        <td class='light_border'>[% ctx.user.card.barcode %]</td>
 
                         <td></td>
                     </tr>
@@ -544,21 +531,17 @@
                     <tr>
                         <td class='color_4 light_border'>
                         [% l("Home Library") %]</td>
-                        <td class='light_border'
-                            id='myopac_summary_homelib'></td>
+                        <td class='light_border'>[% ctx.user.home_ou.name %]</td>
                         <td><a href='#'
                            class="hide_me"
-                           id='myopac_summary_home_change'
-                           style=
-                           'text-decoration: underline;'>[% l("Change") %]</a></td>
+                           style='text-decoration: underline;'>[% l("Change") %]</a></td>
                     </tr>
-                    <tr id='myopac_update_home_row'
-                        class='hide_me'>
+                    <tr class='hide_me'>
                         <td class='myopac_update_cell'
                             colspan='3'>
                             <span class='myopac_update_span'>
                                 New home library:</span>
-                            <select id='myopac_new_home'>
+                            <select>
                             </select>
                             <span class='myopac_update_span'>
                                 <button>
@@ -590,64 +573,56 @@
             <table width='100%' class='light_border data_grid'>
                 <thead>
                     <tr>
-                        <td>[% l("Addresses") %]</td>
+                        <td><strong>[% l("Addresses") %]</strong></td>
 
-                        <td id='myopac_pending_addr_td' class='hide_me'>
-                            <table cellpadding="0" cellspacing="0" border="0">
-                                <tr>
-                                    <td>[% l("Pending Addresses") %]</td>
-
-                                    <td>
-                                        <a href="#"><img
-                                            alt="Address Help"
-                                            src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
-                                    </td>
-                                </tr>
-                            </table>
-                        </td>
                     </tr>
                 </thead>
                 <tbody id='myopac_addr_tbody'>
-                    <tr id='myopac_addr_row' class='light_border'>
+                    [% FOR addr IN ctx.user.addresses %]
+                    <tr class='[% addr.pending == "t" ? "pending-addr" : "light_border" %]'>
                         <td>
                             <table>
                                 <tr>
                                     <td>[% l("Address Type") %]</td>
-                                    <td name='myopac_addr_type'></td>
+                                    <td name='myopac_addr_type'>[%
+                                        IF addr.pending == "t";
+                                            "<strong>" _ l("*** PENDING ***") _ "</strong> ";
+                                        END;
+                                        addr.address_type | lower | ucfirst;
+                                    %]</td>
                                 </tr>
-
                                 <tr>
                                     <td>[% l("Street") %]</td>
-                                    <td name='myopac_addr_street'></td>
+                                    <td name='myopac_addr_street'>[% addr.street1 | html %]</td>
                                 </tr>
-                                <tr>
+                                [% IF addr.street2 %]<tr>
                                     <td>[% l("Street") %]</td>
-                                    <td name='myopac_addr_street2'></td>
-                                </tr>
+                                    <td name='myopac_addr_street2'>[% addr.street2 | html %]</td>
+                                </tr>[% END %]
 
                                 <tr>
                                     <td>[% l("City") %]</td>
-                                    <td name='myopac_addr_city'></td>
+                                    <td name='myopac_addr_city'>[% addr.city | html %]</td>
                                 </tr>
 
                                 <tr>
                                     <td>[% l("County") %]</td>
-                                    <td name='myopac_addr_county'></td>
+                                    <td name='myopac_addr_county'>[% addr.county| html  %]</td>
                                 </tr>
 
                                 <tr>
                                     <td>[% l("State") %]</td>
-                                    <td name='myopac_addr_state'></td>
+                                    <td name='myopac_addr_state'>[% addr.state | html %]</td>
                                 </tr>
 
                                 <tr>
                                     <td>[% l("Country") %]</td>
-                                    <td name='myopac_addr_country'></td>
+                                    <td name='myopac_addr_country'>[% addr.country | html %]</td>
                                 </tr>
 
                                 <tr>
                                     <td>[% l("Zip") %]</td>
-                                    <td name='myopac_addr_zip'></td>
+                                    <td name='myopac_addr_zip'>[% addr.post_code | html %]</td>
                                 </tr>
                                 <tr>
                                     <td name='myopac_addr_edit_td'
@@ -659,74 +634,8 @@
                                 </tr>
                             </table>
                         </td>
-                        <td class='hide_me'
-                            name='myopac_pending_addr_td'>
-                            <table>
-                                <tr>
-                                    <td>[% l("Address Type") %]</td>
-
-                                    <td><input name=
-                                    'myopac_pending_addr_type' /></td>
-                                </tr>
-                                <tr>
-                                    <td>
-                                    [% l("Street") %]</td>
-
-                                    <td><input name=
-                                    'myopac_pending_addr_street' /></td>
-                                </tr>
-                                <tr>
-                                    <td>[% l("Street") %]</td>
-                                    <td>
-                                        <input name='myopac_pending_addr_street2' />
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td>[% l("City") %]</td>
-                                    <td>
-                                        <input name='myopac_pending_addr_city' />
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td>[% l("County") %]</td>
-
-                                    <td>
-                                        <input name='myopac_pending_addr_county' />
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td>[% l("State") %]</td>
-                                    <td>
-                                        <input name='myopac_pending_addr_state' />
-                                    </td>
-                                </tr>
-
-                                <tr>
-                                    <td>[% l("Country") %]</td>
-
-                                    <td>
-                                        <input name='myopac_pending_addr_country' />
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td>[% l("Zip") %]</td>
-                                    <td><input name=
-                                    'myopac_pending_addr_zip' /></td>
-                                </tr>
-                                <tr>
-                                    <td name='myopac_addr_edit_td' colspan='2'>
-                                        <a class='classic_link'
-                                            name='myopac_pending_addr_edit_link'
-                                            href='#'>Save Changes</a>
-                                        <a style='padding-left:10px;'
-                                            class='classic_link'
-                                            name='myopac_pending_addr_del_link'
-                                            href='#'>Discard Pending Address</a>
-                                    </td>
-                                </tr>
-                            </table>
-                        </td>
                     </tr>
+                    [% END %]
                 </tbody>
             </table>
         </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 7b8eec4..ca33722 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -4,6 +4,9 @@
     USE EGI18N;
     SET DATE_FORMAT = l('%m/%d/%Y');
 
+    # Don't wrap in l() here; do that where this format string is actually used.
+    SET HUMAN_NAME_FORMAT = '[_1] [_2] [_3] [_4] [_5]';
+
     formats = [  # XXX KCLS-specific
         {'code' => 'a', 'name' => 'Book', 'image' => 'media_book.jpg'},
         {'code' => 'i', 'name' => 'Book on cassette', 'image' => 'media_bookoncasset.jpg'},

commit 40b369f6efa3e8939077027d20ccdfd9744a5801
Merge: f8579d2 6ad459f
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Mar 14 10:08:03 2011 -0400

    Merge branch 'master' of ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit f8579d2e3b6011f735790298b3f4afca07543785
Author: senator <lebbeous at esilibrary.com>
Date:   Fri Mar 11 18:07:54 2011 -0500

    Support for most of the actions on lists and bookbags
    
    Show authors too. And other little stuff.

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 7fcdfa9..5195b8d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -528,7 +528,8 @@ sub load_myopac_bookbag_update {
     my $action = $cgi->param('action');
     my $list_id = $cgi->param('list');
     my $add_rec = $cgi->param('add_rec');
-    my $del_item = $cgi->param('del_item');
+    my @del_item = $cgi->param('del_item');
+    my $shared = $cgi->param('shared');
     my $name = $cgi->param('name');
     my $success = 0;
     my $list;
@@ -538,7 +539,7 @@ sub load_myopac_bookbag_update {
         $list->name($name);
         $list->owner($e->requestor->id);
         $list->btype('bookbag');
-        $list->pub('f');
+        $list->pub($shared ? 't' : 'f');
         $success = $U->simplereq('open-ils.actor', 
             'open-ils.actor.container.create', $e->authtoken, 'biblio', $list)
 
@@ -583,8 +584,13 @@ sub load_myopac_bookbag_update {
             'open-ils.actor.container.item.create', $e->authtoken, 'biblio', $item);
 
     } elsif($action eq 'del_item') {
-        $success = $U->simplereq('open-ils.actor', 
-            'open-ils.actor.container.item.delete', $e->authtoken, 'biblio', $del_item);
+        foreach (@del_item) {
+            $success = $U->simplereq(
+                'open-ils.actor',
+                'open-ils.actor.container.item.delete', $e->authtoken, 'biblio', $_
+            );
+            last unless $success;
+        }
     }
 
     return $self->generic_redirect if $success;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
index 5a73fdb..38a9755 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
@@ -60,17 +60,19 @@ sub load_mylist_add {
 # Removes a record ID from My List
 sub load_mylist_del {
     my $self = shift;
-    my $rec_id = $self->cgi->param('record');
+    my @rec_ids = $self->cgi->param('record');
 
     my ($cache_key, $list) = $self->fetch_mylist;
     return $self->mylist_action_redirect unless $cache_key;
 
-    $list = [ grep { $_ ne $rec_id } @$list ];
+    my @keep;
+    foreach my $id (@$list) { push(@keep, $id) unless grep { $id eq $_ } @rec_ids; }
 
     $cache_key = $U->simplereq(
         'open-ils.actor',
         'open-ils.actor.anon_cache.set_value', 
-        $cache_key, ANON_CACHE_MYLIST, $list);
+        $cache_key, ANON_CACHE_MYLIST, \@keep
+    );
 
     return $self->mylist_action_redirect($cache_key);
 }
diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index 84748d0..602c9d2 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -24,8 +24,8 @@
 
 #lib_selector_span { display: none }
 .float-left { float: left; }
-.opac-auto-039 { float: left; font-weight: bold; padding-top: 5px; }
-.opac-auto-040 { float: left; padding: 5px 0px 0px 10px; }
+.bookbag-name { float: left; font-weight: bold; padding-top: 5px; }
+.bookbag-share { float: left; padding: 5px 0px 0px 10px; }
 .left-corner { float: left; width: 163px; height: 30px; background: url('/images/utils-corner-mid.png') repeat-x top; }
 .float-right { float: right; }
 .opac-auto-045 { float: right; margin-right: 17px; }
@@ -55,7 +55,7 @@
 .opac-auto-070 { margin-bottom: 20px; }
 .opac-auto-071 { margin-bottom: 5px; }
 .opac-auto-072 { margin-left: 20px; }
-.opac-auto-073 { margin-left: 5px; margin-top: 5px; }
+.bookbag-list { margin-left: 5px; margin-top: 5px; width: 91%; border: 0;}
 #cn_browse_where { margin-left: 6px; }
 .opac-auto-075 { margin-right: 20px; }
 .opac-auto-076 { margin-right: 3px; }
@@ -152,7 +152,7 @@
 .opac-auto-168 { width: 100%; border: 2px solid #E0F0E0; margin-bottom: 20px; }
 .opac-auto-169 { width: 100%; height: 100%; }
 .opac-auto-170 { width: 100%; margin-top: 20px; border-top: 1px dotted #ccc; padding-top: 8px; }
-.opac-auto-171 { width: 100%; text-align: center; font-weight: 700; margin-top: 10px; }
+.opac-auto-171 { font-size: 120%; text-align: center; font-style: italic; }
 .opac-auto-172 { width: 100%; text-align: center; padding-bottom: 5px; }
 .opac-auto-173 { width: 10px; }
 .opac-auto-174 { width: 111px; height: 25px; }
diff --git a/Open-ILS/web/templates/default/opac/mylist.tt2 b/Open-ILS/web/templates/default/opac/mylist.tt2
index f115441..daccdb7 100644
--- a/Open-ILS/web/templates/default/opac/mylist.tt2
+++ b/Open-ILS/web/templates/default/opac/mylist.tt2
@@ -9,7 +9,11 @@
     </div>
     <div id="content-wrapper">
         <div id="main-content">
-            [% INCLUDE "default/opac/parts/anon_list.tt2" %]
+            [%  IF ctx.mylist.size;
+                    INCLUDE "default/opac/parts/anon_list.tt2";
+                ELSE %]
+                <div class="opac-auto-171 opac-auto-097">[% l("You have not created a list yet."); %]</div>
+                [% END %]
             <div class="common-full-pad"></div>	
         </div>
     </div>
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index 3da5062..85cf1c0 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -21,45 +21,84 @@
         [% INCLUDE "default/opac/parts/anon_list.tt2" %]
         [% IF ctx.bookbags.size %]
         <div id='acct_lists_prime'>
+            [% FOR bbag IN ctx.bookbags %]
             <div id='acct_list_template'>
                 <div style="width:100%">
-                    <div style="float:left;font-weight:bold;padding-top:5px;" name='list_name'></div>
-
-                    <div style="float:left;padding:5px 0px 0px 10px;">
-
-                        <a target='_blank' name='share_list_rss' class='hide_me'><img 
-                            alt="[% l('RSS Feed') %]" border="0" src="[% ctx.media_prefix %]/images/small-rss.png"
-                            title="[% l('You are sharing this list') %]"/></a>
-                    </div>
-                    <div style="float:left;padding:5px 0px 0px 10px;">
-                        <a href="#" name="share_list_link">[% l('Share') %]</a>
-                    </div>
-                    <div style="float:left;padding:5px 0px 0px 10px;">
-                        <a href="#" name="remove_list">[% l('Remove') %]</a>
+                    <div class="bookbag-name">[% bbag.name %]</div>
+                    <div class="bookbag-share">
+                        [% IF bbag.pub == 't'; # XXX TODO %]
+                        <!-- <a target='_blank' name='share_list_rss'><img
+                            alt="[% l('RSS Feed') %]" border="0"
+                            src="[% ctx.media_prefix %]/images/small-rss.png"
+                            title="[% l('You are sharing this list') %]" /></a> -->
+                        [% END %]
                     </div>
+                    <form action="[% ctx.opac_root %]/myopac/list/update"
+                        method="POST">
+                        <div class="bookbag-share">
+                            <input type="hidden" name="list" value="[% bbag.id %]" />
+                            [% IF bbag.pub != 't' %]
+                            <input type="hidden" name="action" value="show" />
+                            <input type="submit" value="[% l('Share') %]" />
+                            [% ELSE %]
+                            <input type="hidden" name="action" value="hide" />
+                            <input type="submit" value="[% l('Hide') %]" />
+                            [% END %]
+                        </div>
+                    </form>
+                    <form action="[% ctx.opac_root %]/myopac/list/update"
+                        method="POST">
+                        <div class="bookbag-share">
+                            <input type="hidden" name="list" value="[% bbag.id %]" />
+                            <input type="hidden" name="action" value="delete" />
+                            <input type="submit" value="[% l('Delete List') %]" />
+                        </div>
+                    </form>
                     <div class="clear-both pad-bottom-five"></div>
                 </div>
-                <table id="acct_list_header" cellpadding='0' cellspacing='0' border='0'>
-                    <tr>
-                        <td width="1%" style="padding-left:10px;">
-                            <input type="checkbox" id="check_all_list" />
-                        </td>
-                        <td width="98%" style="padding-left:5px;">Title</td>
-                        <td width="1%">
-                            <select class="opac-auto-179" name="list_actions">
-                                <option value="0">[% l('-- Actions for this list --') %]</option>
-                                <option value="hold">[% l('Place Hold') %]</option>
-                                <option value="remove">[% l('Remove Items') %]</option>
-                            </select>
-                        </td>
-                    </tr>
-                </table>
-                <table cellpadding='0' cellspacing='5' border='0'
-                    width='91%' style='margin-left:5px;margin-top:5px;'>
-                    <tbody name='list_tbody'></tbody>
+                <form action="[% ctx.opac_root %]/myopac/list/update"
+                    method="POST">
+                <input type="hidden" name="list" value="[% bbag.id %]" />
+                <table cellpadding='0' cellspacing='0' border='0'>
+                    <thead id="acct_list_header">
+                        <tr>
+                            <td width="1%" style="padding-left: 10px;">
+                                <input type="checkbox" />
+                            </td>
+                            <td width="49%" style="padding-left: 5px;">[% l('Title') %]</td>
+                            <td width="49%">[% l('Author(s)') %]</td>
+                            <td width="1%" class="nowrap">
+                                <select class="opac-auto-179" name="action">
+                                    <option>[% l('-- Actions for this list --') %]</option>
+                                    <!-- XXX not ready yet<option value="hold">[% l('Place Hold') %]</option> -->
+                                    <option value="del_item">[% l('Remove Items') %]</option>
+                                </select>
+                                <input type="submit" value="[% l('Go') %]" />
+                            </td>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        [% UNLESS bbag.items.size %]
+                        <tr><td colspan="4" class="opac-auto-171 opac-auto-097">
+                            [% l("This list contains no items.") %]
+                        </td></tr>
+                        [% END %]
+                        [% FOR item IN bbag.items;
+                            item_id = item.id;
+                            attrs = {marc_xml => ctx.bookbags_marc_xml.$item_id};
+                            PROCESS get_marc_attrs args=attrs %]
+                        <tr>
+                            <td class="opac-auto-097b" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item_id %]" /></td>
+                            <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title %]</td>
+                            <td class="opac-auto-097b">[% attrs.author %]</td>
+                        </tr>
+                        [% END %]
+                    </tbody>
                 </table>
+                </form>
                 <br /><br />
             </div>
+            [% END %]
         </div>
         [% END %]
     </div>
@@ -68,75 +107,9 @@
     </div>
     <div style='text-align: center; font-weight: bold;' 
         class='hide_me' id='myopac_bookbags_none'>[% l("You have not created any bookbags") %]</div>
-    <table width='100%' class='data_grid data_grid_center hide_me'
-        id='myopac_bookbag_table'>
-        <thead>
-            <tr>
-                <td>[% l("Name") %]</td>
-                <td>[% l("# Items") %]</td>
-                <td>[% l("Shared") %]</td>
-                <td>[% l("Share / Hide") %]</td>
-                <td>[% l("Delete this bookbag?") %]</td>
-            </tr>
-        </thead>
-        <tbody id='myopac_bookbag_tbody'>
-            <tr>
-                <td>
-                    <a href='#' class='classic_link' name='myopac_expand_bookbag'> </a>
-                </td>
-                <td>
-                    <span name='myopac_bookbag_item_count'> </span>
-                    <span>[% l("Items") %]</span>
-                </td>
-                <td>
-                    <span name='myopac_bb_published_no' class='hide_me'>[% l("No") %]</span>
-                    <span name='myopac_bb_published_yes' class='hide_me'>[% l("Yes") %]</span>
-                    <a class='classic_link hide_me'>[% l("(View)") %]</a>
-
-                    <a class='unadorned_link hide_me'><img 
-                        alt="[% l('RSS Feed') %]" border="0"
-                        src="[% ctx.media_prefix %]/images/small-rss.png" title="[% l("ATOM Feed") %]" />
-                    </a>
-                </td>
-                <td>
-                    <a class='classic_link hide_me'>[% l("Hide") %]</a>
-                    <a class='classic_link hide_me'>[% l("Share this Bookbag") %]</a>
-                </td>
-                <td>
-                    <a class='classic_link' href='#'>[% l("Delete") %]</a>
-                </td>
-            </tr>
-        </tbody>
-    </table>
     <div style='width: 99%; text-align: center'>
         <b id='myopac_bookbag_items_name'> </b>
     </div>
-    <div class='hide_me'
-        style='width:100%; text-align:center; font-weight:700; margin-top:10px;'
-        id='myopac_bookbag_no_items'>
-        [% l("The selected bookbag contains no items...") %]
-    </div>
-    <table width='100%' class='hide_me data_grid data_grid_center'
-        id='myopac_bookbag_items_table'>
-        <thead> 
-            <tr>
-                <td>[% l("Title") %]</td>
-                <td>[% l("Authors") %]</td>
-                <td>[% l("Remove this item?") %]</td>
-            </tr> 
-        </thead>
-        <tbody id='myopac_bookbag_items_tbody'>
-            <tr id='myopac_bookbag_items_row'>
-                <td>
-                    <a name='myopac_bookbag_items_title' class='classic_link'> </a>
-                </td>
-                <td name='myopac_bookbag_items_author'></td>
-                <td>
-                    <a name='myopac_bookbag_items_remove' class='classic_link'>[% l("remove") %]</a>
-                </td>    
-            </tr>
-        </tbody>
-    </table>
     <span id='bb_publish_text' class='hide_me'>[% l("Sharing a Bookbag means that the contents of the Bookbag will be visible to others.  To see the public view of a shared Bookbag, click the \"View\" link in the \"Shared\" column of the Bookbag list at the top of this page.") %]</span>
     <span id='myopac_remove_bb_item_confirm' class='hide_me'>
         [% l("Are you sure you wish to remove this bookbag item?") %]
@@ -160,31 +133,34 @@
         [% l("Bookbag successfully updated") %]
     </span>
 </div>
-<div style="margin-top: 6px;margin-left:20px;width:250px;padding:5px;" id="mylist_div">
-
-    <!-- new list creation -->
-    <div style="padding-bottom: 7px;">
-        <h2 style="font-weight:normal;">[% l('Create new list') %]</h2>
-        [% l('Enter the name of the new list:') %]<br/>
-        <input type="text" id="mylist_new" />
-    </div>
-
-    <table cellpadding="0" cellspacing="10" border="0">
-        <tr>
-            <td>
-                [% l('Share this list?') %]
-                <a href="#"><img alt="[% l('Sharing Help') %]"
-                    src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
-            </td>
-            <td>
-                <input type="radio" value="0" name="shareList" checked="checked" />[% l('No') %]
-                <br/>
-                <input type="radio" value="1" name="shareList"/>[% l('Yes') %]
-            </td>
-        </tr>
-    </table>
-    <a href="#"><img alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png"/></a>
-    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-    <a href="#"><img alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+<!-- new list creation -->
+<form action="[% ctx.opac_root %]/myopac/list/update" method="POST" id="create_form">
+<div style="padding-bottom: 7px;">
+    <h2>[% l('Create new list') %]</h2><a name="createnewlist"></a>
+    [% l('Enter the name of the new list:') %]<br/>
+    <input type="hidden" name="action" value="create" />
+    <input type="text" name="name" />
 </div>
+
+<table cellpadding="0" cellspacing="10" border="0">
+    <tr>
+        <td>
+            [% l('Share this list?') %]
+            <a href="#"><img alt="[% l('Sharing Help') %]"
+                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+        </td>
+        <td>
+            <input type="radio" value="0" name="shared" id="shared_0" checked="checked" /><label for="shared_0">[% l('No') %]</label>
+            <br/>
+            <input type="radio" value="1" name="shared" id="shared_1"/><label for="shared_1">[% l('Yes') %]</label>
+        </td>
+    </tr>
+</table>
+<input type="image" alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png"/>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+<a href="javascript:void(0);"
+    onclick="document.getElementById('create_form').reset(); return false"><img
+    alt="[% l('Cancel') %]"
+    src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+</form>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2 b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
index 2d1d1e3..e1e72fe 100644
--- a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
@@ -1,4 +1,5 @@
         [% IF ctx.mylist.size %]
+        <form action="[% ctx.opac_root %]/mylist/del" method="POST">
         <div id='acct_list_template2'>
             <div style="width:100%">
                 <table cellpadding="0" cellspacing="0" border="0">
@@ -16,33 +17,38 @@
                 <div class="float-right"></div>
                 <div class="clear-both pad-bottom-five"></div>
             </div>
-            <table id="acct_list_header_anon" cellpadding='0' cellspacing='0' border='0'>
-                <tr>
-                    <td width="1%" style="padding-left:10px;"><input type="checkbox"/>
-                    </td>
-                    <td width="98%" style="padding-left:5px;">[% l('Title') %]</td>
-                    <td width="1%">
-                        <select class="opac-auto-179"
-                            name="list_actions" id="sel_all_list_anon">
-                            <option value="0">[% l('-- Actions for this list --') %]</option>
-                            <option value="hold">[% l('Place Hold') %]</option>
-                            <option value="remove">[% l('Remove Items') %]</option>
-                        </select>
-                    </td>
-                </tr>
-            </table>
-            <table cellpadding='0' cellspacing='5' border='0'
-                width='91%' style='margin-left:5px;margin-top:5px;'>
+            <table cellpadding='0' cellspacing='0' border='0'>
+                <thead id="acct_list_header_anon">
+                    <tr>
+                        <td width="1%" style="padding-left:10px;"><input type="checkbox"/>
+                        </td>
+                        <td width="49%" style="padding-left:5px;">[% l('Title') %]</td>
+                        <td width="49%" style="padding-left:5px;">[% l('Author(s)') %]</td>
+                        <td width="1%" class="nowrap">
+                            <select class="opac-auto-179" name="action">
+                                <option>[% l('-- Actions for this list --') %]</option>
+                                <!-- XXX not ready <option value="hold">[% l('Place Hold') %]</option> -->
+                                <option value="delete">[% l('Remove Items') %]</option>
+                            </select>
+                            <input type="submit" value="[% l('Go') %]" />
+                        </td>
+                    </tr>
+                </thead>
                 <tbody id='anon_list_tbody'>
                     [% FOR item IN ctx.mylist;
                         attrs = {marc_xml => ctx.mylist_marc_xml.$item};
                         PROCESS get_marc_attrs args=attrs %]
                     <tr>
-                        <td>[% attrs.title %]</td>
+                        <td class="opac-auto-097b" style="padding-left: 10px;">
+                            <input type="checkbox" name="record" value="[% item %]" />
+                        </td>
+                        <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title %]</td>
+                        <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.author %]</td>
                     </tr>
                     [% END %]
                 </tbody>
             </table>
             <br /><br />
         </div>
+        </form>
         [% END %]

commit f66701e3582e319624867071bcba4fa31472d2b2
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Mar 10 17:24:08 2011 -0500

    Foundational work for temporary/anon lists and per-user lists (bookbags)
    
    There were already some features in EGCatLoader for adding and
    deleting items from lists, but there's more to do, as that code only
    dealt with numeric IDs, and we need records avaiable. Also, to avoid
    search bots creating temporary/anon lists all the time, and just because
    the following is good practice, our "add to my list" links need to be
    forms that POST, not links that GET.
    
    Etc., etc.; more to come.

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 597bf96..941efa1 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -84,12 +84,17 @@ sub load {
 
     my $path = $self->apache->path_info;
 
+    (undef, $self->ctx->{mylist}) = $self->fetch_mylist unless
+        $path =~ /opac\/my(opac\/lists|list)/;
+
     return $self->load_simple("home") if $path =~ /opac\/home/;
     return $self->load_simple("advanced") if $path =~ /opac\/advanced/;
     return $self->load_rresults if $path =~ /opac\/results/;
     return $self->load_record if $path =~ /opac\/record/;
+
     return $self->load_mylist_add if $path =~ /opac\/mylist\/add/;
     return $self->load_mylist_del if $path =~ /opac\/mylist\/del/;
+    return $self->load_mylist if $path =~ /opac\/mylist/;
     return $self->load_cache_clear if $path =~ /opac\/cache\/clear/;
 
     # ----------------------------------------------------------------
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 5adff47..7fcdfa9 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -489,19 +489,31 @@ sub load_myopac_bookbags {
     my $self = shift;
     my $e = $self->editor;
     my $ctx = $self->ctx;
-    my $limit = $self->cgi->param('limit') || 0;
-    my $offset = $self->cgi->param('offset') || 0;
 
-    my $args = {order_by => {cbreb => 'name'}};
-    $args->{limit} = $limit if $limit;
-    $args->{offset} = $offset if $offset;
+    my $rv = $self->load_mylist;
+    return $rv if $rv ne Apache2::Const::OK;
 
-    (undef, $ctx->{mylist}) = $self->fetch_mylist;
+    my $args = {
+        order_by => {cbreb => 'name'},
+        limit => $self->cgi->param('limit') || 10,
+        offset => $self->cgi->param('limit') || 0
+    };
 
     $ctx->{bookbags} = $e->search_container_biblio_record_entry_bucket([
         {owner => $self->editor->requestor->id, btype => 'bookbag'},
-        $args
-    ]);
+        # XXX what to do about the possibility of really large bookbags here?
+        {"flesh" => 1, "flesh_fields" => {"cbreb" => ["items"]}, %$args}
+    ]) or return $e->die_event;
+
+    # get unique record IDs
+    my %rec_ids = ();
+    foreach my $bbag (@{$ctx->{bookbags}}) {
+        foreach my $item_id (map { $_->id } @{$bbag->items}) {
+            $rec_ids{$item_id} = 1;
+        }
+    }
+
+    $ctx->{bookbags_marc_xml} = $self->fetch_marc_xml_by_id(keys %rec_ids);
 
     return Apache2::Const::OK;
 }
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
index 49954e7..5a73fdb 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
@@ -13,7 +13,7 @@ use constant ANON_CACHE_MYLIST => 'mylist';
 # Retrieve the users cached records AKA 'My List'
 # Returns an empty list if there are no cached records
 sub fetch_mylist {
-    my $self = shift;
+    my ($self, $with_marc_xml) = @_;
 
     my $list = [];
     my $cache_key = $self->cgi->cookie(COOKIE_ANON_CACHE);
@@ -32,8 +32,12 @@ sub fetch_mylist {
     }
 
     $self->apache->log->info("Found anon-cache list [@$list]");
+    my $marc_xml;
+    if ($with_marc_xml) {
+        $marc_xml = $self->fetch_marc_xml_by_id($list);
+    }
 
-    return ($cache_key, $list);
+    return ($cache_key, $list, $marc_xml);
 }
 
 
@@ -108,4 +112,12 @@ sub mylist_action_redirect {
     );
 }
 
+sub load_mylist {
+    my ($self) = shift;
+    (undef, $self->ctx->{mylist}, $self->ctx->{mylist_marc_xml}) =
+        $self->fetch_mylist(1);
+
+    return Apache2::Const::OK;
+}
+
 1;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index e2ea613..84c68a7 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -26,6 +26,7 @@ sub _prepare_biblio_search_basics {
 
         # This stuff probably will need refined or rethought to better handle
         # the weird things Real Users will surely type in.
+        $contains = "" unless defined $contains; # silence warning
         if ($contains eq 'nocontains') {
             $query =~ s/"//g;
             $query = ('"' . $query . '"') if index $query, ' ';
@@ -138,43 +139,16 @@ sub load_rresults {
 
     return Apache2::Const::OK if @$rec_ids == 0;
 
-    my $cstore1 = OpenSRF::AppSession->create('open-ils.cstore');
-    my $bre_req = $cstore1->request(
-        'open-ils.cstore.direct.biblio.record_entry.search', {id => $rec_ids});
-
-    my $search = OpenSRF::AppSession->create('open-ils.search');
-    my $facet_req = $search->request('open-ils.search.facet_cache.retrieve', $results->{facet_key}, 10);
-
-    my @data;
-    while(my $resp = $bre_req->recv) {
-        my $bre = $resp->content; 
-
-        # XXX farm out to multiple cstore sessions before loop, then collect after
-        my $copy_counts = $e->json_query(
-            {from => ['asset.record_copy_count', 1, $bre->id, 0]})->[0];
-
-        push(@data,
-            {
-                bre => $bre,
-                marc_xml => XML::LibXML->new->parse_string($bre->marc),
-                copy_counts => $copy_counts
-            }
-        );
-    }
-
-    $cstore1->kill_me;
+    my ($facets, @data) = $self->get_records_and_facets($rec_ids, $results->{facet_key});
 
     # shove recs into context in search results order
-    for my $rec_id (@$rec_ids) { 
+    for my $rec_id (@$rec_ids) {
         push(
             @{$ctx->{records}},
             grep { $_->{bre}->id == $rec_id } @data
         );
     }
 
-    my $facets = $facet_req->gather(1);
-
-    $facets->{$_} = {cmf => $ctx->{find_cmf}->($_), data => $facets->{$_}} for keys %$facets;  # quick-n-dirty
     $ctx->{search_facets} = $facets;
 
     return Apache2::Const::OK;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 63b5213..a6e408d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -137,4 +137,73 @@ sub generic_redirect {
     return Apache2::Const::REDIRECT;
 }
 
+sub get_records_and_facets {
+    my ($self, $rec_ids, $facet_key) = @_;
+
+    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
+    my $bre_req = $cstore->request(
+        'open-ils.cstore.direct.biblio.record_entry.search', {id => $rec_ids}
+    );
+
+    my $search = OpenSRF::AppSession->create('open-ils.search');
+    my $facet_req = $search->request(
+        'open-ils.search.facet_cache.retrieve', $facet_key, 10
+    ) if $facet_key;
+
+    my @data;
+    while (my $resp = $bre_req->recv) {
+        my $bre = $resp->content;
+
+        # XXX farm out to multiple cstore sessions before loop,
+        # then collect after
+        my $copy_counts = $self->editor->json_query(
+            {from => ['asset.record_copy_count', 1, $bre->id, 0]}
+        )->[0];
+
+        push @data, {
+            bre => $bre,
+            marc_xml => XML::LibXML->new->parse_string($bre->marc),
+            copy_counts => $copy_counts
+        };
+    }
+
+    $cstore->kill_me;
+
+    my $facets;
+    if ($facet_key) {
+        $facets = $facet_req->gather(1);
+
+        $facets->{$_} = {
+            cmf => $self->ctx->{find_cmf}->($_),
+            data => $facets->{$_}
+        } for keys %$facets;    # quick-n-dirty
+    } else {
+        $facets = undef;
+    }
+
+    return ($facets, @data);
+}
+
+sub fetch_marc_xml_by_id {
+    my ($self, $id_list) = @_;
+    $id_list = [$id_list] unless ref($id_list);
+    return {} if scalar(grep { defined $_ } @$id_list) < 1;
+
+    # I'm just sure there needs to be some more efficient way to get all of
+    # this.
+    my $results = $self->editor->json_query({
+        "select" => {"bre" => ["id", "marc"]},
+        "from" => {"bre" => {}},
+        "where" => {"id" => $id_list}
+    }) or return $self->editor->die_event;
+
+    my $marc_xml = {};
+    for my $r (@$results) {
+        $marc_xml->{$r->{"id"}} =
+            (new XML::LibXML)->parse_string($r->{"marc"});
+    }
+
+    return $marc_xml;
+}
+
 1;
diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index f652eaa..84748d0 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -41,7 +41,7 @@
 .bold { font-weight: bold; }
 .opac-auto-057 { font-weight: bold; padding: 5px; margin: 5px; width: 100%; }
 .opac-auto-058 { font-weight: bold; padding-left: 10px; }
-.opac-auto-059 { font-weight: bold; padding-right: 10px; }
+#anon_list_name { font-weight: bold; padding-right: 10px; }
 .opac-auto-060 { font-weight: normal; }
 .opac-auto-061 { height: 0px; border-top: 1px solid #b7b7b7; border-bottom: 1px solid #d4d4d4; margin: 15px 0px; }
 .small-height { height: 10px; }
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 6780de3..324e2ff 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -940,3 +940,12 @@ div.select-wrapper:hover {
     padding-left: 5em; background-color: #d7d7d7; margin: 2ex 0;
 }
 .row-remover { position: relative; top: 1px; vertical-align: middle; }
+.subtle-button {
+    background-color: #ffffff;
+    color: #003399; text-decoration: none;
+    font-size: 12px;
+    padding: 0; border: 0; margin: 0;
+    vertical-align: middle;
+}
+.subtle-button:hover { text-decoration: underline; cursor: pointer; }
+.no-dec:hover { text-decoration: none; }
diff --git a/Open-ILS/web/templates/default/opac/mylist.tt2 b/Open-ILS/web/templates/default/opac/mylist.tt2
new file mode 100644
index 0000000..f115441
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/mylist.tt2
@@ -0,0 +1,16 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/marc_misc.tt2";
+    WRAPPER "default/opac/parts/base.tt2";
+    INCLUDE "default/opac/parts/topnav.tt2";
+    ctx.page_title = l("Record Detail") %]
+    <div id="search-wrapper">
+        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content">
+            [% INCLUDE "default/opac/parts/anon_list.tt2" %]
+            <div class="common-full-pad"></div>	
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index 6d1a6db..3da5062 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -1,36 +1,10 @@
 [%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/marc_misc.tt2";
     WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "lists"  %]
-<div style="margin-top: 6px;margin-left:20px;width:250px;padding:5px;" id="mylist_div">
-
-    <!-- new list creation -->
-    <div style="padding-bottom: 7px;">
-        <h2 style="font-weight:normal;">[% l('Create new list') %]</h2>
-        [% l('Enter the name of the new list:') %]<br/>
-        <input type="text" id="mylist_new" />
-    </div>
-
-    <table cellpadding="0" cellspacing="10" border="0">
-        <tr>
-            <td>
-                [% l('Share this list?') %]
-                <a href="#"><img alt="Sharing Help"     
-                    src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
-            </td>
-            <td>
-                <input type="radio" value="0" name="shareList" checked="checked" />[% l('No') %]
-                <br/>
-                <input type="radio" value="1" name="shareList"/>[% l('Yes') %]
-            </td>
-        </tr>
-    </table>
-    <a href="#"><img alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png"/></a>
-    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-    <a href="#"><img alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
-</div>
 <div id='myopac_bookbag_div' style="padding:5px;">
-    <div class="header_middle">
+    <!-- <div class="header_middle">
         <span id="acct_holds_header" style="float:left;">[% l('My Lists') %]</span>
         <span style="float:right;"><a class="hide_me" href="#">[% l('Export List') %]</a></span>
     </div>
@@ -42,50 +16,10 @@
                 <a href="#"><img alt="[% l('Save') %]" src="[% ctx.media_prefix %]/images/save-btn.png"/></a>
             </div>
         </div>
-    </div>
-    <div class="clear-both pad-top-ten">
-        <a href="#">[% l('+ Add new list') %]</a>
-    </div>
+    </div> -->
     <div id="temp_wrapper">
-        <div id='acct_list_template2' class="hide_me">
-            <div style="width:100%">
-                <table cellpadding="0" cellspacing="0" border="0">
-                    <tr>
-                        <td style="font-weight:bold;padding-right:10px;" id='anon_list_name'>
-                            [% l('Temporary List') %]
-                        </td>
-                        <td>
-                            <a href="#"><img
-                                alt="[% l('Anonymous List Help') %]"
-                                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
-                        </td>
-                    </tr>
-                </table>
-                <div class="float-right"></div>
-                <div class="clear-both pad-bottom-five"></div>
-            </div>
-    
-            <table id="acct_list_header_anon" cellpadding='0' cellspacing='0' border='0'>
-                <tr>
-                    <td width="1%" style="padding-left:10px;"><input type="checkbox"/>
-                    </td>
-                    <td width="98%" style="padding-left:5px;">Title</td>
-                    <td width="1%">
-                        <select style='width:175px;margin-right:11px;'
-                            name="list_actions" id="sel_all_list_anon">
-                            <option value="0">[% l('-- Actions for this list --') %]</option>
-                            <option value="hold">[% l('Place Hold') %]</option>
-                            <option value="remove">[% l('Remove Items') %]</option>
-                        </select>
-                    </td>
-                </tr>
-            </table>
-            <table cellpadding='0' cellspacing='5' border='0'
-                width='91%' style='margin-left:5px;margin-top:5px;'>
-                <tbody id='anon_list_tbody'></tbody>
-            </table>
-            <br /><br />
-        </div>
+        [% INCLUDE "default/opac/parts/anon_list.tt2" %]
+        [% IF ctx.bookbags.size %]
         <div id='acct_lists_prime'>
             <div id='acct_list_template'>
                 <div style="width:100%">
@@ -112,7 +46,7 @@
                         </td>
                         <td width="98%" style="padding-left:5px;">Title</td>
                         <td width="1%">
-                            <select style='width:175px;margin-right:11px;' name="list_actions">
+                            <select class="opac-auto-179" name="list_actions">
                                 <option value="0">[% l('-- Actions for this list --') %]</option>
                                 <option value="hold">[% l('Place Hold') %]</option>
                                 <option value="remove">[% l('Remove Items') %]</option>
@@ -127,6 +61,7 @@
                 <br /><br />
             </div>
         </div>
+        [% END %]
     </div>
     <div id='myopac_delete_bookbag_warn' class='hide_me'>
         [% l("This will remove the selected bookbag and all items contained within the bookbag.  Are you sure you wish to continue?") %]
@@ -173,32 +108,6 @@
             </tr>
         </tbody>
     </table>
-    <table width='100%' class='data_grid data_grid_center hide_me' style='margin-top: 10px;'>
-        <thead>
-            <tr><td>[% l("Create a new Bookbag") %]</td></tr>
-        </thead>
-        <tbody>
-            <tr>
-                <td> 
-                    <span style='padding-right: 5px;'>
-                        [% l("Enter the name of the new Bookbag: ") %]
-                    </span>
-                    <input id='myopac_bookbag_new_name' type='text' /> 
-                </td>
-            </tr>
-            <tr>
-                <td>
-                    <span style='padding: 5px;'>[% l("Share this Bookbag") %]</span>
-                    <a class='classic_link' href='#'><b>[% l("(Help)") %]</b></a>
-                    <span>[% l("Yes") %]</span>
-                    <input type='radio' name='bb_public' id='bb_public_yes'/>
-                    <span>[% l("No") %]</span>
-                    <input type='radio' name='bb_public' id='bb_public_no' checked='checked'/>
-                    <input style='padding-left: 10px;' type='submit' value='[% l("Submit") %]' />
-                </td>
-            </tr>
-        </tbody>
-    </table>
     <div style='width: 99%; text-align: center'>
         <b id='myopac_bookbag_items_name'> </b>
     </div>
@@ -251,4 +160,31 @@
         [% l("Bookbag successfully updated") %]
     </span>
 </div>
+<div style="margin-top: 6px;margin-left:20px;width:250px;padding:5px;" id="mylist_div">
+
+    <!-- new list creation -->
+    <div style="padding-bottom: 7px;">
+        <h2 style="font-weight:normal;">[% l('Create new list') %]</h2>
+        [% l('Enter the name of the new list:') %]<br/>
+        <input type="text" id="mylist_new" />
+    </div>
+
+    <table cellpadding="0" cellspacing="10" border="0">
+        <tr>
+            <td>
+                [% l('Share this list?') %]
+                <a href="#"><img alt="[% l('Sharing Help') %]"
+                    src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+            </td>
+            <td>
+                <input type="radio" value="0" name="shareList" checked="checked" />[% l('No') %]
+                <br/>
+                <input type="radio" value="1" name="shareList"/>[% l('Yes') %]
+            </td>
+        </tr>
+    </table>
+    <a href="#"><img alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png"/></a>
+    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+    <a href="#"><img alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+</div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/anon_list.tt2 b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
new file mode 100644
index 0000000..2d1d1e3
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/anon_list.tt2
@@ -0,0 +1,48 @@
+        [% IF ctx.mylist.size %]
+        <div id='acct_list_template2'>
+            <div style="width:100%">
+                <table cellpadding="0" cellspacing="0" border="0">
+                    <tr>
+                        <td id='anon_list_name'>
+                            [% l('Temporary List') %]
+                        </td>
+                        <td>
+                            <a href="#"><img
+                                alt="[% l('Anonymous List Help') %]"
+                                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                        </td>
+                    </tr>
+                </table>
+                <div class="float-right"></div>
+                <div class="clear-both pad-bottom-five"></div>
+            </div>
+            <table id="acct_list_header_anon" cellpadding='0' cellspacing='0' border='0'>
+                <tr>
+                    <td width="1%" style="padding-left:10px;"><input type="checkbox"/>
+                    </td>
+                    <td width="98%" style="padding-left:5px;">[% l('Title') %]</td>
+                    <td width="1%">
+                        <select class="opac-auto-179"
+                            name="list_actions" id="sel_all_list_anon">
+                            <option value="0">[% l('-- Actions for this list --') %]</option>
+                            <option value="hold">[% l('Place Hold') %]</option>
+                            <option value="remove">[% l('Remove Items') %]</option>
+                        </select>
+                    </td>
+                </tr>
+            </table>
+            <table cellpadding='0' cellspacing='5' border='0'
+                width='91%' style='margin-left:5px;margin-top:5px;'>
+                <tbody id='anon_list_tbody'>
+                    [% FOR item IN ctx.mylist;
+                        attrs = {marc_xml => ctx.mylist_marc_xml.$item};
+                        PROCESS get_marc_attrs args=attrs %]
+                    <tr>
+                        <td>[% attrs.title %]</td>
+                    </tr>
+                    [% END %]
+                </tbody>
+            </table>
+            <br /><br />
+        </div>
+        [% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 414c8ba..1358ecb 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -181,26 +181,26 @@
                                                 <div style="width:250px;text-align:left;">
                                                     <div style="float:right;">
                                                         <div class="results_aux_utils opac-auto-010"><a
-                                                                href="[% ctx.opac_root %]/place_hold?hold_target=[% rec.bre.id %]&hold_type=T" name="place_hold_link"><img
+                                                                href="[% ctx.opac_root %]/place_hold?hold_target=[% rec.bre.id %]&hold_type=T" name="place_hold_link" class="no-dec"><img
                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
                                                                 alt="place hold" /><span
                                                                     style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
                                                         </div>
                                                         <div class="results_aux_utils opac-auto-011">
+                                                            <form action="[% ctx.opac_root %]/mylist/add" method="POST">
+                                                                <input type="hidden" name="record" value="[% rec.bre.id %]" />
                                                             <div style="position:absolute;">
                                                                 <div style="position:relative;top:5px; left: 25px;">
-                                                                    <a title="Add to my list"
-                                                                        name="result_my_list_link"
-                                                                        href="javascript:;">Add to my list</a>
+                                                                    <input type="submit" title="[% l('Add to my list') %]" value="[% l('Add to my list') %]" class="subtle-button" />
                                                                 </div>
                                                             </div>
-                                                            <a href="javascript:;"
-                                                                name="result_my_list_link_img"><img
-                                                                alt="add to my list"
-                                                                src="[% ctx.media_prefix %]/images/clipboard.png" /></a>
+                                                                <input type="image"
+                                                                alt="[% l('Add to my list') %]"
+                                                                src="[% ctx.media_prefix %]/images/clipboard.png" />
+                                                        </form>
                                                         </div>
                                                         <div style="padding-top:7px;" class="results_aux_utils">
-                                                            <a title="Reviews and More" target="_blank"
+                                                            <a title="Reviews and More" target="_blank" class="no-dec"
                                                                 name="reviews_and_more" href="javascript:;"><img
                                                                 alt="reviews &amp; more"
                                                                 src="[% ctx.media_prefix %]/images/starz.png" /> <span
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 682ef91..444995a 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -33,13 +33,15 @@
                         onmouseover="this.src='[% ctx.media_prefix %]/images/adv_search_hover.png';"
                         onmouseout="this.src='[% ctx.media_prefix %]/images/adv_search.png';" /></a>
                 </div>
+                [% IF ctx.mylist.size %]
                 <div class="results_header_btns cached_list_div">
-                    <a href="#" class="hide_me" id="cacheListLink"><img
+                    <a href="[% ctx.opac_root; ctx.user ? '/myopac/lists' : '/mylist' %]"><img
                         alt="View My List"
                         src="[% ctx.media_prefix %]/images/view_my_list.png"
                         onmouseover="this.src='[% ctx.media_prefix %]/images/view_my_list_hover.png';"
                         onmouseout="this.src='[% ctx.media_prefix %]/images/view_my_list.png';" /></a>
                 </div>
+                [% END %]
                 <div class="results_header_div"></div>
                 [% UNLESS CGI.param('_adv') %]
                     <div class="results_header_lbl">Sort by</div>

commit aa265893a28722d353cf4e4c8748100146f77cbf
Merge: c1d429c 2c7dda3
Author: berick <berick at esilibrary.com>
Date:   Tue Mar 8 17:16:50 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit c1d429c3f8683489661249a2d60d3e83ec2e4324
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Mar 7 13:15:03 2011 -0500

    Subclass CGI (and create TT plugin wrapper for the subclass) to get utf8 params
    
    The CGI module configuration option -utf8 just doesn't seem to do the
    trick.  I could have missed something, but this works and isn't too
    awful.

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/CGIUTF8.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/CGIUTF8.pm
new file mode 100644
index 0000000..baa43eb
--- /dev/null
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/CGIUTF8.pm
@@ -0,0 +1,20 @@
+package OpenILS::WWW::CGIUTF8;
+use strict;
+use warnings;
+use base qw(CGI);
+use Encode;
+
+sub param {
+    my ($self, $k) = @_;
+
+    return map { Encode::decode_utf8($_) } CGI::param($k) if wantarray;
+    return Encode::decode_utf8(CGI::param($k));
+}
+
+sub param_bin {
+    my $self = shift;
+
+    return CGI::param(@_);
+}
+
+1;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index bb1371b..597bf96 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -1,6 +1,5 @@
 package OpenILS::WWW::EGCatLoader;
 use strict; use warnings;
-use CGI;
 use XML::LibXML;
 use URI::Escape;
 use Digest::MD5 qw(md5_hex);
@@ -14,6 +13,7 @@ use OpenILS::Application::AppUtils;
 use OpenILS::Utils::CStoreEditor qw/:funcs/;
 use OpenILS::Utils::Fieldmapper;
 use DateTime::Format::ISO8601;
+use OpenILS::WWW::CGIUTF8;
 
 # EGCatLoader sub-modules 
 use OpenILS::WWW::EGCatLoader::Util;
@@ -33,7 +33,7 @@ sub new {
 
     $self->apache($apache);
     $self->ctx($ctx);
-    $self->cgi(CGI->new);
+    $self->cgi(new OpenILS::WWW::CGIUTF8);
 
     OpenILS::Utils::CStoreEditor->init; # just in case
     $self->editor(new_editor());
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index 4064ec2..6a7f49a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -51,7 +51,10 @@ sub handler {
         OUTPUT => ($as_xml) ?  sub { parse_as_xml($r, $ctx, @_); } : $r,
         INCLUDE_PATH => $ctx->{template_paths},
         DEBUG => $ctx->{debug_template},
-        PLUGINS => {EGI18N => 'OpenILS::WWW::EGWeb::I18NFilter'}
+        PLUGINS => {
+            EGI18N => 'OpenILS::WWW::EGWeb::I18NFilter',
+            CGIUTF8 => 'OpenILS::WWW::EGWeb::CGIUTF8'
+        }
     });
 
     unless($tt->process($template, {ctx => $ctx, l => set_text_handler($ctx, $r)})) {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/CGIUTF8.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/CGIUTF8.pm
new file mode 100644
index 0000000..e90d5d9
--- /dev/null
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/CGIUTF8.pm
@@ -0,0 +1,17 @@
+package OpenILS::WWW::EGWeb::CGIUTF8;
+
+# This is just a wrapper for TT around the real package,
+# which is OpenILS::WWW::CGIUTF8
+
+use strict;
+use warnings;
+use base 'Template::Plugin';
+use OpenILS::WWW::CGIUTF8;
+
+sub new {
+    my $class   = shift;
+    my $context = shift;
+    new OpenILS::WWW::CGIUTF8(@_);
+}
+
+1;
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 866ce2d..7b8eec4 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -1,6 +1,6 @@
 [%- USE money = format(l('$%.2f'));
     USE date;
-    USE CGI; 
+    USE CGI = CGIUTF8;
     USE EGI18N;
     SET DATE_FORMAT = l('%m/%d/%Y');
 
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index 84d8e71..f3d8ef3 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -1,5 +1,4 @@
-[%  USE CGI;
-    PROCESS "default/opac/parts/marc_misc.tt2";
+[%  PROCESS "default/opac/parts/marc_misc.tt2";
     attrs = {marc_xml => ctx.marc_xml};
     PROCESS get_marc_attrs args=attrs;
 %]

commit e881edfe507a8f88c9fc8514c90171ab65e94501
Merge: 979148d da4f185
Author: berick <berick at esilibrary.com>
Date:   Mon Mar 7 09:27:29 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 979148da85e844eb10a7015251db6c1aa92d0a01
Author: berick <berick at esilibrary.com>
Date:   Fri Mar 4 14:43:36 2011 -0500

    added bookbag CRUD+ interface which supports create/delete/rename/show/hide/add_rec/del_item actions; some I18N and cleanup of lists.tt2; added generic redirect sub to replace the bare REDIRECTs spread throughout w/ a more consistent mechanism for finding where to redirect

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 40d867b..bb1371b 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -118,7 +118,8 @@ sub load {
     return $self->load_myopac_circs if $path =~ /opac\/myopac\/circs/;
     return $self->load_myopac_fines if $path =~ /opac\/myopac\/main/;
     return $self->load_myopac_update_email if $path =~ /opac\/myopac\/update_email/;
-    return $self->load_myopac_bookbags if $path =~ /opac\/myopac\/bookbags/;
+    return $self->load_myopac_bookbags if $path =~ /opac\/myopac\/lists/;
+    return $self->load_myopac_bookbag_update if $path =~ /opac\/myopac\/list\/update/;
     return $self->load_myopac if $path =~ /opac\/myopac/;
 
     return Apache2::Const::OK;
@@ -131,8 +132,7 @@ sub load {
 sub redirect_ssl {
     my $self = shift;
     my $new_page = sprintf('https://%s%s', $self->apache->hostname, $self->apache->unparsed_uri);
-    $self->apache->print($self->cgi->redirect(-url => $new_page));
-    return Apache2::Const::REDIRECT;
+    return $self->generic_redirect($new_page);
 }
 
 # -----------------------------------------------------------------------------
@@ -143,8 +143,7 @@ sub redirect_auth {
     my $self = shift;
     my $login_page = sprintf('https://%s%s/login', $self->apache->hostname, $self->ctx->{opac_root});
     my $redirect_to = uri_escape($self->apache->unparsed_uri);
-    $self->apache->print($self->cgi->redirect(-url => "$login_page?redirect_to=$redirect_to"));
-    return Apache2::Const::REDIRECT;
+    return $self->generic_redirect("$login_page?redirect_to=$redirect_to");
 }
 
 # -----------------------------------------------------------------------------
@@ -248,20 +247,16 @@ sub load_login {
     my $acct = $self->apache->unparsed_uri;
     $acct =~ s#/login#/myopac/main#;
 
-    $self->apache->print(
-        $cgi->redirect(
-            -url => $cgi->param('redirect_to') || $acct,
-            -cookie => $cgi->cookie(
-                -name => COOKIE_SES,
-                -path => '/',
-                -secure => 1,
-                -value => $response->{payload}->{authtoken},
-                -expires => ($persist) ? CORE::time + $response->{payload}->{authtime} : undef
-            )
+    return $self->generic_redirect(
+        $cgi->param('redirect_to') || $acct,
+        $cgi->cookie(
+            -name => COOKIE_SES,
+            -path => '/',
+            -secure => 1,
+            -value => $response->{payload}->{authtoken},
+            -expires => ($persist) ? CORE::time + $response->{payload}->{authtime} : undef
         )
     );
-
-    return Apache2::Const::REDIRECT;
 }
 
 # -----------------------------------------------------------------------------
@@ -274,19 +269,15 @@ sub load_logout {
     # while logged in, go ahead and clear it out.
     $self->clear_anon_cache;
 
-    $self->apache->print(
-        $self->cgi->redirect(
-            -url => $self->ctx->{home_page},
-            -cookie => $self->cgi->cookie(
-                -name => COOKIE_SES,
-                -path => '/',
-                -value => '',
-                -expires => '-1h'
-            )
+    return $self->generic_redirect(
+        $self->ctx->{home_page},
+        $self->cgi->cookie(
+            -name => COOKIE_SES,
+            -path => '/',
+            -value => '',
+            -expires => '-1h'
         )
     );
-
-    return Apache2::Const::REDIRECT;
 }
 
 1;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 5042641..5adff47 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -233,8 +233,7 @@ sub load_place_hold {
             if($stat and $stat > 0) {
                 # if successful, return the user to the requesting page
                 $self->apache->log->info("Redirecting back to " . $cgi->param('redirect_to'));
-                $self->apache->print($cgi->redirect(-url => $cgi->param('redirect_to')));
-                return Apache2::Const::REDIRECT;
+                return $self->generic_redirect;
 
             } else {
                 $ctx->{hold_failed} = 1;
@@ -482,9 +481,8 @@ sub load_myopac_update_email {
 
     my $url = $self->apache->unparsed_uri;
     $url =~ s/update_email/main/;
-    $self->apache->print($self->cgi->redirect(-url => $url));
 
-    return Apache2::Const::REDIRECT;
+    return $self->generic_redirect($url);
 }
 
 sub load_myopac_bookbags {
@@ -496,7 +494,9 @@ sub load_myopac_bookbags {
 
     my $args = {order_by => {cbreb => 'name'}};
     $args->{limit} = $limit if $limit;
-    $args->{offset} = $limit if $limit;
+    $args->{offset} = $offset if $offset;
+
+    (undef, $ctx->{mylist}) = $self->fetch_mylist;
 
     $ctx->{bookbags} = $e->search_container_biblio_record_entry_bucket([
         {owner => $self->editor->requestor->id, btype => 'bookbag'},
@@ -507,4 +507,79 @@ sub load_myopac_bookbags {
 }
 
 
+# actions are create, delete, show, hide, rename, add_rec, delete_item
+# CGI is action, list=list_id, add_rec=bre_id, del_item=bucket_item_id, name=new_bucket_name
+sub load_myopac_bookbag_update {
+    my $self = shift;
+    my $e = $self->editor;
+    my $cgi = $self->cgi;
+    my $action = $cgi->param('action');
+    my $list_id = $cgi->param('list');
+    my $add_rec = $cgi->param('add_rec');
+    my $del_item = $cgi->param('del_item');
+    my $name = $cgi->param('name');
+    my $success = 0;
+    my $list;
+
+    if($action eq 'create') {
+        $list = Fieldmapper::container::biblio_record_entry_bucket->new;
+        $list->name($name);
+        $list->owner($e->requestor->id);
+        $list->btype('bookbag');
+        $list->pub('f');
+        $success = $U->simplereq('open-ils.actor', 
+            'open-ils.actor.container.create', $e->authtoken, 'biblio', $list)
+
+    } else {
+
+        $list = $e->retrieve_container_biblio_record_entry_bucket($list_id);
+
+        return Apache2::Const::HTTP_BAD_REQUEST unless 
+            $list and $list->owner == $e->requestor->id;
+    }
+
+    if($action eq 'delete') {
+        $success = $U->simplereq('open-ils.actor', 
+            'open-ils.actor.container.full_delete', $e->authtoken, 'biblio', $list_id);
+
+    } elsif($action eq 'show') {
+        unless($U->is_true($list->pub)) {
+            $list->pub('t');
+            $success = $U->simplereq('open-ils.actor', 
+                'open-ils.actor.container.update', $e->authtoken, 'biblio', $list);
+        }
+
+    } elsif($action eq 'hide') {
+        if($U->is_true($list->pub)) {
+            $list->pub('f');
+            $success = $U->simplereq('open-ils.actor', 
+                'open-ils.actor.container.update', $e->authtoken, 'biblio', $list);
+        }
+
+    } elsif($action eq 'rename') {
+        if($name) {
+            $list->name($name);
+            $success = $U->simplereq('open-ils.actor', 
+                'open-ils.actor.container.update', $e->authtoken, 'biblio', $list);
+        }
+
+    } elsif($action eq 'add_rec') {
+        my $item = Fieldmapper::container::biblio_record_entry_bucket_item->new;
+        $item->bucket($list_id);
+        $item->target_biblio_record_entry($add_rec);
+        $success = $U->simplereq('open-ils.actor', 
+            'open-ils.actor.container.item.create', $e->authtoken, 'biblio', $item);
+
+    } elsif($action eq 'del_item') {
+        $success = $U->simplereq('open-ils.actor', 
+            'open-ils.actor.container.item.delete', $e->authtoken, 'biblio', $del_item);
+    }
+
+    return $self->generic_redirect if $success;
+
+    $self->ctx->{bucket_action} = $action;
+    $self->ctx->{bucket_action_failed} = 1;
+    return Apache2::Const::OK;
+}
+
 1
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
index 934714a..49954e7 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
@@ -97,19 +97,15 @@ sub mylist_action_redirect {
     my $self = shift;
     my $cache_key = shift;
 
-    $self->apache->print(
-        $self->cgi->redirect(
-            -url => $self->cgi->param('redirect_to') || $self->ctx->{referer} || $self->ctx->{home_page},
-            -cookie => $self->cgi->cookie(
-                -name => COOKIE_ANON_CACHE,
-                -path => '/',
-                -value => ($cache_key) ? $cache_key : '',
-                -expires => ($cache_key) ? undef : '-1h'
-            )
+    return $self->generic_redirect(
+        undef, 
+        $self->cgi->cookie(
+            -name => COOKIE_ANON_CACHE,
+            -path => '/',
+            -value => ($cache_key) ? $cache_key : '',
+            -expires => ($cache_key) ? undef : '-1h'
         )
     );
-
-    return Apache2::Const::REDIRECT;
 }
 
 1;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 50495a8..63b5213 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -119,4 +119,22 @@ sub init_ro_object_cache {
     };
 }
 
+sub generic_redirect {
+    my $self = shift;
+    my $url = shift;
+    my $cookie = shift; # can be an array of cgi.cookie's
+
+    $self->apache->print(
+        $self->cgi->redirect(
+            -url => $url || 
+                $self->cgi->param('redirect_to') || 
+                $self->ctx->{referer} || 
+                $self->ctx->{home_page},
+            -cookie => $cookie
+        )
+    );
+
+    return Apache2::Const::REDIRECT;
+}
+
 1;
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index c93fac5..6d1a6db 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -2,60 +2,49 @@
     WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "lists"  %]
-<div
-    style="margin-top: 6px;margin-left:20px;width:250px;padding:5px;"
-    id="mylist_div">
+<div style="margin-top: 6px;margin-left:20px;width:250px;padding:5px;" id="mylist_div">
+
+    <!-- new list creation -->
     <div style="padding-bottom: 7px;">
-        <h2 style="font-weight:normal;">Create new list</h2>
-        Enter the name of the new list:<br />
+        <h2 style="font-weight:normal;">[% l('Create new list') %]</h2>
+        [% l('Enter the name of the new list:') %]<br/>
         <input type="text" id="mylist_new" />
     </div>
+
     <table cellpadding="0" cellspacing="10" border="0">
         <tr>
             <td>
-                Share this list?
-                <a href="#"><img
-                    alt="Sharing Help"
+                [% l('Share this list?') %]
+                <a href="#"><img alt="Sharing Help"     
                     src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
             </td>
             <td>
-                <input type="radio" value="0" name="shareList"
-                    id="shareListNo" checked="checked" />
-                <label for="shareListNo">No</label>
-                <br />
-                <input type="radio" value="1" name="shareList"
-                    id="shareListYes" />
-                    <label for="shareListYes">Yes</label>
+                <input type="radio" value="0" name="shareList" checked="checked" />[% l('No') %]
+                <br/>
+                <input type="radio" value="1" name="shareList"/>[% l('Yes') %]
             </td>
         </tr>
     </table>
-    <a href="#"><img
-        alt="Submit" src="[% ctx.media_prefix %]/images/btnSubmit.png" /></a>
+    <a href="#"><img alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png"/></a>
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-    <a href="#"><img
-        alt="Cancel" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+    <a href="#"><img alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
 </div>
 <div id='myopac_bookbag_div' style="padding:5px;">
     <div class="header_middle">
-        <span id="acct_holds_header" style="float:left;">My Lists</span>
-        <span style="float:right;">
-            <a class="hide_me" href="#">Export List</a>
-        </span>
+        <span id="acct_holds_header" style="float:left;">[% l('My Lists') %]</span>
+        <span style="float:right;"><a class="hide_me" href="#">[% l('Export List') %]</a></span>
     </div>
     <div style="float:right;width:85px;">
         <div style="position:absolute">
             <div style="position:relative;top:13px;">
-                <a href="#"
-                    style="position:relative;top:-3px;left:-5px;"><img
-                    alt="Saving Help"
+                <a href="#" style="position:relative;top:-3px;left:-5px;"><img alt="[% l('Saving Help') %]" 
                     src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
-                <a id='acct_lists_save' href="#"><img alt="Save"
-                    src="[% ctx.media_prefix %]/images/save-btn.png" /></a>
+                <a href="#"><img alt="[% l('Save') %]" src="[% ctx.media_prefix %]/images/save-btn.png"/></a>
             </div>
         </div>
     </div>
     <div class="clear-both pad-top-ten">
-        <a href="#">+ Add new list</a>
+        <a href="#">[% l('+ Add new list') %]</a>
     </div>
     <div id="temp_wrapper">
         <div id='acct_list_template2' class="hide_me">
@@ -63,11 +52,11 @@
                 <table cellpadding="0" cellspacing="0" border="0">
                     <tr>
                         <td style="font-weight:bold;padding-right:10px;" id='anon_list_name'>
-                            Temporary List
+                            [% l('Temporary List') %]
                         </td>
                         <td>
                             <a href="#"><img
-                                alt="Anonymous List Help"
+                                alt="[% l('Anonymous List Help') %]"
                                 src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
                         </td>
                     </tr>
@@ -78,16 +67,15 @@
     
             <table id="acct_list_header_anon" cellpadding='0' cellspacing='0' border='0'>
                 <tr>
-                    <td width="1%" style="padding-left:10px;">
-                        <input type="checkbox" id="check_all_list_anon" />
+                    <td width="1%" style="padding-left:10px;"><input type="checkbox"/>
                     </td>
                     <td width="98%" style="padding-left:5px;">Title</td>
                     <td width="1%">
                         <select style='width:175px;margin-right:11px;'
                             name="list_actions" id="sel_all_list_anon">
-                            <option value="0">-- Actions for this list --</option>
-                            <option value="hold">Place Hold</option>
-                            <option value="remove">Remove Items</option>
+                            <option value="0">[% l('-- Actions for this list --') %]</option>
+                            <option value="hold">[% l('Place Hold') %]</option>
+                            <option value="remove">[% l('Remove Items') %]</option>
                         </select>
                     </td>
                 </tr>
@@ -101,24 +89,23 @@
         <div id='acct_lists_prime'>
             <div id='acct_list_template'>
                 <div style="width:100%">
-                    <div style="float:left;font-weight:bold;padding-top:5px;"
-                        name='list_name'></div>
+                    <div style="float:left;font-weight:bold;padding-top:5px;" name='list_name'></div>
+
                     <div style="float:left;padding:5px 0px 0px 10px;">
-                        <a target='_blank' name='share_list_rss'
-                            class='hide_me'><img alt="RSS Feed" border="0"
-                            src="/opac[% ctx.media_prefix %]/images/small-rss.png"
-                            title="You are sharing this list"/></a>
+
+                        <a target='_blank' name='share_list_rss' class='hide_me'><img 
+                            alt="[% l('RSS Feed') %]" border="0" src="[% ctx.media_prefix %]/images/small-rss.png"
+                            title="[% l('You are sharing this list') %]"/></a>
                     </div>
                     <div style="float:left;padding:5px 0px 0px 10px;">
-                        <a href="#" name="share_list_link">Share</a>
+                        <a href="#" name="share_list_link">[% l('Share') %]</a>
                     </div>
                     <div style="float:left;padding:5px 0px 0px 10px;">
-                        <a href="#" name="remove_list">Remove</a>
+                        <a href="#" name="remove_list">[% l('Remove') %]</a>
                     </div>
                     <div class="clear-both pad-bottom-five"></div>
                 </div>
-                <table id="acct_list_header" cellpadding='0' cellspacing='0'
-                    border='0'>
+                <table id="acct_list_header" cellpadding='0' cellspacing='0' border='0'>
                     <tr>
                         <td width="1%" style="padding-left:10px;">
                             <input type="checkbox" id="check_all_list" />
@@ -126,9 +113,9 @@
                         <td width="98%" style="padding-left:5px;">Title</td>
                         <td width="1%">
                             <select style='width:175px;margin-right:11px;' name="list_actions">
-                                <option value="0">-- Actions for this list --</option>
-                                <option value="hold">Place Hold</option>
-                                <option value="remove">Remove Items</option>
+                                <option value="0">[% l('-- Actions for this list --') %]</option>
+                                <option value="hold">[% l('Place Hold') %]</option>
+                                <option value="remove">[% l('Remove Items') %]</option>
                             </select>
                         </td>
                     </tr>
@@ -158,40 +145,30 @@
             </tr>
         </thead>
         <tbody id='myopac_bookbag_tbody'>
-            <tr id='myopac_bookbag_tr'>
+            <tr>
                 <td>
-                    <a href='#' class='classic_link'
-                        name='myopac_expand_bookbag'> </a>
+                    <a href='#' class='classic_link' name='myopac_expand_bookbag'> </a>
                 </td>
                 <td>
                     <span name='myopac_bookbag_item_count'> </span>
-                    <span> [% l("Items") %]</span>
+                    <span>[% l("Items") %]</span>
                 </td>
                 <td>
-                    <span name='myopac_bb_published_no' class='hide_me'>
-                        [% l("No") %]
-                    </span>
-                    <span name='myopac_bb_published_yes' class='hide_me'>
-                        [% l("Yes") %]
-                    </span>
-                    <a name='myopac_bb_published_view'
-                        class='classic_link hide_me'>[% l("(View)") %]</a>
-                    <a name='myopac_bb_published_atom'
-                        class='unadorned_link hide_me'>
-                        <img alt="RSS Feed" border="0"
-                        src="/opac[% ctx.media_prefix %]/images/small-rss.png"
-                        title="[% l("ATOM Feed") %]" />
+                    <span name='myopac_bb_published_no' class='hide_me'>[% l("No") %]</span>
+                    <span name='myopac_bb_published_yes' class='hide_me'>[% l("Yes") %]</span>
+                    <a class='classic_link hide_me'>[% l("(View)") %]</a>
+
+                    <a class='unadorned_link hide_me'><img 
+                        alt="[% l('RSS Feed') %]" border="0"
+                        src="[% ctx.media_prefix %]/images/small-rss.png" title="[% l("ATOM Feed") %]" />
                     </a>
                 </td>
                 <td>
-                    <a name='myopac_bb_make_unpublished'
-                        class='classic_link hide_me'>[% l("Hide") %]</a>
-                    <a name='myopac_bb_make_published'
-                        class='classic_link hide_me'>[% l("Share this Bookbag") %]</a>
+                    <a class='classic_link hide_me'>[% l("Hide") %]</a>
+                    <a class='classic_link hide_me'>[% l("Share this Bookbag") %]</a>
                 </td>
                 <td>
-                    <a class='classic_link' href='#'
-                        name='myopac_container_delete'>[% l("Delete") %]</a>
+                    <a class='classic_link' href='#'>[% l("Delete") %]</a>
                 </td>
             </tr>
         </tbody>
@@ -212,14 +189,12 @@
             <tr>
                 <td>
                     <span style='padding: 5px;'>[% l("Share this Bookbag") %]</span>
-                    <a class='classic_link'
-                        href='#'><b>[% l("(Help)") %]</b></a>
+                    <a class='classic_link' href='#'><b>[% l("(Help)") %]</b></a>
                     <span>[% l("Yes") %]</span>
                     <input type='radio' name='bb_public' id='bb_public_yes'/>
                     <span>[% l("No") %]</span>
                     <input type='radio' name='bb_public' id='bb_public_no' checked='checked'/>
-                    <input style='padding-left: 10px;' type='submit'
-                        value='[% l("Submit") %]' />
+                    <input style='padding-left: 10px;' type='submit' value='[% l("Submit") %]' />
                 </td>
             </tr>
         </tbody>
@@ -244,13 +219,11 @@
         <tbody id='myopac_bookbag_items_tbody'>
             <tr id='myopac_bookbag_items_row'>
                 <td>
-                    <a name='myopac_bookbag_items_title'
-                        class='classic_link'> </a>
+                    <a name='myopac_bookbag_items_title' class='classic_link'> </a>
                 </td>
                 <td name='myopac_bookbag_items_author'></td>
                 <td>
-                    <a name='myopac_bookbag_items_remove'
-                        class='classic_link'>[% l("remove") %]</a>
+                    <a name='myopac_bookbag_items_remove' class='classic_link'>[% l("remove") %]</a>
                 </td>    
             </tr>
         </tbody>

commit f6fd04d24c5892ce98bc251c927c9cf9233ce945
Merge: 7db8e2d ab854ad
Author: berick <berick at esilibrary.com>
Date:   Thu Mar 3 10:01:45 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc

diff --cc Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index df33d5a,ec765af..4064ec2
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@@ -20,9 -18,9 +20,9 @@@ my %lh_cache; # locale handler
  
  sub import {
      my $self = shift;
-     $web_config_file = shift;
+     $web_config_file = shift || '';
      unless(-r $web_config_file) {
 -        warn "Invalid web config $web_config_file";
 +        warn "Invalid web config $web_config_file\n";
          return;
      }
      check_web_config();

commit 7db8e2d2d37ba7486c63cb48e3c0ea87554659bf
Merge: bdaa1d0 1cce143
Author: berick <berick at esilibrary.com>
Date:   Tue Mar 1 11:24:14 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit bdaa1d0947075c9073419cf984c82d7f57391929
Merge: 24c9658 76ca453
Author: berick <berick at esilibrary.com>
Date:   Tue Mar 1 11:06:56 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 24c9658b5403d44e2c5ae90ae842bf735d4635ed
Merge: 65ae458 35a74c9
Author: berick <berick at esilibrary.com>
Date:   Mon Feb 28 13:48:44 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 65ae458330c095ad2d5dc48a78fa88a8d78a691d
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 28 08:36:43 2011 -0500

    Implement mike's suggestions from #esi-dev on 27 Feb 2011
    
    This makes an "exact" search build a query with starting and ending
    anchors, and adds a new contains-value called "phrase" which does what
    "exact" was doing before.

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index e4b0741..e2ea613 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -30,9 +30,12 @@ sub _prepare_biblio_search_basics {
             $query =~ s/"//g;
             $query = ('"' . $query . '"') if index $query, ' ';
             $query = '-' . $query;
-        } elsif ($contains eq 'exact') {
+        } elsif ($contains eq 'phrase') {
             $query =~ s/"//g;
             $query = ('"' . $query . '"') if index $query, ' ';
+        } elsif ($contains eq 'exact') {
+            $query =~ s/[\^\$]//g;
+            $query = '^' . $query . '$';
         }
         push @chunks, $query;
     }
@@ -103,24 +106,10 @@ sub load_rresults {
     my $offset = $page * $limit;
 
     my $query = _prepare_biblio_search($cgi, $ctx);
-# XXX for now, we still put limit and offset into a hash rather than
-# right into the query string, because use of the limit() and offset() filters
-# in the query string doesn't actually work as advertised.
-#
-# When you do, with offsets > 0, you get wrong results in the 'count'
-# part of the result hash from open-ils.search.biblio.multiclass.query.
-#
-#    if (defined $cgi->param('limit') or not $query =~ /limit\(\d+\)/) {
-#        $query =~ s/ limit\(\d+\)//;
-#        $query .= " limit($limit)";
-#    }
-#    if (defined $cgi->param('page') or not $query =~ /offset\(\d+\)/) {
-#        $query =~ s/ offset\(\d+\)//;
-#        $query .= " offset($offset)";
-#    }
+    # Limit and offset will stay here. Everything else should be part of
+    # the query string, not special args.
     my $args = {'limit' => $limit, 'offset' => $offset};
 
-
     # Stuff these into the TT context so that templates can use them in redrawing forms
     $ctx->{processed_search_query} = $query;
 
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
index 2f874c9..ae8081e 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
@@ -1,4 +1,10 @@
 [%
+    contains_options = [
+        {value => 'contains', label => l('Contains')},
+        {value => 'nocontains', label => l('Does not contain')},
+        {value => 'phrase', label => l('Contains phrase')},
+        {value => 'exact', label => l('Matches exactly')}
+    ];
     contains = CGI.param('contains');
     queries = CGI.param('query');
     qtypes = CGI.param('qtype') || ['keyword' x 3];
@@ -12,9 +18,10 @@
                 query_type=qtype %]
         </span>
         <select name='contains' style='margin-right: 7px;'>
-            <option value='contains'[% c == 'contains' ? ' selected="selected"' : '' %]>[% l("Contains") %]</option>
-            <option value='nocontains'[% c == 'nocontains' ? ' selected="selected"' : '' %]>[% l("Does not contain") %]</option>
-            <option value='exact'[% c == 'exact' ? ' selected="selected"' : '' %]>[% l("Matches Exactly") %]</option>
+            [% FOR o IN contains_options;
+                |l(o.value, o.label) -%]
+            <option value="[_1]"[% c == o.value ? ' selected="selected"' : '' %]>[_2]</option>
+            [% END; END %]
         </select>
         <input type='text' size='18' name='query' value="[% q | html %]" />
         <a href="javascript:;" class="row-remover"

commit 8c854fcda17e22a6f20efdf040bcab4b3eb2d5c4
Author: senator <lebbeous at esilibrary.com>
Date:   Fri Feb 25 11:53:58 2011 -0500

    provide three rows of search input by default
    
    this better accommodates users with no JS

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index beb9ee9..e4b0741 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -21,6 +21,7 @@ sub _prepare_biblio_search_basics {
     for (my $i = 0; $i < scalar @{$parts{'qtype'}}; $i++) {
         my ($qtype, $contains, $query) = map { $parts{$_}->[$i] } @part_names;
 
+        next unless $query =~ /\S/;
         push(@chunks, $qtype . ':') unless $qtype eq 'keyword' and $i == 0;
 
         # This stuff probably will need refined or rethought to better handle
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
index afa97ff..2f874c9 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
@@ -1,7 +1,7 @@
 [%
     contains = CGI.param('contains');
     queries = CGI.param('query');
-    qtypes = CGI.param('qtype') || ['keyword'];
+    qtypes = CGI.param('qtype') || ['keyword' x 3];
     FOR qtype IN qtypes;
         c = contains.shift;
         q = queries.shift; %]

commit fd5cde927c048ad4496f9dc5ca12b14abd384508
Author: senator <lebbeous at esilibrary.com>
Date:   Fri Feb 25 11:45:17 2011 -0500

    remove debugging cruft

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 025f9d6..beb9ee9 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -127,7 +127,6 @@ sub load_rresults {
 
     my $results;
 
-    $logger->info("LFW XXX: compiled query: q{$query}");
     try {
 
         my $method = 'open-ils.search.biblio.multiclass.query';

commit 97fc9f4806179c4eef42a1d5febc317dcb611a7d
Author: senator <lebbeous at esilibrary.com>
Date:   Fri Feb 25 11:42:30 2011 -0500

    refining advanced search now preserves qtype/contains/query combos.  also,
    
    also, show something better for empty search results

diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index 68edb5e..f652eaa 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -27,7 +27,6 @@
 .opac-auto-039 { float: left; font-weight: bold; padding-top: 5px; }
 .opac-auto-040 { float: left; padding: 5px 0px 0px 10px; }
 .left-corner { float: left; width: 163px; height: 30px; background: url('/images/utils-corner-mid.png') repeat-x top; }
-.opac-auto-043 { float: left; width: 300px; margin-top: 20px; }
 .float-right { float: right; }
 .opac-auto-045 { float: right; margin-right: 17px; }
 .opac-auto-046 { float: right; width: 214px; }
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 0366017..6780de3 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -714,6 +714,8 @@ div.select-wrapper:hover {
 	padding-bottom:5px;
 }
 
+#zero_search_hits div { float:left;width:300px;margin-top:20px; }
+
 #zero_search_hits p {
 	margin-top:0;
 }
@@ -937,3 +939,4 @@ div.select-wrapper:hover {
 #adv_search_refine {
     padding-left: 5em; background-color: #d7d7d7; margin: 2ex 0;
 }
+.row-remover { position: relative; top: 1px; vertical-align: middle; }
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
index f553218..afa97ff 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
@@ -1,21 +1,26 @@
-<tr id="adv_global_row" type='input'>
+[%
+    contains = CGI.param('contains');
+    queries = CGI.param('query');
+    qtypes = CGI.param('qtype') || ['keyword'];
+    FOR qtype IN qtypes;
+        c = contains.shift;
+        q = queries.shift; %]
+<tr[% IF loop.first %] id="adv_global_row"[% END %]>
     <td align='left' width='100%' nowrap='nowrap'>
-        <!-- select the search class -->
         <span class="opac-auto-078">
-            [% INCLUDE "default/opac/parts/stypes_selector.tt2" %]
+            [% INCLUDE "default/opac/parts/qtype_selector.tt2"
+                query_type=qtype %]
         </span>
-        <!-- select how to treat the text -->
         <select name='contains' style='margin-right: 7px;'>
-            <option value='contains'>[% l("Contains") %]</option>
-            <option value='nocontains'>[% l("Does not contain") %]</option>
-            <option value='exact'>[% l("Matches Exactly") %]</option>
+            <option value='contains'[% c == 'contains' ? ' selected="selected"' : '' %]>[% l("Contains") %]</option>
+            <option value='nocontains'[% c == 'nocontains' ? ' selected="selected"' : '' %]>[% l("Does not contain") %]</option>
+            <option value='exact'[% c == 'exact' ? ' selected="selected"' : '' %]>[% l("Matches Exactly") %]</option>
         </select>
-        <!-- search term -->
-        <input type='text' size='18' name='query' />
-        <!-- Remove this row -->
-        <a href="javascript:;"
-            style="position:relative;top:1px; vertical-align: middle;"
+        <input type='text' size='18' name='query' value="[% q | html %]" />
+        <a href="javascript:;" class="row-remover"
             title="[% l('Remove row') %]" alt="[% l('Remove row') %]"
             onclick='var row = this.parentNode.parentNode;var tbody = row.parentNode; if( tbody.getElementsByTagName("tr").length > 2 ) row.parentNode.removeChild(row);'><img src="[% ctx.media_prefix %]/images/adv_row_close_btn.png" /></a>
     </td>
 </tr>
+[%      i = i + 1;
+    END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2
similarity index 58%
rename from Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
rename to Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2
index b139791..8c31f0d 100644
--- a/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2
@@ -1,4 +1,4 @@
-[%  search_classes = [
+[%  query_types = [
     {value => "keyword", label => l("Keyword")},
     {value => "title", label => l("Title")},
     {value => "author", label => l("Author")},
@@ -7,10 +7,10 @@
     {value => "id|bibcn", label => l("Call Number")}
 ] %]
 <select name="qtype">
-    [%  search_class = CGI.param('qtype');
-        FOR sc IN search_classes -%]
-    <option value='[% sc.value %]'[%
-        search_class == sc.value ? ' selected="selected"' : ''
-    %]>[% sc.label %]</option>
+    [%  query_type = query_type || CGI.param('qtype');
+        FOR qt IN query_types -%]
+    <option value='[% qt.value %]'[%
+        query_type == qt.value ? ' selected="selected"' : ''
+    %]>[% qt.label %]</option>
     [% END -%]
 </select>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2 b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
index 1afe8b0..9393c49 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
@@ -1,8 +1,11 @@
 <div id='result_low_hits'>
     <div id="zero_search_hits">
-        <div style="float:left;width:300px;margin-top:20px;">
-            <p>Sorry, no entries were found for
-                <q id="zero_hits_term">[% query | html %]</q><br />
+        <div>
+            <p>[% l('Sorry, no entries were found for') %]
+                [% IF is_advanced; l('your search'); ELSE %]
+                <q>[% CGI.param('query') | html %]</q>
+                [% END %]
+                <br />
                 <span id="zero_hits_label1" class="hide_me">Did you mean
                     <strong><a id="spell_check_link" href="javascript:;"></a></strong>?</span>
             </p>
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 7a83aea..8e9d787 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -18,7 +18,7 @@
                 <input type="hidden" name="_adv" value="1" />
             [% ELSE %]
             <td>
-            [% INCLUDE "default/opac/parts/stypes_selector.tt2" %]
+            [% INCLUDE "default/opac/parts/qtype_selector.tt2" %]
             </td>
             <td>
             [% END %]

commit 92a1b454d84ad7ff5958b2311aa1391140d14746
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 24 18:11:04 2011 -0500

    lot of things, including:
    
    - crib subjects support from regular opac poc
    - get rid of adv search form inclusion on results page, but keep the link to
        it. Show a special version of just the "compiled" QP query
    - better and more generic handling of search terms (compiling CGI params
        to QP string)
    - make limit to avail and sort work from basic search results page
    - genericize search cgi params -> qp. filter:foo, s/class/qtype/, etc
    - more!

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 199ef1e..025f9d6 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -11,15 +11,17 @@ my $U = 'OpenILS::Application::AppUtils';
 sub _prepare_biblio_search_basics {
     my ($cgi) = @_;
 
+    return $cgi->param('query') unless $cgi->param('qtype');
+
     my %parts;
-    my @part_names = qw/class contains query/;
+    my @part_names = qw/qtype contains query/;
     $parts{$_} = [ $cgi->param($_) ] for (@part_names);
 
     my @chunks = ();
-    for (my $i = 0; $i < scalar @{$parts{'class'}}; $i++) {
-        my ($class, $contains, $query) = map { $parts{$_}->[$i] } @part_names;
+    for (my $i = 0; $i < scalar @{$parts{'qtype'}}; $i++) {
+        my ($qtype, $contains, $query) = map { $parts{$_}->[$i] } @part_names;
 
-        push(@chunks, $class . ':') unless $class eq 'keyword' and $i == 0;
+        push(@chunks, $qtype . ':') unless $qtype eq 'keyword' and $i == 0;
 
         # This stuff probably will need refined or rethought to better handle
         # the weird things Real Users will surely type in.
@@ -41,32 +43,16 @@ sub _prepare_biblio_search {
     my ($cgi, $ctx) = @_;
 
     my $query = _prepare_biblio_search_basics($cgi);
-    my $args = {};
-
-    $args->{'org_unit'} = $cgi->param('loc') || $ctx->{aou_tree}->()->id;
-    $args->{'depth'} = defined $cgi->param('depth') ?
-        $cgi->param('depth') :
-        $ctx->{find_aou}->($args->{'org_unit'})->ou_type->depth;
-
-    if (grep /available/, $cgi->param('modifier')) {
-        $query = '#available ' . $query;
-    }
 
-    if ($cgi->param('format')) {
-        $query .= ' format(' . join('', $cgi->param('format')) . ')';
-    }
+    $query = ('#' . $_ . ' ' . $query) foreach ($cgi->param('modifier'));
 
-    if ($cgi->param('lang')) {
-        # XXX TODO find out how to build query with multiple langs, if that
-        # even needs to be a feature of adv search.
-        $query .= ' lang:' . $cgi->param('lang');
+    foreach (grep /^fi:/, $cgi->param) {
+        /:(\w+)$/ or next;
+        my $term = join(",", $cgi->param($_));
+        $query .= " $1($term)" if length $term;
     }
 
-    if ($cgi->param('audience')) {
-        $query .= ' audience(' . join(',', $cgi->param('audience')) . ')';
-    }
-
-    if (defined $cgi->param('sort')) {
+    if ($cgi->param('sort')) {
         my ($axis, $desc) = split /\./, $cgi->param('sort');
         $query .= " sort($axis)";
         $query .= '#descending' if $desc;
@@ -86,7 +72,17 @@ sub _prepare_biblio_search {
         }
     }
 
-    return ($args, $query);
+    my $site = $cgi->param('loc') || $ctx->{aou_tree}->()->id;
+    if (defined($cgi->param('loc')) or not $query =~ /site\(\d+\)/) {
+        $query .= " site($site)";
+    }
+    if (defined($cgi->param('depth')) or not $query =~ /depth\(\d+\)/) {
+        my $depth = defined $cgi->param('depth') ?
+            $cgi->param('depth') : $ctx->{find_aou}->($site)->ou_type->depth;
+        $query .= " depth($depth)";
+    }
+
+    return $query;
 }
 
 # context additions: 
@@ -103,20 +99,35 @@ sub load_rresults {
     my $page = $cgi->param('page') || 0;
     my $facet = $cgi->param('facet');
     my $limit = $cgi->param('limit') || 10; # TODO user settings
+    my $offset = $page * $limit;
+
+    my $query = _prepare_biblio_search($cgi, $ctx);
+# XXX for now, we still put limit and offset into a hash rather than
+# right into the query string, because use of the limit() and offset() filters
+# in the query string doesn't actually work as advertised.
+#
+# When you do, with offsets > 0, you get wrong results in the 'count'
+# part of the result hash from open-ils.search.biblio.multiclass.query.
+#
+#    if (defined $cgi->param('limit') or not $query =~ /limit\(\d+\)/) {
+#        $query =~ s/ limit\(\d+\)//;
+#        $query .= " limit($limit)";
+#    }
+#    if (defined $cgi->param('page') or not $query =~ /offset\(\d+\)/) {
+#        $query =~ s/ offset\(\d+\)//;
+#        $query .= " offset($offset)";
+#    }
+    my $args = {'limit' => $limit, 'offset' => $offset};
 
-    my ($args, $query) = _prepare_biblio_search($cgi, $ctx);
 
     # Stuff these into the TT context so that templates can use them in redrawing forms
     $ctx->{processed_search_query} = $query;
-    $ctx->{processed_search_args} = $args;
-
-    $args->{'limit'} = $limit;
-    $args->{'offset'} = $page * $limit;
 
     $query = "$query $facet" if $facet; # TODO
 
     my $results;
 
+    $logger->info("LFW XXX: compiled query: q{$query}");
     try {
 
         my $method = 'open-ils.search.biblio.multiclass.query';
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 8577afd..0366017 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -228,7 +228,7 @@ div.select-wrapper:hover {
 #search_box_wrapper {
 	border:1px solid #e9ebf3;
 	padding: 1px;
-	padding-left:3px;
+    padding-left: 3px;
 }
 
 #search-wrapper #breadcrumb {
@@ -656,7 +656,7 @@ div.select-wrapper:hover {
 }
 
 .results_header_sel {
-    width: 88px;
+    /* width: 88px; */
 	float:left;
 	position: relative;
 	top: 2px;
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
index 6d65c68..f553218 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
@@ -11,7 +11,7 @@
             <option value='exact'>[% l("Matches Exactly") %]</option>
         </select>
         <!-- search term -->
-        <input type='text' size='18' name='query' style='margin-right: 3px;' />
+        <input type='text' size='18' name='query' />
         <!-- Remove this row -->
         <a href="javascript:;"
             style="position:relative;top:1px; vertical-align: middle;"
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index 72ca027..433b438 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -32,23 +32,19 @@
             <td valign='top'>
                 <strong>[% l("Item Type") %]</strong><br />
                 [%  INCLUDE "default/opac/parts/format_selector.tt2"
-                        values=CGI.param("format")
                         multiple="multiple" size="4"
                         id="adv_global_item_type_basic" %]
             </td>
             <td valign='top'>
                 <strong>[% l("Language") %]</strong><br />
-                <select multiple='multiple' size='4' name="lang" id='adv_global_lang'>
-                    [% INCLUDE "default/opac/parts/item_lang_options.tt2"
-                        values=CGI.param("lang") %]
-                </select>
+                [%  INCLUDE "default/opac/parts/language_selector.tt2"
+                        multiple="multiple" size="4" %]
             </td>
             <td valign='top'>
                 <strong>[% l("Audience") %]</strong><br />
-                <select size='3' name="audience" multiple="multiple"
-                    id='adv_global_audience_basic'>
-                    [% INCLUDE "default/opac/parts/audience_options.tt2"
-                        values=CGI.param("audience") %]
+                    [% INCLUDE "default/opac/parts/audience_selector.tt2"
+                        id="adv_global_audience_basic"
+                        multiple="multiple" size="4" %]
                 </select>
                     <!--<a id='adv_global_audience_link_adv' class='classic_link adv_adv_link'
                         href='javascript:void(0);' onclick='
@@ -114,9 +110,9 @@
                                     [%  END; END %]
                             </select>    
                             <div style='margin-top:5px;'>
-                                <input id='adv_global_pub_date_1' name='date1' type='text' size='4' maxlength='4' />
+                                <input id='adv_global_pub_date_1' name='date1' type='text' size='4' maxlength='4' value="[% CGI.param('date1') | html %]" />
                                 <span id='adv_global_pub_date_2_span' class='[% CGI.param("pubdate") == "between" ? "" : "hide_me" %]'>
-                                   [% l("and") %] <input name='date2' id='adv_global_pub_date_2' type='text' size='4' maxlength='4'/>
+                                   [% l("and") %] <input name='date2' id='adv_global_pub_date_2' type='text' size='4' maxlength='4' value="[% CGI.param('date2') | html %]" />
                                 </span>
                             </div>
                         </td>
diff --git a/Open-ILS/web/templates/default/opac/parts/audience_options.tt2 b/Open-ILS/web/templates/default/opac/parts/audience_options.tt2
deleted file mode 100644
index 00e7790..0000000
--- a/Open-ILS/web/templates/default/opac/parts/audience_options.tt2
+++ /dev/null
@@ -1,9 +0,0 @@
-[%
-FOR opt IN [
-    {'code' => 'a,b,c,j', 'label' => l("Juvenile")},
-    {'code' => 'd', 'label' => l("General")},
-    {'code' => 'e', 'label' => l("Adult")}
-];
-    |l(opt.code, opt.label) %]
-<option value='[_1]'[% values.grep('^' _ opt.code _ '$').size ? ' selected="selected"' : '' %]>[_2]</option>
-[% END; END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/audience_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/audience_selector.tt2
new file mode 100644
index 0000000..b3e86bf
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/audience_selector.tt2
@@ -0,0 +1,16 @@
+[%  name = name || "fi:audience";
+    id = id || "audience_selector";
+    values = values || CGI.param(name) %]
+<select id='[% id %]' name='[% name %]'[%
+    multiple ? ' multiple="multiple"' : '';
+    size ? (' size="' _ size _ '"') : ''; %]>
+[%
+FOR opt IN [
+    {'code' => 'a,b,c,j', 'label' => l("Juvenile")},
+    {'code' => 'd', 'label' => l("General")},
+    {'code' => 'e', 'label' => l("Adult")}
+];
+    |l(opt.code, opt.label) %]
+<option value='[_1]'[% values.grep('^' _ opt.code _ '$').size ? ' selected="selected"' : '' %]>[_2]</option>
+[% END; END %]
+</select>
diff --git a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
index d9fcddd..2ca397b 100644
--- a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
@@ -1,5 +1,6 @@
-[%  name = name || "format";
-    id = id || "format_selector" %]
+[%-  name = name || "fi:format";
+    id = id || "format_selector";
+    values = values || CGI.param(name) -%]
 <select id='[% id %]' name='[% name %]'[%
     multiple ? ' multiple="multiple"' : '';
     size ? (' size="' _ size _ '"') : ''; %]>
diff --git a/Open-ILS/web/templates/default/opac/parts/item_lang_options.tt2 b/Open-ILS/web/templates/default/opac/parts/language_selector.tt2
similarity index 83%
rename from Open-ILS/web/templates/default/opac/parts/item_lang_options.tt2
rename to Open-ILS/web/templates/default/opac/parts/language_selector.tt2
index d44b21c..6bdfffe 100644
--- a/Open-ILS/web/templates/default/opac/parts/item_lang_options.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/language_selector.tt2
@@ -1,4 +1,10 @@
-[%
+[%- name = name || "fi:language";
+    id = id || "language_selector";
+    values = values || CGI.param(name); -%]
+<select id='[% id %]' name='[% name %]'[%
+    multiple ? ' multiple="multiple"' : '';
+    size ? (' size="' _ size _ '"') : ''; %]>
+[%-
 # Language otions for languages that exist in the catalog.
 # This file should be updated on occasion.
 #
@@ -30,4 +36,5 @@ FOR lang IN [
 ];
     |l(lang.code, lang.label) %]
 <option value='[_1]'[% values.grep('^' _ lang.code _ '$').size ? ' selected="selected"' : '' %]>[_2]</option>
-[%  END; END %]
+[%  END; END -%]
+</select>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 761ae9a..63c1daf 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -104,11 +104,27 @@
                                 <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
                             </td>
                             <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
+                            [% BLOCK render_subject;
+                            FOR node IN ctx.marc_xml.findnodes('//*[@tag="650"]');
+                                s0 = node.childNodes.0.textContent;
+                                s1 = node.childNodes.1.textContent;
+                                IF s0;
+                                    IF s0.match('\S') %]
+                                    <a href="[% ctx.opac_root %]/results?query=su:[% s0 | url %]">[% s0 %]</a>
+                                    &mdash;
+                                    [% END; IF s1 %]
+                                    <a href="[% ctx.opac_root %]/results?query=su:[% s1 | url %]">[% s1 %]</a>
+                                    <br/>
+                                    [% END %]
+                                [% END %]
+                            [% END %]
+                            [% END %]
+                            [% s = PROCESS render_subject; IF s.match('\S') %]
                             <td nowrap='nowrap' valign="top">
-                                [%# XXX TODO see kcls' drawMarcSubjects() in rdetail.js %]
                                 <strong id="rdetail_sub_lbl">[% l("Subjects") %]</strong>
                             </td>
-                            <td valign="top"></td>
+                            <td valign="top">[% s %]</td>
+                            [% END %]
                         </tr>
                     </table>
                 </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 3636eb0..7a83aea 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -1,23 +1,8 @@
 [% PROCESS "default/opac/parts/org_selector.tt2" %]
 <div id="search-box">    
-    [% IF CGI.param('_adv') # this means adv search got us here %]
-    <div class="refine-controls">
-        <span id="refine_control_reveal">[
-            <a href="[% ctx.opac_root %]/advanced?[% query_string %]"
-                onclick="unHideMe($('adv_search_refine')); unHideMe($('refine_control_hide')); hideMe($('refine_control_reveal')); return false;">[%
-            l('Click to Refine Your Search')
-        %]</a> ]</span>
-        <span id="refine_control_hide" class="hide_me">[
-            <a href="javascript:void(0);"
-                onclick="hideMe($('adv_search_refine')); hideMe($('refine_control_hide')); unHideMe($('refine_control_reveal')); return false;">[%
-            l('Click to Hide Search Form')
-        %]</a> ]</span>
-    </div>
-    <div id="adv_search_refine" class="hide_me">
-        [% INCLUDE "default/opac/parts/advanced/search.tt2" %]
-    </div>
-    [% ELSE %]
+    [% UNLESS took_care_of_form -%]
     <form action="[% ctx.opac_root %]/results" method="GET">
+    [%- END %]
     <table cellpadding="0" cellspacing="10" border="0">
         <tr>
             <td colspan="3">
@@ -28,17 +13,23 @@
             </td>
         </tr>
         <tr>
+            [% IF is_advanced %]
+            <td colspan="2">
+                <input type="hidden" name="_adv" value="1" />
+            [% ELSE %]
             <td>
-                [% INCLUDE "default/opac/parts/stypes_selector.tt2" %]
+            [% INCLUDE "default/opac/parts/stypes_selector.tt2" %]
             </td>
             <td>
+            [% END %]
                 <div id="search_box_wrapper">
                     <!-- Note: when common browsers support HTML5 placeholder text, we can remove the JS -->
-                    <input type="text" id="search_box" name="query" value="[% ctx.processed_search_query || l("Search Keyword") | html %]"
+                    <input type="text" id="search_box" name="query" value="[% is_advanced ? ctx.processed_search_query : CGI.param('query') || l("Search Keyword") | html %]"
+                        [% IF is_advanced %]style="width: 450px"[% END %]
                         onfocus="if (this.value=='[% l("Search Keyword") %]'){this.value='';this.style.color='#000';}"
                         onblur="if (this.value==''){this.value='[% l("Search Keyword") %]';this.style.color='#999';}" />
-                    <input name='page' type='hidden' value="0" />
                 </div>
+                <input name='page' type='hidden' value="0" />
             </td>
             <td valign="top">
                 <div class="pos-abs">
@@ -50,6 +41,7 @@
                 </div>
             </td>
         </tr>
+        [% UNLESS is_advanced %]
         <tr>
             <td>
                 [% INCLUDE "default/opac/parts/format_selector.tt2" value=CGI.param("format") %]
@@ -64,8 +56,15 @@
                 </span>
             </td>
         </tr>
+        [% END %]
     </table>
-    </form>
+    [% UNLESS took_care_of_form %]</form>[% END %]
+    [% IF is_advanced %]
+    <div class="opac-auto-102">
+        [ <a href="[% ctx.opac_root %]/advanced?[% query_string %]">[%
+            l('Click to Refine Your Search')
+        %]</a> ]
+    </div>
     [% END %]
     <div id="breadcrumb">
         <a href="[% ctx.opac_root %]/home">[% l('Catalog Home') %]</a> &gt;
diff --git a/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
index 69389e9..b139791 100644
--- a/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
@@ -6,8 +6,8 @@
     {value => "series", label => l("Series")},
     {value => "id|bibcn", label => l("Call Number")}
 ] %]
-<select name="class">
-    [%  search_class = CGI.param('class');
+<select name="qtype">
+    [%  search_class = CGI.param('qtype');
         FOR sc IN search_classes -%]
     <option value='[% sc.value %]'[%
         search_class == sc.value ? ' selected="selected"' : ''
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index f4f0f71..682ef91 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -4,6 +4,7 @@
     WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = l("Search Results");
+    is_advanced = CGI.param("_adv").size;
 
     query_string = CGI.query_string |
         replace(';x=\d+','') | replace(';y=\d+','') | replace(';page=\d*', '') |
@@ -12,9 +13,10 @@
     loc = CGI.param('loc');
     page_count = POSIX.ceil(ctx.hit_count / ctx.page_size);
 %]
+    <form action="[% ctx.opac_root %]/results" method="GET">
     <div id="search-wrapper">
         [% INCLUDE "default/opac/parts/utils.tt2" %]
-        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
+        [% INCLUDE "default/opac/parts/searchbar.tt2" took_care_of_form=1 %]
     </div>
     <div id="content-wrapper">
         <div id="results_header_bar">
@@ -41,7 +43,7 @@
                 <div class="results_header_div"></div>
                 [% UNLESS CGI.param('_adv') %]
                     <div class="results_header_lbl">Sort by</div>
-                    [% INCLUDE "default/opac/parts/filtersort.tt2" %]
+                    [% INCLUDE "default/opac/parts/filtersort.tt2" value=CGI.param('sort') %]
                     <div class="results_header_div"></div>
                     <!-- XXX still needed?<div class="results_header_lbl">View</div>
                     <select class="results_header_sel">
@@ -49,7 +51,10 @@
                         <option>Detailed</option>
                     </select>
                     <div class="results_header_div"></div> -->
-                    <input type="checkbox" id="limit_to_available" />
+                    <input type="checkbox" id="limit_to_available"
+                        name="modifier" value="available"
+                        [% CGI.param('modifier').grep('available').size
+                            ? ' checked="checked"' : '' %] />
                     <label for="limit_to_available" class="results_header_lbl">
                         [% l('Limit to available items') %]
                     </label>
@@ -66,4 +71,5 @@
             <div class="common-full-pad"></div>    
         </div>
     </div>
+    </form>
 [% END %]

commit cb52780d8bea4eb27bc40c9d8494a0f42aaaff51
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Feb 23 14:11:46 2011 -0500

    advanced search results now show an advanced search form...
    
    for refining your search terms.  The query-type/contains/term rows don't
    yet populate, but the rest of the form does. There probably also needs to
    be more stylistic consideration.  Still need to improve the translation of
    CGI parameters into QP syntax. Still need to do all kinds of things.

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index e294aab..199ef1e 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -48,12 +48,12 @@ sub _prepare_biblio_search {
         $cgi->param('depth') :
         $ctx->{find_aou}->($args->{'org_unit'})->ou_type->depth;
 
-    if ($cgi->param('available')) {
+    if (grep /available/, $cgi->param('modifier')) {
         $query = '#available ' . $query;
     }
 
     if ($cgi->param('format')) {
-        $args->{'format'} = join('', $cgi->param('format'));
+        $query .= ' format(' . join('', $cgi->param('format')) . ')';
     }
 
     if ($cgi->param('lang')) {
@@ -63,24 +63,26 @@ sub _prepare_biblio_search {
     }
 
     if ($cgi->param('audience')) {
-        $query .= ' audience(' . $cgi->param('audience') . ')';
+        $query .= ' audience(' . join(',', $cgi->param('audience')) . ')';
     }
 
     if (defined $cgi->param('sort')) {
-        my $sort = $cgi->param('sort');
-        my $sort_order = $cgi->param('sort_order');
-        $query .= " sort($sort)";
-        $query .= '#' . $sort_order if $sort_order and $sort ne 'rel';
+        my ($axis, $desc) = split /\./, $cgi->param('sort');
+        $query .= " sort($axis)";
+        $query .= '#descending' if $desc;
     }
 
-    if ($cgi->param('pubyear_how') && $cgi->param('pubyear1')) {
-        if ($cgi->param('pubyear_how') eq 'between') {
-            $query .= ' between(' . $cgi->param('pubyear1');
-            $query .= ',' .  $cgi->param('pubyear2') if $cgi->param('pubyear2');
+    if ($cgi->param('pubdate') && $cgi->param('date1')) {
+        if ($cgi->param('pubdate') eq 'between') {
+            $query .= ' between(' . $cgi->param('date1');
+            $query .= ',' .  $cgi->param('date2') if $cgi->param('date2');
             $query .= ')';
+        } elsif ($cgi->param('pubdate') eq 'is') {
+            $query .= ' between(' . $cgi->param('date1') .
+                ',' .  $cgi->param('date1') . ')';  # sic, date1 twice
         } else {
-            $query .= ' ' . $cgi->param('pubyear_how') .
-                '(' . $cgi->param('pubyear1') . ')';
+            $query .= ' ' . $cgi->param('pubdate') .
+                '(' . $cgi->param('date1') . ')';
         }
     }
 
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index e47edcc..8577afd 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -931,3 +931,9 @@ div.select-wrapper:hover {
 #opac.result.sort { width: 160px; }
 .renew-summary { font-size: 125%; font-style: italic; margin: 0.5ex 0; }
 .failure-text { margin-left: 4em; font-style: italic; color: #ff0000; }
+.refine-controls { font-size: 125%; padding: 0.5ex 0; }
+#adv_search_refine input[type=text] { border: 1px inset #ccc !important; }
+#adv_search_refine select { border: 1px inset #ccc !important; }
+#adv_search_refine {
+    padding-left: 5em; background-color: #d7d7d7; margin: 2ex 0;
+}
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index 0fb4ab1..72ca027 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -32,24 +32,23 @@
             <td valign='top'>
                 <strong>[% l("Item Type") %]</strong><br />
                 [%  INCLUDE "default/opac/parts/format_selector.tt2"
-                        value=CGI.param("item_type")
+                        values=CGI.param("format")
                         multiple="multiple" size="4"
                         id="adv_global_item_type_basic" %]
             </td>
             <td valign='top'>
                 <strong>[% l("Language") %]</strong><br />
                 <select multiple='multiple' size='4' name="lang" id='adv_global_lang'>
-                    [% INCLUDE "default/opac/parts/item_lang_options.tt2" %]
+                    [% INCLUDE "default/opac/parts/item_lang_options.tt2"
+                        values=CGI.param("lang") %]
                 </select>
             </td>
             <td valign='top'>
                 <strong>[% l("Audience") %]</strong><br />
-                <!-- XXX this used to be multiple, but when would that be
-                useful? -->
-                <select size='3' name="audience" id='adv_global_audience_basic'>
-                    <option value='abcj'>[% l("Juvenile") %]</option>
-                    <option value='d'>[% l("General") %]</option>
-                    <option value='e'>[% l("Adult") %]</option>
+                <select size='3' name="audience" multiple="multiple"
+                    id='adv_global_audience_basic'>
+                    [% INCLUDE "default/opac/parts/audience_options.tt2"
+                        values=CGI.param("audience") %]
                 </select>
                     <!--<a id='adv_global_audience_link_adv' class='classic_link adv_adv_link'
                         href='javascript:void(0);' onclick='
@@ -66,41 +65,12 @@
                         hideMe(this);'>[% l("Basic") %]</a>-->
             </td>
             <td valign='top'>
-            <strong>[% l("Sort Criteria") %]</strong>
+            <strong>[% l("Sort Results") %]</strong>
               <table class='opac-auto-017'>
                 <tr>
                     <td align='center' width='100%'>
-                        <table class='' width='100%'>
-                            <tbody>
-                                <tr>
-                                    <td align=''>
-                                        <select id='adv_global_sort_by' name="sort" onchange="$('adv_global_sort_dir').disabled = !Boolean(this.selectedIndex);">
-                                            <option value='rel'>[% l("Relevance") %]</option>
-                                            <option value='title'>[% l("Title") %]</option>
-                                            <option value='author'>[% l("Author") %]</option>
-                                            <option value='pubdate'>[% l("Publication date") %]</option>
-                                        </select>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td>
-                                        <select id='adv_global_sort_dir' name="sort_order" disabled='disabled'>
-                                            <option value='asc'>[% l("Ascending / A to Z") %]</option>
-                                            <option value='desc'>[% l("Descending / Z to A") %]</option>
-                                        </select>
-                                    </td>
-                           <!-- force the enable/disable sort dir code to run -->
-                                </tr>
-                                <tr>
-                                    <td align='center' class="hide_me">
-                                        <span>[% l("Group Formats and Editions") %]</span>
-                                        <input id='adv_group_titles' type='checkbox' />
-                                    </td>
-                                    <td align='center'>
-                                    </td>
-                                </tr>
-                            </tbody>
-                        </table>
+                        [% INCLUDE "default/opac/parts/filtersort.tt2"
+                            value=CGI.param('sort') %]
                     </td>
                 </tr>
               </table>
@@ -113,54 +83,14 @@
             <table cellpadding='10' cellspacing='0' border='0'>
                 <tbody>
                     <tr>
-                        <td align='right' class="hide_me">
-                            <span>[% l("Item Form") %]</span>
-                        </td>
-                        <td align='left' class="hide_me">
-                            <select multiple='multiple' size='3' id='adv_global_item_form'>
-                            </select>    
-                        </td>
-                        <td align='right' class="hide_me">
-                            <span>[% l("Literary Form") %]</span>
-                            <a id='adv_global_lit_form_link_adv' class='classic_link adv_adv_link'
-                                href='javascript:void(0);' onclick='
-                                hideMe($("adv_global_lit_form_basic"));
-                                unHideMe($("adv_global_lit_form"));
-                                hideMe(this);
-                                unHideMe($("adv_global_lit_form_link_basic"));
-                                '>[% l("Advanced") %]</a>
-                            <a id='adv_global_lit_form_link_basic' class='hide_me classic_link adv_adv_link'
-                                href='javascript:void(0);' onclick='
-                                unHideMe($("adv_global_lit_form_basic"));
-                                hideMe($("adv_global_lit_form"));
-                                unHideMe($("adv_global_lit_form_link_adv"));
-                                hideMe(this);
-                                '>[% l("Basic") %]</a>
-                        </td>
-                        <td align='left' class="hide_me">
-                            <select multiple='multiple' size='3' id='adv_global_lit_form' class='hide_me'>
-                            </select>    
-                            <select multiple='multiple' size='3' id='adv_global_lit_form_basic'>
-                                <option value='0 '>[% l("Non Fiction") %]</option>
-                                <option value='1'>[% l("Fiction") %]</option>
-                            </select>    
-                        </td>
-                        <td align='right' class="hide_me">
-                            <span>[% l("Bib Level") %]</span>
-                        </td>
-                        <td align='left' class="hide_me">
-                            <select multiple='multiple' size='3' id='adv_global_bib_level'>
-                            </select>    
-                        </td>
-                    </tr>
-                    <tr>
                         <td valign='top'>
                             <strong>[% l("Search Library") %]</strong><br />
                             [% PROCESS "default/opac/parts/org_selector.tt2";
                                 PROCESS build_org_selector name='loc' value=loc %]
                             <div style="position:relative;top:7px;">
-                                <input type='checkbox' name="available" value="1"
-                                    id='opac.result.limit2avail'/>
+                                <input type='checkbox' name="modifier"
+                                value="available"[% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %]
+                                    id='opac.result.limit2avail' />
                                 <label style="position:relative;top:-2px;"
                                     for='opac.result.limit2avail'>
                                     [% l("Limit to Available") %]</label>
@@ -168,20 +98,25 @@
                         </td>
                         <td valign='top'>
                             <strong>[% l("Publication Year") %]</strong><br />
-                            <select id='adv_global_pub_date_type' name='pubyear_how' onchange='
+                            <select id='adv_global_pub_date_type' name='pubdate' onchange='
                                 if(this.selectedIndex == 3)
                                     unHideMe($("adv_global_pub_date_2_span"));
                                 else
                                     hideMe($("adv_global_pub_date_2_span"));'>
-                                <option value='between' selected='selected'>[% l("Is") %]</option><!-- sic -->
-                                <option value='before'>[% l("Before") %]</option>
-                                <option value='after'>[% l("After") %]</option>
-                                <option value='between'>[% l("Between") %]</option>
+                                    [%  FOR opt IN [
+                                            {"code" => "is", "label" => l("Is")},
+                                            {"code" => "before", "label" => l("Before")},
+                                            {"code" => "after", "label" => l("After")},
+                                            {"code" => "between", "label" => l("Between")}
+                                        ];
+                                            |l(opt.code, opt.label) %]
+                                        <option value="[_1]"[% CGI.param('pubdate') == opt.code ? ' selected="selected"' : '' %]>[_2]</option>
+                                    [%  END; END %]
                             </select>    
                             <div style='margin-top:5px;'>
-                                <input id='adv_global_pub_date_1' name='pubyear1' type='text' size='4' maxlength='4'/>
-                                <span id='adv_global_pub_date_2_span' class='hide_me'>
-                                   [% l("and") %] <input name='pubyear2' id='adv_global_pub_date_2' type='text' size='4' maxlength='4'/>
+                                <input id='adv_global_pub_date_1' name='date1' type='text' size='4' maxlength='4' />
+                                <span id='adv_global_pub_date_2_span' class='[% CGI.param("pubdate") == "between" ? "" : "hide_me" %]'>
+                                   [% l("and") %] <input name='date2' id='adv_global_pub_date_2' type='text' size='4' maxlength='4'/>
                                 </span>
                             </div>
                         </td>
@@ -208,6 +143,7 @@
         </td>
     </tr>
 </table>
+<input type="hidden" name="_adv" value="1" />
 </form>
 <div id='adv_quick_search_sidebar' class='sidebar_chunk hide_me'> 
     <div id='adv_quick_search'>
diff --git a/Open-ILS/web/templates/default/opac/parts/audience_options.tt2 b/Open-ILS/web/templates/default/opac/parts/audience_options.tt2
new file mode 100644
index 0000000..00e7790
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/audience_options.tt2
@@ -0,0 +1,9 @@
+[%
+FOR opt IN [
+    {'code' => 'a,b,c,j', 'label' => l("Juvenile")},
+    {'code' => 'd', 'label' => l("General")},
+    {'code' => 'e', 'label' => l("Adult")}
+];
+    |l(opt.code, opt.label) %]
+<option value='[_1]'[% values.grep('^' _ opt.code _ '$').size ? ' selected="selected"' : '' %]>[_2]</option>
+[% END; END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/filtersort.tt2 b/Open-ILS/web/templates/default/opac/parts/filtersort.tt2
new file mode 100644
index 0000000..795b179
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/filtersort.tt2
@@ -0,0 +1,15 @@
+<select class="results_header_sel" id='opac.result.sort' name="sort">
+    <option value=''>[% l("Sort by Relevance") %]</option>
+    <optgroup label='[% l("Sort by Title") %]'>
+        <option value='title'[% value == 'title' ? ' selected="selected"' : '' %]>[% l("Title: A to Z") %]</option>
+        <option value='title.desc'[% value == 'title.desc' ? ' selected="selected"' : '' %]>[% l("Title: Z to A") %]</option>
+    </optgroup>
+    <optgroup label='[% l("Sort by Author") %]'>
+        <option value='author'[% value == 'author' ? ' selected="selected"' : '' %]>[% l("Author: A to Z") %]</option>
+        <option value='author.desc'[% value == 'author.desc' ? ' selected="selected"' : '' %]>[% l("Author: Z to A") %]</option>
+    </optgroup>
+    <optgroup label='[% l("Sort by Publication Date") %]'>
+        <option value='pubdate.desc'[% value == 'pubdate.desc' ? ' selected="selected"' : '' %]>[% l("Date: Newest to Oldest") %]</option>
+        <option value='pubdate'[% value == 'pubdate' ? ' selected="selected"' : '' %]>[% l("Date: Oldest to Newest") %]</option>
+    </optgroup>
+</select>
diff --git a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
index a93a4ad..d9fcddd 100644
--- a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
@@ -5,7 +5,7 @@
     size ? (' size="' _ size _ '"') : ''; %]>
     <option value=''>[% l("All Formats") %]</option>
 [% FOR o IN formats %]
-    <option value='[% o.code %]'[% value == o.code ? ' selected="selected"' : ''%]>[% o.name %]</option>
+    <option value='[% o.code %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : ''%]>[% o.name %]</option>
 [%- END %]
 <!--
 	<option value='at'>[% l("Books") %]</option>
diff --git a/Open-ILS/web/templates/default/opac/parts/item_lang_options.tt2 b/Open-ILS/web/templates/default/opac/parts/item_lang_options.tt2
index 90ee666..d44b21c 100644
--- a/Open-ILS/web/templates/default/opac/parts/item_lang_options.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/item_lang_options.tt2
@@ -1,28 +1,33 @@
+[%
+# Language otions for languages that exist in the catalog.
+# This file should be updated on occasion.
+#
+# develooper=# select code,value from config.language_map m
+#   join metabib.rec_descriptor r on (r.item_lang = m.code) group by 1,2;
 
-<!--
-Language otions for languages that exist in the catalog.
-This file should be updated on occasion.
-
-develooper=# select code,value from config.language_map m 
-	join metabib.rec_descriptor r on (r.item_lang = m.code) group by 1,2;
--->
-
-<option value='eng'>English</option>
-<option value='spa'>Spanish</option>
-<option value='fre'>French</option>
-<option value='ger'>German</option>
-<option value='ita'>Italian</option>
-<option value='chi'>Chinese</option>
-<option value='jpn'>Japanese</option>
-<option value='kor'>Korean</option>
-<option value='dut'>Dutch</option>
-<option value='gre'>Greek, Modern (1453- )</option>
-<option value='lat'>Latin</option>
-<option value='vie'>Vietnamese</option>
-<option value='rus'>Russian</option>
-<option value='nor'>Norwegian</option>
-<option value='wel'>Welsh</option>
-<option value='pau'>Palauan</option>
-<option value='swe'>Swedish</option>
-<option value='nav'>Navajo</option>
-<option value='und'>Undetermined</option>
+# XXX I haven't internationalized these labels because this stuff shouldn't
+# be hardcoded like this forever.
+FOR lang IN [
+    {'code' => 'eng', 'label' => 'English'},
+    {'code' => 'spa', 'label' => 'Spanish'},
+    {'code' => 'fre', 'label' => 'French'},
+    {'code' => 'ger', 'label' => 'German'},
+    {'code' => 'ita', 'label' => 'Italian'},
+    {'code' => 'chi', 'label' => 'Chinese'},
+    {'code' => 'jpn', 'label' => 'Japanese'},
+    {'code' => 'kor', 'label' => 'Korean'},
+    {'code' => 'dut', 'label' => 'Dutch'},
+    {'code' => 'gre', 'label' => 'Greek, Modern (1453- )'},
+    {'code' => 'lat', 'label' => 'Latin'},
+    {'code' => 'vie', 'label' => 'Vietnamese'},
+    {'code' => 'rus', 'label' => 'Russian'},
+    {'code' => 'nor', 'label' => 'Norwegian'},
+    {'code' => 'wel', 'label' => 'Welsh'},
+    {'code' => 'pau', 'label' => 'Palauan'},
+    {'code' => 'swe', 'label' => 'Swedish'},
+    {'code' => 'nav', 'label' => 'Navajo'},
+    {'code' => 'und', 'label' => 'Undetermined'}
+];
+    |l(lang.code, lang.label) %]
+<option value='[_1]'[% values.grep('^' _ lang.code _ '$').size ? ' selected="selected"' : '' %]>[_2]</option>
+[%  END; END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/result/filtersort.tt2 b/Open-ILS/web/templates/default/opac/parts/result/filtersort.tt2
deleted file mode 100644
index fc59655..0000000
--- a/Open-ILS/web/templates/default/opac/parts/result/filtersort.tt2
+++ /dev/null
@@ -1,15 +0,0 @@
-<select class="results_header_sel" id='opac.result.sort' onchange='searchBarSubmit(true);'>
-    <option selected='selected' value=''>[% l("Sort Results by Relevance") %]</option>
-    <optgroup label='[% l("Sort Results by Title") %]'>
-        <option id='opac.result.title.a2z' value='title.asc'>[% l("Title: A to Z") %]</option>
-        <option id='opac.result.title.z2a' lue='title.desc'>[% l("Title: Z to A") %]</option>
-    </optgroup>
-    <optgroup label='[% l("Sort Results by Author") %]'>
-        <option id='opac.result.author.a2z' value='author.asc'>[% l("Author: A to Z") %]</option>
-        <option id='opac.result.author.z2a' value='author.desc'>[% l("Author: Z to A") %]</option>
-    </optgroup>
-    <optgroup label='[% l("Sort Results by Publication Date") %]'>
-        <option id='opac.result.pubdate.new2old' value='pubdate.desc'>[% l("Date: Newest to Oldest") %]</option>
-        <option id='opac.result.pubdate.old2new' value='pubdate.asc'>[% l("Date: Oldest to Newest") %]</option>
-    </optgroup>
-</select>
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index e4d157d..3636eb0 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -1,5 +1,22 @@
 [% PROCESS "default/opac/parts/org_selector.tt2" %]
 <div id="search-box">    
+    [% IF CGI.param('_adv') # this means adv search got us here %]
+    <div class="refine-controls">
+        <span id="refine_control_reveal">[
+            <a href="[% ctx.opac_root %]/advanced?[% query_string %]"
+                onclick="unHideMe($('adv_search_refine')); unHideMe($('refine_control_hide')); hideMe($('refine_control_reveal')); return false;">[%
+            l('Click to Refine Your Search')
+        %]</a> ]</span>
+        <span id="refine_control_hide" class="hide_me">[
+            <a href="javascript:void(0);"
+                onclick="hideMe($('adv_search_refine')); hideMe($('refine_control_hide')); unHideMe($('refine_control_reveal')); return false;">[%
+            l('Click to Hide Search Form')
+        %]</a> ]</span>
+    </div>
+    <div id="adv_search_refine" class="hide_me">
+        [% INCLUDE "default/opac/parts/advanced/search.tt2" %]
+    </div>
+    [% ELSE %]
     <form action="[% ctx.opac_root %]/results" method="GET">
     <table cellpadding="0" cellspacing="10" border="0">
         <tr>
@@ -49,6 +66,7 @@
         </tr>
     </table>
     </form>
+    [% END %]
     <div id="breadcrumb">
         <a href="[% ctx.opac_root %]/home">[% l('Catalog Home') %]</a> &gt;
     </div>
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 2bfa7ca..f4f0f71 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -39,19 +39,21 @@
                         onmouseout="this.src='[% ctx.media_prefix %]/images/view_my_list.png';" /></a>
                 </div>
                 <div class="results_header_div"></div>
-                <div class="results_header_lbl">Sort by</div>
-                [% INCLUDE "default/opac/parts/result/filtersort.tt2" %]
-                <div class="results_header_div"></div>
-                <!-- XXX still needed?<div class="results_header_lbl">View</div>
-                <select class="results_header_sel">
-                    <option>Simple</option>
-                    <option>Detailed</option>
-                </select>
-                <div class="results_header_div"></div> -->
-                <input type="checkbox" id="limit_to_available" />
-                <label for="limit_to_available" class="results_header_lbl">
-                    [% l('Limit to available items') %]
-                </label>
+                [% UNLESS CGI.param('_adv') %]
+                    <div class="results_header_lbl">Sort by</div>
+                    [% INCLUDE "default/opac/parts/filtersort.tt2" %]
+                    <div class="results_header_div"></div>
+                    <!-- XXX still needed?<div class="results_header_lbl">View</div>
+                    <select class="results_header_sel">
+                        <option>Simple</option>
+                        <option>Detailed</option>
+                    </select>
+                    <div class="results_header_div"></div> -->
+                    <input type="checkbox" id="limit_to_available" />
+                    <label for="limit_to_available" class="results_header_lbl">
+                        [% l('Limit to available items') %]
+                    </label>
+                [% END %]
                 <div class="clear-both"></div>
             </div>
         </div>

commit 395f0a5bd397c75f06ed5609db77a21d93f07f9e
Merge: 0b1ce40 0c9a046
Author: berick <berick at esilibrary.com>
Date:   Tue Feb 22 15:36:00 2011 -0500

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 0b1ce40d1122accbf6d605c87de36eb7defee7b2
Author: berick <berick at esilibrary.com>
Date:   Tue Feb 22 15:35:55 2011 -0500

    apparently, some version of perl require 'our' in this context, presumably because it's the same package across separate files...

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index e37fc7c..50495a8 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -7,7 +7,7 @@ use OpenILS::Utils::Fieldmapper;
 use OpenILS::Application::AppUtils;
 my $U = 'OpenILS::Application::AppUtils';
 
-my %cache = (
+our %cache = (
     map => {aou => {}}, # others added dynamically as needed
     list => {},
     org_settings => {}

commit 0c9a046359728ce966229220873a0b182686c77e
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 22 15:15:48 2011 -0500

    oops, forgot to do this reflecting js move

diff --git a/Open-ILS/web/templates/default/opac/parts/base.tt2 b/Open-ILS/web/templates/default/opac/parts/base.tt2
index 4f95cdf..488c21d 100644
--- a/Open-ILS/web/templates/default/opac/parts/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/base.tt2
@@ -26,7 +26,7 @@
             <a href="http://www.kcls.org/employment/">[% l('Employment') %]</a> 
         </div>
         <script type="text/javascript"
-            src="[% ctx.media_prefix %]/js/opac/simple.js"></script>
+            src="[% ctx.media_prefix %]/js/ui/default/opac/simple.js"></script>
         <!-- Google Analytics -->
         <script type="text/javascript">
         /* uncomment when ready */ /*

commit e5129fae32cd3c4af54ce180dbbc39139ffe8b40
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 22 15:14:39 2011 -0500

    move js to its proper places in the filesystem

diff --git a/Open-ILS/web/js/opac/simple.js b/Open-ILS/web/js/ui/default/opac/simple.js
similarity index 100%
rename from Open-ILS/web/js/opac/simple.js
rename to Open-ILS/web/js/ui/default/opac/simple.js

commit f30619e68d8b4bb8a0afc93adfe901779bd36669
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 22 10:20:42 2011 -0500

    move js to end of body; no need to have footer in its own file

diff --git a/Open-ILS/web/templates/default/opac/parts/base.tt2 b/Open-ILS/web/templates/default/opac/parts/base.tt2
index 69fddc1..4f95cdf 100644
--- a/Open-ILS/web/templates/default/opac/parts/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/base.tt2
@@ -11,12 +11,36 @@
             href="[% ctx.media_prefix %]/css/skin/default/opac/style.css" />
         <title>[% l('Catalog - King County Library - [_1]', ctx.page_title) %]</title>
         <link rel="unapi-server" type="application/xml" title="unAPI" href="/opac/extras/unapi" />
-        <script type="text/javascript" src="[% ctx.media_prefix %]/js/opac/simple.js"></script>
         [% BLOCK html_head; END; # provide a default that can be overridden -%]
         [%- PROCESS html_head -%]
     </head>
     <body>
         [% content %] 
-        [% INCLUDE "default/opac/parts/footer.tt2" %]
+        <div id="footer">
+            <a href="http://www.kcls.org/usingthelibrary/request/">[% l('Request a Purchase') %]</a> &nbsp;|&nbsp;
+            <a href="http://www.kcls.org/usingthelibrary/request/">[% l('Interlibrary Loan') %]</a> &nbsp;|&nbsp;
+            <a href="http://www.kcls.org/about/contact/">[% l('Contact Us') %]</a> &nbsp;|&nbsp;
+            <a href="http://www.kcls.org/usingthelibrary/catalog_help/">[% l('Site Help') %]</a> &nbsp;|&nbsp;
+            <a href="http://www.kcls.org/usingthelibrary/policies/privacy.cfm">[% l('Privacy Statement') %]</a> &nbsp;|&nbsp;
+            <a href="http://www.kcls.org/about/support/">[% l('Support KCLS') %]</a> &nbsp;|&nbsp;
+            <a href="http://www.kcls.org/employment/">[% l('Employment') %]</a> 
+        </div>
+        <script type="text/javascript"
+            src="[% ctx.media_prefix %]/js/opac/simple.js"></script>
+        <!-- Google Analytics -->
+        <script type="text/javascript">
+        /* uncomment when ready */ /*
+          var _gaq = _gaq || [];
+          _gaq.push(['_setAccount', 'UA-3018520-10']);
+          _gaq.push(['_trackPageview']);
+
+          (function() {
+            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+          })();
+        */
+        </script>
+        <!-- End Google Analytics -->
     </body>
 </html>
diff --git a/Open-ILS/web/templates/default/opac/parts/footer.tt2 b/Open-ILS/web/templates/default/opac/parts/footer.tt2
deleted file mode 100644
index aebbd48..0000000
--- a/Open-ILS/web/templates/default/opac/parts/footer.tt2
+++ /dev/null
@@ -1,25 +0,0 @@
-<!-- Google Analytics -->
-<script type="text/javascript">
-/* uncomment when ready */ /*
-  var _gaq = _gaq || [];
-  _gaq.push(['_setAccount', 'UA-3018520-10']);
-  _gaq.push(['_trackPageview']);
-
-  (function() {
-    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-  })();
-*/
-</script>
-<!-- End Google Analytics -->
-
-<div id="footer">
-    <a href="http://www.kcls.org/usingthelibrary/request/">Request a Purchase</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/usingthelibrary/request/">Interlibrary Loan</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/about/contact/">Contact Us</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/usingthelibrary/catalog_help/">Site Help</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/usingthelibrary/policies/privacy.cfm">Privacy Statement</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/about/support/">Support KCLS</a> &nbsp;|&nbsp;
-    <a href="http://www.kcls.org/employment/">Employment</a> 
-</div>

commit b9432b7b0413b2fb23d77bdb7da152dc12c9eab9
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 21 16:35:41 2011 -0500

    empty case for myopac/circs

diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index ea78426..d5602be 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -30,6 +30,11 @@
         </span>
     </div>
     <div class="clear-both"></div>
+    [% IF ctx.circs.size < 1 %]
+    <div class="opac-auto-079">
+        <big><strong>[% l('You have no items checked out.') %]</strong></big>
+    </div>
+    [% ELSE %]
     [% IF ctx.success_renewals %]
     <div class="renew-summary">
         [% l("Successfully renewed [_1] item(s)", ctx.success_renewals) %]
@@ -144,6 +149,7 @@
         </div>
         </form>
     </div>
+    [% END %]
     <div id='checked_hist' class="hide_me" style="padding-top:8px;">
         <table id="acct_checked_hist_header" cellpadding='0' cellspacing='0'
             border='0' width='100%'>

commit 4b4c52bfa839d29ea77ee52596a854a637d19c3e
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 21 16:18:33 2011 -0500

    empty case for myopac/holds. use of quant for plural word in i18n.

diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index bdda327..8babf82 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -87,6 +87,11 @@
                 </td>
             </tr>
         </table>
+        [% IF ctx.holds.size < 1 %]
+        <div class="opac-auto-079">
+            <big><strong>[% l('No holds found.') %]</strong></big>
+        </div>
+        [% ELSE %]
         <table id="acct_holds_main_header" cellpadding='0' cellspacing='0'
             border='0' width="100%">
             <tr>
@@ -212,9 +217,9 @@
                 [% END %]
             </tbody>
         </table>
+        [% END %]
         </form>
     </div>
-    <div id='holds_hist_table' class="hide_me">testing...</div>
 
     <span id='myopac.holds.cancel.confirm' class='hide_me'>[% l("Are you sure you wish to cancel the selected holds?") %]</span>
     <span id='myopac.holds.freeze.confirm' class='hide_me'>[% l("Are you sure you wish to suspend the selected holds?  If an item has already been selected to fulfill the hold, it will not be suspended") %]</span>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 64d3bbc..414c8ba 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -137,9 +137,8 @@
                                                         </tr>
                                                     </table>
                                                     <div>
-                                                        [% l('[_1] of [_2] [_3] available',
-                                                            rec.copy_counts.available, rec.copy_counts.visible,
-                                                            rec.copy_counts.visible == 1 ? 'copy' : 'copies') %]
+                                                        [% l('[_1] of [quant,_2,copy,copies] available',
+                                                            rec.copy_counts.available, rec.copy_counts.visible) %]
                                                     </div>
                                                 </span>
                                                 <div class="hide_me">

commit 43dc7d8f0372de5094602a97888a7cd5f638f70b
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 21 15:59:31 2011 -0500

    show summarized copy availability on results page

diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index f42982f..64d3bbc 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -137,12 +137,9 @@
                                                         </tr>
                                                     </table>
                                                     <div>
-                                                        <span name="copy_holds"></span>
-                                                        <span name="copy_holds2"></span><br />
-                                                        <span name="copy_count_avail"></span>
-                                                        <!-- of <span name="copy_count"></span> on
-                                                        <span name="copy_count_total"></span> copies
-                                                        available-->
+                                                        [% l('[_1] of [_2] [_3] available',
+                                                            rec.copy_counts.available, rec.copy_counts.visible,
+                                                            rec.copy_counts.visible == 1 ? 'copy' : 'copies') %]
                                                     </div>
                                                 </span>
                                                 <div class="hide_me">

commit 4f4cfd6d0f0a9a3eaf44eded2279374d6839bc2a
Merge: 9e33416 676adf1
Author: berick <berick at esilibrary.com>
Date:   Mon Feb 21 15:37:39 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 9e3341696fb944ea80adb0ebac23727ec5521919
Author: berick <berick at esilibrary.com>
Date:   Mon Feb 21 15:32:07 2011 -0500

    i18n cleanup

diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index d8fa026..f42982f 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -13,19 +13,13 @@
 <div class="results_header_nav1">
     <table cellpadding="0" cellspacing="0" border="0" width="100%">
         <tr>
-            <td class="h1" width="116">Search Results</td>
+            <td class="h1" width="116">[% l('Search Results') %]</td>
             <td valign="bottom" nowrap="nowrap" class="result_number">
-                [% l("Results") %]
-                <strong>[% ctx.result_start %]</strong>
-                &nbsp;-
-                <strong>[% ctx.result_stop  %] </strong>
-                &nbsp;[% l("of") %]
-                <strong>[% ctx.hit_count %]</strong>
+                [% |l(ctx.result_start, ctx.result_stop, ctx.hit_count) %]
+                Results <strong>[_1]</strong> - <strong>[_2]</strong> of <strong>[_3]</strong>
+                [% END %]
                 <span style='padding-left: 6px;'>
-                    (page
-                    <strong>[% page + 1 %]</strong>
-                    &nbsp;[% l("of") %]
-                    <strong>[% page_count %]</strong>)
+                    [% |l(page + 1, page_count) %](page <strong>[_1]</strong> of <strong>[_2]</strong>)[% END %]
                 </span>
             </td>
             <td align="right" valign="bottom">

commit b9c176910c14c1448893cf5f1d6953ca4cbc283e
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 21 15:23:02 2011 -0500

    berick spotted it. double escaping.

diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index b08dabe..d8fa026 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -1,7 +1,6 @@
 [%  PROCESS "default/opac/parts/marc_misc.tt2";
 
-    q = query_string | url;
-    np_link = '?' _ q;
+    np_link = '?' _ query_string;
 
     ctx.result_start = 1 + ctx.page_size * page;
     ctx.result_stop = 1 + ctx.page_size * (page + 1);

commit 93ada490ebc69b899a8f7f09eb316a228194bf61
Merge: 684a218 e7fb8dc
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 21 14:49:33 2011 -0500

    Merge branch 'opac-tt-poc' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 684a218db75389d169abf50cc882fb7cb4ab9370
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 21 14:42:38 2011 -0500

    big ol' commit making advanced search work, albeit with issues
    
    most obvious issue is that advanced search leads to a result page that
    renders with a basic search form filled out in a silly-looking way
    
    I'm thinking it'd be best when showing results from an advanced search
    to *not* show that basic search form, but instead have a hidden version
    of the advanced search form, prepopulated, revealable by a button
    labeled "refine your search" or something.
    
    That way we'd not have to worry about reversing query parser syntax back
    into broken-out widget values. make sense?

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 2d826cd..e294aab 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -8,6 +8,85 @@ use OpenILS::Application::AppUtils;
 my $U = 'OpenILS::Application::AppUtils';
 
 
+sub _prepare_biblio_search_basics {
+    my ($cgi) = @_;
+
+    my %parts;
+    my @part_names = qw/class contains query/;
+    $parts{$_} = [ $cgi->param($_) ] for (@part_names);
+
+    my @chunks = ();
+    for (my $i = 0; $i < scalar @{$parts{'class'}}; $i++) {
+        my ($class, $contains, $query) = map { $parts{$_}->[$i] } @part_names;
+
+        push(@chunks, $class . ':') unless $class eq 'keyword' and $i == 0;
+
+        # This stuff probably will need refined or rethought to better handle
+        # the weird things Real Users will surely type in.
+        if ($contains eq 'nocontains') {
+            $query =~ s/"//g;
+            $query = ('"' . $query . '"') if index $query, ' ';
+            $query = '-' . $query;
+        } elsif ($contains eq 'exact') {
+            $query =~ s/"//g;
+            $query = ('"' . $query . '"') if index $query, ' ';
+        }
+        push @chunks, $query;
+    }
+
+    return join(' ', @chunks);
+}
+
+sub _prepare_biblio_search {
+    my ($cgi, $ctx) = @_;
+
+    my $query = _prepare_biblio_search_basics($cgi);
+    my $args = {};
+
+    $args->{'org_unit'} = $cgi->param('loc') || $ctx->{aou_tree}->()->id;
+    $args->{'depth'} = defined $cgi->param('depth') ?
+        $cgi->param('depth') :
+        $ctx->{find_aou}->($args->{'org_unit'})->ou_type->depth;
+
+    if ($cgi->param('available')) {
+        $query = '#available ' . $query;
+    }
+
+    if ($cgi->param('format')) {
+        $args->{'format'} = join('', $cgi->param('format'));
+    }
+
+    if ($cgi->param('lang')) {
+        # XXX TODO find out how to build query with multiple langs, if that
+        # even needs to be a feature of adv search.
+        $query .= ' lang:' . $cgi->param('lang');
+    }
+
+    if ($cgi->param('audience')) {
+        $query .= ' audience(' . $cgi->param('audience') . ')';
+    }
+
+    if (defined $cgi->param('sort')) {
+        my $sort = $cgi->param('sort');
+        my $sort_order = $cgi->param('sort_order');
+        $query .= " sort($sort)";
+        $query .= '#' . $sort_order if $sort_order and $sort ne 'rel';
+    }
+
+    if ($cgi->param('pubyear_how') && $cgi->param('pubyear1')) {
+        if ($cgi->param('pubyear_how') eq 'between') {
+            $query .= ' between(' . $cgi->param('pubyear1');
+            $query .= ',' .  $cgi->param('pubyear2') if $cgi->param('pubyear2');
+            $query .= ')';
+        } else {
+            $query .= ' ' . $cgi->param('pubyear_how') .
+                '(' . $cgi->param('pubyear1') . ')';
+        }
+    }
+
+    return ($args, $query);
+}
+
 # context additions: 
 #   page_size
 #   hit_count
@@ -20,25 +99,19 @@ sub load_rresults {
 
     $ctx->{page} = 'rresult';
     my $page = $cgi->param('page') || 0;
-    my $item_type = $cgi->param('item_type');
     my $facet = $cgi->param('facet');
-    my $query = $cgi->param('query');
-    my $search_class = $cgi->param('class');
     my $limit = $cgi->param('limit') || 10; # TODO user settings
 
-    my $loc = $cgi->param('loc') || $ctx->{aou_tree}->()->id;
-    my $depth = defined $cgi->param('depth') ? 
-        $cgi->param('depth') : $ctx->{find_aou}->($loc)->ou_type->depth;
+    my ($args, $query) = _prepare_biblio_search($cgi, $ctx);
 
-    my $args = {
-        limit => $limit, offset => $page * $limit,
-        org_unit => $loc, depth => $depth, $item_type ? (item_type => [$item_type]) : ()
-    };
+    # Stuff these into the TT context so that templates can use them in redrawing forms
+    $ctx->{processed_search_query} = $query;
+    $ctx->{processed_search_args} = $args;
+
+    $args->{'limit'} = $limit;
+    $args->{'offset'} = $page * $limit;
 
     $query = "$query $facet" if $facet; # TODO
-    # XXX Since open-ils.search is a public service, it is responsible for
-    # being wary of injection/bad input, not us, right?
-    $query = $search_class . ':' . $query if $search_class;
 
     my $results;
 
diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index 550669f..68edb5e 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -136,11 +136,11 @@
 .opac-auto-149 { position: relative; top: 5px; left: 25px; }
 #util_print_btn { position: relative; top: 5px; left: 30px; }
 .opac-auto-151 { position: relative; top: 75px; }
-.opac-auto-152 { position: relative; top: -9px; }
+#adv_reset { position: relative; top: -9px; }
 .opac-auto-153 { position: relative; z-index: 100; }
 .text-center { text-align: center; }
 .opac-auto-156 { text-align: center; font-weight: bold; }
-.opac-auto-157 { text-align: center; margin-top: 20px; width: 400px; }
+#adv_quick_search_sidebar { text-align: center; margin-top: 20px; width: 400px; }
 .opac-auto-158 { text-align: center; margin-top: 6px; margin-bottom: 6px }
 .opac-auto-159 { text-align: center; padding: 20px; width: 100% }
 .opac-auto-160 { text-align: center; padding-bottom: 8px; }
diff --git a/Open-ILS/web/images/adv_row_close_btn.png b/Open-ILS/web/images/adv_row_close_btn.png
new file mode 100644
index 0000000..edccf37
Binary files /dev/null and b/Open-ILS/web/images/adv_row_close_btn.png differ
diff --git a/Open-ILS/web/js/opac/simple.js b/Open-ILS/web/js/opac/simple.js
new file mode 100644
index 0000000..7124d03
--- /dev/null
+++ b/Open-ILS/web/js/opac/simple.js
@@ -0,0 +1,29 @@
+/* Keep this dead simple. No dojo. Call nothing via onload. */
+function $(s) { return document.getElementById(s); }
+function removeClass(node, cls) {
+    if (!node || !node.className) return;
+    node.className =
+        node.className.replace(new RegExp("\\b" + cls + "\\b", "g"), "");
+}
+function addClass(node, cls) {
+    if (!node) return;
+    removeClass(node, cls);
+    if (!node.className) node.className = cls;
+    else node.className += ' ' + cls;
+}
+function unHideMe(node) { removeClass(node, "hide_me"); }
+function hideMe(node) { addClass(node, "hide_me"); }
+
+var _search_row_template;
+function addSearchRow() {
+    if (!_search_row_template) {
+        t = $("adv_global_row").cloneNode(true);
+        t.id = null;
+        _search_row_template = t;
+    }
+
+    $("adv_global_tbody").insertBefore(
+        _search_row_template.cloneNode(true),
+        $("adv_global_addrow")
+    );
+}
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
index 941cf7c..6d65c68 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
@@ -1,4 +1,4 @@
-<tr id='adv_global_trow' type='input'>
+<tr id="adv_global_row" type='input'>
     <td align='left' width='100%' nowrap='nowrap'>
         <!-- select the search class -->
         <span class="opac-auto-078">
@@ -11,7 +11,11 @@
             <option value='exact'>[% l("Matches Exactly") %]</option>
         </select>
         <!-- search term -->
-        <input type='text' size='18' name='term' style='margin-right: 3px;' />
+        <input type='text' size='18' name='query' style='margin-right: 3px;' />
         <!-- Remove this row -->
+        <a href="javascript:;"
+            style="position:relative;top:1px; vertical-align: middle;"
+            title="[% l('Remove row') %]" alt="[% l('Remove row') %]"
+            onclick='var row = this.parentNode.parentNode;var tbody = row.parentNode; if( tbody.getElementsByTagName("tr").length > 2 ) row.parentNode.removeChild(row);'><img src="[% ctx.media_prefix %]/images/adv_row_close_btn.png" /></a>
     </td>
 </tr>
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index c4fde3a..0fb4ab1 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -1,3 +1,4 @@
+<form id="adv_search_form" action="[% ctx.opac_root %]/results" method="GET">
 <table id='adv_global_search' class='data_grid data_grid_center' width='100%'>
     <tr style='border-bottom: none;'>
         <!-- Contains the user-addable(?) rows to define search class, containment and text -->
@@ -17,8 +18,7 @@
                     <!-- add a new row -->
                     <tr id='adv_global_addrow'>
                         <td align='left' style="padding-top:7px;">
-                            <a href="javascript:;" id="myopac_new_global_row" onclick='advAddGblRow();'>Add Search Row</a>
-                            <button class="hide_me">[% l("Submit Search") %]</button><!-- XXX TODO make a real form -->
+                            <a href="javascript:;" id="myopac_new_global_row" onclick='addSearchRow();'>Add Search Row</a>
                         </td>
                     </tr>
                 </tbody>
@@ -38,14 +38,15 @@
             </td>
             <td valign='top'>
                 <strong>[% l("Language") %]</strong><br />
-                <select multiple='multiple' size='4' id='adv_global_lang'>
+                <select multiple='multiple' size='4' name="lang" id='adv_global_lang'>
                     [% INCLUDE "default/opac/parts/item_lang_options.tt2" %]
                 </select>
             </td>
             <td valign='top'>
                 <strong>[% l("Audience") %]</strong><br />
-                <select multiple='multiple' size='3' id='adv_global_audience' class='hide_me'></select>
-                <select multiple='multiple' size='3' id='adv_global_audience_basic'>
+                <!-- XXX this used to be multiple, but when would that be
+                useful? -->
+                <select size='3' name="audience" id='adv_global_audience_basic'>
                     <option value='abcj'>[% l("Juvenile") %]</option>
                     <option value='d'>[% l("General") %]</option>
                     <option value='e'>[% l("Adult") %]</option>
@@ -73,7 +74,7 @@
                             <tbody>
                                 <tr>
                                     <td align=''>
-                                        <select id='adv_global_sort_by' onchange='__setsortsel();'>
+                                        <select id='adv_global_sort_by' name="sort" onchange="$('adv_global_sort_dir').disabled = !Boolean(this.selectedIndex);">
                                             <option value='rel'>[% l("Relevance") %]</option>
                                             <option value='title'>[% l("Title") %]</option>
                                             <option value='author'>[% l("Author") %]</option>
@@ -83,13 +84,12 @@
                                 </tr>
                                 <tr>
                                     <td>
-                                        <select id='adv_global_sort_dir' disabled='disabled'>
+                                        <select id='adv_global_sort_dir' name="sort_order" disabled='disabled'>
                                             <option value='asc'>[% l("Ascending / A to Z") %]</option>
                                             <option value='desc'>[% l("Descending / Z to A") %]</option>
                                         </select>
                                     </td>
                            <!-- force the enable/disable sort dir code to run -->
-                           <script language='javascript' type='text/javascript'>__setsortsel();</script>
                                 </tr>
                                 <tr>
                                     <td align='center' class="hide_me">
@@ -159,8 +159,8 @@
                             [% PROCESS "default/opac/parts/org_selector.tt2";
                                 PROCESS build_org_selector name='loc' value=loc %]
                             <div style="position:relative;top:7px;">
-                                <input type='checkbox'
-                                id='opac.result.limit2avail'/>
+                                <input type='checkbox' name="available" value="1"
+                                    id='opac.result.limit2avail'/>
                                 <label style="position:relative;top:-2px;"
                                     for='opac.result.limit2avail'>
                                     [% l("Limit to Available") %]</label>
@@ -168,20 +168,20 @@
                         </td>
                         <td valign='top'>
                             <strong>[% l("Publication Year") %]</strong><br />
-                            <select id='adv_global_pub_date_type' onchange='
-                                if($("adv_global_pub_date_type").selectedIndex == 3)
+                            <select id='adv_global_pub_date_type' name='pubyear_how' onchange='
+                                if(this.selectedIndex == 3)
                                     unHideMe($("adv_global_pub_date_2_span"));
                                 else
                                     hideMe($("adv_global_pub_date_2_span"));'>
-                                <option value='equals' selected='selected'>[% l("Is") %]</option>
+                                <option value='between' selected='selected'>[% l("Is") %]</option><!-- sic -->
                                 <option value='before'>[% l("Before") %]</option>
                                 <option value='after'>[% l("After") %]</option>
                                 <option value='between'>[% l("Between") %]</option>
                             </select>    
                             <div style='margin-top:5px;'>
-                                <input id='adv_global_pub_date_1' type='text' size='4' maxlength='4'/>
+                                <input id='adv_global_pub_date_1' name='pubyear1' type='text' size='4' maxlength='4'/>
                                 <span id='adv_global_pub_date_2_span' class='hide_me'>
-                                   [% l("and") %] <input id='adv_global_pub_date_2' type='text' size='4' maxlength='4'/>
+                                   [% l("and") %] <input name='pubyear2' id='adv_global_pub_date_2' type='text' size='4' maxlength='4'/>
                                 </span>
                             </div>
                         </td>
@@ -198,20 +198,18 @@
             </table>
         </td>
     </tr>
-
     <tr class='border_4_2'>
         <td align="left" colspan='2'>
-            <!-- XXX TODO make a real form, and make this a real submitter -->
-        <img src="[% ctx.media_prefix %]/images/search_btn.gif" alt="[% l('Search') %]"  class='pointer' />
-        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-        <!-- XXX TODO make a real form, and make this a real resetter -->
-        <a href="javascript:;" style="position: relative; top: -9px;">Reset Form</a>
+            <input type="image" src="[% ctx.media_prefix %]/images/search_btn.gif"
+            alt="[% l('Search') %]" class='pointer' />
+            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            <a href="javascript:document.getElementById('adv_search_form').reset();"
+                id="adv_reset">[% l('Reset Form') %]</a>
         </td>
     </tr>
 </table>
-
-
-<div id='adv_quick_search_sidebar' class='sidebar_chunk hide_me' style='text-align:center; margin-top: 20px; width:400px;'> 
+</form>
+<div id='adv_quick_search_sidebar' class='sidebar_chunk hide_me'> 
     <div id='adv_quick_search'>
         <div class='adv_quick_search color_4'><b>[% l("Quick Search") %]</b></div>
         <div style='margin-top: 8px;'>
diff --git a/Open-ILS/web/templates/default/opac/parts/base.tt2 b/Open-ILS/web/templates/default/opac/parts/base.tt2
index 2ff73d5..69fddc1 100644
--- a/Open-ILS/web/templates/default/opac/parts/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/base.tt2
@@ -11,6 +11,7 @@
             href="[% ctx.media_prefix %]/css/skin/default/opac/style.css" />
         <title>[% l('Catalog - King County Library - [_1]', ctx.page_title) %]</title>
         <link rel="unapi-server" type="application/xml" title="unAPI" href="/opac/extras/unapi" />
+        <script type="text/javascript" src="[% ctx.media_prefix %]/js/opac/simple.js"></script>
         [% BLOCK html_head; END; # provide a default that can be overridden -%]
         [%- PROCESS html_head -%]
     </head>
diff --git a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
index d7c755f..a93a4ad 100644
--- a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
@@ -1,10 +1,10 @@
-[%  name = name || "item_type";
+[%  name = name || "format";
     id = id || "format_selector" %]
 <select id='[% id %]' name='[% name %]'[%
     multiple ? ' multiple="multiple"' : '';
     size ? (' size="' _ size _ '"') : ''; %]>
     <option value=''>[% l("All Formats") %]</option>
-[% FOR o IN item_types %]
+[% FOR o IN formats %]
     <option value='[% o.code %]'[% value == o.code ? ' selected="selected"' : ''%]>[% o.name %]</option>
 [%- END %]
 <!--
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index c4a9ce1..866ce2d 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -4,7 +4,7 @@
     USE EGI18N;
     SET DATE_FORMAT = l('%m/%d/%Y');
 
-    item_types = [  # XXX KCLS-specific
+    formats = [  # XXX KCLS-specific
         {'code' => 'a', 'name' => 'Book', 'image' => 'media_book.jpg'},
         {'code' => 'i', 'name' => 'Book on cassette', 'image' => 'media_bookoncasset.jpg'},
         {'code' => 'n', 'name' => 'Book on CD', 'image' => 'media_bookoncd.jpg'},
@@ -35,10 +35,10 @@
         {'code' => 's', 'name' => 'Slide set', 'image' => 'media_slide.jpg'}
     ];
 
-    icon_by_mattype = {};
-    FOR o IN item_types;
+    icon_by_format = {};
+    FOR o IN formats;
         code = o.code;
-        icon_by_mattype.$code = o.image;
+        icon_by_format.$code = o.image;
     END;
 
 -%]
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 58d4f63..b08dabe 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -1,13 +1,8 @@
 [%  PROCESS "default/opac/parts/marc_misc.tt2";
 
-    q = query | url;
-    np_link = '?query=' _ q;
-    IF loc;
-        np_link = np_link _ "&loc=" _ loc;
-    END;
-    IF depth or depth == 0;
-        np_link = np_link _ "&depth=" _ depth;
-    END;
+    q = query_string | url;
+    np_link = '?' _ q;
+
     ctx.result_start = 1 + ctx.page_size * page;
     ctx.result_stop = 1 + ctx.page_size * (page + 1);
     IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index aeceb34..e4d157d 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -17,7 +17,7 @@
             <td>
                 <div id="search_box_wrapper">
                     <!-- Note: when common browsers support HTML5 placeholder text, we can remove the JS -->
-                    <input type="text" id="search_box" name="query" value="[% query || l("Search Keyword") | html %]"
+                    <input type="text" id="search_box" name="query" value="[% ctx.processed_search_query || l("Search Keyword") | html %]"
                         onfocus="if (this.value=='[% l("Search Keyword") %]'){this.value='';this.style.color='#000';}"
                         onblur="if (this.value==''){this.value='[% l("Search Keyword") %]';this.style.color='#999';}" />
                     <input name='page' type='hidden' value="0" />
@@ -35,7 +35,7 @@
         </tr>
         <tr>
             <td>
-                [% INCLUDE "default/opac/parts/format_selector.tt2" value=CGI.param("item_type") %]
+                [% INCLUDE "default/opac/parts/format_selector.tt2" value=CGI.param("format") %]
             </td>
             <td>
                 <span id='depth_selector_span'>
diff --git a/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
index f3e30ad..69389e9 100644
--- a/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
@@ -1,12 +1,12 @@
 [%  search_classes = [
-    {value => "", label => l("Keyword")},
+    {value => "keyword", label => l("Keyword")},
     {value => "title", label => l("Title")},
     {value => "author", label => l("Author")},
     {value => "subject", label => l("Subject")},
     {value => "series", label => l("Series")},
-    {value => "cn", label => l("Call Number")}  # XXX or should this be bibcn?
+    {value => "id|bibcn", label => l("Call Number")}
 ] %]
-<select id='search_type_selector' name="class">
+<select name="class">
     [%  search_class = CGI.param('class');
         FOR sc IN search_classes -%]
     <option value='[% sc.value %]'[%
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 3c99292..2bfa7ca 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -5,8 +5,10 @@
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = l("Search Results");
 
+    query_string = CGI.query_string |
+        replace(';x=\d+','') | replace(';y=\d+','') | replace(';page=\d*', '') |
+        replace(';', '&');
     page = CGI.param('page') || 0;
-    query = CGI.param('query');
     loc = CGI.param('loc');
     page_count = POSIX.ceil(ctx.hit_count / ctx.page_size);
 %]

commit e7fb8dc64f8bc0878527ba31b5d1a86dd324dd0c
Author: berick <berick at esilibrary.com>
Date:   Fri Feb 18 17:05:03 2011 -0500

    immediate cache expiration for html is too aggressive, leading to re-fetches on current page w/ chrome;  give the browser a few seconds to breathe

diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf
index cd263bb..17abcdc 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf
+++ b/Open-ILS/examples/apache/eg_vhost.conf
@@ -555,9 +555,9 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
 </LocationMatch>
 <Location /eg/opac>
     PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
-    # Expire the HTML immediately since we're loading dynamic data for each page
+    # Expire the HTML quickly since we're loading dynamic data for each page
     ExpiresActive On
-    ExpiresByType text/html "access plus 0 seconds"
+    ExpiresByType text/html "access plus 5 seconds"
 </Location>
 
 

commit 2a3337aa9387eaf34cbabbc10d38b88569b618f3
Author: berick <berick at esilibrary.com>
Date:   Fri Feb 18 14:58:57 2011 -0500

    initial cut of anonymoust cache record lists (aka My List) management; minor cleanup

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index f1e6d48..40d867b 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -20,9 +20,12 @@ use OpenILS::WWW::EGCatLoader::Util;
 use OpenILS::WWW::EGCatLoader::Account;
 use OpenILS::WWW::EGCatLoader::Search;
 use OpenILS::WWW::EGCatLoader::Record;
+use OpenILS::WWW::EGCatLoader::Container;
 
 my $U = 'OpenILS::Application::AppUtils';
 
+use constant COOKIE_SES => 'ses';
+
 sub new {
     my($class, $apache, $ctx) = @_;
 
@@ -85,6 +88,9 @@ sub load {
     return $self->load_simple("advanced") if $path =~ /opac\/advanced/;
     return $self->load_rresults if $path =~ /opac\/results/;
     return $self->load_record if $path =~ /opac\/record/;
+    return $self->load_mylist_add if $path =~ /opac\/mylist\/add/;
+    return $self->load_mylist_del if $path =~ /opac\/mylist\/del/;
+    return $self->load_cache_clear if $path =~ /opac\/cache\/clear/;
 
     # ----------------------------------------------------------------
     # Logout and login require SSL
@@ -168,7 +174,7 @@ sub load_common {
     $ctx->{home_page} = 'http://' . $self->apache->hostname . $self->ctx->{opac_root} . "/home";
     $ctx->{logout_page} = 'https://' . $self->apache->hostname . $self->ctx->{opac_root} . "/logout";
 
-    if($e->authtoken($self->cgi->cookie('ses'))) {
+    if($e->authtoken($self->cgi->cookie(COOKIE_SES))) {
 
         if($e->checkauth) {
 
@@ -246,7 +252,7 @@ sub load_login {
         $cgi->redirect(
             -url => $cgi->param('redirect_to') || $acct,
             -cookie => $cgi->cookie(
-                -name => 'ses',
+                -name => COOKIE_SES,
                 -path => '/',
                 -secure => 1,
                 -value => $response->{payload}->{authtoken},
@@ -264,11 +270,15 @@ sub load_login {
 sub load_logout {
     my $self = shift;
 
+    # If the user was adding anyting to an anonymous cache 
+    # while logged in, go ahead and clear it out.
+    $self->clear_anon_cache;
+
     $self->apache->print(
         $self->cgi->redirect(
             -url => $self->ctx->{home_page},
             -cookie => $self->cgi->cookie(
-                -name => 'ses',
+                -name => COOKIE_SES,
                 -path => '/',
                 -value => '',
                 -expires => '-1h'
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
new file mode 100644
index 0000000..934714a
--- /dev/null
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
@@ -0,0 +1,115 @@
+package OpenILS::WWW::EGCatLoader;
+use strict; use warnings;
+use Apache2::Const -compile => qw(OK DECLINED FORBIDDEN HTTP_INTERNAL_SERVER_ERROR REDIRECT HTTP_BAD_REQUEST);
+use OpenSRF::Utils::Logger qw/$logger/;
+use OpenILS::Utils::CStoreEditor qw/:funcs/;
+use OpenILS::Utils::Fieldmapper;
+use OpenILS::Application::AppUtils;
+my $U = 'OpenILS::Application::AppUtils';
+
+use constant COOKIE_ANON_CACHE => 'anoncache';
+use constant ANON_CACHE_MYLIST => 'mylist';
+
+# Retrieve the users cached records AKA 'My List'
+# Returns an empty list if there are no cached records
+sub fetch_mylist {
+    my $self = shift;
+
+    my $list = [];
+    my $cache_key = $self->cgi->cookie(COOKIE_ANON_CACHE);
+
+    if($cache_key) {
+
+        $list = $U->simplereq(
+            'open-ils.actor',
+            'open-ils.actor.anon_cache.get_value', 
+            $cache_key, ANON_CACHE_MYLIST);
+
+        if(!$list) {
+            $cache_key = undef;
+            $list = [];
+        }
+    }
+
+    $self->apache->log->info("Found anon-cache list [@$list]");
+
+    return ($cache_key, $list);
+}
+
+
+# Adds a record (by id) to My List, creating a new anon cache + list if necessary.
+sub load_mylist_add {
+    my $self = shift;
+    my $rec_id = $self->cgi->param('record');
+
+    my ($cache_key, $list) = $self->fetch_mylist;
+    push(@$list, $rec_id);
+
+    $cache_key = $U->simplereq(
+        'open-ils.actor',
+        'open-ils.actor.anon_cache.set_value', 
+        $cache_key, ANON_CACHE_MYLIST, $list);
+
+    return $self->mylist_action_redirect($cache_key);
+}
+
+# Removes a record ID from My List
+sub load_mylist_del {
+    my $self = shift;
+    my $rec_id = $self->cgi->param('record');
+
+    my ($cache_key, $list) = $self->fetch_mylist;
+    return $self->mylist_action_redirect unless $cache_key;
+
+    $list = [ grep { $_ ne $rec_id } @$list ];
+
+    $cache_key = $U->simplereq(
+        'open-ils.actor',
+        'open-ils.actor.anon_cache.set_value', 
+        $cache_key, ANON_CACHE_MYLIST, $list);
+
+    return $self->mylist_action_redirect($cache_key);
+}
+
+sub load_cache_clear {
+    my $self = shift;
+    $self->clear_anon_cache;
+    return $self->mylist_action_redirect;
+}
+
+# Wipes the entire anonymous cache, including My List
+sub clear_anon_cache {
+    my $self = shift;
+    my $field = shift;
+
+    my $cache_key = $self->cgi->cookie(COOKIE_ANON_CACHE) or return;
+
+    $U->simplereq(
+        'open-ils.actor',
+        'open-ils.actor.anon_cache.delete_session', $cache_key)
+        if $cache_key;
+
+}
+
+# Called after an anon-cache / My List action occurs.  Redirect
+# to the redirect_url (cgi param) or referrer or home.
+sub mylist_action_redirect {
+    my $self = shift;
+    my $cache_key = shift;
+
+    $self->apache->print(
+        $self->cgi->redirect(
+            -url => $self->cgi->param('redirect_to') || $self->ctx->{referer} || $self->ctx->{home_page},
+            -cookie => $self->cgi->cookie(
+                -name => COOKIE_ANON_CACHE,
+                -path => '/',
+                -value => ($cache_key) ? $cache_key : '',
+                -expires => ($cache_key) ? undef : '-1h'
+            )
+        )
+    );
+
+    return Apache2::Const::REDIRECT;
+}
+
+1;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 87ff608..e37fc7c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -107,12 +107,16 @@ sub init_ro_object_cache {
     # retrieve and cache org unit setting values
     $ctx->{get_org_setting} = sub {
         my($org_id, $setting) = @_;
-        $cache{org_settings}{$org_id} = {} unless $cache{org_settings}{$org_id};
-        $cache{org_settings}{$org_id}{$setting} = $U->ou_ancestor_setting_value($org_id, $setting)
-            unless exists $cache{org_settings}{$org_id}{$setting};
+
+        $cache{org_settings}{$org_id} = {} 
+            unless $cache{org_settings}{$org_id};
+
+        $cache{org_settings}{$org_id}{$setting} = 
+            $U->ou_ancestor_setting_value($org_id, $setting)
+                unless exists $cache{org_settings}{$org_id}{$setting};
+
         return $cache{org_settings}{$org_id}{$setting};
     };
 }
 
-
 1;

commit e4d6c6740fdc3c21c07708ff591166e7ca6ea204
Author: berick <berick at esilibrary.com>
Date:   Fri Feb 18 13:48:28 2011 -0500

    adding the fines/payments tab images

diff --git a/Open-ILS/web/images/acct_fines_off.jpg b/Open-ILS/web/images/acct_fines_off.jpg
new file mode 100644
index 0000000..b73b61d
Binary files /dev/null and b/Open-ILS/web/images/acct_fines_off.jpg differ
diff --git a/Open-ILS/web/images/acct_fines_on.jpg b/Open-ILS/web/images/acct_fines_on.jpg
new file mode 100644
index 0000000..4ea7e89
Binary files /dev/null and b/Open-ILS/web/images/acct_fines_on.jpg differ
diff --git a/Open-ILS/web/images/acct_payments_off.jpg b/Open-ILS/web/images/acct_payments_off.jpg
new file mode 100644
index 0000000..c8a50f5
Binary files /dev/null and b/Open-ILS/web/images/acct_payments_off.jpg differ
diff --git a/Open-ILS/web/images/acct_payments_on.jpg b/Open-ILS/web/images/acct_payments_on.jpg
new file mode 100644
index 0000000..c571398
Binary files /dev/null and b/Open-ILS/web/images/acct_payments_on.jpg differ

commit dd5a239a440f73478bb75c19007b7f620ff2f5dd
Author: berick <berick at esilibrary.com>
Date:   Fri Feb 18 13:33:19 2011 -0500

    if no login redirect is set, redirect to account instead of home page

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 9c78bbf..f1e6d48 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -239,12 +239,12 @@ sub load_login {
 
     # login succeeded, redirect as necessary
 
-    my $home = $self->apache->unparsed_uri;
-    $home =~ s/\/login/\/home/;
+    my $acct = $self->apache->unparsed_uri;
+    $acct =~ s#/login#/myopac/main#;
 
     $self->apache->print(
         $cgi->redirect(
-            -url => $cgi->param('redirect_to') || $home,
+            -url => $cgi->param('redirect_to') || $acct,
             -cookie => $cgi->cookie(
                 -name => 'ses',
                 -path => '/',

commit 1e269b5081f1d20bb6960d8f4aba89685b2a83f8
Author: berick <berick at esilibrary.com>
Date:   Fri Feb 18 13:23:32 2011 -0500

    hide all refs to fines payment until its implemented to reduce confusion; minor cleanup

diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 694185a..0c307f0 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -150,12 +150,13 @@
                             <td>[% l("Due Date") %]</td>
                             <td>[% l("Date Returned") %]</td>
                             <td>[% l("Balance Owed") %]</td>
+                            <!-- TODO: hidden until pay-fines is implemented
                             <td nowrap="nowrap" style="white-space:nowrap;">
                                 <input id="pay_fines_box1" checked="checked"
-                                    type="checkbox"
-                                    title="[% l('Click to (un)select all fines') %]" />
+                                    type="checkbox" title="[% l('Click to (un)select all fines') %]" />
                                 <label for="pay_fines_box1">[% l('Pay Fines') %]</label>
                             </td>
+                            -->
                         </tr>
                     </thead>
                     <tbody id='myopac_circ_trans_tbody'>
@@ -204,11 +205,11 @@
                                     [% money(f.xact.balance_owed) %]
                                 </strong>
                             </td>
+                            <!-- TODO: hidden until pay-fines is implemented
                             <td>
-                                <input type="checkbox" checked="checked"
-                                    name="selector"
-                                    title="[% l('Pay this fine') %]" />
+                                <input type="checkbox" name="selector" title="[% l('Pay this fine') %]" />
                             </td>
+                            -->
                         </tr>
                         [% END %]
                     </tbody>
@@ -237,6 +238,7 @@
                             <td width='16%'>[% l("Total Amount Paid") %]</td>
                             <td width='16%'>[% l("Balance Owed") %]</td>
                             <td width='16%'>[% l("Billing Type") %]</td>
+                            <!-- TODO: hidden until pay-fines is implemented
                             <td width='4%' align="center" nowrap="nowrap"
                                 style="white-space:nowrap;">
                                 <input id="pay_fines_box2" checked="checked"
@@ -244,6 +246,7 @@
                                     title="[% l('Click to (un)select all fines') %]" />
                                 <label for="pay_fines_box2">[% l("Pay Fines") %]</label>
                             </td>
+                            -->
                         </tr>
                     </thead>
                     <tbody id='myopac_trans_tbody'>
@@ -270,22 +273,24 @@
                                 </strong>
                             </td>
                             <td>[% f.xact.last_billing_type %]</td>
+                            <!-- TODO: hidden until pay-fines is implemented
                             <td>
-                                <input type="checkbox" name='selector'
-                                    title='[% l("Pay this fine") %]'
-                                    checked="checked" />
+                                <input type="checkbox" name='selector' title='[% l("Pay this fine") %]'/>
                             </td>
+                            -->
                         </tr>
                         [% END %]
                     </tbody>
                 </table>
             </div>
             [% END %]
+            <!-- TODO: hidden until pay-fines is implemented
             <a href="#"><img alt="[% l('Pay Fines') %]"
                 onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
                 src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
                 style="position:relative;top:5px;" /></a>
             <br/>
+            -->
         </div>
     </div>
     <div id="pay_fines_now" class="hide_me">

commit 78ec405763620db7e9d47361b415019f1ddfbd67
Author: berick <berick at esilibrary.com>
Date:   Fri Feb 18 13:17:58 2011 -0500

    i18n

diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 5ae5137..761ae9a 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -8,7 +8,7 @@
             <td width="90" valign="top" id="rdetail_image_cell">
                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
                 <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident %]'><img
-                    alt="Image of item" id='rdetail_image'
+                    alt="[% l('Image of item') %]" id='rdetail_image'
                     src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a>
                 [% END %]
                 <br />
@@ -39,7 +39,7 @@
                                 <div style="float:right;">
                                     <div class="rdetail_aux_utils opac-auto-010">
                                         <a href="[% ctx.opac_root %]/place_hold?hold_target=[% record.id %]&hold_type=T" id="rdetail_place_hold"><img
-                                            src="[% ctx.media_prefix %]/images/green_check.png" alt="place hold" />
+                                            src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" />
                                             <span style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
                                     </div>
                                     <div style="padding-top:6px;" class="rdetail_aux_utils">
@@ -50,12 +50,12 @@
                                             </div>
                                         </div>
                                         <a href="#"><img
-                                            alt="add to my list"
+                                            alt="[% l('add to my list') %]"
                                             src="[% ctx.media_prefix %]/images/clipboard.png" /></a>
                                     </div>
                                 </div>
                                 <div style="float:right;margin-right:17px;">
-                                    <img id="rdetail_tor_pic" alt="Format" class="hide_me" src="" />
+                                    <img id="rdetail_tor_pic" alt="[% l('Format') %]" class="hide_me" src="" />
                                 </div>
                             </div>
                         </td>
@@ -83,7 +83,7 @@
                             </td>
                             <td valign="top">
                                 [% IF attrs.format %]
-                                <img alt="Format" class='tor_pic'
+                                <img alt="[% l('Format') %]" class='tor_pic'
                                     title="[% attrs.format %]"
                                     src="[% ctx.media_prefix _ '/images/' _ attrs.format_icon %]" />
                                 [%  END %]
@@ -232,11 +232,11 @@
                                 </div>
                             </td>
                             <td width="1" valign="top" align="right" style="white-space:nowrap;">
-                                <a href="[% ctx.opac_root %]/place_hold?hold_target=[% record.id %]&hold_type=T"><img alt="Place Hold"
+                                <a href="[% ctx.opac_root %]/place_hold?hold_target=[% record.id %]&hold_type=T"><img alt="[% l('Place Hold') %]"
                                     src="[% ctx.media_prefix %]/images/place_hold.gif" /></a>
                                 <a href="#" id="rd_reviews_and_more" target="_blank"><img
-                                    alt="Reviews and More" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>
-                                <a href="#" id=""><img alt="Add to My List"
+                                    alt="[% l('Reviews and More') %]" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>
+                                <a href="#" id=""><img alt="[% l('Add to My List') %]"
                                     src="[% ctx.media_prefix %]/images/add_mylist.gif" /></a>
                             </td>
                         </tr>

commit 74355312a6df553cc1b83ad3095821cf39b28910
Author: berick <berick at esilibrary.com>
Date:   Fri Feb 18 13:12:50 2011 -0500

    round of CSS cleanup;  removing unused rules and replacing inline style with css classes

diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index 6902837..550669f 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -1,23 +1,15 @@
 /* once done renaming and everything, combine with style.css */
-.opac-auto-001 { background: #2bb0fd; }
-.opac-auto-002 { background: #54987f; }
-.opac-auto-003 { background: #decc92; }
+
+/* Verfied in-use classes --------------------------- */
 .opac-auto-004 { background: #E0F0E0; }
-.opac-auto-005 { background: #ffc331; }
-.gray-back { background: gray; }
-.pink-back { background: pink; }
-.white-back { background: white; }
 .opac-auto-009 { border: 3px solid #E0E0E0; }
 .opac-auto-010 { border-bottom: 1px dotted #ccc; padding-top: 10px; }
 .opac-auto-011 { border-bottom: 1px dotted #ccc; padding-top: 6px; }
 .opac-auto-012 { border-bottom: none; }
 .opac-auto-013 { border-bottom: none; *height: 0px; }
-.opac-auto-014 { border-collapse: collapse; }
 .opac-auto-015 { border-left: 1px solid #e9ebf3; padding-right: 27px; }
-.opac-auto-016 { border: none; }
 .opac-auto-017 { border: none; width: 100%; }
 .opac-auto-018 { border-top: 1px dotted #ccc; padding-top: 17px; }
-.opac-auto-019 { border-top: none; }
 .clear-both { clear: both; }
 .common-no-pad { clear: both; height: 0px; margin: 0px; padding: 0px; }
 .common-full-pad { clear: both; height: 15px; }
@@ -27,6 +19,9 @@
 .red { color: red; }
 .bold-red { color: red; font-weight: bold }
 .pointer { cursor: pointer; }
+/* ------------------------------------------- */
+
+
 #lib_selector_span { display: none }
 .float-left { float: left; }
 .opac-auto-039 { float: left; font-weight: bold; padding-top: 5px; }
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 3a8a94a..e47edcc 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -58,7 +58,7 @@ h2 {
 	font-weight:bold;
 }
 
-.hide_me {
+.hide_me, .hidden {
 	display: none;
 	visibility: hidden;
 }
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 2e1d3a4..ea78426 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -70,27 +70,25 @@
                     />
                 </td>
                 <td width="40%" style="padding-left:5px;">
-                    <span title="Click to sort" style="cursor:pointer;">
+                    <span title="Click to sort" class='pointer'>
                         Title
                     </span> /
-                    <span title="Click to sort" style="cursor:pointer;">
+                    <span title="Click to sort" class='pointer'>
                         Author
                     </span>
                 </td>
                 <td width="8%" style="padding-right:5px;" align="center">
-                    <span title="Click to sort" style="cursor:pointer;">
-                        Renews<br />Left
+                    <span title="Click to sort" class='pointer'>Renews<br />Left
                     </span>
                 </td>
                 <td width="13%" style="padding-left:5px;">
-                    <span title="Click to sort" style="cursor:pointer;">Due Date
-                    </span>
+                    <span title="Click to sort" class='pointer'>Due Date</span>
                 </td>
                 <td width="16%">
-                    <span title="Click to sort" style="cursor:pointer;">barcode</span>
+                    <span title="Click to sort" class='pointer'>barcode</span>
                 </td>
                 <td width="22%">
-                    <span title="Click to sort" style="cursor:pointer;">call number</span>
+                    <span title="Click to sort" class='pointer'>call number</span>
                 </td>
             </tr>
         </table>
@@ -151,27 +149,21 @@
             border='0' width='100%'>
             <tr>
                 <td width="45%" style="padding-left:15px;">
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Title</span> /
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Author</span>
+                    <span title="Click to sort" class='pointer'>Title</span> /
+                    <span title="Click to sort" class='pointer'>Author</span>
                 </td>
                 <td width="22%"
                     style="white-space:nowrap;padding-left:5px;">
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Call Number</span>
+                    <span title="Click to sort" class='pointer'>Call Number</span>
                 </td>
                 <td width="11%">
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Checkout</span>
+                    <span title="Click to sort" class='pointer'>Checkout</span>
                 </td>
                 <td width="11%">
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Due Date</span>
+                    <span title="Click to sort" class='pointer'>Due Date</span>
                 </td>
                 <td width="11%">
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Returned</span>
+                    <span title="Click to sort" class='pointer'>Returned</span>
                 </td>
             </tr>
         </table>
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 2d7b375..694185a 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -121,14 +121,14 @@
                     <tr id='myopac_fines_summary_row'>
                         <td id='myopac_fines_summary_total'>[% money(ctx.fines.total_owed) %]</td>
                         <td id='myopac_fines_summary_paid'>[% money(ctx.fines.total_paid) %]</td>
-                        <td id='myopac_fines_summary_balance' style='color:red;font-weight: bold;'>[% money(ctx.fines.balance_owed) %]</td>
+                        <td id='myopac_fines_summary_balance' class='bold-red'>[% money(ctx.fines.balance_owed) %]</td>
                     </tr>
                 </tbody>
             </table>
         <!--
         <div id='accrue_explanation' class='hide_me'>
             <span>Transactions whose balances are marked with a</span>
-            <span style='color:red; font-weight: bold'>*</span>
+            <span class='bold-red'>*</span>
             <span>will continue to accrue fines until the checked out item is returned.</span>
         </div>
         -->
@@ -220,7 +220,7 @@
             <!-- Table for all non-circulation transactions -->
             <div id='myopac_trans_div'>
                 <br/>
-                <hr style="border-bottom:none;*height:0px;" color="#dcdbdb" />
+                <hr class='opac-auto-013'  color="#dcdbdb" />
                 <br/>
                 <table width='100%' class='data_grid data_grid_center'
                     id='myopac_trans_table'>
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
index 0545872..9f6177a 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
@@ -249,8 +249,7 @@
                        width='100%'>
                     <tbody>
                         <tr>
-                            <td width='100%'
-                                style='color:red;'>
+                            <td width='100%' class='red'>
                                 [% l("Your account expired on") %]
                                 <span id='myopac.expired.date'></span>!
                                 [% l("Please see a librarian to renew your account.") %]</td>
@@ -585,7 +584,7 @@
                     </tr>
                 </tbody>
             </table><br />
-            <hr style="border-bottom:none;*height:0px;" color="#DCDBDB" />
+            <hr class='opac-auto-013' color="#DCDBDB" />
             <br />
 
             <table width='100%' class='light_border data_grid'>
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index 833d7f3..c4fde3a 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -1,7 +1,7 @@
 <table id='adv_global_search' class='data_grid data_grid_center' width='100%'>
     <tr style='border-bottom: none;'>
         <!-- Contains the user-addable(?) rows to define search class, containment and text -->
-        <td valign='top' style='border-bottom: none;'>
+        <td valign='top' class='opac-auto-012'>
             <table width='100%' id='adv_global_input_table'>
                 <thead>
                     <tr>
@@ -66,7 +66,7 @@
             </td>
             <td valign='top'>
             <strong>[% l("Sort Criteria") %]</strong>
-              <table style='border: none; width: 100%;'>
+              <table class='opac-auto-017'>
                 <tr>
                     <td align='center' width='100%'>
                         <table class='' width='100%'>
@@ -202,7 +202,7 @@
     <tr class='border_4_2'>
         <td align="left" colspan='2'>
             <!-- XXX TODO make a real form, and make this a real submitter -->
-        <img src="[% ctx.media_prefix %]/images/search_btn.gif" alt="[% l('Search') %]"  style="cursor:pointer;" />
+        <img src="[% ctx.media_prefix %]/images/search_btn.gif" alt="[% l('Search') %]"  class='pointer' />
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <!-- XXX TODO make a real form, and make this a real resetter -->
         <a href="javascript:;" style="position: relative; top: -9px;">Reset Form</a>
@@ -235,7 +235,7 @@
             <!-- XXX TODO make a real form, and make a real submitter (quick
             submit, FKA advGenericSearch() -->
             <img src="[% ctx.media_prefix %]/images/search_btn.gif"
-                alt="[% l('Search') %]" id="adv_quick_submit" style="cursor:pointer;" />
+                alt="[% l('Search') %]" id="adv_quick_submit" class='pointer' />
         </div>
     </div>
 </div>
@@ -269,6 +269,6 @@
             class='classic_link' href='javascript:advAddMARC();'>[% l("Add Row") %]</a>
         <!-- XXX TODO make a real form, and make a real submitter (FKA
         advMARCRun()) -->
-        <img alt="Search" src="[% ctx.media_prefix %]/images/search_btn.gif" style="cursor:pointer;" />
+        <img alt="Search" src="[% ctx.media_prefix %]/images/search_btn.gif" class='pointer' />
     </div>
 </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index efe3092..84d8e71 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -238,8 +238,7 @@
                     <td class='holds_cell'>
                         <div style='margin-bottom: 5px;'>
                             <span>[% l("Acceptable Alternative Formats:") %] </span>
-                            <span><a class='classic_link' style='color:red;'
-                                    href='#'>[% l("(Help)") %]</a></span>
+                            <span><a class='classic_link red' href='#'>[% l("(Help)") %]</a></span>
                         </div>
                         <div>[% l("(control-click to select multiple formats)") %]</div>
                     </td>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
index 1156a5a..2865026 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
@@ -1,6 +1,6 @@
 <table class="hide_me">
     <tbody>
-        <tr style='border: 3px solid #E0E0E0;' id='rdetail_volume_details_row' templateRow='1'>
+        <tr class='opac-auto-009' id='rdetail_volume_details_row' templateRow='1'>
             <td colspan='10'>
                 <div style='text-align: center; margin-top: 6px; margin-bottom: 6px'>
                     <a name='print' href='#' class='classic_link'>[% l("print these details") %]</a>
@@ -78,7 +78,7 @@
                     <tr><td>[% l("Publisher") %]</td><td colspan='2' name='publisher'></td></tr>
                     <tr><td>[% l("Physical Description") %]</td><td colspan='2' name='phys'></td></tr>
                     <tr>
-                        <td colspan='3' style='background: #E0F0E0;'> </td>
+                        <td colspan='3' class='opac-auto-004'> </td>
                     </tr>
                     <tr name='cnrow'>
                         <td><b>[% l("Call Number") %]</b></td>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/copyinfo.tt2 b/Open-ILS/web/templates/default/opac/parts/record/copyinfo.tt2
index 8439eda..9d4673f 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/copyinfo.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/copyinfo.tt2
@@ -59,7 +59,7 @@
     </table>
     <!-- <table class='hide_me'>
         <tbody>
-        <tr style='border: 3px solid #E0E0E0;' id='rdetail_volume_details_row'><td colspan='10'></td></tr>
+        <tr class='opac-auto-009' id='rdetail_volume_details_row'><td colspan='10'></td></tr>
         </tbody>
     </table> -->
     <br/><br/>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index 5d714bc..6db9b6e 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -191,7 +191,7 @@
                 <strong>Patron Reviews:</strong>
                 <div id='rdetail_chilifresh_reviews' class='hide_me' style="margin-bottom:20px;">
                     <div id='chilifreshReviewLink' name='chilifreshReviewLink' class='chili_review'></div>
-                    <div id='chilifreshReviewResult' name='chilifreshReviewResult' style='display:none'></div>
+                    <div id='chilifreshReviewResult' name='chilifreshReviewResult' class='hidden'></div>
                 </div>
                 <strong>Reviews:</strong>
                 <div id='rdetail_review_container' style="margin-bottom:20px;"></div>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index b28cf66..5ae5137 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -27,7 +27,7 @@
                         <td valign="top">
                             <span id='rdetail_title'>[% attrs.title %]</span><br />
                             [% IF attrs.author %]
-                            <span style="color:#545454;">[% l("Author") %]:</span>
+                            <span class='opac-auto-030'>[% l("Author") %]:</span>
                             <em><a title='[% l("Perform an author search") %]'
                                     id='rdetail_author'
                                     href="[% ctx.opac_root %]/results?query=author%3a[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% loc %]">[% attrs.author %]</a>
@@ -37,8 +37,7 @@
                         <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
                             <div style="width:230px;text-align:left;margin-top:3px;">
                                 <div style="float:right;">
-                                    <div style="border-bottom:1px dotted #ccc;padding-top:10px;"
-                                        class="rdetail_aux_utils">
+                                    <div class="rdetail_aux_utils opac-auto-010">
                                         <a href="[% ctx.opac_root %]/place_hold?hold_target=[% record.id %]&hold_type=T" id="rdetail_place_hold"><img
                                             src="[% ctx.media_prefix %]/images/green_check.png" alt="place hold" />
                                             <span style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
@@ -62,7 +61,7 @@
                         </td>
                     </tr>
                 </table>
-                <div style="border-top: 1px dotted #ccc;padding-top:17px;">
+                <div class='opac-auto-018'>
                     <table border="0" cellpadding="0" width="100%">
                         <tr>
                             <td nowrap='nowrap' valign="top">
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 0e77bbb..58d4f63 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -69,8 +69,7 @@
                 <div style="width:174px;" class="hide_me" id="tehSideBar">SIDEBAR TODO
                 </div>
             </td>
-            <td style="border-left:1px solid #e9ebf3;padding-right:27px;"
-                width="1"></td>
+            <td class='opac-auto-015' width="1"></td>
             <td valign="top">
                 <table id="res_table" cellpadding="0" cellspacing="0"
                     border="0" width="100%" style="margin-top:10px;">
@@ -177,8 +176,7 @@
                                                 class='result_table_format_cell' align="center" width="1"
                                                 style="padding:0px 10px;">
                                                 <img alt="Format" src="" class="hide_me" name="" />
-                                                <span class='hide_me'
-                                                    style='color: #9999FF; padding-left: 10px; font-size: 7pt; font-weight: 300;'>
+                                                <span class='hide_me opac-auto-031'>
                                                     <span>[% l("Match Score: ") %] </span>
                                                     <span name='relevancy_span'> </span>
                                                 </span>
@@ -198,14 +196,13 @@
                                             <td nowrap='nowrap' width="1" align="right">
                                                 <div style="width:250px;text-align:left;">
                                                     <div style="float:right;">
-                                                        <div style="border-bottom:1px dotted #ccc;padding-top:10px;"
-                                                            class="results_aux_utils"><a
+                                                        <div class="results_aux_utils opac-auto-010"><a
                                                                 href="[% ctx.opac_root %]/place_hold?hold_target=[% rec.bre.id %]&hold_type=T" name="place_hold_link"><img
                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
                                                                 alt="place hold" /><span
                                                                     style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
                                                         </div>
-                                                        <div style="border-bottom:1px dotted #ccc;padding-top:6px;" class="results_aux_utils">
+                                                        <div class="results_aux_utils opac-auto-011">
                                                             <div style="position:absolute;">
                                                                 <div style="position:relative;top:5px; left: 25px;">
                                                                     <a title="Add to my list"
@@ -251,7 +248,7 @@
                                         <tr>
                                             <td colspan="5">
                                                 <div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div>
-                                                <!-- <hr style="border-bottom:none;*height:0px;" color="#FFCC33" /> -->
+                                                <!-- <hr class='opac-auto-013' color="#FFCC33" /> -->
                                             </td>
                                         </tr>
                                     </tbody>

commit 7fbfc7b5d4207b9d1893b5f0ee2ea96d775ae343
Author: berick <berick at esilibrary.com>
Date:   Fri Feb 18 12:02:20 2011 -0500

    mild code realignment

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index af4a8af..9c78bbf 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -184,8 +184,8 @@ sub load_common {
         } else {
 
             # For now, keep an eye out for any pages being unceremoniously redirected to logout...
-            $self->apache->log->info("catloader: loading " . $ctx->{path_info} . "; auth session " . 
-                $e->authtoken . " no longer valid; redirecting to logout");
+            $self->apache->log->info("catloader: loading " . $ctx->{path_info} . 
+                "; auth session " .  $e->authtoken . " no longer valid; redirecting to logout");
 
             return $self->load_logout;
         }

commit 4ca371e43c69526987af37ccd712f9e92a79106a
Author: berick <berick at esilibrary.com>
Date:   Fri Feb 18 10:40:08 2011 -0500

    ensure all login requests are over SSL; warn of any non-SSL logout requests; add log line prefixes for simpler grepping

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 4e9c683..af4a8af 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -83,15 +83,28 @@ sub load {
 
     return $self->load_simple("home") if $path =~ /opac\/home/;
     return $self->load_simple("advanced") if $path =~ /opac\/advanced/;
-    return $self->load_login if $path =~ /opac\/login/;
-    return $self->load_logout if $path =~ /opac\/logout/;
     return $self->load_rresults if $path =~ /opac\/results/;
     return $self->load_record if $path =~ /opac\/record/;
 
     # ----------------------------------------------------------------
-    #  Everything below here requires authentication
+    # Logout and login require SSL
     # ----------------------------------------------------------------
-    return $self->redirect_secure($path) 
+    if($path =~ /opac\/login/) {
+        return $self->redirect_ssl unless $self->cgi->https;
+        return $self->load_login;
+    }
+
+    if($path =~ /opac\/logout/) {
+        #return Apache2::Const::FORBIDDEN unless $self->cgi->https; 
+        $self->apache->log->warn("catloader: logout called in non-secure context from " . 
+            ($self->ctx->{referer} || '<no referer>')) unless $self->cgi->https;
+        return $self->load_logout;
+    }
+
+    # ----------------------------------------------------------------
+    #  Everything below here requires SSL + authentication
+    # ----------------------------------------------------------------
+    return $self->redirect_auth
         unless $self->cgi->https and $self->editor->requestor;
 
     return $self->load_place_hold if $path =~ /opac\/place_hold/;
@@ -105,12 +118,23 @@ sub load {
     return Apache2::Const::OK;
 }
 
+
+# -----------------------------------------------------------------------------
+# Redirect to SSL equivalent of a given page
+# -----------------------------------------------------------------------------
+sub redirect_ssl {
+    my $self = shift;
+    my $new_page = sprintf('https://%s%s', $self->apache->hostname, $self->apache->unparsed_uri);
+    $self->apache->print($self->cgi->redirect(-url => $new_page));
+    return Apache2::Const::REDIRECT;
+}
+
 # -----------------------------------------------------------------------------
-# If a secure resource is requested insecurely, redirect to the login page,
+# If an authnticated resource is requested w/o auth, redirect to the login page,
 # then return to the originally requrested resource upon successful login.
 # -----------------------------------------------------------------------------
-sub redirect_secure {
-    my ($self, $path) = @_;
+sub redirect_auth {
+    my $self = shift;
     my $login_page = sprintf('https://%s%s/login', $self->apache->hostname, $self->ctx->{opac_root});
     my $redirect_to = uri_escape($self->apache->unparsed_uri);
     $self->apache->print($self->cgi->redirect(-url => "$login_page?redirect_to=$redirect_to"));
@@ -160,7 +184,7 @@ sub load_common {
         } else {
 
             # For now, keep an eye out for any pages being unceremoniously redirected to logout...
-            $self->apache->log->info("loading " . $ctx->{path_info} . "; auth session " . 
+            $self->apache->log->info("catloader: loading " . $ctx->{path_info} . "; auth session " . 
                 $e->authtoken . " no longer valid; redirecting to logout");
 
             return $self->load_logout;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index 63836f8..df33d5a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -55,7 +55,7 @@ sub handler {
     });
 
     unless($tt->process($template, {ctx => $ctx, l => set_text_handler($ctx, $r)})) {
-        $r->log->warn('Template error: ' . $tt->error);
+        $r->log->warn('egweb: template error: ' . $tt->error);
         return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
     }
 
@@ -69,10 +69,10 @@ sub set_text_handler {
     my $locale = $ctx->{locale};
     $locale =~ s/-/_/g;
 
-    $r->log->info("messages locale = $locale");
+    $r->log->debug("egweb: messages locale = $locale");
 
     unless($lh_cache{$locale}) {
-        $r->log->info("Unsupported locale: $locale");
+        $r->log->info("egweb: Unsupported locale: $locale");
         $lh_cache{$locale} = $lh_cache{'en_US'};
     }
 
@@ -97,11 +97,11 @@ sub run_context_loader {
     };
 
     if($@) {
-        $r->log->error("Context Loader error: $@");
+        $r->log->error("egweb: Context Loader error: $@");
         return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
     }
 
-    $r->log->info("context loader resulted in status $stat");
+    $r->log->debug("egweb: context loader resulted in status $stat");
     return $stat;
 }
 
@@ -120,7 +120,7 @@ sub parse_as_xml {
     } otherwise {
 	    my $e = shift;
         my $err = "Invalid XML: $e";
-        $r->log->error($err);
+        $r->log->error("egweb: $err");
         $r->content_type('text/plain; encoding=utf8');
         $r->print("\n$err\n\n$data");
     };
@@ -206,7 +206,7 @@ sub find_template {
             last unless $localpath;
             for my $tpath (@{$ctx->{template_paths}}) {
                 my $fpath = "$tpath/$skin/$localpath.$ext";
-                $r->log->debug("looking at possible template $fpath");
+                $r->log->debug("egweb: looking at possible template $fpath");
                 if(-r $fpath) {
                     $template = "$localpath.$ext";
                     last;
@@ -221,12 +221,12 @@ sub find_template {
 
         # no template configured or found
         unless($template) {
-            $r->log->warn("No template configured for path $path");
+            $r->log->debug("egweb: No template configured for path $path");
             return ();
         }
     }
 
-    $r->log->debug("template = $template : page args = @$page_args");
+    $r->log->debug("egweb: template = $template : page args = @$page_args");
     return ($template, $page_args, $as_xml);
 }
 
@@ -236,7 +236,7 @@ sub check_web_config {
     my $r = shift;
     my $epoch = stat($web_config_file)->mtime;
     unless($web_config_edit_time and $web_config_edit_time == $epoch) {
-        $r->log->debug("Reloading web config after edit...") if $r;
+        $r->log->debug("egweb: Reloading web config after edit...") if $r;
         $web_config_edit_time = $epoch;
         $web_config = parse_config($web_config_file);
     }

commit 1cdd6f7661aea6e7e35736308b17dd11f34d517c
Author: berick <berick at esilibrary.com>
Date:   Fri Feb 18 09:52:41 2011 -0500

    i18n and cleanup

diff --git a/Open-ILS/web/templates/default/opac/parts/result/filtersort.tt2 b/Open-ILS/web/templates/default/opac/parts/result/filtersort.tt2
index cee0f82..fc59655 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/filtersort.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/filtersort.tt2
@@ -1,19 +1,15 @@
-<!-- ****************** filtersort.xml ***************************** -->
-    <select class="results_header_sel" id='opac.result.sort' onchange='searchBarSubmit(true);'>
-        <option selected='selected' value=''>[% l("Sort Results by Relevance") %]</option>
-        <optgroup label='[% l("Sort Results by Title") %]'>
-            <option id='opac.result.title.a2z' label='&common.a2z.titla;' value='title.asc'>[% l("Title: A to Z") %]</option>
-            <option id='opac.result.title.z2a' label='&common.z2a.titla;' value='title.desc'>[% l("Title: Z to A") %]</option>
-        </optgroup>
-        <optgroup label='[% l("Sort Results by Author") %]'>
-            <option id='opac.result.author.a2z' label='[% l("Author: A to Z") %]' value='author.asc'>[% l("Author: A to Z") %]</option>
-            <option id='opac.result.author.z2a' label='[% l("Author: Z to A") %]' value='author.desc'>[% l("Author: Z to A") %]</option>
-        </optgroup>
-        <optgroup label='[% l("Sort Results by Publication Date") %]'>
-            <option id='opac.result.pubdate.new2old' label='[% l("Date: Newest to Oldest") %]' 
-                value='pubdate.desc'>[% l("Date: Newest to Oldest") %]</option>
-            <option id='opac.result.pubdate.old2new' label='[% l("Date: Oldest to Newest") %]' 
-                value='pubdate.asc'>[% l("Date: Oldest to Newest") %]</option>
-        </optgroup>
-    </select>
-<!-- ****************** end: filtersort.xml ***************************** -->
+<select class="results_header_sel" id='opac.result.sort' onchange='searchBarSubmit(true);'>
+    <option selected='selected' value=''>[% l("Sort Results by Relevance") %]</option>
+    <optgroup label='[% l("Sort Results by Title") %]'>
+        <option id='opac.result.title.a2z' value='title.asc'>[% l("Title: A to Z") %]</option>
+        <option id='opac.result.title.z2a' lue='title.desc'>[% l("Title: Z to A") %]</option>
+    </optgroup>
+    <optgroup label='[% l("Sort Results by Author") %]'>
+        <option id='opac.result.author.a2z' value='author.asc'>[% l("Author: A to Z") %]</option>
+        <option id='opac.result.author.z2a' value='author.desc'>[% l("Author: Z to A") %]</option>
+    </optgroup>
+    <optgroup label='[% l("Sort Results by Publication Date") %]'>
+        <option id='opac.result.pubdate.new2old' value='pubdate.desc'>[% l("Date: Newest to Oldest") %]</option>
+        <option id='opac.result.pubdate.old2new' value='pubdate.asc'>[% l("Date: Oldest to Newest") %]</option>
+    </optgroup>
+</select>

commit a323f4b45557059519b0ccfbfa6e55446587539a
Merge: c99f3ca 935bc04
Author: berick <berick at esilibrary.com>
Date:   Fri Feb 18 09:38:53 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit c99f3ca2fd1a4fc09a096df9ab93a92709c8f6bd
Author: berick <berick at esilibrary.com>
Date:   Fri Feb 18 09:14:18 2011 -0500

    while we're at it, condense the js/css/images deflat and cache control into 1 block

diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf
index 194696c..cd263bb 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf
+++ b/Open-ILS/examples/apache/eg_vhost.conf
@@ -169,26 +169,6 @@ RewriteRule . - [E=locale:%1]
 
 </Location>
 
-<Location /js/>
-    # ----------------------------------------------------------------------------------
-    # Some mod_deflate fun
-    # ----------------------------------------------------------------------------------
-    <IfModule mod_deflate.c>
-        SetOutputFilter DEFLATE
-
-        BrowserMatch ^Mozilla/4 gzip-only-text/html
-        BrowserMatch ^Mozilla/4\.0[678] no-gzip
-        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
-
-        SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
-
-        <IfModule mod_headers.c>
-            Header append Vary User-Agent env=!dont-vary
-        </IfModule>
-    </IfModule>
-
-</Location>
-
 # ----------------------------------------------------------------------------------
 # Force SSL on the OPAC's "My Account" page
 # ----------------------------------------------------------------------------------
@@ -554,20 +534,32 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
         BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
         SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
         <IfModule mod_headers.c>
+            Header append Cache-Control "public"
             Header append Vary User-Agent env=!dont-vary
         </IfModule>
     </IfModule>
 </Location>
+<LocationMatch ^/(images|css|js)/>
+    # should pick up the default expire time from eg.conf...
+    <IfModule mod_deflate.c>
+        SetOutputFilter DEFLATE
+        BrowserMatch ^Mozilla/4 gzip-only-text/html
+        BrowserMatch ^Mozilla/4\.0[678] no-gzip
+        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
+        SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
+        <IfModule mod_headers.c>
+            Header append Cache-Control "public"
+            Header append Vary User-Agent env=!dont-vary
+        </IfModule>
+    </IfModule>
+</LocationMatch>
 <Location /eg/opac>
     PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
     # Expire the HTML immediately since we're loading dynamic data for each page
     ExpiresActive On
     ExpiresByType text/html "access plus 0 seconds"
 </Location>
-<LocationMatch ^/(images|css|js)/>
-    # should pick up the default expire time...
-    Header append Cache-Control "public"
-</LocationMatch>
+
 
 # Note: the template processor will decline handling anything it does not
 # have an explicit configuration for, which means it will fall back to 

commit f71a1d5b6ee30a92741ef3ec3ee721a47f3e74f7
Author: berick <berick at esilibrary.com>
Date:   Fri Feb 18 09:08:51 2011 -0500

    under /eg/opac, expire html immediately to pick up dynamic data;  set public cache-control on general images/css/js content

diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf
index 99564e8..194696c 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf
+++ b/Open-ILS/examples/apache/eg_vhost.conf
@@ -560,13 +560,14 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
 </Location>
 <Location /eg/opac>
     PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
-#    Disable caching for development..
-    <IfModule mod_headers.c>
-#        Header set Expires "Thu, 19 Nov 1981 08:52:00 GM"
-#        Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
-#        Header set Pragma "no-cache"
-    </IfModule>
+    # Expire the HTML immediately since we're loading dynamic data for each page
+    ExpiresActive On
+    ExpiresByType text/html "access plus 0 seconds"
 </Location>
+<LocationMatch ^/(images|css|js)/>
+    # should pick up the default expire time...
+    Header append Cache-Control "public"
+</LocationMatch>
 
 # Note: the template processor will decline handling anything it does not
 # have an explicit configuration for, which means it will fall back to 

commit 49e886765c83a1b22e016bfb94a2771999ef7f8f
Author: berick <berick at esilibrary.com>
Date:   Fri Feb 18 09:04:32 2011 -0500

    after auth expire time, redirect to logout page (which ultimately redirects home) to force removal of the stale auth cookie

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index a7fc0a7..4e9c683 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -139,7 +139,10 @@ sub load_common {
     $ctx->{path_info} = $self->cgi->path_info;
     $ctx->{opac_root} = $ctx->{base_path} . "/opac"; # absolute base url
     $ctx->{is_staff} = ($self->apache->headers_in->get('User-Agent') =~ 'oils_xulrunner');
+
+    # capture some commonly accessed pages
     $ctx->{home_page} = 'http://' . $self->apache->hostname . $self->ctx->{opac_root} . "/home";
+    $ctx->{logout_page} = 'https://' . $self->apache->hostname . $self->ctx->{opac_root} . "/logout";
 
     if($e->authtoken($self->cgi->cookie('ses'))) {
 
@@ -156,6 +159,10 @@ sub load_common {
 
         } else {
 
+            # For now, keep an eye out for any pages being unceremoniously redirected to logout...
+            $self->apache->log->info("loading " . $ctx->{path_info} . "; auth session " . 
+                $e->authtoken . " no longer valid; redirecting to logout");
+
             return $self->load_logout;
         }
     }
diff --git a/Open-ILS/web/templates/default/opac/parts/base.tt2 b/Open-ILS/web/templates/default/opac/parts/base.tt2
index 892cb27..2ff73d5 100644
--- a/Open-ILS/web/templates/default/opac/parts/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/base.tt2
@@ -3,7 +3,7 @@
     <head>
         <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
         [% IF ctx.authtime %]
-        <meta http-equiv="refresh" content="[% ctx.authtime %];[% ctx.home_page %]">
+        <meta http-equiv="refresh" content="[% ctx.authtime %];[% ctx.logout_page %]">
         [% END %]
         <link rel="stylesheet" type="text/css"
             href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto.css" />

commit 71330c861fd025f81e7150b770e28f16114493a7
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 17 15:15:33 2011 -0500

    basic search classes work (except cn)
    
    Not sure what would happen on a KCLS environment. Need to test.
    bibcn nor cn do what I mean in my dev environment.

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index ad9526a..2d826cd 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -23,6 +23,7 @@ sub load_rresults {
     my $item_type = $cgi->param('item_type');
     my $facet = $cgi->param('facet');
     my $query = $cgi->param('query');
+    my $search_class = $cgi->param('class');
     my $limit = $cgi->param('limit') || 10; # TODO user settings
 
     my $loc = $cgi->param('loc') || $ctx->{aou_tree}->()->id;
@@ -35,6 +36,10 @@ sub load_rresults {
     };
 
     $query = "$query $facet" if $facet; # TODO
+    # XXX Since open-ils.search is a public service, it is responsible for
+    # being wary of injection/bad input, not us, right?
+    $query = $search_class . ':' . $query if $search_class;
+
     my $results;
 
     try {
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
index dd413b7..941cf7c 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
@@ -1,15 +1,9 @@
-<!-- ****************** adv_global_row.xml ***************************** -->
 <tr id='adv_global_trow' type='input'>
     <td align='left' width='100%' nowrap='nowrap'>
         <!-- select the search class -->
-        <select name='type' style='margin-right: 7px;'>
-            <option value='keyword' selected='selected'>[% l("Keyword") %]</option>
-            <option value='title'>[% l("Title") %]</option>
-            <option value='author'>[% l("Author") %]</option>
-            <option value='subject'>[% l("Subject") %]</option>
-            <option value='series'>[% l("Series") %]</option>
-            <option value='bibcn'>Bibliographic call number:</option>
-            </select>
+        <span class="opac-auto-078">
+            [% INCLUDE "default/opac/parts/stypes_selector.tt2" %]
+        </span>
         <!-- select how to treat the text -->
         <select name='contains' style='margin-right: 7px;'>
             <option value='contains'>[% l("Contains") %]</option>
@@ -21,4 +15,3 @@
         <!-- Remove this row -->
     </td>
 </tr>
-<!-- ****************** end: adv_global_row.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
index a7c6326..f3e30ad 100644
--- a/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
@@ -1,10 +1,16 @@
-<!-- ****************** stypes_selector.xml ***************************** -->
-<select id='search_type_selector'>
-	<option value='keyword' selected='selected'>[% l("Keyword") %]</option>
-	<option value='title'>[% l("Title") %]</option>
-	<option value='author'>[% l("Author") %]</option>
-	<option value='subject'>[% l("Subject") %]</option>
-	<option value='series'>[% l("Series") %]</option>
-	<option value='cn'>Call Number</option>
+[%  search_classes = [
+    {value => "", label => l("Keyword")},
+    {value => "title", label => l("Title")},
+    {value => "author", label => l("Author")},
+    {value => "subject", label => l("Subject")},
+    {value => "series", label => l("Series")},
+    {value => "cn", label => l("Call Number")}  # XXX or should this be bibcn?
+] %]
+<select id='search_type_selector' name="class">
+    [%  search_class = CGI.param('class');
+        FOR sc IN search_classes -%]
+    <option value='[% sc.value %]'[%
+        search_class == sc.value ? ' selected="selected"' : ''
+    %]>[% sc.label %]</option>
+    [% END -%]
 </select>
-<!-- ****************** end: stypes_selector.xml ***************************** -->

commit 5d7f65775f4a0f569264893fcacd4e61b5eaf256
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 17 13:24:35 2011 -0500

    force new layout changes into advanced search page
    
    The advanced search page doesn't yet work, but should soon.

diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index 9872b85..833d7f3 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -1,8 +1,7 @@
-<!-- ****************** advanced_global.xml ***************************** -->
 <table id='adv_global_search' class='data_grid data_grid_center' width='100%'>
     <tr style='border-bottom: none;'>
         <!-- Contains the user-addable(?) rows to define search class, containment and text -->
-        <td valign='top' width='65%' style='border-bottom: none;'>
+        <td valign='top' style='border-bottom: none;'>
             <table width='100%' id='adv_global_input_table'>
                 <thead>
                     <tr>
@@ -18,7 +17,8 @@
                     <!-- add a new row -->
                     <tr id='adv_global_addrow'>
                         <td align='left' style="padding-top:7px;">
-                            <button>[% l("Submit Search") %]</button><!-- XXX TODO make a real form -->
+                            <a href="javascript:;" id="myopac_new_global_row" onclick='advAddGblRow();'>Add Search Row</a>
+                            <button class="hide_me">[% l("Submit Search") %]</button><!-- XXX TODO make a real form -->
                         </td>
                     </tr>
                 </tbody>
@@ -26,31 +26,91 @@
         </td>
     </tr>
     <tr>
-        <td align='center'>
-            [% l("Search Library") %]<br /><br />
-            <span id='depth_selector_span'>
-                [% PROCESS "default/opac/parts/org_selector.tt2";
-                    PROCESS build_org_selector name='loc' value=loc %]
-            </span>
-            <span id='lib_selector_span'>
-                <a id='lib_selector_link' class='classic_link'
-                    href='#'>[% l("Choose a library to search") %]</a>
-            </span>
-            <br /><br />
-            <span>[% l("Limit to Available") %]</span>
-            <input type='checkbox' id='opac.result.limit2avail'/>
+        <td align='top'>
+          <div style="width:100%;" class="header_middle">Search Filters</div>
+          <table cellpadding='10' cellspacing='0' border='0'><tr>
+            <td valign='top'>
+                <strong>[% l("Item Type") %]</strong><br />
+                [%  INCLUDE "default/opac/parts/format_selector.tt2"
+                        value=CGI.param("item_type")
+                        multiple="multiple" size="4"
+                        id="adv_global_item_type_basic" %]
+            </td>
+            <td valign='top'>
+                <strong>[% l("Language") %]</strong><br />
+                <select multiple='multiple' size='4' id='adv_global_lang'>
+                    [% INCLUDE "default/opac/parts/item_lang_options.tt2" %]
+                </select>
+            </td>
+            <td valign='top'>
+                <strong>[% l("Audience") %]</strong><br />
+                <select multiple='multiple' size='3' id='adv_global_audience' class='hide_me'></select>
+                <select multiple='multiple' size='3' id='adv_global_audience_basic'>
+                    <option value='abcj'>[% l("Juvenile") %]</option>
+                    <option value='d'>[% l("General") %]</option>
+                    <option value='e'>[% l("Adult") %]</option>
+                </select>
+                    <!--<a id='adv_global_audience_link_adv' class='classic_link adv_adv_link'
+                        href='javascript:void(0);' onclick='
+                        hideMe($("adv_global_audience_basic"));
+                        unHideMe($("adv_global_audience"));
+                        hideMe(this);
+                        unHideMe($("adv_global_audience_link_basic"));
+                        '>[% l("Advanced") %]</a>
+                    <a id='adv_global_audience_link_basic' class='hide_me classic_link adv_adv_link'
+                        href='javascript:void(0);' onclick='
+                        unHideMe($("adv_global_audience_basic"));
+                        hideMe($("adv_global_audience"));
+                        unHideMe($("adv_global_audience_link_adv"));
+                        hideMe(this);'>[% l("Basic") %]</a>-->
+            </td>
+            <td valign='top'>
+            <strong>[% l("Sort Criteria") %]</strong>
+              <table style='border: none; width: 100%;'>
+                <tr>
+                    <td align='center' width='100%'>
+                        <table class='' width='100%'>
+                            <tbody>
+                                <tr>
+                                    <td align=''>
+                                        <select id='adv_global_sort_by' onchange='__setsortsel();'>
+                                            <option value='rel'>[% l("Relevance") %]</option>
+                                            <option value='title'>[% l("Title") %]</option>
+                                            <option value='author'>[% l("Author") %]</option>
+                                            <option value='pubdate'>[% l("Publication date") %]</option>
+                                        </select>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <select id='adv_global_sort_dir' disabled='disabled'>
+                                            <option value='asc'>[% l("Ascending / A to Z") %]</option>
+                                            <option value='desc'>[% l("Descending / Z to A") %]</option>
+                                        </select>
+                                    </td>
+                           <!-- force the enable/disable sort dir code to run -->
+                           <script language='javascript' type='text/javascript'>__setsortsel();</script>
+                                </tr>
+                                <tr>
+                                    <td align='center' class="hide_me">
+                                        <span>[% l("Group Formats and Editions") %]</span>
+                                        <input id='adv_group_titles' type='checkbox' />
+                                    </td>
+                                    <td align='center'>
+                                    </td>
+                                </tr>
+                            </tbody>
+                        </table>
+                    </td>
+                </tr>
+              </table>
+            </td>
+          </tr></table>
         </td>
     </tr>
     <tr>
         <td colspan="2">
-            <table width='100%'>
-                <thead>
-                    <tr>
-                        <td colspan='2' align='center'>
-                            [% l("Search Filters") %]
-                        </td>
-                    </tr>
-                </thead>
+            <table cellpadding='10' cellspacing='0' border='0'>
                 <tbody>
                     <tr>
                         <td align='right' class="hide_me">
@@ -60,89 +120,31 @@
                             <select multiple='multiple' size='3' id='adv_global_item_form'>
                             </select>    
                         </td>
-                        <td align='right'>
-                            <span>[% l("Item Type") %]</span><br />
-                        </td>
-                        <td align='left'>
-                            <select multiple='multiple' size='3' id='adv_global_item_type' class='hide_me'>
-                            </select>    
-                            <select multiple='multiple' size='3' id='adv_global_item_type_basic'>
-                                <option value=''>[% l("All Formats") %]</option>
-
-                                <!-- These will be replaced w/ SVF.  Leave them hard-coded for now -->
-                                <option value='a'>Book</option>
-                                <option value='i'>Book on cassette</option>
-                                <option value='n'>Book on CD</option>
-                                <option value='x'>Download music</option>
-                                <option value='y'>Download video</option>
-                                <option value='h'>DVD</option>
-                                <option value='w'>eBook - Audio</option>
-                                <option value='v'>eBook - Text</option>
-                                <option value='e'>Equipment</option>
-                                <option value='f'>Films</option>
-                                <option value='o'>Kit</option>
-                                <option value='q'>Large print</option>
-                                <option value='b'>Magazine</option>
-                                <option value='d'>Microform</option>
-                                <option value='k'>Music cassette</option>
-                                <option value='j'>Music CD</option>
-                                <option value='l'>Music LP</option>
-                                <option value='p'>Newspaper</option>
-                                <option value='t'>Online</option>
-                                <option value='u'>Player</option>
-                                <option value='c'>Printed music</option>
-                                <option value='2'>Read along with cassette</option>
-                                <option value='5'>Read along with CD</option>    
-                                <option value='c'>Scores</option>    
-                                <option value='m'>Software</option>
-                                <option value='g'>Video</option>
-                                <option value='r'>3-D Object</option>
-                                <option value='z'>Map</option>
-                                <option value='s'>Slide set</option>
-
-                            </select>    
-                        </td>
                         <td align='right' class="hide_me">
                             <span>[% l("Literary Form") %]</span>
-                            <a class='classic_link adv_adv_link' href='#'>[% l("Advanced") %]</a>
-                            <a class='hide_me classic_link adv_adv_link' href='#'>[% l("Basic") %]</a>
+                            <a id='adv_global_lit_form_link_adv' class='classic_link adv_adv_link'
+                                href='javascript:void(0);' onclick='
+                                hideMe($("adv_global_lit_form_basic"));
+                                unHideMe($("adv_global_lit_form"));
+                                hideMe(this);
+                                unHideMe($("adv_global_lit_form_link_basic"));
+                                '>[% l("Advanced") %]</a>
+                            <a id='adv_global_lit_form_link_basic' class='hide_me classic_link adv_adv_link'
+                                href='javascript:void(0);' onclick='
+                                unHideMe($("adv_global_lit_form_basic"));
+                                hideMe($("adv_global_lit_form"));
+                                unHideMe($("adv_global_lit_form_link_adv"));
+                                hideMe(this);
+                                '>[% l("Basic") %]</a>
                         </td>
                         <td align='left' class="hide_me">
-                            <select multiple='multiple' size='3' id='adv_global_lit_form' class='hide_me'> </select>    
-                            <select multiple='multiple' size='3' id='adv_global_lit_form_basic'> 
+                            <select multiple='multiple' size='3' id='adv_global_lit_form' class='hide_me'>
+                            </select>    
+                            <select multiple='multiple' size='3' id='adv_global_lit_form_basic'>
                                 <option value='0 '>[% l("Non Fiction") %]</option>
                                 <option value='1'>[% l("Fiction") %]</option>
                             </select>    
                         </td>
-                        <td align='right'>
-                            <span>[% l("Language") %]</span>
-                        </td>
-                        <td align='left'>
-                            <select multiple='multiple' size='3' id='adv_global_lang'>
-                                [% INCLUDE "default/opac/parts/item_lang_options.tt2" %]
-                            </select>
-                        </td>
-
-                        <td align='right' class="hide_me">
-                            <span>[% l("Audience") %]</span>
-                            <a id='adv_global_audience_link_adv'
-                                class='classic_link adv_adv_link'
-                                href='#'>[% l("Advanced") %]</a>
-
-                            <a id='adv_global_audience_link_basic'
-                                class='hide_me classic_link adv_adv_link'
-                                href='#'>[% l("Basic") %]</a>
-                        </td>
-                        <td align='left' class="hide_me">
-                            <select multiple='multiple' size='3' id='adv_global_audience' class='hide_me'>
-                            </select>
-                            <select multiple='multiple' size='3' id='adv_global_audience_basic'>
-                                <option value='e '>[% l("Adult") %]</option>
-                                <option value='abcdj'>[% l("Juvenile") %]</option>
-                                <option value='fg '>[% l("General") %]</option>
-                            </select>
-                        </td>
-
                         <td align='right' class="hide_me">
                             <span>[% l("Bib Level") %]</span>
                         </td>
@@ -152,20 +154,34 @@
                         </td>
                     </tr>
                     <tr>
-                        <td align='right'>
-                            <span>[% l("Publication Year") %]</span>
+                        <td valign='top'>
+                            <strong>[% l("Search Library") %]</strong><br />
+                            [% PROCESS "default/opac/parts/org_selector.tt2";
+                                PROCESS build_org_selector name='loc' value=loc %]
+                            <div style="position:relative;top:7px;">
+                                <input type='checkbox'
+                                id='opac.result.limit2avail'/>
+                                <label style="position:relative;top:-2px;"
+                                    for='opac.result.limit2avail'>
+                                    [% l("Limit to Available") %]</label>
+                            </div>
                         </td>
-                        <td align='left'>
-                            <select id='adv_global_pub_date_type'>
-                                    <option value='equals' selected='selected'>[% l("Is") %] </option>
-                                    <option value='before'>[% l("Before") %]</option>
-                                    <option value='after'>[% l("After") %]</option>
-                                    <option value='between'>[% l("Between") %]</option>
+                        <td valign='top'>
+                            <strong>[% l("Publication Year") %]</strong><br />
+                            <select id='adv_global_pub_date_type' onchange='
+                                if($("adv_global_pub_date_type").selectedIndex == 3)
+                                    unHideMe($("adv_global_pub_date_2_span"));
+                                else
+                                    hideMe($("adv_global_pub_date_2_span"));'>
+                                <option value='equals' selected='selected'>[% l("Is") %]</option>
+                                <option value='before'>[% l("Before") %]</option>
+                                <option value='after'>[% l("After") %]</option>
+                                <option value='between'>[% l("Between") %]</option>
                             </select>    
                             <div style='margin-top:5px;'>
                                 <input id='adv_global_pub_date_1' type='text' size='4' maxlength='4'/>
                                 <span id='adv_global_pub_date_2_span' class='hide_me'>
-                                    [% l("and") %] <input id='adv_global_pub_date_2' type='text' size='4' maxlength='4'/>
+                                   [% l("and") %] <input id='adv_global_pub_date_2' type='text' size='4' maxlength='4'/>
                                 </span>
                             </div>
                         </td>
@@ -174,9 +190,7 @@
                     <tr id='adv_copy_location_filter_row' class='hide_me'>
                         <td align='right'>[% l("Shelving Location") %]</td>
                         <td align='left' id='adv_copy_location_filter_td'>
-                            <select size='3'
-                                id='adv_copy_location_filter_select'
-                                multiple='multiple'>
+                            <select size='3' id='adv_copy_location_filter_select' multiple='multiple'>
                             </select>
                         </td>
                     </tr>
@@ -184,53 +198,6 @@
             </table>
         </td>
     </tr>
-    <tr style='border-top: none;'>
-        <td align='center' valign='top' style='border-top: none;' colspan='2'>
-            <table style='border: none; width: 100%;'>
-                <tr>
-                    <td align='center' width='100%'>
-                        <table class='' width='100%'>
-            
-                            <thead>
-                                <tr>
-                                    <td align='center' width='50%'>[% l("Sort Criteria") %]</td>
-                                    <td align='center'></td>
-                                </tr>
-                            </thead>
-            
-                            <tbody>
-                                <tr>
-                                    <td align=''>
-                                        <select id='adv_global_sort_by'>
-                                            <option value='rel'>[% l("Relevance") %]</option>
-                                            <option value='title'>[% l("Title") %]</option>
-                                            <option value='author'>[% l("Author") %]</option>
-                                            <option value='pubdate'>[% l("Publication date") %]</option>
-                                        </select>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td>
-                                        <select id='adv_global_sort_dir' disabled='disabled'>
-                                            <option value='asc'>[% l("Ascending / A to Z") %]</option>
-                                            <option value='desc'>[% l("Descending / Z to A") %]</option>
-                                        </select>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td align='center' class="hide_me">
-                                        <span>[% l("Group Formats and Editions") %]</span>
-                                        <input id='adv_group_titles' type='checkbox' />
-                                    </td>
-                                    <td align='center'></td>
-                                </tr>
-                            </tbody>
-                        </table>
-                    </td>
-                </tr>
-            </table>
-        </td>
-    </tr>
 
     <tr class='border_4_2'>
         <td align="left" colspan='2'>
@@ -305,4 +272,3 @@
         <img alt="Search" src="[% ctx.media_prefix %]/images/search_btn.gif" style="cursor:pointer;" />
     </div>
 </div>
-<!-- ****************** end: advanced_global.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
index 7ebd072..d7c755f 100644
--- a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
@@ -1,6 +1,8 @@
 [%  name = name || "item_type";
     id = id || "format_selector" %]
-<select id='[% id %]' name='[% name %]'>
+<select id='[% id %]' name='[% name %]'[%
+    multiple ? ' multiple="multiple"' : '';
+    size ? (' size="' _ size _ '"') : ''; %]>
     <option value=''>[% l("All Formats") %]</option>
 [% FOR o IN item_types %]
     <option value='[% o.code %]'[% value == o.code ? ' selected="selected"' : ''%]>[% o.name %]</option>

commit 9526d790213c4e2b39c179c4fcc1682259b13975
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 17 09:18:53 2011 -0500

    make the zero-hits case work for search results

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 5fcfe9d..3a8a94a 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -720,6 +720,7 @@ div.select-wrapper:hover {
 
 #zero_hits_term {
 	text-transform: uppercase;
+    font-weight: bold;
 }
 
 #zero_search_hits #spell_check_link {
diff --git a/Open-ILS/web/templates/default/opac/parts/result/header.tt2 b/Open-ILS/web/templates/default/opac/parts/result/header.tt2
deleted file mode 100644
index 67f6193..0000000
--- a/Open-ILS/web/templates/default/opac/parts/result/header.tt2
+++ /dev/null
@@ -1,60 +0,0 @@
-[%  q = query | url;
-    np_link = '?query=' _ q;
-    IF loc;
-        np_link = np_link _ "&loc=" _ loc;
-    END;
-    IF depth or depth == 0;
-        np_link = np_link _ "&depth=" _ depth;
-    END;
-    ctx.result_start = 1 + ctx.page_size * page;
-    ctx.result_stop = 1 + ctx.page_size * (page + 1);
-    IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
-%]
-<div style="height: 10px;"></div>
-[% BLOCK results_count_header %]
-<div class="results_header_nav1">
-    <table cellpadding="0" cellspacing="0" border="0" width="100%">
-        <tr>
-            <td class="h1" width="116">Search Results</td>
-            <td valign="bottom" nowrap="nowrap" class="result_number">
-                [% l("Results") %]
-                <strong>[% ctx.result_start %]</strong>
-                &nbsp;-
-                <strong>[% ctx.result_stop  %] </strong>
-                &nbsp;[% l("of") %]
-                <strong>[% ctx.hit_count %]</strong>
-                <span style='padding-left: 6px;'>
-                    (page
-                    <strong>[% page + 1 %]</strong>
-                    &nbsp;[% l("of") %]
-                    <strong>[% page_count %]</strong>)
-                </span>
-            </td>
-            <td align="right" valign="bottom">
-                <span class='start_end_links_span'>
-                    [% IF page > 0 %]
-                    <a class='search_page_nav_link'
-                        href="[% np_link _ '&page=' _ (page - 1) %]"
-                        title='[% l("Previous page") %]'>
-                        <span class="nav_arrow_fix">&#9668;</span> Previous
-                    </a>
-                    [% END %]
-                    <span class='hide_me'
-                        style='padding-left: 11px; padding-right:11px;'>
-                        <span></span>
-                    </span>
-                    [% IF (page + 1) < page_count %]
-                    <a class='search_page_nav_link'
-                        href="[% np_link _ '&page=' _ (page + 1) %]"
-                        title='[% l("Next page") %]'>
-                        Next <span class="nav_arrow_fix">&#9658;</span>
-                    </a>
-                    [% END %]
-                </span>
-            </td>
-        </tr>
-    </table>
-</div>
-[% END %]
-[% ctx.results_count_header = PROCESS results_count_header;
-    ctx.results_count_header %]
diff --git a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2 b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
index a35876a..1afe8b0 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
@@ -1,9 +1,8 @@
-<!-- ****************** result_lowhits.xml ***************************** -->
-<div id='result_low_hits' class='hide_me'>
-    <div id="zero_search_hits" class="hide_me">
+<div id='result_low_hits'>
+    <div id="zero_search_hits">
         <div style="float:left;width:300px;margin-top:20px;">
             <p>Sorry, no entries were found for
-                <strong>&quot;<span id="zero_hits_term"></span>&quot;</strong><br />
+                <q id="zero_hits_term">[% query | html %]</q><br />
                 <span id="zero_hits_label1" class="hide_me">Did you mean
                     <strong><a id="spell_check_link" href="javascript:;"></a></strong>?</span>
             </p>
@@ -28,7 +27,8 @@
                 Change to <strong>Advanced Keyword Search.</strong>
             </p>
             <p>
-                Adjacency Multiple words are not searched together as a phrase. They will
+                <strong>Adjacency</strong><br />
+                Multiple words are not searched together as a phrase. They will
                 be found in various parts of the record. To search for a phrase, enclose your
                 search terms in quotation marks.<br />
                 (example:  <strong>&quot;garcia marquez&quot;</strong>)
@@ -90,4 +90,3 @@
         </div>
     </div>
 </div>
-<!-- ****************** end: result_lowhits.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index b602af2..0e77bbb 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -1,6 +1,67 @@
 [%  PROCESS "default/opac/parts/marc_misc.tt2";
-    SET result_count = ctx.result_start; %]
-<!-- ****************** result_table.xml ***************************** -->
+
+    q = query | url;
+    np_link = '?query=' _ q;
+    IF loc;
+        np_link = np_link _ "&loc=" _ loc;
+    END;
+    IF depth or depth == 0;
+        np_link = np_link _ "&depth=" _ depth;
+    END;
+    ctx.result_start = 1 + ctx.page_size * page;
+    ctx.result_stop = 1 + ctx.page_size * (page + 1);
+    IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
+
+    result_count = ctx.result_start;
+%]
+<div style="height: 10px;"></div>
+[% BLOCK results_count_header %]
+<div class="results_header_nav1">
+    <table cellpadding="0" cellspacing="0" border="0" width="100%">
+        <tr>
+            <td class="h1" width="116">Search Results</td>
+            <td valign="bottom" nowrap="nowrap" class="result_number">
+                [% l("Results") %]
+                <strong>[% ctx.result_start %]</strong>
+                &nbsp;-
+                <strong>[% ctx.result_stop  %] </strong>
+                &nbsp;[% l("of") %]
+                <strong>[% ctx.hit_count %]</strong>
+                <span style='padding-left: 6px;'>
+                    (page
+                    <strong>[% page + 1 %]</strong>
+                    &nbsp;[% l("of") %]
+                    <strong>[% page_count %]</strong>)
+                </span>
+            </td>
+            <td align="right" valign="bottom">
+                <span class='start_end_links_span'>
+                    [% IF page > 0 %]
+                    <a class='search_page_nav_link'
+                        href="[% np_link _ '&page=' _ (page - 1) %]"
+                        title='[% l("Previous page") %]'>
+                        <span class="nav_arrow_fix">&#9668;</span> Previous
+                    </a>
+                    [% END %]
+                    <span class='hide_me'
+                        style='padding-left: 11px; padding-right:11px;'>
+                        <span></span>
+                    </span>
+                    [% IF (page + 1) < page_count %]
+                    <a class='search_page_nav_link'
+                        href="[% np_link _ '&page=' _ (page + 1) %]"
+                        title='[% l("Next page") %]'>
+                        Next <span class="nav_arrow_fix">&#9658;</span>
+                    </a>
+                    [% END %]
+                </span>
+            </td>
+        </tr>
+    </table>
+</div>
+[% END %]
+[% ctx.results_count_header = PROCESS results_count_header;
+    ctx.results_count_header %]
 <div id="result_table_div">
     <table cellpadding="0" cellspacing="0" border="0" width="100%">
         <tr>
@@ -208,4 +269,3 @@
     [% ctx.results_count_header %]
     <!-- ChiliFresh XXX script TODO -->
 </div>
-<!-- ****************** end: result_table.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index e698e87..3c99292 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -55,11 +55,9 @@
         </div>
         <div id="main-content">
             <div id="tehResultsPage">
-                [% INCLUDE "default/opac/parts/result/header.tt2" %]
-                <div id="rresults_page">
-                    [% INCLUDE "default/opac/parts/result/table.tt2" %]
-                    [% INCLUDE "default/opac/parts/result/lowhits.tt2" %]
-                </div>
+                [% path = "default/opac/parts/result/" _
+                    (ctx.records.size ? "table.tt2" : "lowhits.tt2");
+                INCLUDE $path %]
             </div>
             <div class="common-full-pad"></div>    
         </div>

commit 5631bec8ea3a6e9df5dd1a9a611b3c3cdfd930cd
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Feb 16 17:23:16 2011 -0500

    crummy paging in the record pages' copy listing

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index 71c7bd4..c3716d5 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -15,8 +15,8 @@ sub load_record {
 
     my $org = $self->cgi->param('loc') || $self->ctx->{aou_tree}->()->id;
     my $depth = $self->cgi->param('depth') || 0;
-    my $copy_limit = $self->cgi->param('copy_limit');
-    my $copy_offset = $self->cgi->param('copy_offset');
+    my $copy_limit = int($self->cgi->param('copy_limit') || 20);
+    my $copy_offset = int($self->cgi->param('copy_offset') || 0);
 
     my $rec_id = $self->ctx->{page_args}->[0]
         or return Apache2::Const::HTTP_BAD_REQUEST;
@@ -30,6 +30,8 @@ sub load_record {
     $self->ctx->{marc_xml} = XML::LibXML->new->parse_string($self->ctx->{record}->marc);
 
     $self->ctx->{copies} = $copy_rec->gather(1);
+    $self->ctx->{copy_limit} = $copy_limit;
+    $self->ctx->{copy_offset} = $copy_offset;
 
     return Apache2::Const::OK;
 }
@@ -39,8 +41,8 @@ sub mk_copy_query {
     my $rec_id = shift;
     my $org = shift;
     my $depth = shift;
-    my $copy_limit = shift || 20;
-    my $copy_offset = shift || 0;
+    my $copy_limit = shift;
+    my $copy_offset = shift;
 
     my $query = {
         select => {
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 05c73f3..b28cf66 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -174,6 +174,24 @@
                 END %]</td>
         </tr>
         [% END %]
+        <tr>
+        [% IF ctx.copy_offset > 0;
+            new_offset = ctx.copy_offset - ctx.copy_limit;
+            IF new_offset < 0; new_offset = 0; END %]
+            <td>
+                <a href="[% ctx.opac_root %]/record/[% record.id %]?copy_offset=[% new_offset %]&copy_limit=[% ctx.copy_limit %]">&laquo; [%
+                    l('Previous [_1]', ctx.copy_offset - new_offset)
+                %]</a>
+            </td>
+        [% END %]
+        [% IF ctx.copies.size >= ctx.copy_limit %]
+            <td>
+                <a href="[% ctx.opac_root %]/record/[% record.id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %]&copy_limit=[% ctx.copy_limit %]">[%
+                    l('Next [_1]', ctx.copy_limit)
+                %] &raquo;</a>
+            </td>
+        [% END %]
+        </tr>
     </tbody>
 </table>
 

commit d9e58961b229a4ddc13254c928094c9544fbbd91
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Feb 16 17:04:02 2011 -0500

    copy details in the right place in the layout; some hide_me's sprinkled
    around for now

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 14456a7..87ff608 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -19,7 +19,7 @@ sub init_ro_object_cache {
     my $ctx = $self->ctx;
 
     # fetch-on-demand-and-cache subs for commonly used public data
-    my @public_classes = qw/ccs aout cifm citm clm cmf/;
+    my @public_classes = qw/ccs aout cifm citm clm cmf crahp/;
 
     for my $hint (@public_classes) {
 
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index faa3f57..5fcfe9d 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -408,7 +408,7 @@ div.select-wrapper:hover {
 	padding: 7px 0px 3px 13px;
 }
 
-#rdetails_status_head td {
+#rdetails_status thead td {
 	background-color: #d8d8d8;
 	padding: 13px 0px 13px 13px;
 	font-size: 10px;
@@ -416,8 +416,8 @@ div.select-wrapper:hover {
 	font-weight: bold;
 }
 
-#rdetails_status_head2 td {
-	padding: 0px;
+#rdetails_status tbody td {
+	padding-left: 13px;;
 }
 
 .rdetail_extras {
diff --git a/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
index 2a5167e..1156a5a 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
@@ -1,47 +1,11 @@
-<!-- ****************** rdetail_cn_details.xml ***************************** -->
-<table class='hide_me'>
+<table class="hide_me">
     <tbody>
         <tr style='border: 3px solid #E0E0E0;' id='rdetail_volume_details_row' templateRow='1'>
             <td colspan='10'>
                 <div style='text-align: center; margin-top: 6px; margin-bottom: 6px'>
                     <a name='print' href='#' class='classic_link'>[% l("print these details") %]</a>
                     <table class='data_grid data_grid_center' style='width: 100%'>
-                        <thead>
-                            <tr>
-                                <td width='33%'>[% l("Barcode") %]</td>
-                                <td>[% l("Status") %]</td>
-                                <td>[% l("Location") %]</td>
-                                [% IF ctx.is_staff %]
-                                <td>[% l("Age Hold Protection") %]</td>
-                                <td>[% l("Create Date") %]</td>
-                                <td>[% l("Holdable") %]</td>
-                                [% END %]
-                                <td>[% l("Due Date") %]</td>
-                            </tr>
-                        </thead>
                         <tbody name='copies_tbody' class='copy_details_table' width='100%'>
-                            [% FOR copy_info IN ctx.copies %]
-                            <tr name='copies_row'>
-                                <td>[% copy_info.barcode %]</td>
-                                <td>[% copy_info.copy_status %]</td>
-                                <td>[% copy_info.copy_location %]</td>
-                                [% IF ctx.is_staff %]
-                                <td>[% copy_info.age_protect %]</td>
-                                <td>[% date.format(ctx.parse_datetime(copy_info.create_date), DATE_FORMAT) %]</td>
-                                <td>
-                                    [%  IF copy_info.holdable == 't' AND 
-                                            copy_info.location_holdable == 't' AND
-                                            copy_info.status_holdable == 't';
-                                            l('Yes');
-                                        ELSE;
-                                            l('No');
-                                        END; 
-                                    %]
-                                </td>
-                                [% END %]
-                                <td>[% date.format(ctx.parse_datetime(copy_info.create_date), DATE_FORMAT) %]</td>
-                            </tr>
-                            [% END %]
 
                                 <!-- XXX keeping for now for reference...
                                 <td>
@@ -125,4 +89,3 @@
         </div>
     </div>
 </div>
-<!-- ****************** end: rdetail_cn_details.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index 8a53826..5d714bc 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -1,5 +1,4 @@
-<!-- ****************** rdetail_extras.xml ***************************** -->
-<div xmlns:xi="http://www.w3.org/2001/XInclude" id="rdetail_main_div" class="">
+<div id="rdetail_main_div">
     <table class='hide_me rdetails_extra_links'>
         <thead>
             <tr>
@@ -258,7 +257,7 @@
             </div>
         </div>
 
-        <div rel="rdetail_cn_browse_div" rel2="cn" class="rdetail_extras"
+        <div rel="rdetail_cn_browse_div" rel2="cn" class="rdetail_extras hide_me"
             id="rdetail_viewcn_link">
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
@@ -286,7 +285,7 @@
         [% INCLUDE "default/opac/parts/record/cn_details.tt2" %]
 
         <div rel="rdetail_copy_info_div" rel2="copyinfo"
-            class="rdetail_extras" id="rdetail_copy_info_link">
+            class="hide_me rdetail_extras" id="rdetail_copy_info_link">
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("copyinfo");'><img
@@ -298,7 +297,7 @@
 
         [% INCLUDE "default/opac/parts/record/copyinfo.tt2" %]
 
-        <div rel="rdetail_marc_div" rel2="marc" class="rdetail_extras" id="rdetail_viewmarc_link">
+        <div rel="rdetail_marc_div" rel2="marc" class="rdetail_extras hide_me" id="rdetail_viewmarc_link">
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("marc");'><img
@@ -315,7 +314,4 @@
     <div id='rdetail_preview_title' class='hide_me'>[% l("See the full text of this book.") %]</div>
     <div id='rdetail_preview_badge' class='hide_me'>[% l("Show a preview of this book from Google Book Search") %]</div>
 </div>
-
 <!-- XXX TODO Novelist stuff here? -->
-
-<!-- ****************** end: rdetail_extras.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 712042e..05c73f3 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -120,27 +120,64 @@
 <br /><br />
 
 <table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
-    <tr id="rdetails_status_head">
-        <td width="25%">Location</td>
-        <td width="20%">Call Number</td>
-        <td width="18%">Selving Location</td>
-        <td width="17%">Status</td>
-        <td width="20%">Due Date</td>
-    </tr>
-</table>
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-    <tbody id="rdetails_status2" class="hide_me">
-        <tr id="rdetails_status_head2">
-            <td width="25%"></td>
-            <td width="20%"></td>
-            <td width="18%"></td>
-            <td width="17%"></td>
-            <td width="20%"></td>
+    <thead>
+        <tr id="rdetails_status_head">
+            <td>[% l("Location") %]</td>
+            <td>[% l("Call Number") %]</td>
+            <td>[% l("Barcode") %]</td>
+            <td>[% l("Shelving Location") %]</td>
+            [% IF ctx.is_staff %]
+            <td>[% l("Age Hold Protection") %]</td>
+            <td>[% l("Create Date") %]</td>
+            <td>[% l("Holdable") %]</td>
+            [% END %]
+            <td>[% l("Status") %]</td>
+            <td>[% l("Due Date") %]</td>
+        </tr>
+    </thead>
+    <tbody class="copy_details_table">
+        [% FOR copy_info IN ctx.copies %]
+        <tr>
+            <td>[%
+                # XXX KCLS-specific kludging
+                org_name = ctx.find_aou(copy_info.circ_lib).name;
+                dir = org_name | lower | replace('[^\w]', '') |
+                    replace('.+320th', '320th'); %]
+                <a href="http://www.kcls.org/[% dir %]/"
+                    class="classic_link">[% org_name %]</a>
+            </td>
+            <td>[% copy_info.call_number_label %]</td>
+            <td>[% copy_info.barcode %]</td>
+            <td>[% copy_info.copy_location %]</td>
+            [% IF ctx.is_staff %]
+            <td>
+                [% copy_info.age_protect ?
+                    ctx.find_crahp(copy_info.age_protect).name : l('None') %]
+            </td>
+            <td>[% date.format(
+                ctx.parse_datetime(copy_info.create_date),
+                DATE_FORMAT
+            ) %]</td>
+            <td>[% (copy_info.holdable == 't' AND
+                    copy_info.location_holdable == 't' AND
+                    copy_info.status_holdable == 't') ? l('Yes') : l('No') %]</td>
+            [% END %]
+            <td>[% copy_info.copy_status %]</td>
+            <td>[%
+                IF copy_info.due_date;
+                    date.format(
+                        ctx.parse_datetime(copy_info.due_date),
+                        DATE_FORMAT
+                    );
+                ELSE;
+                    '-';
+                END %]</td>
         </tr>
+        [% END %]
     </tbody>
 </table>
 
-<div id="rdetail_locs_expand">
+<div id="rdetail_locs_expand" class="hide_me">
     <a href="#"><img
         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
     <a style="position:relative;top:-3px;" href="#">Show more locations</a>
@@ -152,7 +189,7 @@
     <a style="position:relative;top:-3px;" href="#">Collapse locations</a>
 </div>
 
-<div id="rdetail_extras_expand">
+<div id="rdetail_extras_expand" class="hide_me">
     <a href="#"><img
         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
     <a style="position:relative;top:-3px;" href="#">Expand all tabs</a>

commit 8dce58d88c1ed21efd4c973cab80d899942f39d7
Author: berick <berick at esilibrary.com>
Date:   Wed Feb 16 12:13:59 2011 -0500

    more i18n, minor cleanup

diff --git a/Open-ILS/web/templates/default/opac/login.tt2 b/Open-ILS/web/templates/default/opac/login.tt2
index 4888ce2..675a40d 100644
--- a/Open-ILS/web/templates/default/opac/login.tt2
+++ b/Open-ILS/web/templates/default/opac/login.tt2
@@ -11,6 +11,7 @@
             [% INCLUDE "default/opac/parts/login/form.tt2" %]
             <div class="clear-both very-big-height"></div>	
             <script type="text/javascript">
+                /* Note: when common browsers suppor HTML5 "autofocus", we can remove this */
                 var _onload = window.onload;
                 window.onload = function() {
                     try {
diff --git a/Open-ILS/web/templates/default/opac/parts/base.tt2 b/Open-ILS/web/templates/default/opac/parts/base.tt2
index c83cb88..892cb27 100644
--- a/Open-ILS/web/templates/default/opac/parts/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/base.tt2
@@ -10,8 +10,7 @@
         <link rel="stylesheet" type="text/css"
             href="[% ctx.media_prefix %]/css/skin/default/opac/style.css" />
         <title>[% l('Catalog - King County Library - [_1]', ctx.page_title) %]</title>
-        [%# <!-- is this needed? --><link rel="unapi-server"
-            type="application/xml" title="unAPI" href="/opac/extras/unapi" />%]
+        <link rel="unapi-server" type="application/xml" title="unAPI" href="/opac/extras/unapi" />
         [% BLOCK html_head; END; # provide a default that can be overridden -%]
         [%- PROCESS html_head -%]
     </head>
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 24e56eb..aeceb34 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -7,7 +7,7 @@
                 <span class="search_catalog_lbl">[% l('Search the Catalog') %]</span>
                 <a href="[% ctx.opac_root %]/advanced"
                     id="home_adv_search_link"><span
-                    class="adv_search_font">Advanced Search</span></a>
+                    class="adv_search_font">[% l('Advanced Search') %]</span></a>
             </td>
         </tr>
         <tr>
@@ -16,8 +16,8 @@
             </td>
             <td>
                 <div id="search_box_wrapper">
-                    <input type="text" id="search_box" name="query"
-                        value="[% query || l("Search Keyword") | html %]"
+                    <!-- Note: when common browsers support HTML5 placeholder text, we can remove the JS -->
+                    <input type="text" id="search_box" name="query" value="[% query || l("Search Keyword") | html %]"
                         onfocus="if (this.value=='[% l("Search Keyword") %]'){this.value='';this.style.color='#000';}"
                         onblur="if (this.value==''){this.value='[% l("Search Keyword") %]';this.style.color='#999';}" />
                     <input name='page' type='hidden' value="0" />
@@ -26,13 +26,9 @@
             <td valign="top">
                 <div class="pos-abs">
                     <div class="opac-auto-143">
-                        <input type="submit" id="search_submit" value="GO"
-                            class="hide_me" /><a
-                                href="javascript:document.getElementById('search_submit').click();"
-                                id="search_submit_alt"><img
-                                alt="Search" src="[% ctx.media_prefix %]/images/go-btn.png"
+                        <input type="image" alt="[% l('Search') %]" src="[% ctx.media_prefix %]/images/go-btn.png"
                             onmouseover="this.src='[% ctx.media_prefix %]/images/go-btn-hover.png';"
-                            onmouseout="this.src='[% ctx.media_prefix %]/images/go-btn.png';" /></a>
+                            onmouseout="this.src='[% ctx.media_prefix %]/images/go-btn.png';" />
                     </div>
                 </div>
             </td>
@@ -54,7 +50,7 @@
     </table>
     </form>
     <div id="breadcrumb">
-        <a href="[% ctx.opac_root %]/home">Catalog Home</a> &gt;
+        <a href="[% ctx.opac_root %]/home">[% l('Catalog Home') %]</a> &gt;
     </div>
     <div class="clear-both"></div>
 </div>

commit 0b3c7853e27034cce475212f99915c4b878ee8b1
Merge: ee2cc47 8878585
Author: berick <berick at esilibrary.com>
Date:   Wed Feb 16 11:26:56 2011 -0500

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 8878585f40c0195865e181004beba1ecbbd6bae2
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Mon Feb 14 13:56:35 2011 -0500

    more i18n goodness

diff --git a/Open-ILS/web/templates/default/opac/advanced.tt2 b/Open-ILS/web/templates/default/opac/advanced.tt2
index f4949ab..adb1807 100644
--- a/Open-ILS/web/templates/default/opac/advanced.tt2
+++ b/Open-ILS/web/templates/default/opac/advanced.tt2
@@ -1,7 +1,7 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
-    ctx.page_title = "Advanced Search" %]
+    ctx.page_title = l("Advanced Search") %]
     <div id="search-wrapper">
         [% INCLUDE "default/opac/parts/utils.tt2" %]
         <div id="adv_search_parent">
diff --git a/Open-ILS/web/templates/default/opac/home.tt2 b/Open-ILS/web/templates/default/opac/home.tt2
index 11edbdf..3436a46 100644
--- a/Open-ILS/web/templates/default/opac/home.tt2
+++ b/Open-ILS/web/templates/default/opac/home.tt2
@@ -1,7 +1,7 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
-    ctx.page_title = "Home" %]
+    ctx.page_title = l("Home") %]
     <div id="search-wrapper">
         [% INCLUDE "default/opac/parts/utils.tt2" %]
         [% INCLUDE "default/opac/parts/searchbar.tt2" %]
diff --git a/Open-ILS/web/templates/default/opac/login.tt2 b/Open-ILS/web/templates/default/opac/login.tt2
index 0265f71..4888ce2 100644
--- a/Open-ILS/web/templates/default/opac/login.tt2
+++ b/Open-ILS/web/templates/default/opac/login.tt2
@@ -1,7 +1,7 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
-    ctx.page_title = "Account Login" %]
+    ctx.page_title = l("Account Login") %]
     <div id="search-wrapper">
         [% INCLUDE "default/opac/parts/utils.tt2" %]
         [% INCLUDE "default/opac/parts/searchbar.tt2" %]
diff --git a/Open-ILS/web/templates/default/opac/place_hold.tt2 b/Open-ILS/web/templates/default/opac/place_hold.tt2
index 95c7acb..792b5c2 100644
--- a/Open-ILS/web/templates/default/opac/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/place_hold.tt2
@@ -1,7 +1,7 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
-    ctx.page_title = "Place Hold" %]
+    ctx.page_title = l("Place Hold") %]
     <div id="search-wrapper">
         [% INCLUDE "default/opac/parts/utils.tt2" %]
         [% INCLUDE "default/opac/parts/searchbar.tt2" %]
diff --git a/Open-ILS/web/templates/default/opac/record.tt2 b/Open-ILS/web/templates/default/opac/record.tt2
index 04e33cb..7f2a705 100644
--- a/Open-ILS/web/templates/default/opac/record.tt2
+++ b/Open-ILS/web/templates/default/opac/record.tt2
@@ -1,7 +1,7 @@
 [%  PROCESS "default/opac/parts/header.tt2";
     WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
-    ctx.page_title = "Record Detail" %]
+    ctx.page_title = l("Record Detail") %]
     <div id="search-wrapper">
         [% INCLUDE "default/opac/parts/utils.tt2" %]
         [% INCLUDE "default/opac/parts/searchbar.tt2" %]
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 6c989d6..e698e87 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -3,7 +3,7 @@
 
     WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
-    ctx.page_title = "Search Results";
+    ctx.page_title = l("Search Results");
 
     page = CGI.param('page') || 0;
     query = CGI.param('query');

commit 35c5b0c72062d68c83908bc2a4ec36b2d9de504a
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Mon Feb 14 13:32:22 2011 -0500

    avoid undef warnings

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index fb15179..5042641 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -172,7 +172,7 @@ sub load_myopac_holds {
     my $limit = $self->cgi->param('limit') || 0;
     my $offset = $self->cgi->param('offset') || 0;
     my $action = $self->cgi->param('action') || '';
-    my $available = int($self->cgi->param('available'));
+    my $available = int($self->cgi->param('available') || 0);
 
     $self->handle_hold_update($action) if $action;
 

commit c3a81e2b700da69cd551752b70369cd3b5083a20
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Mon Feb 14 13:31:50 2011 -0500

    when authenticated, force the page to redirect the home page after the auth time has expired to protect patron data and  prevent potentially confusing post-search-submit redirects

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 89d616b..a7fc0a7 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -139,13 +139,12 @@ sub load_common {
     $ctx->{path_info} = $self->cgi->path_info;
     $ctx->{opac_root} = $ctx->{base_path} . "/opac"; # absolute base url
     $ctx->{is_staff} = ($self->apache->headers_in->get('User-Agent') =~ 'oils_xulrunner');
+    $ctx->{home_page} = 'http://' . $self->apache->hostname . $self->ctx->{opac_root} . "/home";
 
     if($e->authtoken($self->cgi->cookie('ses'))) {
 
         if($e->checkauth) {
 
-            $self->apache->log->warn("authtime = " . $e->authtime);
-
             $ctx->{authtoken} = $e->authtoken;
             $ctx->{authtime} = $e->authtime;
             $ctx->{user} = $e->requestor;
@@ -234,11 +233,9 @@ sub load_login {
 sub load_logout {
     my $self = shift;
 
-    my $url = 'http://' . $self->apache->hostname . $self->ctx->{opac_root} . "/home";
-
     $self->apache->print(
         $self->cgi->redirect(
-            -url => $url,
+            -url => $self->ctx->{home_page},
             -cookie => $self->cgi->cookie(
                 -name => 'ses',
                 -path => '/',
diff --git a/Open-ILS/web/templates/default/opac/parts/base.tt2 b/Open-ILS/web/templates/default/opac/parts/base.tt2
index 27652a5..c83cb88 100644
--- a/Open-ILS/web/templates/default/opac/parts/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/base.tt2
@@ -2,6 +2,9 @@
 <html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.locale %]' xml:lang='[% ctx.locale %]'>
     <head>
         <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+        [% IF ctx.authtime %]
+        <meta http-equiv="refresh" content="[% ctx.authtime %];[% ctx.home_page %]">
+        [% END %]
         <link rel="stylesheet" type="text/css"
             href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto.css" />
         <link rel="stylesheet" type="text/css"

commit 26daadb3818db87ea64539cecb2987b2d7a75d89
Merge: 51b9bd0 a268006
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Mon Feb 14 13:05:23 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 51b9bd01c435babf0eda0e6ee351da80df7d73b7
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Mon Feb 14 13:03:24 2011 -0500

    updated cstoreditor to fetch full cached object to get the authtime; capturing authtime in the web context

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm
index ff298f4..03237ca 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm
@@ -115,11 +115,19 @@ sub log {
 sub checkauth {
 	my $self = shift;
 	$self->log(D, "checking auth token ".$self->authtoken);
-	my ($reqr, $evt) = $U->checkses($self->authtoken);
-	$self->event($evt) if $evt;
-	return $self->{requestor} = $reqr;
-}
 
+	my $content = $U->simplereq( 
+		'open-ils.auth', 
+		'open-ils.auth.session.retrieve', $self->authtoken, 1);
+
+    if(!$content or $U->event_code($content)) {
+        $self->event( ($content) ? $content : OpenILS::Event->new('NO_SESSION'));
+        return undef;
+    }
+
+    $self->{authtime} = $content->{authtime};
+	return $self->{requestor} = $content->{userobj};
+}
 
 =head test
 sub checkauth {
@@ -177,6 +185,12 @@ sub authtoken {
 	return $self->{authtoken};
 }
 
+sub authtime {
+	my( $self, $auth ) = @_;
+	$self->{authtime} = $auth if $auth;
+	return $self->{authtime};
+}
+
 sub timeout {
     my($self, $to) = @_;
     $self->{timeout} = $to if defined $to;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 99df8e7..89d616b 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -144,8 +144,12 @@ sub load_common {
 
         if($e->checkauth) {
 
+            $self->apache->log->warn("authtime = " . $e->authtime);
+
             $ctx->{authtoken} = $e->authtoken;
+            $ctx->{authtime} = $e->authtime;
             $ctx->{user} = $e->requestor;
+
             $ctx->{user_stats} = $U->simplereq(
                 'open-ils.actor', 
                 'open-ils.actor.user.opac.vital_stats', 

commit b74e977a41ad388463ba1baf44002dcf2f63f133
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Mon Feb 14 12:36:25 2011 -0500

    added option to open-ils.auth.session.retrieve to return the full cached object, which includes the auth time (cache timeout) of the cached user object

diff --git a/Open-ILS/src/c-apps/oils_auth.c b/Open-ILS/src/c-apps/oils_auth.c
index eb20fb7..4e7b20b 100644
--- a/Open-ILS/src/c-apps/oils_auth.c
+++ b/Open-ILS/src/c-apps/oils_auth.c
@@ -807,8 +807,17 @@ int oilsAuthResetTimeout( osrfMethodContext* ctx ) {
 
 int oilsAuthSessionRetrieve( osrfMethodContext* ctx ) {
 	OSRF_METHOD_VERIFY_CONTEXT(ctx);
+    bool returnFull = false;
 
 	const char* authToken = jsonObjectGetString( jsonObjectGetIndex(ctx->params, 0));
+
+    if(ctx->params->size > 1) {
+        // caller wants full cached object, with authtime, etc.
+        const char* rt = jsonObjectGetString(jsonObjectGetIndex(ctx->params, 1));
+        if(rt && strcmp(rt, "0") != 0) 
+            returnFull = true;
+    }
+
 	jsonObject* cacheObj = NULL;
 	oilsEvent* evt = NULL;
 
@@ -828,7 +837,10 @@ int oilsAuthSessionRetrieve( osrfMethodContext* ctx ) {
 			cacheObj = osrfCacheGetObject( key );
 			if(cacheObj) {
 				// Return a copy of the cached user object
-				osrfAppRespondComplete( ctx, jsonObjectGetKeyConst( cacheObj, "userobj"));
+                if(returnFull)
+				    osrfAppRespondComplete( ctx, cacheObj);
+                else
+				    osrfAppRespondComplete( ctx, jsonObjectGetKeyConst( cacheObj, "userobj"));
 				jsonObjectFree(cacheObj);
 			} else {
 				// Auth token is invalid or expired

commit ae46044797776bc60df4108b78e221cf7cc18e0a
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Mon Feb 14 11:47:57 2011 -0500

    added sub to collect the HTML version of a record for display

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index ac15a59..71c7bd4 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -116,4 +116,11 @@ sub mk_copy_query {
     #return $self->editor->json_query($query);
 }
 
+sub mk_marc_html {
+    my($self, $rec_id) = @_;
+
+    $self->ctx->{marc_html} = $U->simplereq(
+        'open-ils.search', 'open-ils.search.biblio.record.html', $rec_id);
+}
+
 1;

commit eb20ff7ec05a543cf5821de11c1ef39e77da3657
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 15 17:45:46 2011 -0500

    hold actions work

diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index bf0932e..bdda327 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -36,31 +36,32 @@
     </div>
     <div class="clear-both"></div>
     <div id='holds_main'>
+        <form method="POST">
         <table cellpadding='0' cellspacing='0' class="opac-auto-097">
             <tr>
                 <td width="1">
-                    <select id="acct_holds_actions">
+                    <select name="action" id="acct_holds_actions">
                         <option id='myopac_holds_actions_none' value=''>
                         -- [% l("Actions for selected holds") %] --
                         </option>
-                        <option value='freeze'>
+                        <option value='suspend'>
                             [% l("Suspend") %]
                         </option>
-                        <option value='thaw'>
+                        <option value='activate'>
                             [% l("Activate") %]
                         </option>
-                        <option value='thaw_date'>
+                        <!-- XXX maybe later <option value='thaw_date'>
                             [% l("Set Active Date") %]
-                        </option>
+                        </option> -->
                         <option value='cancel'>
                             [% l("Cancel") %]
                         </option>
                     </select>
                 </td>
                 <td width="1" style="padding-left:9px;">
-                    <a href="#"><img
-                        alt="Save"
-                        src="[% ctx.media_prefix %]/images/save-btn.png" /></a>
+                    <input type="image"
+                        alt="[% l('Go') %]" title="[% l('Go') %]"
+                        src="[% ctx.media_prefix %]/images/go-btn.png" />
                 </td>
                 <td width="1" style="padding-left:5px;">
                     <a href="#"><img
@@ -157,29 +158,29 @@
                         [% ctx.find_aou(hold.hold.hold.pickup_lib).name %]
                     </td>
                     <td width="104">
-                        <input
+                        <!-- <input
                             title="Enter a date (e.g. 10/21/2010)"
                             class="hide_me" style="width:91px;"
-                            name="activate_box" type="text" />
+                            name="activate_box" type="text" /> -->
                         [% IF hold.hold.hold.frozen == 't' AND
                                 hold.hold.hold.thaw_date;
                             date.format(ctx.parse_datetime(hold.hold.hold.thaw_date), DATE_FORMAT);
                         END %]
                     </td>
                     <td width="106">
-                        <input title="Enter a date (e.g. 10/21/2010)"
+                        <!-- <input title="[% l('Enter a date (e.g. 10/21/2010)') %]"
                             class="hide_me" style="width:91px;"
-                            name="hold_expires_box" type="text" />
+                            name="hold_expires_box" type="text" />-->
                         [% IF hold.hold.hold.expire_time;
                             date.format(ctx.parse_datetime(hold.hold.hold.expire_time), DATE_FORMAT);
                         END %]
                     </td>
                     <td width="95">
-                        <select name="hold_active_sel"
+                        <!-- <select name="hold_active_sel"
                             style="width:90px;" class="hide_me">
                             <option value="f">Active</option>
                             <option value="t">Suspended</option>
-                        </select>
+                        </select> -->
                         [% l(hold.hold.hold.frozen == 'f' ? 'Active' : 'Suspended') %]
                     </td>
                     <td width="110">
@@ -211,6 +212,7 @@
                 [% END %]
             </tbody>
         </table>
+        </form>
     </div>
     <div id='holds_hist_table' class="hide_me">testing...</div>
 

commit 86a1a02f776b523794c6965caac454ffd3e61bc1
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 15 16:10:25 2011 -0500

    Renewals working, with feedback displayed

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 6bb5918..faa3f57 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -928,3 +928,5 @@ div.select-wrapper:hover {
 #rdetail_copy_info_table td { padding: 3px; }
 .search_page_nav_link { cursor: pointer; }
 #opac.result.sort { width: 160px; }
+.renew-summary { font-size: 125%; font-style: italic; margin: 0.5ex 0; }
+.failure-text { margin-left: 4em; font-style: italic; color: #ff0000; }
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 8d7fa21..2e1d3a4 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -24,24 +24,36 @@
     </div>
     
     <div class="header_middle">
-        <span id="acct_checked_header" style="float:left;">
-            Current Items Checked Out
-        </span>
-        <span style="float:right;">
-            <a class="hide_me" href="#">Export List</a>
+        <span class="float-left">[% l('Current Items Checked Out') %]</span>
+        <span class="float-right">
+            <a class="hide_me" href="#">[% l('Export List') %]</a>
         </span>
     </div>
     <div class="clear-both"></div>
+    [% IF ctx.success_renewals %]
+    <div class="renew-summary">
+        [% l("Successfully renewed [_1] item(s)", ctx.success_renewals) %]
+    </div>
+    [% END %]
+    [% IF ctx.failed_renewals %]
+    <div class="renew-summary red">
+        [% l("Failed to renew [_1] item(s)", ctx.failed_renewals) %]
+    </div>
+    [% END %]
     <div id='checked_main'>
+        <form method="POST" id="circ-form"
+            onsubmit="return confirm('[% l("Are you sure you wish to renew the selected item(s)?") %]');">
         <table cellpadding='0' cellspacing='0' class="opac-auto-097b">
             <tr>
                 <td>
-                    <a href="#">Renew Selected Titles</a>
+                    <select name="action">
+                        <option value="renew">[% l('Renew Selected Titles') %]</option>
+                    </select>
                 </td>
                 <td style="padding-left:9px;">
-                    <a class="hide_me" href="#"><img
-                        alt="Save"
-                        src="[% ctx.media_prefix %]/images/save-btn.png" /></a>
+                    <input type="image"
+                        alt="[% l('Go') %]" title="[% l('Go') %]"
+                        src="[% ctx.media_prefix %]/images/go-btn.png" /></a>
                 </td>
                 <td style="padding-left:5px;">
                     <a href="#"><img alt="Renewing Help"
@@ -53,7 +65,9 @@
             border='0'>
             <tr>
                 <td width="1%" style="padding-left:10px;">
-                    <input type="checkbox" id="check_all_checked" />
+                    <input type="checkbox" id="check_all_checked"
+                        onclick="var inputs=document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs[i].name == 'circ' && !inputs[i].disabled) inputs[i].checked = this.checked;}"
+                    />
                 </td>
                 <td width="40%" style="padding-left:5px;">
                     <span title="Click to sort" style="cursor:pointer;">
@@ -90,7 +104,9 @@
                         PROCESS get_marc_attrs args=attrs; %]
                     <tr>
                         <td width="1%" style="padding-left:10px;" valign="top">
-                            <input type="checkbox" name="check_all_checked" />
+                            <input type="checkbox" name="circ"
+                                [% IF circ.circ.renewal_remaining < 1; l('disabled="disabled"'); END %]
+                                value="[% circ.circ.id %]" />
                         </td>
                         <td width="40%"
                             style="padding-left:5px;padding-bottom:10px;"
@@ -114,10 +130,21 @@
                             [% circ.circ.target_copy.call_number.label %]
                         </td>
                     </tr>
-                    [% END %]
+                    [%  IF circ.renewal_response AND
+                            circ.renewal_response.textcode != 'SUCCESS' %]
+                    <tr>
+                        <td colspan="6">[%# XXX colspan="0" does not work in IE %]
+                            <span class="failure-text" title="[% circ.renewal_response.textcode %] / [% circ.renewal_response.payload.fail_part %]">
+                                [% circ.renewal_response.desc || circ.renewal_response.payload.fail_part || circ.renewal_response.textcode %]
+                            </span>
+                        </td>
+                    </tr>
+                    [%  END;
+                    END %]
                 </table>
             </div>
         </div>
+        </form>
     </div>
     <div id='checked_hist' class="hide_me" style="padding-top:8px;">
         <table id="acct_checked_hist_header" cellpadding='0' cellspacing='0'
@@ -186,9 +213,6 @@
                 </tr>
             </tbody>
         </table>
-    </div>
-    <div id='myopac_renew_success' class='hide_me'>[% l("item(s) successfully renewed") %]</div>
-    <span class='hide_me' id='myopac_renew_confirm'>[% l("Are you sure you wish to renew the selected item(s)?") %]</span>
     <span class='hide_me' id='myopac_renew_fail'>[% l("The system is unable to renew the selected item at this time.  This usually means the item is needed to fulfill a hold.  Please see a librarian for further help.") %]</span>
    <span class='hide_me' id='myopac_renew_fail2'>[% l("Library policy prevents the renewal of this item at this time.  Please see a librarian for further details.") %]</span>
 </div>

commit 3851705d26fac76049683f918cf2fd7a175d63b3
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Mon Feb 14 06:45:55 2011 -0500

    make date format localize-able

diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 17091d0..c4a9ce1 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -2,7 +2,7 @@
     USE date;
     USE CGI; 
     USE EGI18N;
-    SET DATE_FORMAT = '%m/%d/%Y';
+    SET DATE_FORMAT = l('%m/%d/%Y');
 
     item_types = [  # XXX KCLS-specific
         {'code' => 'a', 'name' => 'Book', 'image' => 'media_book.jpg'},

commit 65f8cf4d290fc8ced8761ebb9999886d2c413ef7
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Mon Feb 14 06:45:40 2011 -0500

    pulling in more copy fields for display; added sample code

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index aeb7108..ac15a59 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -44,9 +44,15 @@ sub mk_copy_query {
 
     my $query = {
         select => {
-            acp => ['id', 'barcode', 'circ_lib'],
-            acpl => [{column => 'name', alias => 'copy_location'}],
-            ccs => [{column => 'name', alias => 'copy_status'}],
+            acp => ['id', 'barcode', 'circ_lib', 'create_date', 'age_protect', 'holdable'],
+            acpl => [
+                {column => 'name', alias => 'copy_location'},
+                {column => 'holdable', alias => 'location_holdable'}
+            ],
+            ccs => [
+                {column => 'name', alias => 'copy_status'},
+                {column => 'holdable', alias => 'status_holdable'}
+            ],
             acn => [
                 {column => 'label', alias => 'call_number_label'},
                 {column => 'id', alias => 'call_number'}
diff --git a/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
index 6d44776..2a5167e 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
@@ -11,14 +11,39 @@
                                 <td width='33%'>[% l("Barcode") %]</td>
                                 <td>[% l("Status") %]</td>
                                 <td>[% l("Location") %]</td>
-                                <td name='age_protect_label' class='hide_me'>[% l("Age Hold Protection") %]</td>
-                                <td name='create_date_label' class='hide_me'>[% l("Create Date") %]</td>
-                                <td name='holdable_label' class='hide_me'>[% l("Holdable") %]</td>
-                                <td name='due_date_label' class='hide_me'>[% l("Due Date") %]</td>
+                                [% IF ctx.is_staff %]
+                                <td>[% l("Age Hold Protection") %]</td>
+                                <td>[% l("Create Date") %]</td>
+                                <td>[% l("Holdable") %]</td>
+                                [% END %]
+                                <td>[% l("Due Date") %]</td>
                             </tr>
                         </thead>
                         <tbody name='copies_tbody' class='copy_details_table' width='100%'>
+                            [% FOR copy_info IN ctx.copies %]
                             <tr name='copies_row'>
+                                <td>[% copy_info.barcode %]</td>
+                                <td>[% copy_info.copy_status %]</td>
+                                <td>[% copy_info.copy_location %]</td>
+                                [% IF ctx.is_staff %]
+                                <td>[% copy_info.age_protect %]</td>
+                                <td>[% date.format(ctx.parse_datetime(copy_info.create_date), DATE_FORMAT) %]</td>
+                                <td>
+                                    [%  IF copy_info.holdable == 't' AND 
+                                            copy_info.location_holdable == 't' AND
+                                            copy_info.status_holdable == 't';
+                                            l('Yes');
+                                        ELSE;
+                                            l('No');
+                                        END; 
+                                    %]
+                                </td>
+                                [% END %]
+                                <td>[% date.format(ctx.parse_datetime(copy_info.create_date), DATE_FORMAT) %]</td>
+                            </tr>
+                            [% END %]
+
+                                <!-- XXX keeping for now for reference...
                                 <td>
                                     <span name='barcode'> </span>
                                     <a class='hide_me classic_link copy_more_info'
@@ -39,6 +64,7 @@
                                     <span name='copy_due_date'> </span>
                                 </td>
                             </tr>
+                                -->
 
                             <tr name='copy_extras_row' class='hide_me'>
                                 <td colspan='10'>
diff --git a/Open-ILS/web/templates/default/opac/record.tt2 b/Open-ILS/web/templates/default/opac/record.tt2
index 6e4368f..04e33cb 100644
--- a/Open-ILS/web/templates/default/opac/record.tt2
+++ b/Open-ILS/web/templates/default/opac/record.tt2
@@ -12,15 +12,4 @@
             <div class="common-full-pad"></div>	
         </div>
     </div>
-    [%# TODO: TEST CODE, DELETE ME... %]
-    [% FOR copy_info IN ctx.copies %]
-        <div>
-            [% 
-                copy_info.id _ ' ' _ copy_info.barcode _ ' ' _ ctx.find_aou(copy_info.circ_lib).name _ 
-                ' ' _ copy_info.copy_location _ ' ' _ copy_info.copy_status _ 
-                ' ' _ copy_info.call_number_label _ ' ' _ copy_info.call_number _ ' ';
-                IF copy_info.due_date; date.format(ctx.parse_datetime(copy_info.due_date),'%m/%d/%Y'); END;
-            %]
-        </div>
-    [% END %]
 [% END %]

commit be54de18eaf9f3035f2a6f12fae20c407febef16
Merge: 4fa8c92 8d12ceb
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Mon Feb 14 06:28:58 2011 -0500

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 8d12ceb700e21f31a38264519544a113fcbaaa13
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 15 13:37:47 2011 -0500

    "Items Ready For Pickup" works
    
    This uses the holds page of myopac with a special param.
    Also, tiny bit of JS just to focus the username field on the login page.
    Couldn't resist.

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index dd89852..fb15179 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -34,6 +34,7 @@ sub fetch_user_holds {
     my $hold_ids = shift;
     my $ids_only = shift;
     my $flesh = shift;
+    my $available = shift;
     my $limit = shift;
     my $offset = shift;
 
@@ -91,6 +92,10 @@ sub fetch_user_holds {
         last if $first and not @ses;
 
         if(@collected) {
+            # If desired by the caller, filter any holds that are not available.
+            if ($available) {
+                @collected = grep { $_->{hold}->{status} == 4 } @collected;
+            }
             while(my $blob = pop(@collected)) {
                 $blob->{marc_xml} = XML::LibXML->new->parse_string($blob->{hold}->{bre}->marc) if $flesh;
                 push(@holds, $blob);
@@ -167,10 +172,11 @@ sub load_myopac_holds {
     my $limit = $self->cgi->param('limit') || 0;
     my $offset = $self->cgi->param('offset') || 0;
     my $action = $self->cgi->param('action') || '';
+    my $available = int($self->cgi->param('available'));
 
     $self->handle_hold_update($action) if $action;
 
-    $ctx->{holds} = $self->fetch_user_holds(undef, 0, 1, $limit, $offset);
+    $ctx->{holds} = $self->fetch_user_holds(undef, 0, 1, $available, $limit, $offset);
 
     return Apache2::Const::OK;
 }
diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index 61355d6..6902837 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -85,7 +85,8 @@
 .opac-auto-094 { padding: 5px 7px 0px 0px; }
 .opac-auto-095 { padding: 5px 7px 0px 0px; white-space: nowrap; }
 .opac-auto-096 { padding: 6px }
-.opac-auto-097 { padding: 8px 0px 6px 0px; }
+.opac-auto-097 { padding: 8px 0px 6px 0px; width: 100%; border: 0; }
+.opac-auto-097b { padding: 8px 0px 6px 0px; border: 0; }
 .opac-auto-098 { padding-bottom: 10px; }
 .opac-auto-099 { padding-bottom: 12px; color: #666; }
 .opac-auto-100 { padding-bottom: 16px; }
diff --git a/Open-ILS/web/templates/default/opac/login.tt2 b/Open-ILS/web/templates/default/opac/login.tt2
index 67e76f1..0265f71 100644
--- a/Open-ILS/web/templates/default/opac/login.tt2
+++ b/Open-ILS/web/templates/default/opac/login.tt2
@@ -10,6 +10,17 @@
         <div id="main-content">
             [% INCLUDE "default/opac/parts/login/form.tt2" %]
             <div class="clear-both very-big-height"></div>	
+            <script type="text/javascript">
+                var _onload = window.onload;
+                window.onload = function() {
+                    try {
+                        document.getElementById("username_field").focus();
+                        if (_onload) _onload();
+                    } catch (E) {
+                        void(0);
+                    }
+                };
+            </script>
         </div>
     </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 77ba056..8d7fa21 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -33,8 +33,7 @@
     </div>
     <div class="clear-both"></div>
     <div id='checked_main'>
-        <table cellpadding='0' cellspacing='0' border='0'
-            style="padding:8px 0px 6px 0px;">
+        <table cellpadding='0' cellspacing='0' class="opac-auto-097b">
             <tr>
                 <td>
                     <a href="#">Renew Selected Titles</a>
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 6c6cafe..bf0932e 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -23,7 +23,12 @@
     </div>
     <div class="header_middle">
         <span id="acct_holds_header" style="float:left;">
-            Current Items on Hold
+            [%  IF CGI.param("available");
+                    l("Items Ready for Pickup");
+                ELSE;
+                    l("Current Items on Hold");
+                END
+            %]
         </span>
         <span style="float:right;">
             <a class="hide_me" href="#">Export List</a>
@@ -31,8 +36,7 @@
     </div>
     <div class="clear-both"></div>
     <div id='holds_main'>
-        <table cellpadding='0' cellspacing='0' border='0'
-            style="padding:8px 0px 6px 0px;">
+        <table cellpadding='0' cellspacing='0' class="opac-auto-097">
             <tr>
                 <td width="1">
                     <select id="acct_holds_actions">
@@ -64,6 +68,15 @@
                         src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
                 </td>
                 <td align="right">
+                    [% l("Show") %] &nbsp; &nbsp;
+                    [% IF CGI.param("available") %]
+                    <a href="holds">[% l('all') %]</a> |
+                    <strong>[% l("only available") %]</strong>
+                    [% ELSE %]
+                    <strong>[% l("all") %]</strong> |
+                    <a href="holds?available=1">[% l("only available") %]</a>
+                    [% END %] &nbsp; &nbsp;
+                    [% l("holds") %]
                     <select class="hide_me" id="holds_sort">
                         <option value="">-- Sort By --</option>
                         <option value="title">Title</option>
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index dd0d5cc..2d7b375 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -83,7 +83,7 @@
                                 </span>
                             </td>
                             <td align="right" class="view_link">
-                                <a href="#">View All</a>
+                                <a href="[% ctx.opac_root %]/myopac/holds?available=1">View All</a>
                             </td>
                         </tr>
                     </table>
diff --git a/Open-ILS/web/templates/default/opac/parts/login/form.tt2 b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
index 38a6a2d..c0624ae 100644
--- a/Open-ILS/web/templates/default/opac/parts/login/form.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
@@ -104,7 +104,7 @@
                             </td>
                             <td width="58%" valign="top">
                                 <div class="input_bg">
-                                    <input type="text" name="username"/>
+                                    <input type="text" id="username_field" name="username"/>
                                 </div>
                             </td>
                         </tr>

commit f63c3ced78739bb1318f89819959d75d7386669b
Merge: b36ac35 1c4cd8e
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 15 12:19:47 2011 -0500

    Merge branch 'opac-tt-poc' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc

diff --cc Open-ILS/web/templates/default/opac/parts/header.tt2
index f887c44,23f1bd4..17091d0
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@@ -1,44 -1,4 +1,44 @@@
- [%- USE money = format('$%.2f');
+ [%- USE money = format(l('$%.2f'));
      USE date;
      USE CGI; 
 -    USE EGI18N; -%]
 +    USE EGI18N;
 +    SET DATE_FORMAT = '%m/%d/%Y';
 +
 +    item_types = [  # XXX KCLS-specific
 +        {'code' => 'a', 'name' => 'Book', 'image' => 'media_book.jpg'},
 +        {'code' => 'i', 'name' => 'Book on cassette', 'image' => 'media_bookoncasset.jpg'},
 +        {'code' => 'n', 'name' => 'Book on CD', 'image' => 'media_bookoncd.jpg'},
 +        {'code' => 'x', 'name' => 'Download music', 'image' => 'media_downloadmusic.jpg'},
 +        {'code' => 'y', 'name' => 'Download video', 'image' => 'media_downloadvideo.jpg'},
 +        {'code' => 'h', 'name' => 'DVD', 'image' => 'media_dvd.jpg'},
 +        {'code' => 'w', 'name' => 'eBook - Audio', 'image' => 'media_eaudio.jpg'},
 +        {'code' => 'v', 'name' => 'eBook - Text', 'image' => 'media_ebooktext.jpg'},
 +        {'code' => 'e', 'name' => 'Equipment', 'image' => 'media_equipment.jpg'},
 +        {'code' => 'f', 'name' => 'Films', 'image' => 'media_films.jpg'},
 +        {'code' => 'o', 'name' => 'Kit', 'image' => 'media_kit.jpg'},
 +        {'code' => 'q', 'name' => 'Large print', 'image' => 'media_largeprint.jpg'},
 +        {'code' => 'b', 'name' => 'Magazine', 'image' => 'media_magazines.jpg'},
 +        {'code' => 'd', 'name' => 'Microform', 'image' => 'media_microform.jpg'},
 +        {'code' => 'k', 'name' => 'Music cassette', 'image' => 'media_musiccassette.jpg'},
 +        {'code' => 'j', 'name' => 'Music CD', 'image' => 'media_musiccd.jpg'},
 +        {'code' => 'l', 'name' => 'Music LP', 'image' => 'media_musicrecord.jpg'},
 +        {'code' => 'p', 'name' => 'Newspaper', 'image' => 'media_newspaper.jpg'},
 +        {'code' => 't', 'name' => 'Online', 'image' => 'media_online.jpg'},
 +        {'code' => 'u', 'name' => 'Player', 'image' => 'media_eaudio.jpg'},
 +        {'code' => 'c', 'name' => 'Printed music / scores', 'image' => 'media_printedmusic.jpg'},
 +        {'code' => '2', 'name' => 'Read along with cassette', 'image' => 'media_cassettewithbook.jpg'},
 +        {'code' => '5', 'name' => 'Read along with CD', 'image' => 'media_cdwithbook.jpg'},
 +        {'code' => 'm', 'name' => 'Software', 'image' => 'media_software.jpg'},
 +        {'code' => 'g', 'name' => 'Video', 'image' => ''},
 +        {'code' => 'r', 'name' => '3-D Object', 'image' => 'media_3dobject.jpg'},
 +        {'code' => 'z', 'name' => 'Map', 'image' => 'media_map.jpg'},
 +        {'code' => 's', 'name' => 'Slide set', 'image' => 'media_slide.jpg'}
 +    ];
 +
 +    icon_by_mattype = {};
 +    FOR o IN item_types;
 +        code = o.code;
 +        icon_by_mattype.$code = o.image;
 +    END;
 +
 +-%]

commit b36ac359587491cb166cd02ca0c22afaa404598a
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 15 12:19:11 2011 -0500

    "format" aka item_type (?) search working, I think

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 4f78497..ad9526a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -20,6 +20,7 @@ sub load_rresults {
 
     $ctx->{page} = 'rresult';
     my $page = $cgi->param('page') || 0;
+    my $item_type = $cgi->param('item_type');
     my $facet = $cgi->param('facet');
     my $query = $cgi->param('query');
     my $limit = $cgi->param('limit') || 10; # TODO user settings
@@ -28,7 +29,10 @@ sub load_rresults {
     my $depth = defined $cgi->param('depth') ? 
         $cgi->param('depth') : $ctx->{find_aou}->($loc)->ou_type->depth;
 
-    my $args = {limit => $limit, offset => $page * $limit, org_unit => $loc, depth => $depth}; 
+    my $args = {
+        limit => $limit, offset => $page * $limit,
+        org_unit => $loc, depth => $depth, $item_type ? (item_type => [$item_type]) : ()
+    };
 
     $query = "$query $facet" if $facet; # TODO
     my $results;
diff --git a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
index 5c3904c..7ebd072 100644
--- a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
@@ -1,35 +1,10 @@
-<!-- ****************** format_selector.xml ***************************** -->
-<select id='format_selector'>
+[%  name = name || "item_type";
+    id = id || "format_selector" %]
+<select id='[% id %]' name='[% name %]'>
     <option value=''>[% l("All Formats") %]</option>
-    <option value='a'>Book</option>
-    <option value='i'>Book on cassette</option>
-    <option value='n'>Book on CD</option>
-    <option value='x'>Download music</option>
-    <option value='y'>Download video</option>
-    <option value='h'>DVD</option>
-    <option value='w'>eBook - Audio</option>
-    <option value='v'>eBook - Text</option>
-    <option value='e'>Equipment</option>
-    <option value='f'>Films</option>
-    <option value='o'>Kit</option>
-    <option value='q'>Large print</option>
-    <option value='b'>Magazine</option>
-    <option value='d'>Microform</option>
-    <option value='k'>Music cassette</option>
-    <option value='j'>Music CD</option>
-    <option value='l'>Music LP</option>
-    <option value='p'>Newspaper</option>
-    <option value='t'>Online</option>
-    <option value='u'>Player</option>
-    <option value='c'>Printed music</option>
-    <option value='2'>Read along with cassette</option>
-    <option value='5'>Read along with CD</option>	
-    <option value='c'>Scores</option>	
-    <option value='m'>Software</option>
-    <option value='g'>Video</option>
-    <option value='r'>3-D Object</option>
-    <option value='z'>Map</option>
-    <option value='s'>Slide set</option>	
+[% FOR o IN item_types %]
+    <option value='[% o.code %]'[% value == o.code ? ' selected="selected"' : ''%]>[% o.name %]</option>
+[%- END %]
 <!--
 	<option value='at'>[% l("Books") %]</option>
 	<option value='at-d'>[% l("Large Print Books") %]</option>
@@ -39,4 +14,3 @@
 	<option value='m'>[% l("Electronic Resources") %]</option>
 -->
 </select>
-<!-- ****************** end: format_selector.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 4f72639..f887c44 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -3,4 +3,42 @@
     USE CGI; 
     USE EGI18N;
     SET DATE_FORMAT = '%m/%d/%Y';
+
+    item_types = [  # XXX KCLS-specific
+        {'code' => 'a', 'name' => 'Book', 'image' => 'media_book.jpg'},
+        {'code' => 'i', 'name' => 'Book on cassette', 'image' => 'media_bookoncasset.jpg'},
+        {'code' => 'n', 'name' => 'Book on CD', 'image' => 'media_bookoncd.jpg'},
+        {'code' => 'x', 'name' => 'Download music', 'image' => 'media_downloadmusic.jpg'},
+        {'code' => 'y', 'name' => 'Download video', 'image' => 'media_downloadvideo.jpg'},
+        {'code' => 'h', 'name' => 'DVD', 'image' => 'media_dvd.jpg'},
+        {'code' => 'w', 'name' => 'eBook - Audio', 'image' => 'media_eaudio.jpg'},
+        {'code' => 'v', 'name' => 'eBook - Text', 'image' => 'media_ebooktext.jpg'},
+        {'code' => 'e', 'name' => 'Equipment', 'image' => 'media_equipment.jpg'},
+        {'code' => 'f', 'name' => 'Films', 'image' => 'media_films.jpg'},
+        {'code' => 'o', 'name' => 'Kit', 'image' => 'media_kit.jpg'},
+        {'code' => 'q', 'name' => 'Large print', 'image' => 'media_largeprint.jpg'},
+        {'code' => 'b', 'name' => 'Magazine', 'image' => 'media_magazines.jpg'},
+        {'code' => 'd', 'name' => 'Microform', 'image' => 'media_microform.jpg'},
+        {'code' => 'k', 'name' => 'Music cassette', 'image' => 'media_musiccassette.jpg'},
+        {'code' => 'j', 'name' => 'Music CD', 'image' => 'media_musiccd.jpg'},
+        {'code' => 'l', 'name' => 'Music LP', 'image' => 'media_musicrecord.jpg'},
+        {'code' => 'p', 'name' => 'Newspaper', 'image' => 'media_newspaper.jpg'},
+        {'code' => 't', 'name' => 'Online', 'image' => 'media_online.jpg'},
+        {'code' => 'u', 'name' => 'Player', 'image' => 'media_eaudio.jpg'},
+        {'code' => 'c', 'name' => 'Printed music / scores', 'image' => 'media_printedmusic.jpg'},
+        {'code' => '2', 'name' => 'Read along with cassette', 'image' => 'media_cassettewithbook.jpg'},
+        {'code' => '5', 'name' => 'Read along with CD', 'image' => 'media_cdwithbook.jpg'},
+        {'code' => 'm', 'name' => 'Software', 'image' => 'media_software.jpg'},
+        {'code' => 'g', 'name' => 'Video', 'image' => ''},
+        {'code' => 'r', 'name' => '3-D Object', 'image' => 'media_3dobject.jpg'},
+        {'code' => 'z', 'name' => 'Map', 'image' => 'media_map.jpg'},
+        {'code' => 's', 'name' => 'Slide set', 'image' => 'media_slide.jpg'}
+    ];
+
+    icon_by_mattype = {};
+    FOR o IN item_types;
+        code = o.code;
+        icon_by_mattype.$code = o.image;
+    END;
+
 -%]
diff --git a/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2 b/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
index f919ed8..8f56196 100644
--- a/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
@@ -1,35 +1,4 @@
 [% 
-    icon_by_mattype = {     # XXX KCLS-specific
-        "a" => "media_book.jpg",
-        "b" => "media_magazines.jpg",
-        "c" => "media_printedmusic.jpg",
-        "d" => "media_microform.jpg",
-        "e" => "media_equipment.jpg",
-        "f" => "media_films.jpg",
-        "g" => "",
-        "h" => "media_dvd.jpg",
-        "i" => "media_bookoncassette.jpg",
-        "j" => "media_musiccd.jpg",
-        "k" => "media_musiccassette.jpg",
-        "l" => "media_musicrecord.jpg",
-        "m" => "media_software.jpg",
-        "n" => "media_bookoncd.jpg",
-        "o" => "media_kit.jpg",
-        "p" => "media_newspaper.jpg",
-        "q" => "media_largeprint.jpg",
-        "r" => "media_3dobject.jpg",
-        "s" => "media_slide.jpg",
-        "t" => "media_online.jpg",
-        "u" => "media_eaudio.jpg",
-        "v" => "media_ebooktext.jpg",
-        "w" => "media_eaudio.jpg",
-        "x" => "media_downloadmusic.jpg",
-        "y" => "media_downloadvideo.jpg",
-        "z" => "media_map.jpg",
-        "2" => "media_cassettewithbook.jpg",
-        "5" => "media_cdwithbook.jpg"
-    };
-
     # Extract MARC fields from XML
     #   get_marc_attrs( { marc_xml => doc } )
     BLOCK get_marc_attrs;
@@ -60,7 +29,5 @@
         mattype = attrs.mattype;
         args.format = ctx.find_citm(mattype).value;
         args.format_icon = icon_by_mattype.$mattype;
-
     END;
-
 %]
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 7156e55..24e56eb 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -39,7 +39,7 @@
         </tr>
         <tr>
             <td>
-                [% INCLUDE "default/opac/parts/format_selector.tt2" %]
+                [% INCLUDE "default/opac/parts/format_selector.tt2" value=CGI.param("item_type") %]
             </td>
             <td>
                 <span id='depth_selector_span'>

commit 337c1d7b3f8a847245160df7e742e6a32769200d
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 15 10:39:16 2011 -0500

    Judgment call. I think this just looks better.

diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index b6a53df..dd0d5cc 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -34,7 +34,7 @@
                 [% money(ctx.fines.balance_owed) %]
             </span><br />
             <a class="hide_me" href="#" id="pay_fines_btn1"><img
-                alt="Pay Fines"
+                alt="[% l('Pay Fines') %]"
                 onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
                 onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
                 src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
@@ -150,13 +150,11 @@
                             <td>[% l("Due Date") %]</td>
                             <td>[% l("Date Returned") %]</td>
                             <td>[% l("Balance Owed") %]</td>
-                            <td align="center" nowrap="nowrap"
-                                style="white-space:nowrap;">
-                                <label for="pay_fines_box1">Pay Fines</label>
-                                <br />
+                            <td nowrap="nowrap" style="white-space:nowrap;">
                                 <input id="pay_fines_box1" checked="checked"
                                     type="checkbox"
-                                    title="Click to (un)select all fines" />
+                                    title="[% l('Click to (un)select all fines') %]" />
+                                <label for="pay_fines_box1">[% l('Pay Fines') %]</label>
                             </td>
                         </tr>
                     </thead>
@@ -206,7 +204,7 @@
                                     [% money(f.xact.balance_owed) %]
                                 </strong>
                             </td>
-                            <td align="center">
+                            <td>
                                 <input type="checkbox" checked="checked"
                                     name="selector"
                                     title="[% l('Pay this fine') %]" />
@@ -241,11 +239,10 @@
                             <td width='16%'>[% l("Billing Type") %]</td>
                             <td width='4%' align="center" nowrap="nowrap"
                                 style="white-space:nowrap;">
-                                <label for="pay_fines_box2">[% l("Pay Fines") %]</label>
-                                <br />
                                 <input id="pay_fines_box2" checked="checked"
                                     type="checkbox"
                                     title="[% l('Click to (un)select all fines') %]" />
+                                <label for="pay_fines_box2">[% l("Pay Fines") %]</label>
                             </td>
                         </tr>
                     </thead>
@@ -273,7 +270,7 @@
                                 </strong>
                             </td>
                             <td>[% f.xact.last_billing_type %]</td>
-                            <td align="center">
+                            <td>
                                 <input type="checkbox" name='selector'
                                     title='[% l("Pay this fine") %]'
                                     checked="checked" />
@@ -284,7 +281,7 @@
                 </table>
             </div>
             [% END %]
-            <a href="#"><img alt="Pay Fines"
+            <a href="#"><img alt="[% l('Pay Fines') %]"
                 onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
                 src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
                 style="position:relative;top:5px;" /></a>

commit 1c4cd8ed23a02d787467a902f3ad8dd4e3e50f0c
Author: berick <berick at esilibrary.com>
Date:   Tue Feb 15 10:32:04 2011 -0500

    make money string localizable

diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 08f0854..23f1bd4 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -1,4 +1,4 @@
-[%- USE money = format('$%.2f');
+[%- USE money = format(l('$%.2f'));
     USE date;
     USE CGI; 
     USE EGI18N; -%]

commit df495eff86056f135bf9babff809f3e2180e35f7
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 15 10:31:44 2011 -0500

    show grocery fines; define date format in a single location

diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index c56b23e..77ba056 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -106,7 +106,7 @@
                         </td>
                         <td width="13%" style="padding-left:5px;"
                             name="due_date">
-                            [% date.format(ctx.parse_datetime(circ.circ.due_date),'%m/%d/%Y') %]
+                            [% date.format(ctx.parse_datetime(circ.circ.due_date),DATE_FORMAT) %]
                         </td>
                         <td width="16%" name="barcode">
                             [% circ.circ.target_copy.barcode %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 1dd741f..6c6cafe 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -150,7 +150,7 @@
                             name="activate_box" type="text" />
                         [% IF hold.hold.hold.frozen == 't' AND
                                 hold.hold.hold.thaw_date;
-                            date.format(ctx.parse_datetime(hold.hold.hold.thaw_date), '%m/%d/%Y');
+                            date.format(ctx.parse_datetime(hold.hold.hold.thaw_date), DATE_FORMAT);
                         END %]
                     </td>
                     <td width="106">
@@ -158,7 +158,7 @@
                             class="hide_me" style="width:91px;"
                             name="hold_expires_box" type="text" />
                         [% IF hold.hold.hold.expire_time;
-                            date.format(ctx.parse_datetime(hold.hold.hold.expire_time), '%m/%d/%Y');
+                            date.format(ctx.parse_datetime(hold.hold.hold.expire_time), DATE_FORMAT);
                         END %]
                     </td>
                     <td width="95">
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index cea25a8..b6a53df 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -177,14 +177,14 @@
                                 [% date.format(
                                     ctx.parse_datetime(
                                         f.xact.circulation.xact_start
-                                    ), "%m/%d/%Y"
+                                    ), DATE_FORMAT
                                 ) %]
                             </td>
                             <td name='myopac_circ_trans_due'>
                                 [% date.format(
                                     ctx.parse_datetime(
                                         f.xact.circulation.due_date
-                                    ), "%m/%d/%Y"
+                                    ), DATE_FORMAT
                                 ) %]
                             </td>
                             <td name='myopac_circ_trans_finished'>
@@ -192,7 +192,7 @@
                                         date.format(
                                             ctx.parse_datetime(
                                                 f.xact.circulation.checkin_time
-                                            ), "%m/%d/%Y"
+                                            ), DATE_FORMAT
                                         );
                                     ELSE %]
                                     <!-- XXX TODO fines aren't really accruing
@@ -208,7 +208,8 @@
                             </td>
                             <td align="center">
                                 <input type="checkbox" checked="checked"
-                                    name="selector" title="pay this fine" />
+                                    name="selector"
+                                    title="[% l('Pay this fine') %]" />
                             </td>
                         </tr>
                         [% END %]
@@ -217,8 +218,9 @@
             </div>
         [% END %]
 
+        [% IF ctx.fines.grocery.size > 0 %]
             <!-- Table for all non-circulation transactions -->
-            <div id='myopac_trans_div' class='hide_me'>
+            <div id='myopac_trans_div'>
                 <br/>
                 <hr style="border-bottom:none;*height:0px;" color="#dcdbdb" />
                 <br/>
@@ -239,40 +241,49 @@
                             <td width='16%'>[% l("Billing Type") %]</td>
                             <td width='4%' align="center" nowrap="nowrap"
                                 style="white-space:nowrap;">
-                                <label for="pay_fines_box2">Pay Fines</label>
+                                <label for="pay_fines_box2">[% l("Pay Fines") %]</label>
                                 <br />
                                 <input id="pay_fines_box2" checked="checked"
                                     type="checkbox"
-                                    title="Click to (un)select all fines" />
+                                    title="[% l('Click to (un)select all fines') %]" />
                             </td>
                         </tr>
                     </thead>
                     <tbody id='myopac_trans_tbody'>
+                        [% FOR f IN ctx.fines.grocery %]
                         <tr id='myopac_trans_row'>
-                            <td name='myopac_trans_start'> </td>
-                            <td name='myopac_trans_last_payment'> </td>
-                            <td name='myopac_trans_init_amount'>
-                                [% l("\$") %]
-                            </td>
-                            <td name='myopac_trans_total_paid'>
-                                [% l("\$") %]
+                            <td>[% date.format(
+                                    ctx.parse_datetime(f.xact.xact_start),
+                                    DATE_FORMAT
+                            ) %]</td>
+                            <td>
+                                [%  IF f.xact.last_payment_ts;
+                                        date.format(
+                                            ctx.parse_datetime(
+                                                f.xact.last_payment_ts
+                                            ), DATE_FORMAT
+                                        );
+                                    END %]
                             </td>
-                            <td style='color:red; font-weight: bold;'>
-                                <span name='myopac_trans_balance_recur'
-                                    class='hide_me'> * </span>
-                                <span name='myopac_trans_balance'>
-                                    [% l("\$") %]
-                                </span>
+                            <td>[% money(f.xact.total_owed) %]</td>
+                            <td>[% money(f.xact.total_paid) %]</td>
+                            <td class="red">
+                                <strong>
+                                    [% money(f.xact.balance_owed) %]
+                                </strong>
                             </td>
-                            <td name='myopac_trans_bill_type'></td>
+                            <td>[% f.xact.last_billing_type %]</td>
                             <td align="center">
                                 <input type="checkbox" name='selector'
-                                    title='pay this fine' checked="checked" />
+                                    title='[% l("Pay this fine") %]'
+                                    checked="checked" />
                             </td>
                         </tr>
+                        [% END %]
                     </tbody>
                 </table>
             </div>
+            [% END %]
             <a href="#"><img alt="Pay Fines"
                 onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
                 src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
index 08f0854..4f72639 100644
--- a/Open-ILS/web/templates/default/opac/parts/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -1,4 +1,6 @@
 [%- USE money = format('$%.2f');
     USE date;
     USE CGI; 
-    USE EGI18N; -%]
+    USE EGI18N;
+    SET DATE_FORMAT = '%m/%d/%Y';
+-%]

commit 367463e4ea4eee8d5a8dd9edd6fcba8d8f6fc553
Author: berick <berick at esilibrary.com>
Date:   Tue Feb 15 10:19:40 2011 -0500

    heh, rolling bcak unintended addition of test code

diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
index cc969fd..f2401d8 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@ -6,7 +6,7 @@
     <div class="float-right">
         [% IF !ctx.user %]
         <div id="your-acct-login">
-            <a href="[% ctx.opac_root %]/myopac/main?foo=bar" id="home_myopac_link"><img
+            <a href="[% ctx.opac_root %]/myopac/main" id="home_myopac_link"><img
                 alt="[% l('Your Account Log in') %]"
                 src="[% ctx.media_prefix %]/images/login-btn.png"
                 onmouseover="this.src='[% ctx.media_prefix %]/images/login-btn-hover.png';"

commit 4fa8c92e0db026b98104933bdecff8331d23b5cd
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Mon Feb 14 06:28:50 2011 -0500

    added support for copy paging/sorting

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index e8f6a4a..aeb7108 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -13,23 +13,101 @@ sub load_record {
     my $self = shift;
     $self->ctx->{page} = 'record';
 
+    my $org = $self->cgi->param('loc') || $self->ctx->{aou_tree}->()->id;
+    my $depth = $self->cgi->param('depth') || 0;
+    my $copy_limit = $self->cgi->param('copy_limit');
+    my $copy_offset = $self->cgi->param('copy_offset');
+
     my $rec_id = $self->ctx->{page_args}->[0]
         or return Apache2::Const::HTTP_BAD_REQUEST;
 
-    $self->ctx->{record} = $self->editor->retrieve_biblio_record_entry([
-        $rec_id,
-        {
-            flesh => 2, 
-            flesh_fields => {
-                bre => ['call_numbers'],
-                acn => ['copies'] # limit, paging, etc.
-            }
-        }
-    ]);
+    # run copy retrieval in parallel to bib retrieval
+    my $copy_rec = OpenSRF::AppSession->create('open-ils.cstore')->request(
+        'open-ils.cstore.json_query.atomic', 
+        $self->mk_copy_query($rec_id, $org, $depth, $copy_limit, $copy_offset));
 
+    $self->ctx->{record} = $self->editor->retrieve_biblio_record_entry($rec_id);
     $self->ctx->{marc_xml} = XML::LibXML->new->parse_string($self->ctx->{record}->marc);
 
+    $self->ctx->{copies} = $copy_rec->gather(1);
+
     return Apache2::Const::OK;
 }
 
+sub mk_copy_query {
+    my $self = shift;
+    my $rec_id = shift;
+    my $org = shift;
+    my $depth = shift;
+    my $copy_limit = shift || 20;
+    my $copy_offset = shift || 0;
+
+    my $query = {
+        select => {
+            acp => ['id', 'barcode', 'circ_lib'],
+            acpl => [{column => 'name', alias => 'copy_location'}],
+            ccs => [{column => 'name', alias => 'copy_status'}],
+            acn => [
+                {column => 'label', alias => 'call_number_label'},
+                {column => 'id', alias => 'call_number'}
+            ],
+            circ => ['due_date'],
+        },
+        from => {
+            acp => {
+                acn => {},
+                acpl => {},
+                ccs => {},
+                circ => {type => 'left'},
+                aou => {}
+            }
+        },
+        where => {
+            '+acp' => {
+                deleted => 'f',
+                call_number => {
+                    in => {
+                        select => {acn => ['id']},
+                        from => 'acn',
+                        where => {record => $rec_id}
+                    }
+                },
+                circ_lib => {
+                    in => {
+                        select => {aou => [{
+                            column => 'id', 
+                            transform => 'actor.org_unit_descendants', 
+                            result_field => 'id', 
+                            params => [$depth]
+                        }]},
+                        from => 'aou',
+                        where => {id => $org}
+                    }
+                }
+            },
+            '+acn' => {deleted => 'f'},
+            '+circ' => {checkin_time => undef}
+        },
+
+        # Order is: copies with circ_lib=org, followed by circ_lib name, followed by call_number label
+        order_by => [
+            {class => 'aou', field => 'name'}, 
+            {class => 'acn', field => 'label'}
+        ],
+
+        limit => $copy_limit,
+        offset => $copy_offset
+    };
+
+    # Filter hidden items if this is the public catalog
+    unless($self->ctx->{is_staff}) { 
+        $query->{where}->{'+acp'}->{opac_visible} = 't';
+        $query->{where}->{'+acpl'}->{opac_visible} = 't';
+        $query->{where}->{'+ccs'}->{opac_visible} = 't';
+    }
+
+    return $query;
+    #return $self->editor->json_query($query);
+}
+
 1;
diff --git a/Open-ILS/web/templates/default/opac/record.tt2 b/Open-ILS/web/templates/default/opac/record.tt2
index 04e33cb..6e4368f 100644
--- a/Open-ILS/web/templates/default/opac/record.tt2
+++ b/Open-ILS/web/templates/default/opac/record.tt2
@@ -12,4 +12,15 @@
             <div class="common-full-pad"></div>	
         </div>
     </div>
+    [%# TODO: TEST CODE, DELETE ME... %]
+    [% FOR copy_info IN ctx.copies %]
+        <div>
+            [% 
+                copy_info.id _ ' ' _ copy_info.barcode _ ' ' _ ctx.find_aou(copy_info.circ_lib).name _ 
+                ' ' _ copy_info.copy_location _ ' ' _ copy_info.copy_status _ 
+                ' ' _ copy_info.call_number_label _ ' ' _ copy_info.call_number _ ' ';
+                IF copy_info.due_date; date.format(ctx.parse_datetime(copy_info.due_date),'%m/%d/%Y'); END;
+            %]
+        </div>
+    [% END %]
 [% END %]

commit 5f7b04b9a2860f3832651c7fb2dcf344cc043a2d
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Mon Feb 14 05:24:57 2011 -0500

    when a secure page is requested insecurely, direct to login page, then redirect to the originally requested page after successful login.  This removes the need for explicit redirect_to and https:// in secure links

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 7dd7605..99df8e7 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -81,8 +81,6 @@ sub load {
 
     my $path = $self->apache->path_info;
 
-    $self->apache->log->info("path = $path; referer = " . $self->cgi->referer);
-
     return $self->load_simple("home") if $path =~ /opac\/home/;
     return $self->load_simple("advanced") if $path =~ /opac\/advanced/;
     return $self->load_login if $path =~ /opac\/login/;
@@ -91,14 +89,10 @@ sub load {
     return $self->load_record if $path =~ /opac\/record/;
 
     # ----------------------------------------------------------------
-    # These pages require authentication
+    #  Everything below here requires authentication
     # ----------------------------------------------------------------
-    unless($self->cgi->https and $self->editor->requestor) {
-        # If a secure resource is requested insecurely, redirect to the login page
-        my $url = 'https://' . $self->apache->hostname . $self->ctx->{opac_root} . "/login";
-        $self->apache->print($self->cgi->redirect(-url => $url));
-        return Apache2::Const::REDIRECT;
-    }
+    return $self->redirect_secure($path) 
+        unless $self->cgi->https and $self->editor->requestor;
 
     return $self->load_place_hold if $path =~ /opac\/place_hold/;
     return $self->load_myopac_holds if $path =~ /opac\/myopac\/holds/;
@@ -107,12 +101,23 @@ sub load {
     return $self->load_myopac_update_email if $path =~ /opac\/myopac\/update_email/;
     return $self->load_myopac_bookbags if $path =~ /opac\/myopac\/bookbags/;
     return $self->load_myopac if $path =~ /opac\/myopac/;
-    # ----------------------------------------------------------------
 
     return Apache2::Const::OK;
 }
 
 # -----------------------------------------------------------------------------
+# If a secure resource is requested insecurely, redirect to the login page,
+# then return to the originally requrested resource upon successful login.
+# -----------------------------------------------------------------------------
+sub redirect_secure {
+    my ($self, $path) = @_;
+    my $login_page = sprintf('https://%s%s/login', $self->apache->hostname, $self->ctx->{opac_root});
+    my $redirect_to = uri_escape($self->apache->unparsed_uri);
+    $self->apache->print($self->cgi->redirect(-url => "$login_page?redirect_to=$redirect_to"));
+    return Apache2::Const::REDIRECT;
+}
+
+# -----------------------------------------------------------------------------
 # Fall-through for loading a basic page
 # -----------------------------------------------------------------------------
 sub load_simple {
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
index 635c5c0..cc969fd 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@ -6,8 +6,7 @@
     <div class="float-right">
         [% IF !ctx.user %]
         <div id="your-acct-login">
-            [% myopac_redirect = 'https://' _ ctx.hostname _ ctx.opac_root _ '/myopac/main' | url %]
-            <a href="[% ctx.opac_root %]/login?redirect_to=[% myopac_redirect %]" id="home_myopac_link"><img
+            <a href="[% ctx.opac_root %]/myopac/main?foo=bar" id="home_myopac_link"><img
                 alt="[% l('Your Account Log in') %]"
                 src="[% ctx.media_prefix %]/images/login-btn.png"
                 onmouseover="this.src='[% ctx.media_prefix %]/images/login-btn-hover.png';"

commit e1e3421f212da4307afdc777214191a53014008b
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Mon Feb 14 04:23:46 2011 -0500

    fixed holds sorting; my-account link redirects to my-account; i18n cleanup

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index f576c65..7dd7605 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -81,6 +81,8 @@ sub load {
 
     my $path = $self->apache->path_info;
 
+    $self->apache->log->info("path = $path; referer = " . $self->cgi->referer);
+
     return $self->load_simple("home") if $path =~ /opac\/home/;
     return $self->load_simple("advanced") if $path =~ /opac\/advanced/;
     return $self->load_login if $path =~ /opac\/login/;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index ce275d4..dd89852 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -84,9 +84,8 @@ sub fetch_user_holds {
     };
 
     my $first = 1;
-    my @collected;
-    my @holds;
-    my @ses;
+    my(@collected, @holds, @ses);
+
     while(1) {
         @ses = $mk_req_batch->() if $first;
         last if $first and not @ses;
@@ -108,7 +107,13 @@ sub fetch_user_holds {
         $first = 0;
     }
 
-    return \@holds;
+    # put the holds back into the original server sort order
+    my @sorted;
+    for my $id (@$hold_ids) {
+        push @sorted, grep { $_->{hold}->{hold}->id == $id } @holds;
+    }
+
+    return \@sorted;
 }
 
 sub handle_hold_update {
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 5f3ad5d..7156e55 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -4,7 +4,7 @@
     <table cellpadding="0" cellspacing="10" border="0">
         <tr>
             <td colspan="3">
-                <span class="search_catalog_lbl">Search the Catalog</span>
+                <span class="search_catalog_lbl">[% l('Search the Catalog') %]</span>
                 <a href="[% ctx.opac_root %]/advanced"
                     id="home_adv_search_link"><span
                     class="adv_search_font">Advanced Search</span></a>
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
index 243fc52..635c5c0 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@ -1,13 +1,14 @@
 <div id="header">
     <div class="float-left">
-        <a href="http://www.kcls.org"><img alt="KCLS Logo"
+        <a href="http://www.kcls.org"><img alt="[% l('KCLS Logo') %]" 
             src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /></a>
     </div>
     <div class="float-right">
         [% IF !ctx.user %]
         <div id="your-acct-login">
-            <a href="[% ctx.opac_root %]/login" id="home_myopac_link"><img
-                alt="Your Account Log in"
+            [% myopac_redirect = 'https://' _ ctx.hostname _ ctx.opac_root _ '/myopac/main' | url %]
+            <a href="[% ctx.opac_root %]/login?redirect_to=[% myopac_redirect %]" id="home_myopac_link"><img
+                alt="[% l('Your Account Log in') %]"
                 src="[% ctx.media_prefix %]/images/login-btn.png"
                 onmouseover="this.src='[% ctx.media_prefix %]/images/login-btn-hover.png';"
                 onmouseout="this.src='[% ctx.media_prefix %]/images/login-btn.png';" /></a>
@@ -22,22 +23,20 @@
                         </td>
                         <td id="dash_corner_mid1a">
                             <span id="dash_user">
-                                [%  # XXX TODO: some kind of standard helper
-                                    # function in TT2 to render human names,
-                                    # i18n aware.
-                                    ctx.user.first_given_name %]
-                                [% ctx.user.family_name %]
+                                [%  l('[_1] [_2]', ctx.user.first_given_name, ctx.user.family_name) %]
                             </span>
                         </td>
                         <td id="dash_corner_mid1b">
                             <img src="[% ctx.media_prefix %]/images/dash-divider.jpg" />
                         </td>
                         <td id="dash_corner_mid1c">
+
                             <a href="[% ctx.opac_root %]/myopac/main" class="pos-rel-top4"><img
                                 alt="[% l('My Account') %]"
                                 src="[% ctx.media_prefix %]/images/acct-btn.png"
                                 onmouseover="this.src='[% ctx.media_prefix %]/images/acct-btn-hover.png';"
                                 onmouseout="this.src='[% ctx.media_prefix %]/images/acct-btn.png';" /></a>
+
                             <a href="[% ctx.opac_root %]/logout" class="pos-rel-top4"
                                 id="logout_link"><img
                                 alt="[% l('Logout') %]"
@@ -107,12 +106,9 @@
 <div id="gold-links-holder">
     <div id="gold-links">
         <div id="header-links">
-            <a href="http://www.kcls.org/usingthelibrary/index.cfm">Using
-                the Library</a>
-            <a href="http://www.kcls.org/booksandreading/">Books &amp;
-                Reading</a>
-            <a href="http://www.kcls.org/research/index.cfm">Research &amp;
-                Homework</a>
+            <a href="http://www.kcls.org/usingthelibrary/index.cfm">Using the Library</a>
+            <a href="http://www.kcls.org/booksandreading/">Books &amp; Reading</a>
+            <a href="http://www.kcls.org/research/index.cfm">Research &amp; Homework</a>
             <a href="http://www.kcls.org/programs/">Programs &amp; Classes</a>
             <a href="http://www.kcls.org/events/">Events</a>
             <a href="/opac/extras/mobile/">Mobile Catalog</a>

commit 93f2ebdb011d7b2c69df367ad29a6ba4ca6acda3
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 14 17:40:27 2011 -0500

    work on myopac fines, displayed in account summary (myopac/main)

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
index 6b3e7be..3a7efd01 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
@@ -34,7 +34,7 @@ use OpenILS::Application::Actor::Stage;
 
 use OpenILS::Utils::CStoreEditor qw/:funcs/;
 use OpenILS::Utils::Penalty;
-use List::Util qw/max/;
+use List::Util qw/max reduce/;
 
 use UUID::Tiny qw/:std/;
 
@@ -1592,6 +1592,8 @@ sub user_opac_vitals {
         ->run($auth => $user_id);
     return $out if (defined($U->event_code($out)));
 
+    $out->{"total_out"} = reduce { $a + $out->{$b} } 0, qw/out overdue long_overdue/;
+
     return {
         user => {
             first_given_name  => $user->first_given_name,
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 2f9b93d..f576c65 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -101,7 +101,7 @@ sub load {
     return $self->load_place_hold if $path =~ /opac\/place_hold/;
     return $self->load_myopac_holds if $path =~ /opac\/myopac\/holds/;
     return $self->load_myopac_circs if $path =~ /opac\/myopac\/circs/;
-    return $self->load_myopac_fines if $path =~ /opac\/myopac\/fines/;
+    return $self->load_myopac_fines if $path =~ /opac\/myopac\/main/;
     return $self->load_myopac_update_email if $path =~ /opac\/myopac\/update_email/;
     return $self->load_myopac_bookbags if $path =~ /opac\/myopac\/bookbags/;
     return $self->load_myopac if $path =~ /opac\/myopac/;
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 29dfb10..cea25a8 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -1,4 +1,5 @@
 [%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/marc_misc.tt2";
     WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "main"  %]
@@ -28,9 +29,9 @@
                     <img src="[% ctx.media_prefix %]/images/acct_sum_fines_br.png" />
                 </div>
             </div>
-            Fines:
-            <span id="myopac_sum_fines_bal" class='[% ctx.user_stats.fines.balance_owed ? "red" : ""%]'>
-                [% money(ctx.user_stats.fines.balance_owed) %]
+            [% l('Fines:') %]
+            <span id="myopac_sum_fines_bal" class='[% ctx.fines.balance_owed ? "red" : ""%]'>
+                [% money(ctx.fines.balance_owed) %]
             </span><br />
             <a class="hide_me" href="#" id="pay_fines_btn1"><img
                 alt="Pay Fines"
@@ -46,13 +47,13 @@
                     <table width="100%" cellspacing="0" cellpadding="0">
                         <tr>
                             <td>
-                                Items Currently Checked out
+                                [% l("Items Currently Checked out") %]
                                 <span id="myopac_sum_checked" class="view_link">
-                                    ([% ctx.user_stats.checkouts.out %])
+                                    ([% ctx.user_stats.checkouts.total_out %])
                                 </span>
                             </td>
                             <td align="right" class="view_link">
-                                <a href="[% ctx.opac_root %]/circs">View All</a>
+                                <a href="[% ctx.opac_root %]/myopac/circs">[% l("View All") %]</a>
                             </td>
                         </tr>
                     </table>
@@ -67,7 +68,7 @@
                                 </span>
                             </td>
                             <td align="right" class="view_link">
-                                <a href="[% ctx.opac_root %]/holds">View All</a>
+                                <a href="[% ctx.opac_root %]/myopac/holds">View All</a>
                             </td>
                         </tr>
                     </table>
@@ -118,9 +119,9 @@
                 </thead>
                 <tbody id='myopac_fines_summary_tbody'>
                     <tr id='myopac_fines_summary_row'>
-                        <td id='myopac_fines_summary_total'>[% money(ctx.user_stats.fines.total_owed) %]</td>
-                        <td id='myopac_fines_summary_paid'>[% money(ctx.user_stats.fines.total_paid) %]</td>
-                        <td id='myopac_fines_summary_balance' style='color:red;font-weight: bold;'>[% money(ctx.user_stats.fines.balance_owed) %]</td>
+                        <td id='myopac_fines_summary_total'>[% money(ctx.fines.total_owed) %]</td>
+                        <td id='myopac_fines_summary_paid'>[% money(ctx.fines.total_paid) %]</td>
+                        <td id='myopac_fines_summary_balance' style='color:red;font-weight: bold;'>[% money(ctx.fines.balance_owed) %]</td>
                     </tr>
                 </tbody>
             </table>
@@ -131,16 +132,15 @@
             <span>will continue to accrue fines until the checked out item is returned.</span>
         </div>
         -->
-        <!-- Table for circulation transactions only -->
-            <div id='myopac_circ_trans_div' class='hide_me'>
+        [% IF ctx.fines.circulation.size > 0 %]
+            <div id='myopac_circ_trans_div'>
                 <br/><hr/><br/>
                 <table width='100%' class='data_grid data_grid_center'
                     id='myopac_circ_trans_table'>
                     <thead>
-                    <!--<tr><td colspan='10' style='padding: 6px'><b>[% l("Overdue Materials") %]</b></td></tr>-->
                         <tr>
                             <td colspan='10' style='padding: 6px'>
-                                <b>Fines</b>
+                                <strong>[% l("Fines") %]</strong>
                             </td>
                         </tr>
                         <tr>
@@ -161,28 +161,61 @@
                         </tr>
                     </thead>
                     <tbody id='myopac_circ_trans_tbody'>
+                        [% FOR f IN ctx.fines.circulation;
+                            attrs = {marc_xml => f.marc_xml};
+                            PROCESS get_marc_attrs args=attrs %]
                         <tr id='myopac_circ_trans_row'>
                             <td>
-                                <a class='classic_link' name='myopac_circ_trans_title'> </a>
+                                <a class='classic_link'
+                                    href="[% ctx.opac_root %]/record/[% f.xact.circulation.target_copy.call_number.record.id %]">[% attrs.title %]</a>
+                            </td>
+                            <td>
+                                <a class="classic_link"
+                                    href="[% ctx.opac_root %]/results?query=au:[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                            </td>
+                            <td name='myopac_circ_trans_start'>
+                                [% date.format(
+                                    ctx.parse_datetime(
+                                        f.xact.circulation.xact_start
+                                    ), "%m/%d/%Y"
+                                ) %]
+                            </td>
+                            <td name='myopac_circ_trans_due'>
+                                [% date.format(
+                                    ctx.parse_datetime(
+                                        f.xact.circulation.due_date
+                                    ), "%m/%d/%Y"
+                                ) %]
                             </td>
-                            <td name='myopac_circ_trans_author'> </td>
-                            <td name='myopac_circ_trans_start'> </td>
-                            <td name='myopac_circ_trans_due'> </td>
                             <td name='myopac_circ_trans_finished'>
-                                <span style='color:red;'>[% l("(fines accruing)") %]</span>
+                                [%  IF f.xact.circulation.checkin_time;
+                                        date.format(
+                                            ctx.parse_datetime(
+                                                f.xact.circulation.checkin_time
+                                            ), "%m/%d/%Y"
+                                        );
+                                    ELSE %]
+                                    <!-- XXX TODO fines aren't really accruing
+                                        if circ has hit maxfines. more clarity
+                                        here? -->
+                                    <span class="red">[% l('(fines accruing)') %]</span>
+                                [%  END %]
                             </td>
                             <td>
-                                <span style='color: red; font-weight: bold;'
-                                    name='myopac_circ_trans_balance'>[% l("\$") %]</span>
+                                <strong class="red">
+                                    [% money(f.xact.balance_owed) %]
+                                </strong>
                             </td>
                             <td align="center">
                                 <input type="checkbox" checked="checked"
                                     name="selector" title="pay this fine" />
                             </td>
                         </tr>
+                        [% END %]
                     </tbody>
                 </table>
             </div>
+        [% END %]
 
             <!-- Table for all non-circulation transactions -->
             <div id='myopac_trans_div' class='hide_me'>
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
index 4b4bda5..243fc52 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@ -64,7 +64,7 @@
                                         <div class="pos-abs">
                                             <div class="dash-pos-out">
                                                 <div class="dash-align-out">
-                                                    <span id="dash_checked">[% ctx.user_stats.checkouts.out %]</span> [% l("Checked Out") %]
+                                                    <span id="dash_checked">[% ctx.user_stats.checkouts.total_out %]</span> [% l("Checked Out") %]
                                                 </div>
                                             </div>
                                         </div>

commit 1310d85e6b2b3c0c204659d7790a4dacc1bee9b9
Merge: b74e0c6 0d9685e
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 14 13:34:20 2011 -0500

    Merge branch 'opac-tt-poc' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit b74e0c6c8598cc3ccfb12db90bb4ddd987c3b32b
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 14 13:33:40 2011 -0500

    myopac: more complete display of circs, holds, and fines
    
    not completely complete. still developing.

diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 897b210..c56b23e 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -1,9 +1,10 @@
 [%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/marc_misc.tt2";
     WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "circs"  %]
 <div id='myopac_checked_div' style="padding:0px;">
-    <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;">
+    <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;" class="hide_me">
         <div class="align selected" id="checked_label">
             <img src="[% ctx.media_prefix %]/images/sub_checked_out_on.jpg" />
         </div>
@@ -85,7 +86,9 @@
             <div id="acct_checked_temp">
                 <table cellpadding='0' cellspacing='0' border='0'
                     style="margin-top:5px;">
-                    [% FOR circ IN ctx.circs %]
+                    [% FOR circ IN ctx.circs;
+                        attrs = {marc_xml => circ.marc_xml};
+                        PROCESS get_marc_attrs args=attrs; %]
                     <tr>
                         <td width="1%" style="padding-left:10px;" valign="top">
                             <input type="checkbox" name="check_all_checked" />
@@ -93,7 +96,10 @@
                         <td width="40%"
                             style="padding-left:5px;padding-bottom:10px;"
                             name="author">
-                            <a href="#" name="title"></a>
+                            <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" name="[% l('Catalog record') %]">[% attrs.title %]</a>
+                            [% IF attrs.author %] /
+                            <a href="[% ctx.opac_root %]/results?query=au:[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
+                            [% END %]
                         </td>
                         <td width="8%" name="renewals" align="center">
                             [% circ.circ.renewal_remaining %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index ce06e6b..1dd741f 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -1,9 +1,10 @@
 [%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/marc_misc.tt2";
     WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "holds"  %]
 <div id='myopac_holds_div'>
-    <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;">
+    <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;" class="hide_me">
         <div class="align selected" id="holds_label">
             <img src="[% ctx.media_prefix %]/images/sub_holds_on.jpg" />
         </div>
@@ -111,41 +112,54 @@
 
         <table cellpadding='0' cellspacing='0' border='0' width="100%">
             <tbody id="holds_temp_parent">
+                [% FOR hold IN ctx.holds;
+                    attrs = {marc_xml => hold.marc_xml};
+                    PROCESS get_marc_attrs args=attrs %]
                 <tr id="acct_holds_temp" name="acct_holds_temp"
                     class="acct_holds_temp">
                     <td width="36" align="center" style="text-align:center;">
-                        <input type="checkbox" name="check_all_holds" />
+                        <input type="checkbox" name="hold_id" value="[% hold.hold.hold.id %]" />
                     </td>
                     <td width="138">
                         <div style="margin-top:10px;margin-bottom:10px;">
-                            <a href="#" name="myopac_holds_title_link"></a>
+                            <a href="[% ctx.opac_root %]/record/[% hold.hold.bre.id %]">[% attrs.title | html %]</a>
                         </div>
                     </td>
                     <td width="123">
-                        <div style="margin-top:10px;margin-bottom:10px;"
-                            name="myopac_holds_author"></div>
+                        <div style="margin-top:10px;margin-bottom:10px;">
+                            <a href="[% ctx.opac_root %]/results?query=au:[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
+                        </div>
                     </td>
                     <td width="64">
-                        <div style="width:26px;height:23px;margin-top:6px;margin-bottom:6px;"
-                            name="myopac_holds_formats">
+                        <div style="width:26px;height:23px;margin-top:6px;margin-bottom:6px;">
+                            [% IF attrs.format_icon %]
+                            <img src="[% ctx.media_prefix %]/images/[% attrs.form_icon %]"
+                                title="[% attrs.format %]" alt="[% attrs.format %]" />
+                            [% ELSE;
+                                attrs.format;
+                               END %]
                         </div>
                     </td>
                     <td width="136">
-                        <span name="hold_pickup_lib_span"></span>
-                        <span name="hold_pickup_lib"></span>
+                        [% ctx.find_aou(hold.hold.hold.pickup_lib).name %]
                     </td>
                     <td width="104">
                         <input
                             title="Enter a date (e.g. 10/21/2010)"
                             class="hide_me" style="width:91px;"
                             name="activate_box" type="text" />
-                            <span name="activate_date"></span>
+                        [% IF hold.hold.hold.frozen == 't' AND
+                                hold.hold.hold.thaw_date;
+                            date.format(ctx.parse_datetime(hold.hold.hold.thaw_date), '%m/%d/%Y');
+                        END %]
                     </td>
                     <td width="106">
                         <input title="Enter a date (e.g. 10/21/2010)"
                             class="hide_me" style="width:91px;"
                             name="hold_expires_box" type="text" />
-                            <span name="hold_expires"></span>
+                        [% IF hold.hold.hold.expire_time;
+                            date.format(ctx.parse_datetime(hold.hold.hold.expire_time), '%m/%d/%Y');
+                        END %]
                     </td>
                     <td width="95">
                         <select name="hold_active_sel"
@@ -153,13 +167,23 @@
                             <option value="f">Active</option>
                             <option value="t">Suspended</option>
                         </select>
-                        <span name="hold_active"></span>
+                        [% l(hold.hold.hold.frozen == 'f' ? 'Active' : 'Suspended') %]
                     </td>
                     <td width="110">
                         <div name="acct_holds_status"
                             style="margin-top:10px;margin-bottom:10px;">
-                            <span class="hide_me"
-                                name="hold_ready_expire"></span>
+                            [%
+                                IF hold.hold.status == 4;
+                                    l("Available");
+                                ELSIF hold.hold.estimated_wait;
+                                    l("Estimated wait (days): ");
+                                    hold.hold.estimated_wait;
+                                ELSIF hold.hold.status == 3;
+                                    l("In Transit");
+                                ELSIF hold.hold.status < 3;
+                                    l("Waiting for copy");
+                                END;
+                            %]
                         </div>
                     </td>
                     <td width="62" align="right"
@@ -171,6 +195,7 @@
                             class="hide_me">Back</a>
                     </td>
                 </tr>
+                [% END %]
             </tbody>
         </table>
     </div>
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index ac6c7ae..29dfb10 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -28,7 +28,10 @@
                     <img src="[% ctx.media_prefix %]/images/acct_sum_fines_br.png" />
                 </div>
             </div>
-            Fines: <span id="myopac_sum_fines_bal">$0.00</span><br />
+            Fines:
+            <span id="myopac_sum_fines_bal" class='[% ctx.user_stats.fines.balance_owed ? "red" : ""%]'>
+                [% money(ctx.user_stats.fines.balance_owed) %]
+            </span><br />
             <a class="hide_me" href="#" id="pay_fines_btn1"><img
                 alt="Pay Fines"
                 onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
@@ -114,13 +117,10 @@
                     </tr>
                 </thead>
                 <tbody id='myopac_fines_summary_tbody'>
-                    <tr id='myopac_fines_summary_loading'>
-                        <td>[% l("Loading...") %]</td>
-                    </tr>
-                    <tr id='myopac_fines_summary_row' class='hide_me'>
-                        <td id='myopac_fines_summary_total' >[% l("\$") %]</td>
-                        <td id='myopac_fines_summary_paid' >[% l("\$") %]</td>
-                        <td id='myopac_fines_summary_balance' style='color:red;font-weight: bold;'>[% l("\$") %]</td>
+                    <tr id='myopac_fines_summary_row'>
+                        <td id='myopac_fines_summary_total'>[% money(ctx.user_stats.fines.total_owed) %]</td>
+                        <td id='myopac_fines_summary_paid'>[% money(ctx.user_stats.fines.total_paid) %]</td>
+                        <td id='myopac_fines_summary_balance' style='color:red;font-weight: bold;'>[% money(ctx.user_stats.fines.balance_owed) %]</td>
                     </tr>
                 </tbody>
             </table>
diff --git a/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
index 1eb24d3..d41caa1 100644
--- a/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
@@ -28,8 +28,7 @@
             </div>
         </div>
         <div id="main-content">
-            <div class="common-full-pad"></div>
             [% content %]
-            <div class="clear-both"></div>
+            <div class="common-full-pad"></div>
         </div>
     </div>

commit a545b236c1d4d764268a8290bbd4f6d88c2913ca
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 14 11:36:50 2011 -0500

    Move USE * from topnav.tt2 to new header.tt2; also some myopac work
    
    Minor progress in myopac/main and myopac/circs

diff --git a/Open-ILS/web/templates/default/opac/advanced.tt2 b/Open-ILS/web/templates/default/opac/advanced.tt2
index 6479a53..9c6c354 100644
--- a/Open-ILS/web/templates/default/opac/advanced.tt2
+++ b/Open-ILS/web/templates/default/opac/advanced.tt2
@@ -1,4 +1,5 @@
-[%  WRAPPER "default/opac/parts/base.tt2";
+[%  PROCESS "default/opac/parts/header.tt2";
+    WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = "Advanced Search" %]
     <div id="search-wrapper">
diff --git a/Open-ILS/web/templates/default/opac/home.tt2 b/Open-ILS/web/templates/default/opac/home.tt2
index be26963..11edbdf 100644
--- a/Open-ILS/web/templates/default/opac/home.tt2
+++ b/Open-ILS/web/templates/default/opac/home.tt2
@@ -1,4 +1,5 @@
-[%  WRAPPER "default/opac/parts/base.tt2";
+[%  PROCESS "default/opac/parts/header.tt2";
+    WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = "Home" %]
     <div id="search-wrapper">
diff --git a/Open-ILS/web/templates/default/opac/login.tt2 b/Open-ILS/web/templates/default/opac/login.tt2
index 2452281..67e76f1 100644
--- a/Open-ILS/web/templates/default/opac/login.tt2
+++ b/Open-ILS/web/templates/default/opac/login.tt2
@@ -1,5 +1,5 @@
-[% USE CGI %]
-[%  WRAPPER "default/opac/parts/base.tt2";
+[%  PROCESS "default/opac/parts/header.tt2";
+    WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = "Account Login" %]
     <div id="search-wrapper">
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 8e6cc43..897b210 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -1,4 +1,5 @@
-[%  WRAPPER "default/opac/parts/base.tt2" +
+[%  PROCESS "default/opac/parts/header.tt2";
+    WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "circs"  %]
 <div id='myopac_checked_div' style="padding:0px;">
@@ -84,6 +85,7 @@
             <div id="acct_checked_temp">
                 <table cellpadding='0' cellspacing='0' border='0'
                     style="margin-top:5px;">
+                    [% FOR circ IN ctx.circs %]
                     <tr>
                         <td width="1%" style="padding-left:10px;" valign="top">
                             <input type="checkbox" name="check_all_checked" />
@@ -93,12 +95,21 @@
                             name="author">
                             <a href="#" name="title"></a>
                         </td>
-                        <td width="8%" name="renewals" align="center"></td>
+                        <td width="8%" name="renewals" align="center">
+                            [% circ.circ.renewal_remaining %]
+                        </td>
                         <td width="13%" style="padding-left:5px;"
-                            name="due_date"></td>
-                        <td width="16%" name="barcode"></td>
-                        <td width="22%" name="call_number"></td>
+                            name="due_date">
+                            [% date.format(ctx.parse_datetime(circ.circ.due_date),'%m/%d/%Y') %]
+                        </td>
+                        <td width="16%" name="barcode">
+                            [% circ.circ.target_copy.barcode %]
+                        </td>
+                        <td width="22%" name="call_number">
+                            [% circ.circ.target_copy.call_number.label %]
+                        </td>
                     </tr>
+                    [% END %]
                 </table>
             </div>
         </div>
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index c239066..ce06e6b 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -1,4 +1,5 @@
-[%  WRAPPER "default/opac/parts/base.tt2" +
+[%  PROCESS "default/opac/parts/header.tt2";
+    WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "holds"  %]
 <div id='myopac_holds_div'>
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index 2123f4b..c93fac5 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -1,4 +1,5 @@
-[%  WRAPPER "default/opac/parts/base.tt2" +
+[%  PROCESS "default/opac/parts/header.tt2";
+    WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "lists"  %]
 <div
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 1c1d077..ac6c7ae 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -1,4 +1,5 @@
-[%  WRAPPER "default/opac/parts/base.tt2" +
+[%  PROCESS "default/opac/parts/header.tt2";
+    WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "main"  %]
 <div id='myopac_summary_div' style="padding:0px;">
@@ -44,7 +45,7 @@
                             <td>
                                 Items Currently Checked out
                                 <span id="myopac_sum_checked" class="view_link">
-                                    (0)
+                                    ([% ctx.user_stats.checkouts.out %])
                                 </span>
                             </td>
                             <td align="right" class="view_link">
@@ -59,7 +60,7 @@
                             <td>
                                 Items Currently on Hold
                                 <span id="myopac_sum_holds" class="view_link">
-                                    (0)
+                                    ([% ctx.user_stats.holds.total %])
                                 </span>
                             </td>
                             <td align="right" class="view_link">
@@ -74,7 +75,7 @@
                             <td>
                                 Items ready for pickup
                                 <span id="myopac_sum_pickup" class="view_link">
-                                    (0)
+                                    ([% ctx.user_stats.holds.ready %])
                                 </span>
                             </td>
                             <td align="right" class="view_link">
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
index ea6fb15..0545872 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
@@ -1,4 +1,5 @@
-[%  WRAPPER "default/opac/parts/base.tt2" +
+[%  PROCESS "default/opac/parts/header.tt2";
+    WRAPPER "default/opac/parts/base.tt2" +
         "default/opac/parts/myopac/base.tt2";
     myopac_page = "prefs"  %]
     <div id='myopac_prefs_div'>
diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2
new file mode 100644
index 0000000..08f0854
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/header.tt2
@@ -0,0 +1,4 @@
+[%- USE money = format('$%.2f');
+    USE date;
+    USE CGI; 
+    USE EGI18N; -%]
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index f07c6a0..712042e 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -66,7 +66,7 @@
                     <table border="0" cellpadding="0" width="100%">
                         <tr>
                             <td nowrap='nowrap' valign="top">
-                                [% IF attrs.isbn %]<strong id="rdetail_isbn_lbl" class="">[% l("ISBN") %]</strong>[% END %]
+                                [% IF attrs.isbn %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
                             </td>
                             <td valign="top" id='rdetail_isbn'>[% attrs.isbn %]</td>
                             <td nowrap='nowrap' valign="top">
@@ -96,18 +96,18 @@
                             </td>
                             <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_sum_lbl" class="">Summary</strong>
+                                <strong id="rdetail_sum_lbl">Summary</strong>
                             </td>
                             <td valign="top" id='rdetail_abstract'></td>
                         </tr>
                         <tr>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_pub_lbl" class="">[% IF attrs.publisher; l("Publisher"); END %]</strong>
+                                <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
                             </td>
                             <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
                             <td nowrap='nowrap' valign="top">
                                 [%# XXX TODO see kcls' drawMarcSubjects() in rdetail.js %]
-                                <strong id="rdetail_sub_lbl" class="hide_me">[% l("Subjects") %]</strong>
+                                <strong id="rdetail_sub_lbl">[% l("Subjects") %]</strong>
                             </td>
                             <td valign="top"></td>
                         </tr>
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
index c0a9c0a..4b4bda5 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@ -1,6 +1,3 @@
-[%- USE money = format('$%.2f');
-    USE CGI; 
-    USE EGI18N; -%]
 <div id="header">
     <div class="float-left">
         <a href="http://www.kcls.org"><img alt="KCLS Logo"
diff --git a/Open-ILS/web/templates/default/opac/place_hold.tt2 b/Open-ILS/web/templates/default/opac/place_hold.tt2
index 43e8ab2..95c7acb 100644
--- a/Open-ILS/web/templates/default/opac/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/place_hold.tt2
@@ -1,4 +1,5 @@
-[%  WRAPPER "default/opac/parts/base.tt2";
+[%  PROCESS "default/opac/parts/header.tt2";
+    WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = "Place Hold" %]
     <div id="search-wrapper">
diff --git a/Open-ILS/web/templates/default/opac/record.tt2 b/Open-ILS/web/templates/default/opac/record.tt2
index f046ddd..04e33cb 100644
--- a/Open-ILS/web/templates/default/opac/record.tt2
+++ b/Open-ILS/web/templates/default/opac/record.tt2
@@ -1,4 +1,5 @@
-[%  WRAPPER "default/opac/parts/base.tt2";
+[%  PROCESS "default/opac/parts/header.tt2";
+    WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = "Record Detail" %]
     <div id="search-wrapper">
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index d4351f2..147fe2b 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -1,4 +1,4 @@
-[%  USE CGI;
+[%  PROCESS "default/opac/parts/header.tt2";
     USE POSIX;
 
     WRAPPER "default/opac/parts/base.tt2";

commit 0d9685eb39d25cb1816841db9b0c73041fa59fd0
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Sun Feb 13 19:06:21 2011 -0500

    localization fixed for plac hold UI

diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index 7c99ec0..efe3092 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -44,7 +44,7 @@
         <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
             [% IF ctx.hold_failed_event %]
         <div>
-            <strong>Problem:</strong>
+            <strong>[% l('Problem:') %]</strong>
             <span title="[% ctx.hold_failed_event.textcode %]">
                 <em>[% ctx.hold_failed_event.desc ||
                         ctx.hold_failed_event.payload.fail_part ||
@@ -63,39 +63,41 @@
                 value="[% ctx.referer | replace('^http:', 'https:') | html %]" />
             <h1>Place Hold</h1>
             <p>
-                You would like to place a hold on
-                <strong><q>[% attrs.title %]</q></strong>
-                to be picked up at
-                <strong>
-                    <q>[% ctx.find_aou(ctx.default_pickup_lib).name %].</q>
-                </strong><br />
+                [% | l(attrs.title, ctx.find_aou(ctx.default_pickup_lib).name) %]
+                You would like to place a hold on <strong><q>[_1]</q></strong> to be picked up at [_2].
                 If this is correct, press <strong>SUBMIT</strong>.
+                [% END %]
             </p>
             <p>
-                If you would like to change the library pick up location, select
-                from the
+                [% l('If you would like to change the library pick up location, select from the location dropdown menu.') %]
+                <br class="clear-both" />
                 [% PROCESS "default/opac/parts/org_selector.tt2";
-                    PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib %]<br class="clear-both" />
-                Location dropdown menu.
+                    PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib %]
             </p>
-            <p>If you use the Traveling Library Center (TLC) and ABC Express
+            <p>
+                [% |l %]If you use the Traveling Library Center (TLC) and ABC Express
                 services, please select "Outreach" to have the item delivered
-                during your scheduled visit.</p>
-            <input type="image" name="submit" value="submit" title="Submit"
-                alt="Submit" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
+                during your scheduled visit.[% END %]
+            </p>
+            <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
+                alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             <a href="javascript:history.go(-1);" id="holds_cancel"><img
-                alt="Cancel" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+                alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
         </form>
         <br /><br />
-        <p>* If you need your item today, and it is checked in at your
+        <p>
+            [% |l %]* If you need your item today, and it is checked in at your
             library, please place your hold and then call your library to set it
             aside. Placing a hold without calling the library will increase your
-            wait time.<br /><a href="#">Library phone numbers.</a>
+            wait time.[% END %]
+            <br /><a href="#">[% l('Library phone numbers.') %]</a>
+        </p>
+        <p>
+            [% |l %]* For best possible service, we recommend keeping 
+            a printed copy of your most recent holds list.[% END %]
         </p>
-        <p>* For best possible service, we recommend keeping a printed copy of
-        your most recent holds list.</p>
-        [% END # ctx.hold_success %]
+        [% END %] <!-- ctx.hold_success -->
         <table width='90%' border="1" class="hide_me">
             <tbody>
                 <tr>
@@ -268,7 +270,10 @@
             [% l("The phone number does not have the correct format. The expected format is XXX-YYY-ZZZZ") %]
         </span>
         <span class='hide_me' id='hold_not_allowed'>
-            [% l("No items were found that could fulfill the requested holds.  It's possible that choosing a different format will result in a successful hold.  It is also possible that you have exceeded the number of allowable holds.  For further information, please consult your local librarian.") %]
+            [% |l %]No items were found that could fulfill the requested holds.  
+                It's possible that choosing a different format will result in a successful hold.  
+                It is also possible that you have exceeded the number of allowable holds.  
+                For further information, please consult your local librarian.[% END %]
         </span>
     </div>
     <div id="anonListTable" class="hide_me" style="margin-top: 6px;">
@@ -314,11 +319,23 @@
         <span name='m'>[% l("Electronic Resources") %]</span>
     </span>
 
-    <span class='hide_me' id='holds_explain_adv'>[% l("If you wish to broaden the scope of your hold to include other versions of this title, select the formats that would be acceptable.  The first available copy will be sent to you.") %]</span>
+    <span class='hide_me' id='holds_explain_adv'>
+        [% |l %]If you wish to broaden the scope of your hold to include other versions of this title, 
+        select the formats that would be acceptable.  The first available copy will be sent to you.[% END %]
+    </span>
+
     <span class='hide_me' id='holds_pick_good_org'>[% l("Please select a physical location where your hold can be delivered.") %]</span>
     <span class='hide_me' id='hold_dup_exists'>[% l("A hold already exists on the requested item.") %]</span>
     <span class='hide_me' id='hold_dup_exists_override'>[% l("A hold already exists on the requested item. Would you like to create the hold anyway?") %]</span>
-    <span id='hold_failed_patron_barred' class='hide_me'>[% l("PATRON BARRED. Please see any notes in the \"Staff Notes\" section of your \"My Account\" page or contact your local library.") %]</span>
-    <span id='invalid_hold' class='hide_me'>[% l("This hold is no longer valid. It's likely that the target for the hold was deleted from the system.  Please cancel this hold and place a new one.") %]</span>
+
+    <span id='hold_failed_patron_barred' class='hide_me'>
+        [% |l %]PATRON BARRED. Please see any notes in the "Staff Notes" section of your 
+        "My Account" page or contact your local library.[% END %]
+    </span>
+
+    <span id='invalid_hold' class='hide_me'>
+        [% |l %]This hold is no longer valid. It's likely that the target for the hold was 
+        deleted from the system.  Please cancel this hold and place a new one.[% END %]
+    </span>
     <span id='holds_invalid_recipient' class='hide_me'>[% l("The patron barcode entered as the hold recipient is invalid.") %]</span>
 </div>

commit 6910ec144d135b92700a9a91a2eb4e12d503e094
Merge: 9789351 a545b23
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Sun Feb 13 18:34:10 2011 -0500

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 978935141ae5d4a9c791c4d03adf7b7d4f1b7803
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Sun Feb 13 18:34:02 2011 -0500

    template cleanup;  localizing strings and mild style tweaks; more to come

diff --git a/Open-ILS/web/templates/default/opac/advanced.tt2 b/Open-ILS/web/templates/default/opac/advanced.tt2
index 6479a53..b9fe4c1 100644
--- a/Open-ILS/web/templates/default/opac/advanced.tt2
+++ b/Open-ILS/web/templates/default/opac/advanced.tt2
@@ -5,12 +5,9 @@
         [% INCLUDE "default/opac/parts/utils.tt2" %]
         <div id="adv_search_parent">
             <div id="adv_search_tabs">
-                <a href="#" alt="Advanced Search" id="adv_search"
-                    rel="adv_global_search"></a>
-                <a href="#" alt="Numeric Search" id="num_search"
-                    rel="adv_quick_search_sidebar"></a>
-                <a href="#" alt="Expert Search" id="expert_search"
-                    rel="adv_marc_search_sidebar"></a>
+                <a href="#" alt="[% l('Advanced Search') %]" id="adv_search"></a>
+                <a href="#" alt="[% l('Numeric Search') %]" id="num_search"></a>
+                <a href="#" alt="[% l('Expert Search') %]" id="expert_search"></a>
             </div>
         </div>
     </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index f0beef9..9872b85 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -57,20 +57,19 @@
                             <span>[% l("Item Form") %]</span>
                         </td>
                         <td align='left' class="hide_me">
-                            <select multiple='multiple' size='3'
-                                id='adv_global_item_form'>
+                            <select multiple='multiple' size='3' id='adv_global_item_form'>
                             </select>    
                         </td>
                         <td align='right'>
                             <span>[% l("Item Type") %]</span><br />
                         </td>
                         <td align='left'>
-                            <select multiple='multiple' size='3'
-                                id='adv_global_item_type' class='hide_me'>
+                            <select multiple='multiple' size='3' id='adv_global_item_type' class='hide_me'>
                             </select>    
-                            <select multiple='multiple' size='3'
-                                id='adv_global_item_type_basic'>
+                            <select multiple='multiple' size='3' id='adv_global_item_type_basic'>
                                 <option value=''>[% l("All Formats") %]</option>
+
+                                <!-- These will be replaced w/ SVF.  Leave them hard-coded for now -->
                                 <option value='a'>Book</option>
                                 <option value='i'>Book on cassette</option>
                                 <option value='n'>Book on CD</option>
@@ -105,26 +104,14 @@
                         </td>
                         <td align='right' class="hide_me">
                             <span>[% l("Literary Form") %]</span>
-                            <a id='adv_global_lit_form_link_adv'
-                                class='classic_link adv_adv_link'
-                                href='#'>[% l("Advanced") %]</a>
-
-                            <a id='adv_global_lit_form_link_basic'
-                                class='hide_me classic_link adv_adv_link'
-                                href='#'>[% l("Basic") %]</a>
+                            <a class='classic_link adv_adv_link' href='#'>[% l("Advanced") %]</a>
+                            <a class='hide_me classic_link adv_adv_link' href='#'>[% l("Basic") %]</a>
                         </td>
                         <td align='left' class="hide_me">
-                            <select multiple='multiple' size='3'
-                                id='adv_global_lit_form' class='hide_me'>
-                            </select>    
-                            <select multiple='multiple' size='3'
-                                id='adv_global_lit_form_basic'>
-                                <option value='0 '>
-                                    [% l("Non Fiction") %]
-                                </option>
-                                <option value='1'>
-                                    [% l("Fiction") %]
-                                </option>
+                            <select multiple='multiple' size='3' id='adv_global_lit_form' class='hide_me'> </select>    
+                            <select multiple='multiple' size='3' id='adv_global_lit_form_basic'> 
+                                <option value='0 '>[% l("Non Fiction") %]</option>
+                                <option value='1'>[% l("Fiction") %]</option>
                             </select>    
                         </td>
                         <td align='right'>
@@ -147,11 +134,9 @@
                                 href='#'>[% l("Basic") %]</a>
                         </td>
                         <td align='left' class="hide_me">
-                            <select multiple='multiple' size='3'
-                                id='adv_global_audience' class='hide_me'>
+                            <select multiple='multiple' size='3' id='adv_global_audience' class='hide_me'>
                             </select>
-                            <select multiple='multiple' size='3'
-                                id='adv_global_audience_basic'>
+                            <select multiple='multiple' size='3' id='adv_global_audience_basic'>
                                 <option value='e '>[% l("Adult") %]</option>
                                 <option value='abcdj'>[% l("Juvenile") %]</option>
                                 <option value='fg '>[% l("General") %]</option>
@@ -162,8 +147,7 @@
                             <span>[% l("Bib Level") %]</span>
                         </td>
                         <td align='left' class="hide_me">
-                            <select multiple='multiple' size='3'
-                                id='adv_global_bib_level'>
+                            <select multiple='multiple' size='3' id='adv_global_bib_level'>
                             </select>    
                         </td>
                     </tr>
@@ -173,27 +157,15 @@
                         </td>
                         <td align='left'>
                             <select id='adv_global_pub_date_type'>
-                                    <option value='equals' selected='selected'>
-                                        [% l("Is") %]
-                                    </option>
-                                    <option value='before'>
-                                        [% l("Before") %]
-                                    </option>
-                                    <option value='after'>
-                                        [% l("After") %]
-                                    </option>
-                                    <option value='between'>
-                                        [% l("Between") %]
-                                    </option>
+                                    <option value='equals' selected='selected'>[% l("Is") %] </option>
+                                    <option value='before'>[% l("Before") %]</option>
+                                    <option value='after'>[% l("After") %]</option>
+                                    <option value='between'>[% l("Between") %]</option>
                             </select>    
                             <div style='margin-top:5px;'>
-                                <input id='adv_global_pub_date_1' type='text'
-                                    size='4' maxlength='4'/>
-                                <span id='adv_global_pub_date_2_span'
-                                    class='hide_me'>
-                                    [% l("and") %] <input
-                                        id='adv_global_pub_date_2' type='text'
-                                        size='4' maxlength='4'/>
+                                <input id='adv_global_pub_date_1' type='text' size='4' maxlength='4'/>
+                                <span id='adv_global_pub_date_2_span' class='hide_me'>
+                                    [% l("and") %] <input id='adv_global_pub_date_2' type='text' size='4' maxlength='4'/>
                                 </span>
                             </div>
                         </td>
@@ -263,7 +235,7 @@
     <tr class='border_4_2'>
         <td align="left" colspan='2'>
             <!-- XXX TODO make a real form, and make this a real submitter -->
-        <img src="[% ctx.media_prefix %]/images/search_btn.gif" alt="Search"  style="cursor:pointer;" />
+        <img src="[% ctx.media_prefix %]/images/search_btn.gif" alt="[% l('Search') %]"  style="cursor:pointer;" />
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <!-- XXX TODO make a real form, and make this a real resetter -->
         <a href="javascript:;" style="position: relative; top: -9px;">Reset Form</a>
@@ -296,7 +268,7 @@
             <!-- XXX TODO make a real form, and make a real submitter (quick
             submit, FKA advGenericSearch() -->
             <img src="[% ctx.media_prefix %]/images/search_btn.gif"
-                alt="Search" id="adv_quick_submit" style="cursor:pointer;" />
+                alt="[% l('Search') %]" id="adv_quick_submit" style="cursor:pointer;" />
         </div>
     </div>
 </div>
@@ -320,20 +292,17 @@
             </tr>
             <tr name='crow' class='hide_me'>
                 <td colspan='4' align='center'>
-                    <a href='javascript:void(0);'
-                        class='classic_link'>[% l("close") %]</a>
+                    <a href='javascript:void(0);' class='classic_link'>[% l("close") %]</a>
                 </td>
             </tr>
         </tbody>
     </table>
     <div id='adv_marc_submit' class='adv_quick_search_submit'>
         <a style='margin-right: 4px; position:relative;top:-10px;'
-            class='classic_link'
-            href='javascript:advAddMARC();'>[% l("Add Row") %]</a>
+            class='classic_link' href='javascript:advAddMARC();'>[% l("Add Row") %]</a>
         <!-- XXX TODO make a real form, and make a real submitter (FKA
         advMARCRun()) -->
-        <img alt="Search" src="[% ctx.media_prefix %]/images/search_btn.gif"
-            style="cursor:pointer;" />
+        <img alt="Search" src="[% ctx.media_prefix %]/images/search_btn.gif" style="cursor:pointer;" />
     </div>
 </div>
 <!-- ****************** end: advanced_global.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/base.tt2 b/Open-ILS/web/templates/default/opac/parts/base.tt2
index c03df65..27652a5 100644
--- a/Open-ILS/web/templates/default/opac/parts/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/base.tt2
@@ -6,7 +6,7 @@
             href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto.css" />
         <link rel="stylesheet" type="text/css"
             href="[% ctx.media_prefix %]/css/skin/default/opac/style.css" />
-        <title>Catalog - King County Library - [% ctx.page_title %]</title>
+        <title>[% l('Catalog - King County Library - [_1]', ctx.page_title) %]</title>
         [%# <!-- is this needed? --><link rel="unapi-server"
             type="application/xml" title="unAPI" href="/opac/extras/unapi" />%]
         [% BLOCK html_head; END; # provide a default that can be overridden -%]
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index d4351f2..3ff51a7 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -18,13 +18,13 @@
         <div id="results_header_bar">
             <div id="results_header_inner">
                 <div class="results_header_btns">
-                    <a href="[% ctx.opac_root %]/home"><img alt="Another Search"
+                    <a href="[% ctx.opac_root %]/home"><img alt="[% l('Another Search') %]"
                         src="[% ctx.media_prefix %]/images/another_search.png"
                         onmouseover="this.src='[% ctx.media_prefix %]/images/another_search_hover.png';"
                         onmouseout="this.src='[% ctx.media_prefix %]/images/another_search.png';" /></a>
                 </div>
                 <div class="results_header_btns">
-                    <a href="[% ctx.opac_root %]/advanced"><img alt="Advanced Search"
+                    <a href="[% ctx.opac_root %]/advanced"><img alt="[% l('Advanced Search') %]"
                         src="[% ctx.media_prefix %]/images/adv_search.png"
                         onmouseover="this.src='[% ctx.media_prefix %]/images/adv_search_hover.png';"
                         onmouseout="this.src='[% ctx.media_prefix %]/images/adv_search.png';" /></a>
@@ -48,7 +48,7 @@
                 <div class="results_header_div"></div> -->
                 <input type="checkbox" id="limit_to_available" />
                 <label for="limit_to_available" class="results_header_lbl">
-                    Limit to available items
+                    [% l('Limit to available items') %]
                 </label>
                 <div class="clear-both"></div>
             </div>

commit a2d3a7865ba45ee6d430ba9de4fbd67c3c176bd8
Merge: 1754a52 141fb89
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Sun Feb 13 17:49:09 2011 -0500

    repiared merge conflict

diff --cc Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 45d9e84,203b5a0..2f9b93d
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@@ -240,6 -331,624 +240,5 @@@ sub load_logout 
      return Apache2::Const::REDIRECT;
  }
  
- 
 -# context additions: 
 -#   page_size
 -#   hit_count
 -#   records : list of bre's and copy-count objects
 -sub load_rresults {
 -    my $self = shift;
 -    my $cgi = $self->cgi;
 -    my $ctx = $self->ctx;
 -    my $e = $self->editor;
 -
 -    $ctx->{page} = 'rresult';
 -    my $page = $cgi->param('page') || 0;
 -    my $facet = $cgi->param('facet');
 -    my $query = $cgi->param('query');
 -    my $limit = $cgi->param('limit') || 10; # TODO user settings
 -
 -    my $loc = $cgi->param('loc') || $ctx->{aou_tree}->()->id;
 -    my $depth = defined $cgi->param('depth') ? 
 -        $cgi->param('depth') : $ctx->{find_aou}->($loc)->ou_type->depth;
 -
 -    my $args = {limit => $limit, offset => $page * $limit, org_unit => $loc, depth => $depth}; 
 -
 -    $query = "$query $facet" if $facet; # TODO
 -    my $results;
 -
 -    try {
 -
 -        my $method = 'open-ils.search.biblio.multiclass.query';
 -        $method .= '.staff' if $ctx->{is_staff};
 -        $results = $U->simplereq('open-ils.search', $method, $args, $query, 1);
 -
 -    } catch Error with {
 -        my $err = shift;
 -        $logger->error("multiclass search error: $err");
 -        $results = {count => 0, ids => []};
 -    };
 -
 -    my $rec_ids = [map { $_->[0] } @{$results->{ids}}];
 -
 -    $ctx->{records} = [];
 -    $ctx->{search_facets} = {};
 -    $ctx->{page_size} = $limit;
 -    $ctx->{hit_count} = $results->{count};
 -
 -    return Apache2::Const::OK if @$rec_ids == 0;
 -
 -    my $cstore1 = OpenSRF::AppSession->create('open-ils.cstore');
 -    my $bre_req = $cstore1->request(
 -        'open-ils.cstore.direct.biblio.record_entry.search', {id => $rec_ids});
 -
 -    my $search = OpenSRF::AppSession->create('open-ils.search');
 -    my $facet_req = $search->request('open-ils.search.facet_cache.retrieve', $results->{facet_key}, 10);
 -
 -    my @data;
 -    while(my $resp = $bre_req->recv) {
 -        my $bre = $resp->content; 
 -
 -        # XXX farm out to multiple cstore sessions before loop, then collect after
 -        my $copy_counts = $e->json_query(
 -            {from => ['asset.record_copy_count', 1, $bre->id, 0]})->[0];
 -
 -        push(@data,
 -            {
 -                bre => $bre,
 -                marc_xml => XML::LibXML->new->parse_string($bre->marc),
 -                copy_counts => $copy_counts
 -            }
 -        );
 -    }
 -
 -    $cstore1->kill_me;
 -
 -    # shove recs into context in search results order
 -    for my $rec_id (@$rec_ids) { 
 -        push(
 -            @{$ctx->{records}},
 -            grep { $_->{bre}->id == $rec_id } @data
 -        );
 -    }
 -
 -    my $facets = $facet_req->gather(1);
 -
 -    $facets->{$_} = {cmf => $ctx->{find_cmf}->($_), data => $facets->{$_}} for keys %$facets;  # quick-n-dirty
 -    $ctx->{search_facets} = $facets;
 -
 -    return Apache2::Const::OK;
 -}
 -
 -# context additions: 
 -#   record : bre object
 -sub load_record {
 -    my $self = shift;
 -    $self->ctx->{page} = 'record';
 -
 -    my $rec_id = $self->ctx->{page_args}->[0]
 -        or return Apache2::Const::HTTP_BAD_REQUEST;
 -
 -    $self->ctx->{record} = $self->editor->retrieve_biblio_record_entry([
 -        $rec_id,
 -        {
 -            flesh => 2, 
 -            flesh_fields => {
 -                bre => ['call_numbers'],
 -                acn => ['copies'] # limit, paging, etc.
 -            }
 -        }
 -    ]);
 -
 -    $self->ctx->{marc_xml} = XML::LibXML->new->parse_string($self->ctx->{record}->marc);
 -
 -    return Apache2::Const::OK;
 -}
 -
 -# context additions: 
 -#   user : au object, fleshed
 -sub load_myopac {
 -    my $self = shift;
 -    $self->ctx->{page} = 'myopac';
 -
 -    $self->ctx->{user} = $self->editor->retrieve_actor_user([
 -        $self->ctx->{user}->id,
 -        {
 -            flesh => 1,
 -            flesh_fields => {
 -                au => ['card']
 -                # ...
 -            }
 -        }
 -    ]);
 -
 -    return Apache2::Const::OK;
 -}
 -
 -
 -sub fetch_user_holds {
 -    my $self = shift;
 -    my $hold_ids = shift;
 -    my $ids_only = shift;
 -    my $flesh = shift;
 -    my $limit = shift;
 -    my $offset = shift;
 -
 -    my $e = $self->editor;
 -
 -    my $circ = OpenSRF::AppSession->create('open-ils.circ');
 -
 -    if(!$hold_ids) {
 -
 -        $hold_ids = $circ->request(
 -            'open-ils.circ.holds.id_list.retrieve.authoritative', 
 -            $e->authtoken, 
 -            $e->requestor->id
 -        )->gather(1);
 -    
 -        $hold_ids = [ grep { defined $_ } @$hold_ids[$offset..($offset + $limit - 1)] ] if $limit or $offset;
 -    }
 -
 -
 -    return $hold_ids if $ids_only or @$hold_ids == 0;
 -
 -    my $args = {
 -        suppress_notices => 1,
 -        suppress_transits => 1,
 -        suppress_mvr => 1,
 -        suppress_patron_details => 1,
 -        include_bre => $flesh ? 1 : 0
 -    };
 -
 -    # ----------------------------------------------------------------
 -    # batch version for testing;  initial test show 40% speed 
 -    # savings on larger sets (>20) of holds.
 -    # ----------------------------------------------------------------
 -    my $batch_size = 8;
 -    my $batch_idx = 0;
 -    my $mk_req_batch = sub {
 -        my @ses;
 -        my $top_idx = $batch_idx + $batch_size;
 -        while($batch_idx < $top_idx) {
 -            my $hold_id = $hold_ids->[$batch_idx++];
 -            last unless $hold_id;
 -            my $ses = OpenSRF::AppSession->create('open-ils.circ');
 -            my $req = $ses->request(
 -                'open-ils.circ.hold.details.retrieve', 
 -                $e->authtoken, $hold_id, $args);
 -            push(@ses, {ses => $ses, req => $req});
 -        }
 -        return @ses;
 -    };
 -
 -    my $first = 1;
 -    my @collected;
 -    my @holds;
 -    my @ses;
 -    while(1) {
 -        @ses = $mk_req_batch->() if $first;
 -        last if $first and not @ses;
 -        if(@collected) {
 -            while(my $blob = pop(@collected)) {
 -                $blob->{marc_xml} = XML::LibXML->new->parse_string($blob->{hold}->{bre}->marc) if $flesh;
 -                push(@holds, $blob);
 -            }
 -        }
 -        for my $req_data (@ses) {
 -            push(@collected, {hold => $req_data->{req}->gather(1)});
 -            $req_data->{ses}->kill_me;
 -        }
 -        @ses = $mk_req_batch->();
 -        last unless @collected or @ses;
 -        $first = 0;
 -    }
 -    # ----------------------------------------------------------------
 -
 -=head
 -    my $req = $circ->request(
 -        # TODO .authoritative version is chewing up cstores
 -        # 'open-ils.circ.hold.details.batch.retrieve.authoritative', 
 -        'open-ils.circ.hold.details.batch.retrieve', 
 -        $e->authtoken, $hold_ids, $args
 -    );
 -
 -    my @holds;
 -    while(my $resp = $req->recv) {
 -        my $hold = $resp->content;
 -        push(@holds, {
 -            hold => $hold,
 -            marc_xml => ($flesh) ? XML::LibXML->new->parse_string($hold->{bre}->marc) : undef
 -        });
 -    }
 -
 -    $circ->kill_me;
 -=cut
 -
 -    return \@holds;
 -}
 -
 -sub handle_hold_update {
 -    my $self = shift;
 -    my $action = shift;
 -    my $e = $self->editor;
 -
 -
 -    my @hold_ids = $self->cgi->param('hold_id'); # for non-_all actions
 -    @hold_ids = @{$self->fetch_user_holds(undef, 1)} if $action =~ /_all/;
 -
 -    my $circ = OpenSRF::AppSession->create('open-ils.circ');
 -
 -    if($action =~ /cancel/) {
 -
 -        for my $hold_id (@hold_ids) {
 -            my $resp = $circ->request(
 -                'open-ils.circ.hold.cancel', $e->authtoken, $hold_id, 6 )->gather(1); # 6 == patron-cancelled-via-opac
 -        }
 -
 -    } else {
 -        
 -        my $vlist = [];
 -        for my $hold_id (@hold_ids) {
 -            my $vals = {id => $hold_id};
 -
 -            if($action =~ /activate/) {
 -                $vals->{frozen} = 'f';
 -                $vals->{thaw_date} = undef;
 -
 -            } elsif($action =~ /suspend/) {
 -                $vals->{frozen} = 't';
 -                # $vals->{thaw_date} = TODO;
 -            }
 -            push(@$vlist, $vals);
 -        }
 -
 -        $circ->request('open-ils.circ.hold.update.batch.atomic', $e->authtoken, undef, $vlist)->gather(1);
 -    }
 -
 -    $circ->kill_me;
 -    return undef;
 -}
 -
 -sub load_myopac_holds {
 -    my $self = shift;
 -    my $e = $self->editor;
 -    my $ctx = $self->ctx;
 -    
 -
 -    my $limit = $self->cgi->param('limit') || 0;
 -    my $offset = $self->cgi->param('offset') || 0;
 -    my $action = $self->cgi->param('action') || '';
 -
 -    $self->handle_hold_update($action) if $action;
 -
 -    $ctx->{holds} = $self->fetch_user_holds(undef, 0, 1, $limit, $offset);
 -
 -    return Apache2::Const::OK;
 -}
 -
 -sub load_place_hold {
 -    my $self = shift;
 -    my $ctx = $self->ctx;
 -    my $e = $self->editor;
 -    my $cgi = $self->cgi;
 -    $self->ctx->{page} = 'place_hold';
 -
 -    $ctx->{hold_target} = $cgi->param('hold_target');
 -    $ctx->{hold_type} = $cgi->param('hold_type');
 -    $ctx->{default_pickup_lib} = $e->requestor->home_ou; # XXX staff
 -
 -    if($ctx->{hold_type} eq 'T') {
 -        $ctx->{record} = $e->retrieve_biblio_record_entry($ctx->{hold_target});
 -    }
 -    # ...
 -
 -    $ctx->{marc_xml} = XML::LibXML->new->parse_string($ctx->{record}->marc);
 -
 -    if(my $pickup_lib = $cgi->param('pickup_lib')) {
 -
 -        my $args = {
 -            patronid => $e->requestor->id,
 -            titleid => $ctx->{hold_target}, # XXX
 -            pickup_lib => $pickup_lib,
 -            depth => 0, # XXX
 -        };
 -
 -        my $allowed = $U->simplereq(
 -            'open-ils.circ',
 -            'open-ils.circ.title_hold.is_possible',
 -            $e->authtoken, $args
 -        );
 -
 -        if($allowed->{success} == 1) {
 -            my $hold = Fieldmapper::action::hold_request->new;
 -
 -            $hold->pickup_lib($pickup_lib);
 -            $hold->requestor($e->requestor->id);
 -            $hold->usr($e->requestor->id); # XXX staff
 -            $hold->target($ctx->{hold_target});
 -            $hold->hold_type($ctx->{hold_type});
 -            # frozen, expired, etc..
 -
 -            my $stat = $U->simplereq(
 -                'open-ils.circ',
 -                'open-ils.circ.holds.create',
 -                $e->authtoken, $hold
 -            );
 -
 -            if($stat and $stat > 0) {
 -                # if successful, return the user to the requesting page
 -                $self->apache->log->info("Redirecting back to " . $cgi->param('redirect_to'));
 -                $self->apache->print($cgi->redirect(-url => $cgi->param('redirect_to')));
 -                return Apache2::Const::REDIRECT;
 -
 -            } else {
 -                $ctx->{hold_failed} = 1;
 -            }
 -        } else { # hold *check* failed
 -            $ctx->{hold_failed} = 1; # XXX process the events, etc
 -            $ctx->{hold_failed_event} = $allowed->{last_event};
 -        }
 -
 -        # hold permit failed
 -        $logger->info('hold permit result ' . OpenSRF::Utils::JSON->perl2JSON($allowed));
 -    }
 -
 -    return Apache2::Const::OK;
 -}
 -
 -
 -sub fetch_user_circs {
 -    my $self = shift;
 -    my $flesh = shift; # flesh bib data, etc.
 -    my $circ_ids = shift;
 -    my $limit = shift;
 -    my $offset = shift;
 -
 -    my $e = $self->editor;
 -
 -    my @circ_ids;
 -
 -    if($circ_ids) {
 -        @circ_ids = @$circ_ids;
 -
 -    } else {
 -
 -        my $circ_data = $U->simplereq(
 -            'open-ils.actor', 
 -            'open-ils.actor.user.checked_out',
 -            $e->authtoken, 
 -            $e->requestor->id
 -        );
 -
 -        @circ_ids =  ( @{$circ_data->{overdue}}, @{$circ_data->{out}} );
 -
 -        if($limit or $offset) {
 -            @circ_ids = grep { defined $_ } @circ_ids[0..($offset + $limit - 1)];
 -        }
 -    }
 -
 -    return [] unless @circ_ids;
 -
 -    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
 -
 -    my $qflesh = {
 -        flesh => 3,
 -        flesh_fields => {
 -            circ => ['target_copy'],
 -            acp => ['call_number'],
 -            acn => ['record']
 -        }
 -    };
 -
 -    $e->xact_begin;
 -    my $circs = $e->search_action_circulation(
 -        [{id => \@circ_ids}, ($flesh) ? $qflesh : {}], {substream => 1});
 -
 -    my @circs;
 -    for my $circ (@$circs) {
 -        push(@circs, {
 -            circ => $circ, 
 -            marc_xml => ($flesh and $circ->target_copy->call_number->id != -1) ? 
 -                XML::LibXML->new->parse_string($circ->target_copy->call_number->record->marc) : 
 -                undef  # pre-cat copy, use the dummy title/author instead
 -        });
 -    }
 -    $e->xact_rollback;
 -
 -    # make sure the final list is in the correct order
 -    my @sorted_circs;
 -    for my $id (@circ_ids) {
 -        push(
 -            @sorted_circs,
 -            (grep { $_->{circ}->id == $id } @circs)
 -        );
 -    }
 -
 -    return \@sorted_circs;
 -}
 -
 -
 -sub handle_circ_renew {
 -    my $self = shift;
 -    my $action = shift;
 -    my $ctx = $self->ctx;
 -
 -    my @renew_ids = $self->cgi->param('circ');
 -
 -    my $circs = $self->fetch_user_circs(0, ($action eq 'renew') ? [@renew_ids] : undef);
 -
 -    # TODO: fire off renewal calls in batches to speed things up
 -    my @responses;
 -    for my $circ (@$circs) {
 -
 -        my $evt = $U->simplereq(
 -            'open-ils.circ', 
 -            'open-ils.circ.renew',
 -            $self->editor->authtoken,
 -            {
 -                patron_id => $self->editor->requestor->id,
 -                copy_id => $circ->{circ}->target_copy,
 -                opac_renewal => 1
 -            }
 -        );
 -
 -        # TODO return these, then insert them into the circ data 
 -        # blob that is shoved into the template for each circ
 -        # so the template won't have to match them
 -        push(@responses, {copy => $circ->{circ}->target_copy, evt => $evt});
 -    }
 -
 -    return @responses;
 -}
 -
 -
 -sub load_myopac_circs {
 -    my $self = shift;
 -    my $e = $self->editor;
 -    my $ctx = $self->ctx;
 -
 -    $ctx->{circs} = [];
 -    my $limit = $self->cgi->param('limit') || 0; # 0 == unlimited
 -    my $offset = $self->cgi->param('offset') || 0;
 -    my $action = $self->cgi->param('action') || '';
 -
 -    # perform the renewal first if necessary
 -    my @results = $self->handle_circ_renew($action) if $action =~ /renew/;
 -
 -    $ctx->{circs} = $self->fetch_user_circs(1, undef, $limit, $offset);
 -
 -    my $success_renewals = 0;
 -    my $failed_renewals = 0;
 -    for my $data (@{$ctx->{circs}}) {
 -        my ($resp) = grep { $_->{copy} == $data->{circ}->target_copy->id } @results;
 -
 -        if($resp) {
 -            my $evt = ref($resp->{evt}) eq 'ARRAY' ? $resp->{evt}->[0] : $resp->{evt};
 -            $data->{renewal_response} = $evt;
 -            $success_renewals++ if $evt->{textcode} eq 'SUCCESS';
 -            $failed_renewals++ if $evt->{textcode} ne 'SUCCESS';
 -        }
 -    }
 -
 -    $ctx->{success_renewals} = $success_renewals;
 -    $ctx->{failed_renewals} = $failed_renewals;
 -
 -    return Apache2::Const::OK;
 -}
 -
 -sub load_myopac_fines {
 -    my $self = shift;
 -    my $e = $self->editor;
 -    my $ctx = $self->ctx;
 -    $ctx->{"fines"} = {
 -        "circulation" => [],
 -        "grocery" => [],
 -        "total_paid" => 0,
 -        "total_owed" => 0,
 -        "balance_owed" => 0
 -    };
 -
 -    my $limit = $self->cgi->param('limit') || 0;
 -    my $offset = $self->cgi->param('offset') || 0;
 -
 -    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
 -
 -    # TODO: This should really be a ML call, but the existing calls 
 -    # return an excessive amount of data and don't offer streaming
 -
 -    my %paging = ($limit or $offset) ? (limit => $limit, offset => $offset) : ();
 -
 -    my $req = $cstore->request(
 -        'open-ils.cstore.direct.money.open_billable_transaction_summary.search',
 -        {
 -            usr => $e->requestor->id,
 -            balance_owed => {'!=' => 0}
 -        },
 -        {
 -            flesh => 4,
 -            flesh_fields => {
 -                mobts => ['circulation', 'grocery'],
 -                mg => ['billings'],
 -                mb => ['btype'],
 -                circ => ['target_copy'],
 -                acp => ['call_number'],
 -                acn => ['record']
 -            },
 -            order_by => { mobts => 'xact_start' },
 -            %paging
 -        }
 -    );
 -
 -    while(my $resp = $req->recv) {
 -        my $mobts = $resp->content;
 -        my $circ = $mobts->circulation;
 -
 -        my $last_billing;
 -        if($mobts->grocery) {
 -            my @billings = sort { $a->billing_ts cmp $b->billing_ts } @{$mobts->grocery->billings};
 -            $last_billing = pop(@billings);
 -        }
 -
 -        # XXX TODO switch to some money-safe non-fp library for math
 -        $ctx->{"fines"}->{$_} += $mobts->$_ for (
 -            qw/total_paid total_owed balance_owed/
 -        );
 -
 -        push(
 -            @{$ctx->{"fines"}->{$mobts->grocery ? "grocery" : "circulation"}},
 -            {
 -                xact => $mobts,
 -                last_grocery_billing => $last_billing,
 -                marc_xml => ($mobts->xact_type ne 'circulation' or $circ->target_copy->call_number->id == -1) ?
 -                    undef :
 -                    XML::LibXML->new->parse_string($circ->target_copy->call_number->record->marc),
 -            } 
 -        );
 -    }
 -
 -     return Apache2::Const::OK;
 -}       
 -
 -sub load_myopac_update_email {
 -    my $self = shift;
 -    my $e = $self->editor;
 -    my $ctx = $self->ctx;
 -    my $email = $self->cgi->param('email') || '';
 -
 -    unless($email =~ /.+\@.+\..+/) { # TODO better regex?
 -        $ctx->{invalid_email} = $email;
 -        return Apache2::Const::OK;
 -    }
 -
 -    my $stat = $U->simplereq(
 -        'open-ils.actor', 
 -        'open-ils.actor.user.email.update', 
 -        $e->authtoken, $email);
 -
 -    my $url = $self->apache->unparsed_uri;
 -    $url =~ s/update_email/main/;
 -    $self->apache->print($self->cgi->redirect(-url => $url));
 -
 -    return Apache2::Const::REDIRECT;
 -}
 -
 -sub load_myopac_bookbags {
 -    my $self = shift;
 -    my $e = $self->editor;
 -    my $ctx = $self->ctx;
 -    my $limit = $self->cgi->param('limit') || 0;
 -    my $offset = $self->cgi->param('offset') || 0;
 -
 -    my $args = {order_by => {cbreb => 'name'}};
 -    $args->{limit} = $limit if $limit;
 -    $args->{offset} = $limit if $limit;
 -
 -    $ctx->{bookbags} = $e->search_container_biblio_record_entry_bucket([
 -        {owner => $self->editor->requestor->id, btype => 'bookbag'},
 -        $args
 -    ]);
 -
 -    return Apache2::Const::OK;
 -}
 -
 -
  1;
 +
diff --cc Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 9dcebf8,0000000..ce275d4
mode 100644,000000..100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@@ -1,498 -1,0 +1,499 @@@
 +package OpenILS::WWW::EGCatLoader;
 +use strict; use warnings;
 +use Apache2::Const -compile => qw(OK DECLINED FORBIDDEN HTTP_INTERNAL_SERVER_ERROR REDIRECT HTTP_BAD_REQUEST);
 +use OpenSRF::Utils::Logger qw/$logger/;
 +use OpenILS::Utils::CStoreEditor qw/:funcs/;
 +use OpenILS::Utils::Fieldmapper;
 +use OpenILS::Application::AppUtils;
 +my $U = 'OpenILS::Application::AppUtils';
 +
 +
 +# context additions: 
 +#   user : au object, fleshed
 +sub load_myopac {
 +    my $self = shift;
 +    $self->ctx->{page} = 'myopac';
 +
 +    $self->ctx->{user} = $self->editor->retrieve_actor_user([
 +        $self->ctx->{user}->id,
 +        {
 +            flesh => 1,
 +            flesh_fields => {
 +                au => ['card']
 +                # ...
 +            }
 +        }
 +    ]);
 +
 +    return Apache2::Const::OK;
 +}
 +
 +
 +sub fetch_user_holds {
 +    my $self = shift;
 +    my $hold_ids = shift;
 +    my $ids_only = shift;
 +    my $flesh = shift;
 +    my $limit = shift;
 +    my $offset = shift;
 +
 +    my $e = $self->editor;
 +
 +    my $circ = OpenSRF::AppSession->create('open-ils.circ');
 +
 +    if(!$hold_ids) {
 +
 +        $hold_ids = $circ->request(
 +            'open-ils.circ.holds.id_list.retrieve.authoritative', 
 +            $e->authtoken, 
 +            $e->requestor->id
 +        )->gather(1);
 +    
 +        $hold_ids = [ grep { defined $_ } @$hold_ids[$offset..($offset + $limit - 1)] ] if $limit or $offset;
 +    }
 +
 +
 +    return $hold_ids if $ids_only or @$hold_ids == 0;
 +
 +    my $args = {
 +        suppress_notices => 1,
 +        suppress_transits => 1,
 +        suppress_mvr => 1,
 +        suppress_patron_details => 1,
 +        include_bre => $flesh ? 1 : 0
 +    };
 +
 +    # ----------------------------------------------------------------
 +    # Collect holds in batches of $batch_size for faster retrieval
 +
 +    my $batch_size = 8;
 +    my $batch_idx = 0;
 +    my $mk_req_batch = sub {
 +        my @ses;
 +        my $top_idx = $batch_idx + $batch_size;
 +        while($batch_idx < $top_idx) {
 +            my $hold_id = $hold_ids->[$batch_idx++];
 +            last unless $hold_id;
 +            my $ses = OpenSRF::AppSession->create('open-ils.circ');
 +            my $req = $ses->request(
 +                'open-ils.circ.hold.details.retrieve', 
 +                $e->authtoken, $hold_id, $args);
 +            push(@ses, {ses => $ses, req => $req});
 +        }
 +        return @ses;
 +    };
 +
 +    my $first = 1;
 +    my @collected;
 +    my @holds;
 +    my @ses;
 +    while(1) {
 +        @ses = $mk_req_batch->() if $first;
 +        last if $first and not @ses;
 +
 +        if(@collected) {
 +            while(my $blob = pop(@collected)) {
 +                $blob->{marc_xml} = XML::LibXML->new->parse_string($blob->{hold}->{bre}->marc) if $flesh;
 +                push(@holds, $blob);
 +            }
 +        }
 +
 +        for my $req_data (@ses) {
 +            push(@collected, {hold => $req_data->{req}->gather(1)});
 +            $req_data->{ses}->kill_me;
 +        }
 +
 +        @ses = $mk_req_batch->();
 +        last unless @collected or @ses;
 +        $first = 0;
 +    }
 +
 +    return \@holds;
 +}
 +
 +sub handle_hold_update {
 +    my $self = shift;
 +    my $action = shift;
 +    my $e = $self->editor;
 +
 +
 +    my @hold_ids = $self->cgi->param('hold_id'); # for non-_all actions
 +    @hold_ids = @{$self->fetch_user_holds(undef, 1)} if $action =~ /_all/;
 +
 +    my $circ = OpenSRF::AppSession->create('open-ils.circ');
 +
 +    if($action =~ /cancel/) {
 +
 +        for my $hold_id (@hold_ids) {
 +            my $resp = $circ->request(
 +                'open-ils.circ.hold.cancel', $e->authtoken, $hold_id, 6 )->gather(1); # 6 == patron-cancelled-via-opac
 +        }
 +
 +    } else {
 +        
 +        my $vlist = [];
 +        for my $hold_id (@hold_ids) {
 +            my $vals = {id => $hold_id};
 +
 +            if($action =~ /activate/) {
 +                $vals->{frozen} = 'f';
 +                $vals->{thaw_date} = undef;
 +
 +            } elsif($action =~ /suspend/) {
 +                $vals->{frozen} = 't';
 +                # $vals->{thaw_date} = TODO;
 +            }
 +            push(@$vlist, $vals);
 +        }
 +
 +        $circ->request('open-ils.circ.hold.update.batch.atomic', $e->authtoken, undef, $vlist)->gather(1);
 +    }
 +
 +    $circ->kill_me;
 +    return undef;
 +}
 +
 +sub load_myopac_holds {
 +    my $self = shift;
 +    my $e = $self->editor;
 +    my $ctx = $self->ctx;
 +    
 +
 +    my $limit = $self->cgi->param('limit') || 0;
 +    my $offset = $self->cgi->param('offset') || 0;
 +    my $action = $self->cgi->param('action') || '';
 +
 +    $self->handle_hold_update($action) if $action;
 +
 +    $ctx->{holds} = $self->fetch_user_holds(undef, 0, 1, $limit, $offset);
 +
 +    return Apache2::Const::OK;
 +}
 +
 +sub load_place_hold {
 +    my $self = shift;
 +    my $ctx = $self->ctx;
 +    my $e = $self->editor;
 +    my $cgi = $self->cgi;
 +    $self->ctx->{page} = 'place_hold';
 +
 +    $ctx->{hold_target} = $cgi->param('hold_target');
 +    $ctx->{hold_type} = $cgi->param('hold_type');
 +    $ctx->{default_pickup_lib} = $e->requestor->home_ou; # XXX staff
 +
 +    if($ctx->{hold_type} eq 'T') {
 +        $ctx->{record} = $e->retrieve_biblio_record_entry($ctx->{hold_target});
 +    }
 +    # ...
 +
 +    $ctx->{marc_xml} = XML::LibXML->new->parse_string($ctx->{record}->marc);
 +
 +    if(my $pickup_lib = $cgi->param('pickup_lib')) {
 +
 +        my $args = {
 +            patronid => $e->requestor->id,
 +            titleid => $ctx->{hold_target}, # XXX
 +            pickup_lib => $pickup_lib,
 +            depth => 0, # XXX
 +        };
 +
 +        my $allowed = $U->simplereq(
 +            'open-ils.circ',
 +            'open-ils.circ.title_hold.is_possible',
 +            $e->authtoken, $args
 +        );
 +
 +        if($allowed->{success} == 1) {
 +            my $hold = Fieldmapper::action::hold_request->new;
 +
 +            $hold->pickup_lib($pickup_lib);
 +            $hold->requestor($e->requestor->id);
 +            $hold->usr($e->requestor->id); # XXX staff
 +            $hold->target($ctx->{hold_target});
 +            $hold->hold_type($ctx->{hold_type});
 +            # frozen, expired, etc..
 +
 +            my $stat = $U->simplereq(
 +                'open-ils.circ',
 +                'open-ils.circ.holds.create',
 +                $e->authtoken, $hold
 +            );
 +
 +            if($stat and $stat > 0) {
- 
 +                # if successful, return the user to the requesting page
 +                $self->apache->log->info("Redirecting back to " . $cgi->param('redirect_to'));
 +                $self->apache->print($cgi->redirect(-url => $cgi->param('redirect_to')));
 +                return Apache2::Const::REDIRECT;
 +
 +            } else {
- 
-                 $ctx->{hold_failed} = 1; # XXX process the events, etc
++                $ctx->{hold_failed} = 1;
 +            }
++        } else { # hold *check* failed
++            $ctx->{hold_failed} = 1; # XXX process the events, etc
++            $ctx->{hold_failed_event} = $allowed->{last_event};
 +        }
 +
 +        # hold permit failed
 +        $logger->info('hold permit result ' . OpenSRF::Utils::JSON->perl2JSON($allowed));
 +    }
 +
 +    return Apache2::Const::OK;
 +}
 +
 +
 +sub fetch_user_circs {
 +    my $self = shift;
 +    my $flesh = shift; # flesh bib data, etc.
 +    my $circ_ids = shift;
 +    my $limit = shift;
 +    my $offset = shift;
 +
 +    my $e = $self->editor;
 +
 +    my @circ_ids;
 +
 +    if($circ_ids) {
 +        @circ_ids = @$circ_ids;
 +
 +    } else {
 +
 +        my $circ_data = $U->simplereq(
 +            'open-ils.actor', 
 +            'open-ils.actor.user.checked_out',
 +            $e->authtoken, 
 +            $e->requestor->id
 +        );
 +
 +        @circ_ids =  ( @{$circ_data->{overdue}}, @{$circ_data->{out}} );
 +
 +        if($limit or $offset) {
 +            @circ_ids = grep { defined $_ } @circ_ids[0..($offset + $limit - 1)];
 +        }
 +    }
 +
 +    return [] unless @circ_ids;
 +
 +    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
 +
 +    my $qflesh = {
 +        flesh => 3,
 +        flesh_fields => {
 +            circ => ['target_copy'],
 +            acp => ['call_number'],
 +            acn => ['record']
 +        }
 +    };
 +
 +    $e->xact_begin;
 +    my $circs = $e->search_action_circulation(
 +        [{id => \@circ_ids}, ($flesh) ? $qflesh : {}], {substream => 1});
 +
 +    my @circs;
 +    for my $circ (@$circs) {
 +        push(@circs, {
 +            circ => $circ, 
 +            marc_xml => ($flesh and $circ->target_copy->call_number->id != -1) ? 
 +                XML::LibXML->new->parse_string($circ->target_copy->call_number->record->marc) : 
 +                undef  # pre-cat copy, use the dummy title/author instead
 +        });
 +    }
 +    $e->xact_rollback;
 +
 +    # make sure the final list is in the correct order
 +    my @sorted_circs;
 +    for my $id (@circ_ids) {
 +        push(
 +            @sorted_circs,
 +            (grep { $_->{circ}->id == $id } @circs)
 +        );
 +    }
 +
 +    return \@sorted_circs;
 +}
 +
 +
 +sub handle_circ_renew {
 +    my $self = shift;
 +    my $action = shift;
 +    my $ctx = $self->ctx;
 +
 +    my @renew_ids = $self->cgi->param('circ');
 +
 +    my $circs = $self->fetch_user_circs(0, ($action eq 'renew') ? [@renew_ids] : undef);
 +
 +    # TODO: fire off renewal calls in batches to speed things up
 +    my @responses;
 +    for my $circ (@$circs) {
 +
 +        my $evt = $U->simplereq(
 +            'open-ils.circ', 
 +            'open-ils.circ.renew',
 +            $self->editor->authtoken,
 +            {
 +                patron_id => $self->editor->requestor->id,
 +                copy_id => $circ->{circ}->target_copy,
 +                opac_renewal => 1
 +            }
 +        );
 +
 +        # TODO return these, then insert them into the circ data 
 +        # blob that is shoved into the template for each circ
 +        # so the template won't have to match them
 +        push(@responses, {copy => $circ->{circ}->target_copy, evt => $evt});
 +    }
 +
 +    return @responses;
 +}
 +
 +
 +sub load_myopac_circs {
 +    my $self = shift;
 +    my $e = $self->editor;
 +    my $ctx = $self->ctx;
 +
 +    $ctx->{circs} = [];
 +    my $limit = $self->cgi->param('limit') || 0; # 0 == unlimited
 +    my $offset = $self->cgi->param('offset') || 0;
 +    my $action = $self->cgi->param('action') || '';
 +
 +    # perform the renewal first if necessary
 +    my @results = $self->handle_circ_renew($action) if $action =~ /renew/;
 +
 +    $ctx->{circs} = $self->fetch_user_circs(1, undef, $limit, $offset);
 +
 +    my $success_renewals = 0;
 +    my $failed_renewals = 0;
 +    for my $data (@{$ctx->{circs}}) {
 +        my ($resp) = grep { $_->{copy} == $data->{circ}->target_copy->id } @results;
 +
 +        if($resp) {
 +            my $evt = ref($resp->{evt}) eq 'ARRAY' ? $resp->{evt}->[0] : $resp->{evt};
 +            $data->{renewal_response} = $evt;
 +            $success_renewals++ if $evt->{textcode} eq 'SUCCESS';
 +            $failed_renewals++ if $evt->{textcode} ne 'SUCCESS';
 +        }
 +    }
 +
 +    $ctx->{success_renewals} = $success_renewals;
 +    $ctx->{failed_renewals} = $failed_renewals;
 +
 +    return Apache2::Const::OK;
 +}
 +
 +sub load_myopac_fines {
 +    my $self = shift;
 +    my $e = $self->editor;
 +    my $ctx = $self->ctx;
 +    $ctx->{"fines"} = {
 +        "circulation" => [],
 +        "grocery" => [],
 +        "total_paid" => 0,
 +        "total_owed" => 0,
 +        "balance_owed" => 0
 +    };
 +
 +    my $limit = $self->cgi->param('limit') || 0;
 +    my $offset = $self->cgi->param('offset') || 0;
 +
 +    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
 +
 +    # TODO: This should really be a ML call, but the existing calls 
 +    # return an excessive amount of data and don't offer streaming
 +
 +    my %paging = ($limit or $offset) ? (limit => $limit, offset => $offset) : ();
 +
 +    my $req = $cstore->request(
 +        'open-ils.cstore.direct.money.open_billable_transaction_summary.search',
 +        {
 +            usr => $e->requestor->id,
 +            balance_owed => {'!=' => 0}
 +        },
 +        {
 +            flesh => 4,
 +            flesh_fields => {
 +                mobts => ['circulation', 'grocery'],
 +                mg => ['billings'],
 +                mb => ['btype'],
 +                circ => ['target_copy'],
 +                acp => ['call_number'],
 +                acn => ['record']
 +            },
 +            order_by => { mobts => 'xact_start' },
 +            %paging
 +        }
 +    );
 +
 +    while(my $resp = $req->recv) {
 +        my $mobts = $resp->content;
 +        my $circ = $mobts->circulation;
 +
 +        my $last_billing;
 +        if($mobts->grocery) {
 +            my @billings = sort { $a->billing_ts cmp $b->billing_ts } @{$mobts->grocery->billings};
 +            $last_billing = pop(@billings);
 +        }
 +
 +        # XXX TODO switch to some money-safe non-fp library for math
 +        $ctx->{"fines"}->{$_} += $mobts->$_ for (
 +            qw/total_paid total_owed balance_owed/
 +        );
 +
 +        push(
 +            @{$ctx->{"fines"}->{$mobts->grocery ? "grocery" : "circulation"}},
 +            {
 +                xact => $mobts,
 +                last_grocery_billing => $last_billing,
 +                marc_xml => ($mobts->xact_type ne 'circulation' or $circ->target_copy->call_number->id == -1) ?
 +                    undef :
 +                    XML::LibXML->new->parse_string($circ->target_copy->call_number->record->marc),
 +            } 
 +        );
 +    }
 +
 +     return Apache2::Const::OK;
 +}       
 +
 +sub load_myopac_update_email {
 +    my $self = shift;
 +    my $e = $self->editor;
 +    my $ctx = $self->ctx;
 +    my $email = $self->cgi->param('email') || '';
 +
 +    unless($email =~ /.+\@.+\..+/) { # TODO better regex?
 +        $ctx->{invalid_email} = $email;
 +        return Apache2::Const::OK;
 +    }
 +
 +    my $stat = $U->simplereq(
 +        'open-ils.actor', 
 +        'open-ils.actor.user.email.update', 
 +        $e->authtoken, $email);
 +
 +    my $url = $self->apache->unparsed_uri;
 +    $url =~ s/update_email/main/;
 +    $self->apache->print($self->cgi->redirect(-url => $url));
 +
 +    return Apache2::Const::REDIRECT;
 +}
 +
 +sub load_myopac_bookbags {
 +    my $self = shift;
 +    my $e = $self->editor;
 +    my $ctx = $self->ctx;
 +    my $limit = $self->cgi->param('limit') || 0;
 +    my $offset = $self->cgi->param('offset') || 0;
 +
 +    my $args = {order_by => {cbreb => 'name'}};
 +    $args->{limit} = $limit if $limit;
 +    $args->{offset} = $limit if $limit;
 +
 +    $ctx->{bookbags} = $e->search_container_biblio_record_entry_bucket([
 +        {owner => $self->editor->requestor->id, btype => 'bookbag'},
 +        $args
 +    ]);
 +
 +    return Apache2::Const::OK;
 +}
 +
 +
 +1

commit 141fb8994fde8af1a1904bfc5219f7291d81c079
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 14 10:39:54 2011 -0500

    hold placement works better

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index f303af7..203b5a0 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -675,16 +675,17 @@ sub load_place_hold {
             );
 
             if($stat and $stat > 0) {
-
                 # if successful, return the user to the requesting page
                 $self->apache->log->info("Redirecting back to " . $cgi->param('redirect_to'));
                 $self->apache->print($cgi->redirect(-url => $cgi->param('redirect_to')));
                 return Apache2::Const::REDIRECT;
 
             } else {
-
-                $ctx->{hold_failed} = 1; # XXX process the events, etc
+                $ctx->{hold_failed} = 1;
             }
+        } else { # hold *check* failed
+            $ctx->{hold_failed} = 1; # XXX process the events, etc
+            $ctx->{hold_failed_event} = $allowed->{last_event};
         }
 
         # hold permit failed
diff --git a/Open-ILS/web/templates/default/opac-poc/place_hold.tt2 b/Open-ILS/web/templates/default/opac-poc/place_hold.tt2
index 91996ad..bfbee07 100644
--- a/Open-ILS/web/templates/default/opac-poc/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac-poc/place_hold.tt2
@@ -23,9 +23,9 @@
     <form action='place_hold' method='POST'>
         Choose a pickup Library [% PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib %]
         <input type='Submit'/>
-        <input type='hidden' name='hold_target' value='[% CGI.param('hold_target') %]'/>
-        <input type='hidden' name='hold_type' value='[% CGI.param('hold_type') %]'/>
-        <input type='hidden' name='redirect_to' value='[% ctx.referer %]'/>
+        <input type='hidden' name='hold_target' value='[% CGI.param('hold_target') | html %]'/>
+        <input type='hidden' name='hold_type' value='[% CGI.param('hold_type') | html %]'/>
+        <input type='hidden' name='redirect_to' value='[% ctx.referer | html %]'/>
     </form>
     [% END %]
 </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index b91d3b7..7c99ec0 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -38,6 +38,21 @@
         <b>[% l("Checking for possibility of hold fulfillment...") %]</b>
     </div>
     <div id='holds_box' class='canvas' style='margin-top: 6px;'>
+        [% IF ctx.hold_success %]
+        <div><big><strong>[% l("Hold was successfully placed"); %]</strong></big></div>
+        [% ELSIF ctx.hold_failed %]
+        <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
+            [% IF ctx.hold_failed_event %]
+        <div>
+            <strong>Problem:</strong>
+            <span title="[% ctx.hold_failed_event.textcode %]">
+                <em>[% ctx.hold_failed_event.desc ||
+                        ctx.hold_failed_event.payload.fail_part ||
+                        ctx.hold_failed_event.textcode %]</em>
+            </span>
+        </div>
+            [% END;
+        ELSE %]
         <form method="POST">
             <br/>
             <input type="hidden" name="hold_target"
@@ -80,6 +95,7 @@
         </p>
         <p>* For best possible service, we recommend keeping a printed copy of
         your most recent holds list.</p>
+        [% END # ctx.hold_success %]
         <table width='90%' border="1" class="hide_me">
             <tbody>
                 <tr>

commit 1754a52a505eaf6d486fc1b0f4c781cb280949f1
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Sun Feb 13 17:44:04 2011 -0500

    moved some code out of the main catloader module into function-specific sub-modules.  Note, sub-modules still retain the OpenILS::WWW::EGCatLoader package name to ease subclassing of the top-level loader object

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index f303af7..45d9e84 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -14,6 +14,13 @@ use OpenILS::Application::AppUtils;
 use OpenILS::Utils::CStoreEditor qw/:funcs/;
 use OpenILS::Utils::Fieldmapper;
 use DateTime::Format::ISO8601;
+
+# EGCatLoader sub-modules 
+use OpenILS::WWW::EGCatLoader::Util;
+use OpenILS::WWW::EGCatLoader::Account;
+use OpenILS::WWW::EGCatLoader::Search;
+use OpenILS::WWW::EGCatLoader::Record;
+
 my $U = 'OpenILS::Application::AppUtils';
 
 sub new {
@@ -61,11 +68,14 @@ sub cgi {
 }
 
 
-# load common data, then load page data
+# -----------------------------------------------------------------------------
+# Perform initial setup, load common data, then load page data
+# -----------------------------------------------------------------------------
 sub load {
     my $self = shift;
 
-    $self->load_helpers;
+    $self->init_ro_object_cache;
+
     my $stat = $self->load_common;
     return $stat unless $stat == Apache2::Const::OK;
 
@@ -100,119 +110,18 @@ sub load {
     return Apache2::Const::OK;
 }
 
-# general purpose utility functions added to the environment
-
-my %cache = (
-    map => {aou => {}}, # others added dynamically as needed
-    list => {},
-    org_settings => {}
-);
-
-sub load_helpers {
-    my $self = shift;
-    my $e = $self->editor;
-    my $ctx = $self->ctx;
-
-    # fetch-on-demand-and-cache subs for commonly used public data
-    my @public_classes = qw/ccs aout cifm citm clm cmf/;
-
-    for my $hint (@public_classes) {
-
-        my ($class) = grep {
-            $Fieldmapper::fieldmap->{$_}->{hint} eq $hint
-        } keys %{ $Fieldmapper::fieldmap };
-
-        my $ident_field =  $Fieldmapper::fieldmap->{$class}->{identity};
-
-	    $class =~ s/Fieldmapper:://o;
-	    $class =~ s/::/_/g;
-
-        # copy statuses
-        my $list_key = $hint . '_list';
-        my $find_key = "find_$hint";
-
-        $ctx->{$list_key} = sub {
-            my $method = "retrieve_all_$class";
-            $cache{list}{$hint} = $e->$method() unless $cache{list}{$hint};
-            return $cache{list}{$hint};
-        };
-    
-        $cache{map}{$hint} = {} unless $cache{map}{$hint};
-
-        $ctx->{$find_key} = sub {
-            my $id = shift;
-            return $cache{map}{$hint}{$id} if $cache{map}{$hint}{$id}; 
-            ($cache{map}{$hint}{$id}) = grep { $_->$ident_field eq $id } @{$ctx->{$list_key}->()};
-            return $cache{map}{$hint}{$id};
-        };
-
-    }
-
-    $ctx->{aou_tree} = sub {
-
-        # fetch the org unit tree
-        unless($cache{aou_tree}) {
-            my $tree = $e->search_actor_org_unit([
-			    {   parent_ou => undef},
-			    {   flesh            => -1,
-				    flesh_fields    => {aou =>  ['children']},
-				    order_by        => {aou => 'name'}
-			    }
-		    ])->[0];
-
-            # flesh the org unit type for each org unit
-            # and simultaneously set the id => aou map cache
-            sub flesh_aout {
-                my $node = shift;
-                my $ctx = shift;
-                $node->ou_type( $ctx->{find_aout}->($node->ou_type) );
-                $cache{map}{aou}{$node->id} = $node;
-                flesh_aout($_, $ctx) foreach @{$node->children};
-            };
-            flesh_aout($tree, $ctx);
-
-            $cache{aou_tree} = $tree;
-        }
-
-        return $cache{aou_tree};
-    };
-
-    # Add a special handler for the tree-shaped org unit cache
-    $ctx->{find_aou} = sub {
-        my $org_id = shift;
-        $ctx->{aou_tree}->(); # force the org tree to load
-        return $cache{map}{aou}{$org_id};
-    };
-
-    # turns an ISO date into something TT can understand
-    $ctx->{parse_datetime} = sub {
-        my $date = shift;
-        $date = DateTime::Format::ISO8601->new->parse_datetime(cleanse_ISO8601($date));
-        return sprintf(
-            "%0.2d:%0.2d:%0.2d %0.2d-%0.2d-%0.4d",
-            $date->hour,
-            $date->minute,
-            $date->second,
-            $date->day,
-            $date->month,
-            $date->year
-        );
-    };
-
-    # retrieve and cache org unit setting values
-    $ctx->{get_org_setting} = sub {
-        my($org_id, $setting) = @_;
-        $cache{org_settings}{$org_id} = {} unless $cache{org_settings}{$org_id};
-        $cache{org_settings}{$org_id}{$setting} = $U->ou_ancestor_setting_value($org_id, $setting)
-            unless exists $cache{org_settings}{$org_id}{$setting};
-        return $cache{org_settings}{$org_id}{$setting};
-    };
+# -----------------------------------------------------------------------------
+# Fall-through for loading a basic page
+# -----------------------------------------------------------------------------
+sub load_simple {
+    my ($self, $page) = @_;
+    $self->ctx->{page} = $page;
+    return Apache2::Const::OK;
 }
 
-# context additions: 
-#   authtoken : string
-#   user : au object
-#   user_status : hash of user circ numbers
+# -----------------------------------------------------------------------------
+# Tests to see if the user is authenticated and sets some common context values
+# -----------------------------------------------------------------------------
 sub load_common {
     my $self = shift;
 
@@ -244,13 +153,10 @@ sub load_common {
     return Apache2::Const::OK;
 }
 
-sub load_simple {
-    my ($self, $page) = @_;
-    $self->ctx->{page} = $page;
-    return Apache2::Const::OK;
-}
-
 
+# -----------------------------------------------------------------------------
+# Log in and redirect to the redirect_to URL (or home)
+# -----------------------------------------------------------------------------
 sub load_login {
     my $self = shift;
     my $cgi = $self->cgi;
@@ -311,6 +217,9 @@ sub load_login {
     return Apache2::Const::REDIRECT;
 }
 
+# -----------------------------------------------------------------------------
+# Log out and redirect to the home page
+# -----------------------------------------------------------------------------
 sub load_logout {
     my $self = shift;
 
@@ -331,623 +240,6 @@ sub load_logout {
     return Apache2::Const::REDIRECT;
 }
 
-# context additions: 
-#   page_size
-#   hit_count
-#   records : list of bre's and copy-count objects
-sub load_rresults {
-    my $self = shift;
-    my $cgi = $self->cgi;
-    my $ctx = $self->ctx;
-    my $e = $self->editor;
-
-    $ctx->{page} = 'rresult';
-    my $page = $cgi->param('page') || 0;
-    my $facet = $cgi->param('facet');
-    my $query = $cgi->param('query');
-    my $limit = $cgi->param('limit') || 10; # TODO user settings
-
-    my $loc = $cgi->param('loc') || $ctx->{aou_tree}->()->id;
-    my $depth = defined $cgi->param('depth') ? 
-        $cgi->param('depth') : $ctx->{find_aou}->($loc)->ou_type->depth;
-
-    my $args = {limit => $limit, offset => $page * $limit, org_unit => $loc, depth => $depth}; 
-
-    $query = "$query $facet" if $facet; # TODO
-    my $results;
-
-    try {
-
-        my $method = 'open-ils.search.biblio.multiclass.query';
-        $method .= '.staff' if $ctx->{is_staff};
-        $results = $U->simplereq('open-ils.search', $method, $args, $query, 1);
-
-    } catch Error with {
-        my $err = shift;
-        $logger->error("multiclass search error: $err");
-        $results = {count => 0, ids => []};
-    };
-
-    my $rec_ids = [map { $_->[0] } @{$results->{ids}}];
-
-    $ctx->{records} = [];
-    $ctx->{search_facets} = {};
-    $ctx->{page_size} = $limit;
-    $ctx->{hit_count} = $results->{count};
-
-    return Apache2::Const::OK if @$rec_ids == 0;
-
-    my $cstore1 = OpenSRF::AppSession->create('open-ils.cstore');
-    my $bre_req = $cstore1->request(
-        'open-ils.cstore.direct.biblio.record_entry.search', {id => $rec_ids});
-
-    my $search = OpenSRF::AppSession->create('open-ils.search');
-    my $facet_req = $search->request('open-ils.search.facet_cache.retrieve', $results->{facet_key}, 10);
-
-    my @data;
-    while(my $resp = $bre_req->recv) {
-        my $bre = $resp->content; 
-
-        # XXX farm out to multiple cstore sessions before loop, then collect after
-        my $copy_counts = $e->json_query(
-            {from => ['asset.record_copy_count', 1, $bre->id, 0]})->[0];
-
-        push(@data,
-            {
-                bre => $bre,
-                marc_xml => XML::LibXML->new->parse_string($bre->marc),
-                copy_counts => $copy_counts
-            }
-        );
-    }
-
-    $cstore1->kill_me;
-
-    # shove recs into context in search results order
-    for my $rec_id (@$rec_ids) { 
-        push(
-            @{$ctx->{records}},
-            grep { $_->{bre}->id == $rec_id } @data
-        );
-    }
-
-    my $facets = $facet_req->gather(1);
-
-    $facets->{$_} = {cmf => $ctx->{find_cmf}->($_), data => $facets->{$_}} for keys %$facets;  # quick-n-dirty
-    $ctx->{search_facets} = $facets;
-
-    return Apache2::Const::OK;
-}
-
-# context additions: 
-#   record : bre object
-sub load_record {
-    my $self = shift;
-    $self->ctx->{page} = 'record';
-
-    my $rec_id = $self->ctx->{page_args}->[0]
-        or return Apache2::Const::HTTP_BAD_REQUEST;
-
-    $self->ctx->{record} = $self->editor->retrieve_biblio_record_entry([
-        $rec_id,
-        {
-            flesh => 2, 
-            flesh_fields => {
-                bre => ['call_numbers'],
-                acn => ['copies'] # limit, paging, etc.
-            }
-        }
-    ]);
-
-    $self->ctx->{marc_xml} = XML::LibXML->new->parse_string($self->ctx->{record}->marc);
-
-    return Apache2::Const::OK;
-}
-
-# context additions: 
-#   user : au object, fleshed
-sub load_myopac {
-    my $self = shift;
-    $self->ctx->{page} = 'myopac';
-
-    $self->ctx->{user} = $self->editor->retrieve_actor_user([
-        $self->ctx->{user}->id,
-        {
-            flesh => 1,
-            flesh_fields => {
-                au => ['card']
-                # ...
-            }
-        }
-    ]);
-
-    return Apache2::Const::OK;
-}
-
-
-sub fetch_user_holds {
-    my $self = shift;
-    my $hold_ids = shift;
-    my $ids_only = shift;
-    my $flesh = shift;
-    my $limit = shift;
-    my $offset = shift;
-
-    my $e = $self->editor;
-
-    my $circ = OpenSRF::AppSession->create('open-ils.circ');
-
-    if(!$hold_ids) {
-
-        $hold_ids = $circ->request(
-            'open-ils.circ.holds.id_list.retrieve.authoritative', 
-            $e->authtoken, 
-            $e->requestor->id
-        )->gather(1);
-    
-        $hold_ids = [ grep { defined $_ } @$hold_ids[$offset..($offset + $limit - 1)] ] if $limit or $offset;
-    }
-
-
-    return $hold_ids if $ids_only or @$hold_ids == 0;
-
-    my $args = {
-        suppress_notices => 1,
-        suppress_transits => 1,
-        suppress_mvr => 1,
-        suppress_patron_details => 1,
-        include_bre => $flesh ? 1 : 0
-    };
-
-    # ----------------------------------------------------------------
-    # batch version for testing;  initial test show 40% speed 
-    # savings on larger sets (>20) of holds.
-    # ----------------------------------------------------------------
-    my $batch_size = 8;
-    my $batch_idx = 0;
-    my $mk_req_batch = sub {
-        my @ses;
-        my $top_idx = $batch_idx + $batch_size;
-        while($batch_idx < $top_idx) {
-            my $hold_id = $hold_ids->[$batch_idx++];
-            last unless $hold_id;
-            my $ses = OpenSRF::AppSession->create('open-ils.circ');
-            my $req = $ses->request(
-                'open-ils.circ.hold.details.retrieve', 
-                $e->authtoken, $hold_id, $args);
-            push(@ses, {ses => $ses, req => $req});
-        }
-        return @ses;
-    };
-
-    my $first = 1;
-    my @collected;
-    my @holds;
-    my @ses;
-    while(1) {
-        @ses = $mk_req_batch->() if $first;
-        last if $first and not @ses;
-        if(@collected) {
-            while(my $blob = pop(@collected)) {
-                $blob->{marc_xml} = XML::LibXML->new->parse_string($blob->{hold}->{bre}->marc) if $flesh;
-                push(@holds, $blob);
-            }
-        }
-        for my $req_data (@ses) {
-            push(@collected, {hold => $req_data->{req}->gather(1)});
-            $req_data->{ses}->kill_me;
-        }
-        @ses = $mk_req_batch->();
-        last unless @collected or @ses;
-        $first = 0;
-    }
-    # ----------------------------------------------------------------
-
-=head
-    my $req = $circ->request(
-        # TODO .authoritative version is chewing up cstores
-        # 'open-ils.circ.hold.details.batch.retrieve.authoritative', 
-        'open-ils.circ.hold.details.batch.retrieve', 
-        $e->authtoken, $hold_ids, $args
-    );
-
-    my @holds;
-    while(my $resp = $req->recv) {
-        my $hold = $resp->content;
-        push(@holds, {
-            hold => $hold,
-            marc_xml => ($flesh) ? XML::LibXML->new->parse_string($hold->{bre}->marc) : undef
-        });
-    }
-
-    $circ->kill_me;
-=cut
-
-    return \@holds;
-}
-
-sub handle_hold_update {
-    my $self = shift;
-    my $action = shift;
-    my $e = $self->editor;
-
-
-    my @hold_ids = $self->cgi->param('hold_id'); # for non-_all actions
-    @hold_ids = @{$self->fetch_user_holds(undef, 1)} if $action =~ /_all/;
-
-    my $circ = OpenSRF::AppSession->create('open-ils.circ');
-
-    if($action =~ /cancel/) {
-
-        for my $hold_id (@hold_ids) {
-            my $resp = $circ->request(
-                'open-ils.circ.hold.cancel', $e->authtoken, $hold_id, 6 )->gather(1); # 6 == patron-cancelled-via-opac
-        }
-
-    } else {
-        
-        my $vlist = [];
-        for my $hold_id (@hold_ids) {
-            my $vals = {id => $hold_id};
-
-            if($action =~ /activate/) {
-                $vals->{frozen} = 'f';
-                $vals->{thaw_date} = undef;
-
-            } elsif($action =~ /suspend/) {
-                $vals->{frozen} = 't';
-                # $vals->{thaw_date} = TODO;
-            }
-            push(@$vlist, $vals);
-        }
-
-        $circ->request('open-ils.circ.hold.update.batch.atomic', $e->authtoken, undef, $vlist)->gather(1);
-    }
-
-    $circ->kill_me;
-    return undef;
-}
-
-sub load_myopac_holds {
-    my $self = shift;
-    my $e = $self->editor;
-    my $ctx = $self->ctx;
-    
-
-    my $limit = $self->cgi->param('limit') || 0;
-    my $offset = $self->cgi->param('offset') || 0;
-    my $action = $self->cgi->param('action') || '';
-
-    $self->handle_hold_update($action) if $action;
-
-    $ctx->{holds} = $self->fetch_user_holds(undef, 0, 1, $limit, $offset);
-
-    return Apache2::Const::OK;
-}
-
-sub load_place_hold {
-    my $self = shift;
-    my $ctx = $self->ctx;
-    my $e = $self->editor;
-    my $cgi = $self->cgi;
-    $self->ctx->{page} = 'place_hold';
-
-    $ctx->{hold_target} = $cgi->param('hold_target');
-    $ctx->{hold_type} = $cgi->param('hold_type');
-    $ctx->{default_pickup_lib} = $e->requestor->home_ou; # XXX staff
-
-    if($ctx->{hold_type} eq 'T') {
-        $ctx->{record} = $e->retrieve_biblio_record_entry($ctx->{hold_target});
-    }
-    # ...
-
-    $ctx->{marc_xml} = XML::LibXML->new->parse_string($ctx->{record}->marc);
-
-    if(my $pickup_lib = $cgi->param('pickup_lib')) {
-
-        my $args = {
-            patronid => $e->requestor->id,
-            titleid => $ctx->{hold_target}, # XXX
-            pickup_lib => $pickup_lib,
-            depth => 0, # XXX
-        };
-
-        my $allowed = $U->simplereq(
-            'open-ils.circ',
-            'open-ils.circ.title_hold.is_possible',
-            $e->authtoken, $args
-        );
-
-        if($allowed->{success} == 1) {
-            my $hold = Fieldmapper::action::hold_request->new;
-
-            $hold->pickup_lib($pickup_lib);
-            $hold->requestor($e->requestor->id);
-            $hold->usr($e->requestor->id); # XXX staff
-            $hold->target($ctx->{hold_target});
-            $hold->hold_type($ctx->{hold_type});
-            # frozen, expired, etc..
-
-            my $stat = $U->simplereq(
-                'open-ils.circ',
-                'open-ils.circ.holds.create',
-                $e->authtoken, $hold
-            );
-
-            if($stat and $stat > 0) {
-
-                # if successful, return the user to the requesting page
-                $self->apache->log->info("Redirecting back to " . $cgi->param('redirect_to'));
-                $self->apache->print($cgi->redirect(-url => $cgi->param('redirect_to')));
-                return Apache2::Const::REDIRECT;
-
-            } else {
-
-                $ctx->{hold_failed} = 1; # XXX process the events, etc
-            }
-        }
-
-        # hold permit failed
-        $logger->info('hold permit result ' . OpenSRF::Utils::JSON->perl2JSON($allowed));
-    }
-
-    return Apache2::Const::OK;
-}
-
-
-sub fetch_user_circs {
-    my $self = shift;
-    my $flesh = shift; # flesh bib data, etc.
-    my $circ_ids = shift;
-    my $limit = shift;
-    my $offset = shift;
-
-    my $e = $self->editor;
-
-    my @circ_ids;
-
-    if($circ_ids) {
-        @circ_ids = @$circ_ids;
-
-    } else {
-
-        my $circ_data = $U->simplereq(
-            'open-ils.actor', 
-            'open-ils.actor.user.checked_out',
-            $e->authtoken, 
-            $e->requestor->id
-        );
-
-        @circ_ids =  ( @{$circ_data->{overdue}}, @{$circ_data->{out}} );
-
-        if($limit or $offset) {
-            @circ_ids = grep { defined $_ } @circ_ids[0..($offset + $limit - 1)];
-        }
-    }
-
-    return [] unless @circ_ids;
-
-    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
-
-    my $qflesh = {
-        flesh => 3,
-        flesh_fields => {
-            circ => ['target_copy'],
-            acp => ['call_number'],
-            acn => ['record']
-        }
-    };
-
-    $e->xact_begin;
-    my $circs = $e->search_action_circulation(
-        [{id => \@circ_ids}, ($flesh) ? $qflesh : {}], {substream => 1});
-
-    my @circs;
-    for my $circ (@$circs) {
-        push(@circs, {
-            circ => $circ, 
-            marc_xml => ($flesh and $circ->target_copy->call_number->id != -1) ? 
-                XML::LibXML->new->parse_string($circ->target_copy->call_number->record->marc) : 
-                undef  # pre-cat copy, use the dummy title/author instead
-        });
-    }
-    $e->xact_rollback;
-
-    # make sure the final list is in the correct order
-    my @sorted_circs;
-    for my $id (@circ_ids) {
-        push(
-            @sorted_circs,
-            (grep { $_->{circ}->id == $id } @circs)
-        );
-    }
-
-    return \@sorted_circs;
-}
-
-
-sub handle_circ_renew {
-    my $self = shift;
-    my $action = shift;
-    my $ctx = $self->ctx;
-
-    my @renew_ids = $self->cgi->param('circ');
-
-    my $circs = $self->fetch_user_circs(0, ($action eq 'renew') ? [@renew_ids] : undef);
-
-    # TODO: fire off renewal calls in batches to speed things up
-    my @responses;
-    for my $circ (@$circs) {
-
-        my $evt = $U->simplereq(
-            'open-ils.circ', 
-            'open-ils.circ.renew',
-            $self->editor->authtoken,
-            {
-                patron_id => $self->editor->requestor->id,
-                copy_id => $circ->{circ}->target_copy,
-                opac_renewal => 1
-            }
-        );
-
-        # TODO return these, then insert them into the circ data 
-        # blob that is shoved into the template for each circ
-        # so the template won't have to match them
-        push(@responses, {copy => $circ->{circ}->target_copy, evt => $evt});
-    }
-
-    return @responses;
-}
-
-
-sub load_myopac_circs {
-    my $self = shift;
-    my $e = $self->editor;
-    my $ctx = $self->ctx;
-
-    $ctx->{circs} = [];
-    my $limit = $self->cgi->param('limit') || 0; # 0 == unlimited
-    my $offset = $self->cgi->param('offset') || 0;
-    my $action = $self->cgi->param('action') || '';
-
-    # perform the renewal first if necessary
-    my @results = $self->handle_circ_renew($action) if $action =~ /renew/;
-
-    $ctx->{circs} = $self->fetch_user_circs(1, undef, $limit, $offset);
-
-    my $success_renewals = 0;
-    my $failed_renewals = 0;
-    for my $data (@{$ctx->{circs}}) {
-        my ($resp) = grep { $_->{copy} == $data->{circ}->target_copy->id } @results;
-
-        if($resp) {
-            my $evt = ref($resp->{evt}) eq 'ARRAY' ? $resp->{evt}->[0] : $resp->{evt};
-            $data->{renewal_response} = $evt;
-            $success_renewals++ if $evt->{textcode} eq 'SUCCESS';
-            $failed_renewals++ if $evt->{textcode} ne 'SUCCESS';
-        }
-    }
-
-    $ctx->{success_renewals} = $success_renewals;
-    $ctx->{failed_renewals} = $failed_renewals;
-
-    return Apache2::Const::OK;
-}
-
-sub load_myopac_fines {
-    my $self = shift;
-    my $e = $self->editor;
-    my $ctx = $self->ctx;
-    $ctx->{"fines"} = {
-        "circulation" => [],
-        "grocery" => [],
-        "total_paid" => 0,
-        "total_owed" => 0,
-        "balance_owed" => 0
-    };
-
-    my $limit = $self->cgi->param('limit') || 0;
-    my $offset = $self->cgi->param('offset') || 0;
-
-    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
-
-    # TODO: This should really be a ML call, but the existing calls 
-    # return an excessive amount of data and don't offer streaming
-
-    my %paging = ($limit or $offset) ? (limit => $limit, offset => $offset) : ();
-
-    my $req = $cstore->request(
-        'open-ils.cstore.direct.money.open_billable_transaction_summary.search',
-        {
-            usr => $e->requestor->id,
-            balance_owed => {'!=' => 0}
-        },
-        {
-            flesh => 4,
-            flesh_fields => {
-                mobts => ['circulation', 'grocery'],
-                mg => ['billings'],
-                mb => ['btype'],
-                circ => ['target_copy'],
-                acp => ['call_number'],
-                acn => ['record']
-            },
-            order_by => { mobts => 'xact_start' },
-            %paging
-        }
-    );
-
-    while(my $resp = $req->recv) {
-        my $mobts = $resp->content;
-        my $circ = $mobts->circulation;
-
-        my $last_billing;
-        if($mobts->grocery) {
-            my @billings = sort { $a->billing_ts cmp $b->billing_ts } @{$mobts->grocery->billings};
-            $last_billing = pop(@billings);
-        }
-
-        # XXX TODO switch to some money-safe non-fp library for math
-        $ctx->{"fines"}->{$_} += $mobts->$_ for (
-            qw/total_paid total_owed balance_owed/
-        );
-
-        push(
-            @{$ctx->{"fines"}->{$mobts->grocery ? "grocery" : "circulation"}},
-            {
-                xact => $mobts,
-                last_grocery_billing => $last_billing,
-                marc_xml => ($mobts->xact_type ne 'circulation' or $circ->target_copy->call_number->id == -1) ?
-                    undef :
-                    XML::LibXML->new->parse_string($circ->target_copy->call_number->record->marc),
-            } 
-        );
-    }
-
-     return Apache2::Const::OK;
-}       
-
-sub load_myopac_update_email {
-    my $self = shift;
-    my $e = $self->editor;
-    my $ctx = $self->ctx;
-    my $email = $self->cgi->param('email') || '';
-
-    unless($email =~ /.+\@.+\..+/) { # TODO better regex?
-        $ctx->{invalid_email} = $email;
-        return Apache2::Const::OK;
-    }
-
-    my $stat = $U->simplereq(
-        'open-ils.actor', 
-        'open-ils.actor.user.email.update', 
-        $e->authtoken, $email);
-
-    my $url = $self->apache->unparsed_uri;
-    $url =~ s/update_email/main/;
-    $self->apache->print($self->cgi->redirect(-url => $url));
-
-    return Apache2::Const::REDIRECT;
-}
-
-sub load_myopac_bookbags {
-    my $self = shift;
-    my $e = $self->editor;
-    my $ctx = $self->ctx;
-    my $limit = $self->cgi->param('limit') || 0;
-    my $offset = $self->cgi->param('offset') || 0;
-
-    my $args = {order_by => {cbreb => 'name'}};
-    $args->{limit} = $limit if $limit;
-    $args->{offset} = $limit if $limit;
-
-    $ctx->{bookbags} = $e->search_container_biblio_record_entry_bucket([
-        {owner => $self->editor->requestor->id, btype => 'bookbag'},
-        $args
-    ]);
-
-    return Apache2::Const::OK;
-}
-
 
 1;
+
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
new file mode 100644
index 0000000..9dcebf8
--- /dev/null
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -0,0 +1,498 @@
+package OpenILS::WWW::EGCatLoader;
+use strict; use warnings;
+use Apache2::Const -compile => qw(OK DECLINED FORBIDDEN HTTP_INTERNAL_SERVER_ERROR REDIRECT HTTP_BAD_REQUEST);
+use OpenSRF::Utils::Logger qw/$logger/;
+use OpenILS::Utils::CStoreEditor qw/:funcs/;
+use OpenILS::Utils::Fieldmapper;
+use OpenILS::Application::AppUtils;
+my $U = 'OpenILS::Application::AppUtils';
+
+
+# context additions: 
+#   user : au object, fleshed
+sub load_myopac {
+    my $self = shift;
+    $self->ctx->{page} = 'myopac';
+
+    $self->ctx->{user} = $self->editor->retrieve_actor_user([
+        $self->ctx->{user}->id,
+        {
+            flesh => 1,
+            flesh_fields => {
+                au => ['card']
+                # ...
+            }
+        }
+    ]);
+
+    return Apache2::Const::OK;
+}
+
+
+sub fetch_user_holds {
+    my $self = shift;
+    my $hold_ids = shift;
+    my $ids_only = shift;
+    my $flesh = shift;
+    my $limit = shift;
+    my $offset = shift;
+
+    my $e = $self->editor;
+
+    my $circ = OpenSRF::AppSession->create('open-ils.circ');
+
+    if(!$hold_ids) {
+
+        $hold_ids = $circ->request(
+            'open-ils.circ.holds.id_list.retrieve.authoritative', 
+            $e->authtoken, 
+            $e->requestor->id
+        )->gather(1);
+    
+        $hold_ids = [ grep { defined $_ } @$hold_ids[$offset..($offset + $limit - 1)] ] if $limit or $offset;
+    }
+
+
+    return $hold_ids if $ids_only or @$hold_ids == 0;
+
+    my $args = {
+        suppress_notices => 1,
+        suppress_transits => 1,
+        suppress_mvr => 1,
+        suppress_patron_details => 1,
+        include_bre => $flesh ? 1 : 0
+    };
+
+    # ----------------------------------------------------------------
+    # Collect holds in batches of $batch_size for faster retrieval
+
+    my $batch_size = 8;
+    my $batch_idx = 0;
+    my $mk_req_batch = sub {
+        my @ses;
+        my $top_idx = $batch_idx + $batch_size;
+        while($batch_idx < $top_idx) {
+            my $hold_id = $hold_ids->[$batch_idx++];
+            last unless $hold_id;
+            my $ses = OpenSRF::AppSession->create('open-ils.circ');
+            my $req = $ses->request(
+                'open-ils.circ.hold.details.retrieve', 
+                $e->authtoken, $hold_id, $args);
+            push(@ses, {ses => $ses, req => $req});
+        }
+        return @ses;
+    };
+
+    my $first = 1;
+    my @collected;
+    my @holds;
+    my @ses;
+    while(1) {
+        @ses = $mk_req_batch->() if $first;
+        last if $first and not @ses;
+
+        if(@collected) {
+            while(my $blob = pop(@collected)) {
+                $blob->{marc_xml} = XML::LibXML->new->parse_string($blob->{hold}->{bre}->marc) if $flesh;
+                push(@holds, $blob);
+            }
+        }
+
+        for my $req_data (@ses) {
+            push(@collected, {hold => $req_data->{req}->gather(1)});
+            $req_data->{ses}->kill_me;
+        }
+
+        @ses = $mk_req_batch->();
+        last unless @collected or @ses;
+        $first = 0;
+    }
+
+    return \@holds;
+}
+
+sub handle_hold_update {
+    my $self = shift;
+    my $action = shift;
+    my $e = $self->editor;
+
+
+    my @hold_ids = $self->cgi->param('hold_id'); # for non-_all actions
+    @hold_ids = @{$self->fetch_user_holds(undef, 1)} if $action =~ /_all/;
+
+    my $circ = OpenSRF::AppSession->create('open-ils.circ');
+
+    if($action =~ /cancel/) {
+
+        for my $hold_id (@hold_ids) {
+            my $resp = $circ->request(
+                'open-ils.circ.hold.cancel', $e->authtoken, $hold_id, 6 )->gather(1); # 6 == patron-cancelled-via-opac
+        }
+
+    } else {
+        
+        my $vlist = [];
+        for my $hold_id (@hold_ids) {
+            my $vals = {id => $hold_id};
+
+            if($action =~ /activate/) {
+                $vals->{frozen} = 'f';
+                $vals->{thaw_date} = undef;
+
+            } elsif($action =~ /suspend/) {
+                $vals->{frozen} = 't';
+                # $vals->{thaw_date} = TODO;
+            }
+            push(@$vlist, $vals);
+        }
+
+        $circ->request('open-ils.circ.hold.update.batch.atomic', $e->authtoken, undef, $vlist)->gather(1);
+    }
+
+    $circ->kill_me;
+    return undef;
+}
+
+sub load_myopac_holds {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+    
+
+    my $limit = $self->cgi->param('limit') || 0;
+    my $offset = $self->cgi->param('offset') || 0;
+    my $action = $self->cgi->param('action') || '';
+
+    $self->handle_hold_update($action) if $action;
+
+    $ctx->{holds} = $self->fetch_user_holds(undef, 0, 1, $limit, $offset);
+
+    return Apache2::Const::OK;
+}
+
+sub load_place_hold {
+    my $self = shift;
+    my $ctx = $self->ctx;
+    my $e = $self->editor;
+    my $cgi = $self->cgi;
+    $self->ctx->{page} = 'place_hold';
+
+    $ctx->{hold_target} = $cgi->param('hold_target');
+    $ctx->{hold_type} = $cgi->param('hold_type');
+    $ctx->{default_pickup_lib} = $e->requestor->home_ou; # XXX staff
+
+    if($ctx->{hold_type} eq 'T') {
+        $ctx->{record} = $e->retrieve_biblio_record_entry($ctx->{hold_target});
+    }
+    # ...
+
+    $ctx->{marc_xml} = XML::LibXML->new->parse_string($ctx->{record}->marc);
+
+    if(my $pickup_lib = $cgi->param('pickup_lib')) {
+
+        my $args = {
+            patronid => $e->requestor->id,
+            titleid => $ctx->{hold_target}, # XXX
+            pickup_lib => $pickup_lib,
+            depth => 0, # XXX
+        };
+
+        my $allowed = $U->simplereq(
+            'open-ils.circ',
+            'open-ils.circ.title_hold.is_possible',
+            $e->authtoken, $args
+        );
+
+        if($allowed->{success} == 1) {
+            my $hold = Fieldmapper::action::hold_request->new;
+
+            $hold->pickup_lib($pickup_lib);
+            $hold->requestor($e->requestor->id);
+            $hold->usr($e->requestor->id); # XXX staff
+            $hold->target($ctx->{hold_target});
+            $hold->hold_type($ctx->{hold_type});
+            # frozen, expired, etc..
+
+            my $stat = $U->simplereq(
+                'open-ils.circ',
+                'open-ils.circ.holds.create',
+                $e->authtoken, $hold
+            );
+
+            if($stat and $stat > 0) {
+
+                # if successful, return the user to the requesting page
+                $self->apache->log->info("Redirecting back to " . $cgi->param('redirect_to'));
+                $self->apache->print($cgi->redirect(-url => $cgi->param('redirect_to')));
+                return Apache2::Const::REDIRECT;
+
+            } else {
+
+                $ctx->{hold_failed} = 1; # XXX process the events, etc
+            }
+        }
+
+        # hold permit failed
+        $logger->info('hold permit result ' . OpenSRF::Utils::JSON->perl2JSON($allowed));
+    }
+
+    return Apache2::Const::OK;
+}
+
+
+sub fetch_user_circs {
+    my $self = shift;
+    my $flesh = shift; # flesh bib data, etc.
+    my $circ_ids = shift;
+    my $limit = shift;
+    my $offset = shift;
+
+    my $e = $self->editor;
+
+    my @circ_ids;
+
+    if($circ_ids) {
+        @circ_ids = @$circ_ids;
+
+    } else {
+
+        my $circ_data = $U->simplereq(
+            'open-ils.actor', 
+            'open-ils.actor.user.checked_out',
+            $e->authtoken, 
+            $e->requestor->id
+        );
+
+        @circ_ids =  ( @{$circ_data->{overdue}}, @{$circ_data->{out}} );
+
+        if($limit or $offset) {
+            @circ_ids = grep { defined $_ } @circ_ids[0..($offset + $limit - 1)];
+        }
+    }
+
+    return [] unless @circ_ids;
+
+    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
+
+    my $qflesh = {
+        flesh => 3,
+        flesh_fields => {
+            circ => ['target_copy'],
+            acp => ['call_number'],
+            acn => ['record']
+        }
+    };
+
+    $e->xact_begin;
+    my $circs = $e->search_action_circulation(
+        [{id => \@circ_ids}, ($flesh) ? $qflesh : {}], {substream => 1});
+
+    my @circs;
+    for my $circ (@$circs) {
+        push(@circs, {
+            circ => $circ, 
+            marc_xml => ($flesh and $circ->target_copy->call_number->id != -1) ? 
+                XML::LibXML->new->parse_string($circ->target_copy->call_number->record->marc) : 
+                undef  # pre-cat copy, use the dummy title/author instead
+        });
+    }
+    $e->xact_rollback;
+
+    # make sure the final list is in the correct order
+    my @sorted_circs;
+    for my $id (@circ_ids) {
+        push(
+            @sorted_circs,
+            (grep { $_->{circ}->id == $id } @circs)
+        );
+    }
+
+    return \@sorted_circs;
+}
+
+
+sub handle_circ_renew {
+    my $self = shift;
+    my $action = shift;
+    my $ctx = $self->ctx;
+
+    my @renew_ids = $self->cgi->param('circ');
+
+    my $circs = $self->fetch_user_circs(0, ($action eq 'renew') ? [@renew_ids] : undef);
+
+    # TODO: fire off renewal calls in batches to speed things up
+    my @responses;
+    for my $circ (@$circs) {
+
+        my $evt = $U->simplereq(
+            'open-ils.circ', 
+            'open-ils.circ.renew',
+            $self->editor->authtoken,
+            {
+                patron_id => $self->editor->requestor->id,
+                copy_id => $circ->{circ}->target_copy,
+                opac_renewal => 1
+            }
+        );
+
+        # TODO return these, then insert them into the circ data 
+        # blob that is shoved into the template for each circ
+        # so the template won't have to match them
+        push(@responses, {copy => $circ->{circ}->target_copy, evt => $evt});
+    }
+
+    return @responses;
+}
+
+
+sub load_myopac_circs {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+
+    $ctx->{circs} = [];
+    my $limit = $self->cgi->param('limit') || 0; # 0 == unlimited
+    my $offset = $self->cgi->param('offset') || 0;
+    my $action = $self->cgi->param('action') || '';
+
+    # perform the renewal first if necessary
+    my @results = $self->handle_circ_renew($action) if $action =~ /renew/;
+
+    $ctx->{circs} = $self->fetch_user_circs(1, undef, $limit, $offset);
+
+    my $success_renewals = 0;
+    my $failed_renewals = 0;
+    for my $data (@{$ctx->{circs}}) {
+        my ($resp) = grep { $_->{copy} == $data->{circ}->target_copy->id } @results;
+
+        if($resp) {
+            my $evt = ref($resp->{evt}) eq 'ARRAY' ? $resp->{evt}->[0] : $resp->{evt};
+            $data->{renewal_response} = $evt;
+            $success_renewals++ if $evt->{textcode} eq 'SUCCESS';
+            $failed_renewals++ if $evt->{textcode} ne 'SUCCESS';
+        }
+    }
+
+    $ctx->{success_renewals} = $success_renewals;
+    $ctx->{failed_renewals} = $failed_renewals;
+
+    return Apache2::Const::OK;
+}
+
+sub load_myopac_fines {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+    $ctx->{"fines"} = {
+        "circulation" => [],
+        "grocery" => [],
+        "total_paid" => 0,
+        "total_owed" => 0,
+        "balance_owed" => 0
+    };
+
+    my $limit = $self->cgi->param('limit') || 0;
+    my $offset = $self->cgi->param('offset') || 0;
+
+    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
+
+    # TODO: This should really be a ML call, but the existing calls 
+    # return an excessive amount of data and don't offer streaming
+
+    my %paging = ($limit or $offset) ? (limit => $limit, offset => $offset) : ();
+
+    my $req = $cstore->request(
+        'open-ils.cstore.direct.money.open_billable_transaction_summary.search',
+        {
+            usr => $e->requestor->id,
+            balance_owed => {'!=' => 0}
+        },
+        {
+            flesh => 4,
+            flesh_fields => {
+                mobts => ['circulation', 'grocery'],
+                mg => ['billings'],
+                mb => ['btype'],
+                circ => ['target_copy'],
+                acp => ['call_number'],
+                acn => ['record']
+            },
+            order_by => { mobts => 'xact_start' },
+            %paging
+        }
+    );
+
+    while(my $resp = $req->recv) {
+        my $mobts = $resp->content;
+        my $circ = $mobts->circulation;
+
+        my $last_billing;
+        if($mobts->grocery) {
+            my @billings = sort { $a->billing_ts cmp $b->billing_ts } @{$mobts->grocery->billings};
+            $last_billing = pop(@billings);
+        }
+
+        # XXX TODO switch to some money-safe non-fp library for math
+        $ctx->{"fines"}->{$_} += $mobts->$_ for (
+            qw/total_paid total_owed balance_owed/
+        );
+
+        push(
+            @{$ctx->{"fines"}->{$mobts->grocery ? "grocery" : "circulation"}},
+            {
+                xact => $mobts,
+                last_grocery_billing => $last_billing,
+                marc_xml => ($mobts->xact_type ne 'circulation' or $circ->target_copy->call_number->id == -1) ?
+                    undef :
+                    XML::LibXML->new->parse_string($circ->target_copy->call_number->record->marc),
+            } 
+        );
+    }
+
+     return Apache2::Const::OK;
+}       
+
+sub load_myopac_update_email {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+    my $email = $self->cgi->param('email') || '';
+
+    unless($email =~ /.+\@.+\..+/) { # TODO better regex?
+        $ctx->{invalid_email} = $email;
+        return Apache2::Const::OK;
+    }
+
+    my $stat = $U->simplereq(
+        'open-ils.actor', 
+        'open-ils.actor.user.email.update', 
+        $e->authtoken, $email);
+
+    my $url = $self->apache->unparsed_uri;
+    $url =~ s/update_email/main/;
+    $self->apache->print($self->cgi->redirect(-url => $url));
+
+    return Apache2::Const::REDIRECT;
+}
+
+sub load_myopac_bookbags {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+    my $limit = $self->cgi->param('limit') || 0;
+    my $offset = $self->cgi->param('offset') || 0;
+
+    my $args = {order_by => {cbreb => 'name'}};
+    $args->{limit} = $limit if $limit;
+    $args->{offset} = $limit if $limit;
+
+    $ctx->{bookbags} = $e->search_container_biblio_record_entry_bucket([
+        {owner => $self->editor->requestor->id, btype => 'bookbag'},
+        $args
+    ]);
+
+    return Apache2::Const::OK;
+}
+
+
+1
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
new file mode 100644
index 0000000..e8f6a4a
--- /dev/null
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -0,0 +1,35 @@
+package OpenILS::WWW::EGCatLoader;
+use strict; use warnings;
+use Apache2::Const -compile => qw(OK DECLINED FORBIDDEN HTTP_INTERNAL_SERVER_ERROR REDIRECT HTTP_BAD_REQUEST);
+use OpenSRF::Utils::Logger qw/$logger/;
+use OpenILS::Utils::CStoreEditor qw/:funcs/;
+use OpenILS::Utils::Fieldmapper;
+use OpenILS::Application::AppUtils;
+my $U = 'OpenILS::Application::AppUtils';
+
+# context additions: 
+#   record : bre object
+sub load_record {
+    my $self = shift;
+    $self->ctx->{page} = 'record';
+
+    my $rec_id = $self->ctx->{page_args}->[0]
+        or return Apache2::Const::HTTP_BAD_REQUEST;
+
+    $self->ctx->{record} = $self->editor->retrieve_biblio_record_entry([
+        $rec_id,
+        {
+            flesh => 2, 
+            flesh_fields => {
+                bre => ['call_numbers'],
+                acn => ['copies'] # limit, paging, etc.
+            }
+        }
+    ]);
+
+    $self->ctx->{marc_xml} = XML::LibXML->new->parse_string($self->ctx->{record}->marc);
+
+    return Apache2::Const::OK;
+}
+
+1;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
new file mode 100644
index 0000000..4f78497
--- /dev/null
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -0,0 +1,99 @@
+package OpenILS::WWW::EGCatLoader;
+use strict; use warnings;
+use Apache2::Const -compile => qw(OK DECLINED FORBIDDEN HTTP_INTERNAL_SERVER_ERROR REDIRECT HTTP_BAD_REQUEST);
+use OpenSRF::Utils::Logger qw/$logger/;
+use OpenILS::Utils::CStoreEditor qw/:funcs/;
+use OpenILS::Utils::Fieldmapper;
+use OpenILS::Application::AppUtils;
+my $U = 'OpenILS::Application::AppUtils';
+
+
+# context additions: 
+#   page_size
+#   hit_count
+#   records : list of bre's and copy-count objects
+sub load_rresults {
+    my $self = shift;
+    my $cgi = $self->cgi;
+    my $ctx = $self->ctx;
+    my $e = $self->editor;
+
+    $ctx->{page} = 'rresult';
+    my $page = $cgi->param('page') || 0;
+    my $facet = $cgi->param('facet');
+    my $query = $cgi->param('query');
+    my $limit = $cgi->param('limit') || 10; # TODO user settings
+
+    my $loc = $cgi->param('loc') || $ctx->{aou_tree}->()->id;
+    my $depth = defined $cgi->param('depth') ? 
+        $cgi->param('depth') : $ctx->{find_aou}->($loc)->ou_type->depth;
+
+    my $args = {limit => $limit, offset => $page * $limit, org_unit => $loc, depth => $depth}; 
+
+    $query = "$query $facet" if $facet; # TODO
+    my $results;
+
+    try {
+
+        my $method = 'open-ils.search.biblio.multiclass.query';
+        $method .= '.staff' if $ctx->{is_staff};
+        $results = $U->simplereq('open-ils.search', $method, $args, $query, 1);
+
+    } catch Error with {
+        my $err = shift;
+        $logger->error("multiclass search error: $err");
+        $results = {count => 0, ids => []};
+    };
+
+    my $rec_ids = [map { $_->[0] } @{$results->{ids}}];
+
+    $ctx->{records} = [];
+    $ctx->{search_facets} = {};
+    $ctx->{page_size} = $limit;
+    $ctx->{hit_count} = $results->{count};
+
+    return Apache2::Const::OK if @$rec_ids == 0;
+
+    my $cstore1 = OpenSRF::AppSession->create('open-ils.cstore');
+    my $bre_req = $cstore1->request(
+        'open-ils.cstore.direct.biblio.record_entry.search', {id => $rec_ids});
+
+    my $search = OpenSRF::AppSession->create('open-ils.search');
+    my $facet_req = $search->request('open-ils.search.facet_cache.retrieve', $results->{facet_key}, 10);
+
+    my @data;
+    while(my $resp = $bre_req->recv) {
+        my $bre = $resp->content; 
+
+        # XXX farm out to multiple cstore sessions before loop, then collect after
+        my $copy_counts = $e->json_query(
+            {from => ['asset.record_copy_count', 1, $bre->id, 0]})->[0];
+
+        push(@data,
+            {
+                bre => $bre,
+                marc_xml => XML::LibXML->new->parse_string($bre->marc),
+                copy_counts => $copy_counts
+            }
+        );
+    }
+
+    $cstore1->kill_me;
+
+    # shove recs into context in search results order
+    for my $rec_id (@$rec_ids) { 
+        push(
+            @{$ctx->{records}},
+            grep { $_->{bre}->id == $rec_id } @data
+        );
+    }
+
+    my $facets = $facet_req->gather(1);
+
+    $facets->{$_} = {cmf => $ctx->{find_cmf}->($_), data => $facets->{$_}} for keys %$facets;  # quick-n-dirty
+    $ctx->{search_facets} = $facets;
+
+    return Apache2::Const::OK;
+}
+
+1;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
new file mode 100644
index 0000000..14456a7
--- /dev/null
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -0,0 +1,118 @@
+package OpenILS::WWW::EGCatLoader;
+use strict; use warnings;
+use Apache2::Const -compile => qw(OK DECLINED FORBIDDEN HTTP_INTERNAL_SERVER_ERROR REDIRECT HTTP_BAD_REQUEST);
+use OpenSRF::Utils::Logger qw/$logger/;
+use OpenILS::Utils::CStoreEditor qw/:funcs/;
+use OpenILS::Utils::Fieldmapper;
+use OpenILS::Application::AppUtils;
+my $U = 'OpenILS::Application::AppUtils';
+
+my %cache = (
+    map => {aou => {}}, # others added dynamically as needed
+    list => {},
+    org_settings => {}
+);
+
+sub init_ro_object_cache {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+
+    # fetch-on-demand-and-cache subs for commonly used public data
+    my @public_classes = qw/ccs aout cifm citm clm cmf/;
+
+    for my $hint (@public_classes) {
+
+        my ($class) = grep {
+            $Fieldmapper::fieldmap->{$_}->{hint} eq $hint
+        } keys %{ $Fieldmapper::fieldmap };
+
+        my $ident_field =  $Fieldmapper::fieldmap->{$class}->{identity};
+
+	    $class =~ s/Fieldmapper:://o;
+	    $class =~ s/::/_/g;
+
+        # copy statuses
+        my $list_key = $hint . '_list';
+        my $find_key = "find_$hint";
+
+        $ctx->{$list_key} = sub {
+            my $method = "retrieve_all_$class";
+            $cache{list}{$hint} = $e->$method() unless $cache{list}{$hint};
+            return $cache{list}{$hint};
+        };
+    
+        $cache{map}{$hint} = {} unless $cache{map}{$hint};
+
+        $ctx->{$find_key} = sub {
+            my $id = shift;
+            return $cache{map}{$hint}{$id} if $cache{map}{$hint}{$id}; 
+            ($cache{map}{$hint}{$id}) = grep { $_->$ident_field eq $id } @{$ctx->{$list_key}->()};
+            return $cache{map}{$hint}{$id};
+        };
+
+    }
+
+    $ctx->{aou_tree} = sub {
+
+        # fetch the org unit tree
+        unless($cache{aou_tree}) {
+            my $tree = $e->search_actor_org_unit([
+			    {   parent_ou => undef},
+			    {   flesh            => -1,
+				    flesh_fields    => {aou =>  ['children']},
+				    order_by        => {aou => 'name'}
+			    }
+		    ])->[0];
+
+            # flesh the org unit type for each org unit
+            # and simultaneously set the id => aou map cache
+            sub flesh_aout {
+                my $node = shift;
+                my $ctx = shift;
+                $node->ou_type( $ctx->{find_aout}->($node->ou_type) );
+                $cache{map}{aou}{$node->id} = $node;
+                flesh_aout($_, $ctx) foreach @{$node->children};
+            };
+            flesh_aout($tree, $ctx);
+
+            $cache{aou_tree} = $tree;
+        }
+
+        return $cache{aou_tree};
+    };
+
+    # Add a special handler for the tree-shaped org unit cache
+    $ctx->{find_aou} = sub {
+        my $org_id = shift;
+        $ctx->{aou_tree}->(); # force the org tree to load
+        return $cache{map}{aou}{$org_id};
+    };
+
+    # turns an ISO date into something TT can understand
+    $ctx->{parse_datetime} = sub {
+        my $date = shift;
+        $date = DateTime::Format::ISO8601->new->parse_datetime(cleanse_ISO8601($date));
+        return sprintf(
+            "%0.2d:%0.2d:%0.2d %0.2d-%0.2d-%0.4d",
+            $date->hour,
+            $date->minute,
+            $date->second,
+            $date->day,
+            $date->month,
+            $date->year
+        );
+    };
+
+    # retrieve and cache org unit setting values
+    $ctx->{get_org_setting} = sub {
+        my($org_id, $setting) = @_;
+        $cache{org_settings}{$org_id} = {} unless $cache{org_settings}{$org_id};
+        $cache{org_settings}{$org_id}{$setting} = $U->ou_ancestor_setting_value($org_id, $setting)
+            unless exists $cache{org_settings}{$org_id}{$setting};
+        return $cache{org_settings}{$org_id}{$setting};
+    };
+}
+
+
+1;

commit aa420ea5d2ca5294c4401157510ace2dd63dfc5a
Author: senator <lebbeous at esilibrary.com>
Date:   Fri Feb 11 15:12:52 2011 -0500

    A start with record detail page

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 07eac9d..6bb5918 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -383,6 +383,7 @@ div.select-wrapper:hover {
 	font-size: 18px;
 }
 
+#rdetail_image { border: none; }
 #rdetail_image_cell {
 	padding-top: 3px;
 	padding-right: 10px;
diff --git a/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2 b/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
index 6f678b2..f919ed8 100644
--- a/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
@@ -1,34 +1,4 @@
 [% 
-    # Extract MARC fields from XML
-    #   get_marc_attrs( { marc_xml => doc } )
-    BLOCK get_marc_attrs;
-        xml = args.marc_xml;
-        args.isbn = xml.findnodes('//*[@tag="020"]/*[@code="a"]').shift.textContent;
-        args.upc = xml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
-        args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
-        args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
-        args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
-        args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
-        args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
-        args.edition = xml.findnodes('//*[@tag="250"]/*[@code="a"]').textContent ||
-            xml.findnodes('//*[@tag="534"]/*[@code="b"]').textContent ||
-            xml.findnodes('//*[@tag="775"]/*[@code="b"]').textContent;
-        phys = xml.findnodes(
-            '//*[@tag="300"]/*[@code="a" or @code="b" or @code="c" or @code="e"]'
-        );
-        phys_content = [];
-        FOR p IN phys; phys_content.push(p.textContent); END;
-        args.phys_desc = phys_content.join("");
-
-        # clean up the ISBN
-        args.isbn_clean = args.isbn.replace('\ .*', '');
-
-        # KCLS-specific stuff; needs to change
-        args.mattype = xml.findnodes('//*[@tag="998"]/*[@code="d"]').textContent;
-        args.kcls_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent;
-
-    END;
-
     icon_by_mattype = {     # XXX KCLS-specific
         "a" => "media_book.jpg",
         "b" => "media_magazines.jpg",
@@ -59,4 +29,38 @@
         "2" => "media_cassettewithbook.jpg",
         "5" => "media_cdwithbook.jpg"
     };
+
+    # Extract MARC fields from XML
+    #   get_marc_attrs( { marc_xml => doc } )
+    BLOCK get_marc_attrs;
+        xml = args.marc_xml;
+        args.isbn = xml.findnodes('//*[@tag="020"]/*[@code="a"]').shift.textContent;
+        args.upc = xml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
+        args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
+        args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
+        args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
+        args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
+        args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
+        args.edition = xml.findnodes('//*[@tag="250"]/*[@code="a"]').textContent ||
+            xml.findnodes('//*[@tag="534"]/*[@code="b"]').textContent ||
+            xml.findnodes('//*[@tag="775"]/*[@code="b"]').textContent;
+        phys = xml.findnodes(
+            '//*[@tag="300"]/*[@code="a" or @code="b" or @code="c" or @code="e"]'
+        );
+        phys_content = [];
+        FOR p IN phys; phys_content.push(p.textContent); END;
+        args.phys_desc = phys_content.join("");
+
+        # clean up the ISBN
+        args.isbn_clean = args.isbn.replace('\ .*', '');
+
+        # KCLS-specific stuff; needs to change
+        args.mattype = xml.findnodes('//*[@tag="998"]/*[@code="d"]').textContent;
+        args.kcls_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent;
+        mattype = attrs.mattype;
+        args.format = ctx.find_citm(mattype).value;
+        args.format_icon = icon_by_mattype.$mattype;
+
+    END;
+
 %]
diff --git a/Open-ILS/web/templates/default/opac/parts/record/body.tt2 b/Open-ILS/web/templates/default/opac/parts/record/body.tt2
index 719df27..93d2bf7 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/body.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/body.tt2
@@ -1,6 +1,14 @@
 <!-- ****************** page_rdetail.xml ***************************** -->
+[%  record = ctx.record;
+    attrs = {marc_xml => ctx.marc_xml};
+    PROCESS "default/opac/parts/marc_misc.tt2";
+    PROCESS get_marc_attrs args=attrs %]
 <div id='canvas_main' class='canvas'>
-    <div id="rdetail_header">
+    <div id="rdetail_header" class="hide_me">[%#
+        XXX Does it make sense for now to even have this section?  Why
+        should the record detail page be aware of the ongoing search?
+        The user can use the back button to go back to their search results
+        like on any other website. %]
         <div style="float:left;">
             Search Results&nbsp;&nbsp;&nbsp;
             <span id="rdetail_result_count" class="hide_me">
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index e1d5e35..f07c6a0 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -6,9 +6,11 @@
     <tbody id="rdetail_details_tbody">
         <tr>
             <td width="90" valign="top" id="rdetail_image_cell">
-                <a id='rdetail_img_link' href='${ident.large}'><img
-                    alt="Image of item" style='border: none;' id='rdetail_image'
-                    src='${ident.small}' /></a>
+                [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
+                <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident %]'><img
+                    alt="Image of item" id='rdetail_image'
+                    src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a>
+                [% END %]
                 <br />
                 <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
                     <div>[% l("Image provided by") %]</div>
@@ -23,16 +25,21 @@
                 <table border="0" cellpadding="0" cellspacing="0" width="100%">
                     <tr>
                         <td valign="top">
-                            <span class="rdetail_item" id='rdetail_title'></span><br />
-                            <span style="color:#545454;">[% l("Author") %]: </span>
-                            <em><a title='[% l("Perform an author search") %]' id='rdetail_author'></a></em>
+                            <span id='rdetail_title'>[% attrs.title %]</span><br />
+                            [% IF attrs.author %]
+                            <span style="color:#545454;">[% l("Author") %]:</span>
+                            <em><a title='[% l("Perform an author search") %]'
+                                    id='rdetail_author'
+                                    href="[% ctx.opac_root %]/results?query=author%3a[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% loc %]">[% attrs.author %]</a>
+                            </em>
+                            [% END %]
                         </td>
                         <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
                             <div style="width:230px;text-align:left;margin-top:3px;">
                                 <div style="float:right;">
                                     <div style="border-bottom:1px dotted #ccc;padding-top:10px;"
                                         class="rdetail_aux_utils">
-                                        <a href="place_hold" id="rdetail_place_hold"><img
+                                        <a href="[% ctx.opac_root %]/place_hold?hold_target=[% record.id %]&hold_type=T" id="rdetail_place_hold"><img
                                             src="[% ctx.media_prefix %]/images/green_check.png" alt="place hold" />
                                             <span style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
                                     </div>
@@ -59,32 +66,35 @@
                     <table border="0" cellpadding="0" width="100%">
                         <tr>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_isbn_lbl" class="">[% l("ISBN") %]</strong>
+                                [% IF attrs.isbn %]<strong id="rdetail_isbn_lbl" class="">[% l("ISBN") %]</strong>[% END %]
                             </td>
-                            <td valign="top" id='rdetail_isbn'></td>
+                            <td valign="top" id='rdetail_isbn'>[% attrs.isbn %]</td>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_phys_lbl" class="">[% l("Physical Description") %]</strong>
+                                [% IF attrs.phys_desc %]<strong id="rdetail_phys_lbl">[% l("Physical Description") %]</strong>[% END %]
                             </td>
-                            <td valign="top" id='rdetail_physical_desc'></td>
+                            <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc %]</td>
                         </tr>
                         <tr>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_ed_lbl" class="">[% l("Edition") %]</strong>
+                                <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
                             </td>
-                            <td valign="top" id='rdetail_edition'></td>
+                            <td valign="top" id='rdetail_edition'>[% attrs.edition %]</td>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_form_lbl" class="">[% l("Format") %]</strong>
+                                <strong id="rdetail_form_lbl">[% IF attrs.format; l("Format"); END %]</strong>
                             </td>
                             <td valign="top">
-                                <img alt="Format" id='' class='tor_pic hide_me' />
-                                <span id='rdetail_tor'></span>
+                                [% IF attrs.format %]
+                                <img alt="Format" class='tor_pic'
+                                    title="[% attrs.format %]"
+                                    src="[% ctx.media_prefix _ '/images/' _ attrs.format_icon %]" />
+                                [%  END %]
                             </td>
                         </tr>
                         <tr>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_pubdate_lbl" class="">[% l("Publication Date") %]</strong>
+                                <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
                             </td>
-                            <td valign="top" id='rdetail_pubdate'></td>
+                            <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
                             <td nowrap='nowrap' valign="top">
                                 <strong id="rdetail_sum_lbl" class="">Summary</strong>
                             </td>
@@ -92,11 +102,12 @@
                         </tr>
                         <tr>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_pub_lbl" class="">[% l("Publisher") %]</strong>
+                                <strong id="rdetail_pub_lbl" class="">[% IF attrs.publisher; l("Publisher"); END %]</strong>
                             </td>
-                            <td valign="top" id='rdetail_publisher'></td>
+                            <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_sub_lbl" class="">[% l("Subjects") %]</strong>
+                                [%# XXX TODO see kcls' drawMarcSubjects() in rdetail.js %]
+                                <strong id="rdetail_sub_lbl" class="hide_me">[% l("Subjects") %]</strong>
                             </td>
                             <td valign="top"></td>
                         </tr>
@@ -167,7 +178,7 @@
                                 </div>
                             </td>
                             <td width="1" valign="top" align="right" style="white-space:nowrap;">
-                                <a href="place_hold" id=''><img alt="Place Hold"
+                                <a href="[% ctx.opac_root %]/place_hold?hold_target=[% record.id %]&hold_type=T"><img alt="Place Hold"
                                     src="[% ctx.media_prefix %]/images/place_hold.gif" /></a>
                                 <a href="#" id="rd_reviews_and_more" target="_blank"><img
                                     alt="Reviews and More" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 9db6f32..b602af2 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -31,7 +31,7 @@
                                                 width="78" nowrap="nowrap" valign="top">
                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
                                                 <a href="[% ctx.opac_root %]/record/[% rec.bre.id %]"><img alt="Image of item"
-                                                        name='item_jacket' class='result_table_pic'
+                                                        name='item_jacket' class='result_table_pic' width="55"
                                                         src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a><br />
                                                 [% END %]
                                             </td>

commit b04e091da415a1bb1d00ffd10a913a13c4175d1b
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 10 17:24:05 2011 -0500

    advanced page doesn't need login first

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 3a62f4f..f303af7 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -71,7 +71,8 @@ sub load {
 
     my $path = $self->apache->path_info;
 
-    return $self->load_home if $path =~ /opac\/home/;
+    return $self->load_simple("home") if $path =~ /opac\/home/;
+    return $self->load_simple("advanced") if $path =~ /opac\/advanced/;
     return $self->load_login if $path =~ /opac\/login/;
     return $self->load_logout if $path =~ /opac\/logout/;
     return $self->load_rresults if $path =~ /opac\/results/;
@@ -243,9 +244,9 @@ sub load_common {
     return Apache2::Const::OK;
 }
 
-sub load_home {
-    my $self = shift;
-    $self->ctx->{page} = 'home';
+sub load_simple {
+    my ($self, $page) = @_;
+    $self->ctx->{page} = $page;
     return Apache2::Const::OK;
 }
 

commit 844423e94df26f0ef560d884a35ce828e1ef4d32
Merge: 2b9beb1 28af7cb
Author: berick <berick at esilibrary.com>
Date:   Thu Feb 10 11:59:50 2011 -0500

    repaired topnav merge conflict

diff --cc Open-ILS/web/templates/default/opac/parts/topnav.tt2
index dbd398c,2db1254..c0a9c0a
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@@ -1,21 -1,108 +1,109 @@@
- <!-- ****************** top_nav.xml ***************************** -->
- [% 
+ [%- USE money = format('$%.2f');
 -    ctx.opac_root = '/eg/opac' -%]
 +    USE CGI; 
-     USE EGI18N;
- %]
++    USE EGI18N; -%]
  <div id="header">
-     <div class="float-left"><a
-         href="http://www.kcls.org"><img alt="KCLS Logo"
-         src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /></a></div>
+     <div class="float-left">
+         <a href="http://www.kcls.org"><img alt="KCLS Logo"
+             src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /></a>
+     </div>
      <div class="float-right">
-         <div id="your-acct-login"><a
-             href="[% skin_root %]login" id="home_myopac_link"><img
-             alt="Your Account Log in"
-             src="[% ctx.media_prefix %]/images/login-btn.png"
-             onmouseover="this.src='[% ctx.media_prefix %]/images/login-btn-hover.png';"
-             onmouseout="this.src='[% ctx.media_prefix %]/images/login-btn.png';" /></a></div>
- 
- 
+         [% IF !ctx.user %]
+         <div id="your-acct-login">
+             <a href="[% ctx.opac_root %]/login" id="home_myopac_link"><img
+                 alt="Your Account Log in"
+                 src="[% ctx.media_prefix %]/images/login-btn.png"
+                 onmouseover="this.src='[% ctx.media_prefix %]/images/login-btn-hover.png';"
+                 onmouseout="this.src='[% ctx.media_prefix %]/images/login-btn.png';" /></a>
+         </div>
+         [% ELSE %]
+         <div id="dash_wrapper">
+             <div class="float-right">
+                 <table cellpadding="0" cellspacing="0" border="0">
+                     <tr>
+                         <td>
+                             <img src="[% ctx.media_prefix %]/images/dash-corner-left1.png" />
+                         </td>
+                         <td id="dash_corner_mid1a">
+                             <span id="dash_user">
+                                 [%  # XXX TODO: some kind of standard helper
+                                     # function in TT2 to render human names,
+                                     # i18n aware.
+                                     ctx.user.first_given_name %]
+                                 [% ctx.user.family_name %]
+                             </span>
+                         </td>
+                         <td id="dash_corner_mid1b">
+                             <img src="[% ctx.media_prefix %]/images/dash-divider.jpg" />
+                         </td>
+                         <td id="dash_corner_mid1c">
+                             <a href="[% ctx.opac_root %]/myopac/main" class="pos-rel-top4"><img
+                                 alt="[% l('My Account') %]"
+                                 src="[% ctx.media_prefix %]/images/acct-btn.png"
+                                 onmouseover="this.src='[% ctx.media_prefix %]/images/acct-btn-hover.png';"
+                                 onmouseout="this.src='[% ctx.media_prefix %]/images/acct-btn.png';" /></a>
+                             <a href="[% ctx.opac_root %]/logout" class="pos-rel-top4"
+                                 id="logout_link"><img
+                                 alt="[% l('Logout') %]"
+                                 src="[% ctx.media_prefix %]/images/logout-btn.png"
+                                 onmouseover="this.src='[% ctx.media_prefix %]/images/logout-btn-hover.png';"
+                                 onmouseout="this.src='[% ctx.media_prefix %]/images/logout-btn.png';" /></a>
+                         </td>
+                         <td>
+                             <img src="[% ctx.media_prefix %]/images/dash-corner-right1.png" />
+                         </td>
+                     </tr>
+                 </table>
+             </div>
+             <div id="dashboard">
+                 <div class="pos-abs">
+                     <div class="pos-rel-top4">
+                         <table cellpadding="0" cellspacing="0" border="0">
+                             <tr>
+                                 <td>
+                                     <img src="[% ctx.media_prefix %]/images/dash-corner-left2.png" />
+                                 </td>
+                                 <td id="dash_corner_mid2a">
+                                     <div id="dash_number_row">
+                                         <div class="pos-abs">
+                                             <div class="dash-pos-out">
+                                                 <div class="dash-align-out">
+                                                     <span id="dash_checked">[% ctx.user_stats.checkouts.out %]</span> [% l("Checked Out") %]
+                                                 </div>
+                                             </div>
+                                         </div>
+                                         <div class="pos-abs">
+                                             <div class="dash-pos-holds">
+                                                 <div class="dash-align-holds">
+                                                     <span id="dash_holds">[% ctx.user_stats.holds.total %]</span> [% l("On Hold") %]
+                                                 </div>
+                                             </div>
+                                         </div>
+                                         <div class="pos-abs">
+                                             <div class="dash-pos-pickup">
+                                                 <div class="dash-align-pickup">
+                                                     <span id="dash_pickup">[% ctx.user_stats.holds.ready %]</span> [% l("Ready for Pickup") %]
+                                                 </div>
+                                             </div>
+                                         </div>
+                                         <div class="pos-abs">
+                                             <div class="dash-pos-fines">
+                                                 <div class="dash-align-fines">
+                                                     <span id="dash_fines">[% money(ctx.user_stats.fines.balance_owed) %]</span> [% l("Fines") %]
+                                                 </div>
+                                             </div>
+                                         </div>
+                                     </div>
+                                 </td>
+                                 <td>
+                                     <img src="[% ctx.media_prefix %]/images/dash-corner-right2.png" />
+                                 </td>
+                             </tr>
+                         </table>
+                     </div>
+                 </div>
+             </div>
+         </div>
+         [% END %]
      </div>
      <div class="common-no-pad"></div>
  </div>

commit 28af7cb3b7445131c014a0cfef7e33f08d29c822
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 10 16:51:19 2011 -0500

    start using a centrally hard-coded ctx.opac_root

diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 1dfaf71..1c1d077 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -48,7 +48,7 @@
                                 </span>
                             </td>
                             <td align="right" class="view_link">
-                                <a href="circs">View All</a>
+                                <a href="[% ctx.opac_root %]/circs">View All</a>
                             </td>
                         </tr>
                     </table>
@@ -63,7 +63,7 @@
                                 </span>
                             </td>
                             <td align="right" class="view_link">
-                                <a href="holds">View All</a>
+                                <a href="[% ctx.opac_root %]/holds">View All</a>
                             </td>
                         </tr>
                     </table>
diff --git a/Open-ILS/web/templates/default/opac/parts/base.tt2 b/Open-ILS/web/templates/default/opac/parts/base.tt2
index ae1dac0..c03df65 100644
--- a/Open-ILS/web/templates/default/opac/parts/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/base.tt2
@@ -6,11 +6,11 @@
             href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto.css" />
         <link rel="stylesheet" type="text/css"
             href="[% ctx.media_prefix %]/css/skin/default/opac/style.css" />
-        [%# <link rel="unapi-server" type="application/xml" title="unAPI"
-            href="/opac/extras/unapi" />%]
         <title>Catalog - King County Library - [% ctx.page_title %]</title>
-        [% BLOCK html_head; END; # provide a default that can be overridden %]
-        [% PROCESS html_head %]
+        [%# <!-- is this needed? --><link rel="unapi-server"
+            type="application/xml" title="unAPI" href="/opac/extras/unapi" />%]
+        [% BLOCK html_head; END; # provide a default that can be overridden -%]
+        [%- PROCESS html_head -%]
     </head>
     <body>
         [% content %] 
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 1474fb6..9db6f32 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -30,7 +30,7 @@
                                             <td class='result_table_pic_header'
                                                 width="78" nowrap="nowrap" valign="top">
                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
-                                                <a href="record/[% rec.bre.id %]"><img alt="Image of item"
+                                                <a href="[% ctx.opac_root %]/record/[% rec.bre.id %]"><img alt="Image of item"
                                                         name='item_jacket' class='result_table_pic'
                                                         src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a><br />
                                                 [% END %]
@@ -40,7 +40,7 @@
                                                 valign="top">
                                                 <div class="bold">
                                                     <a title="[% attrs.title %]" name='item_title'
-                                                        href="record/[% rec.bre.id %]"
+                                                        href="[% ctx.opac_root %]/record/[% rec.bre.id %]"
                                                         class='search_link'>[% attrs.title %]</a>
                                                 </div>
                                                 <span style="font-size:11px;">
@@ -48,7 +48,7 @@
                                                         <em>
                                                             <a title="[% l("Perform an Author Search") %]"
                                                                 name='item_author'
-                                                                href="results?query=author%3a[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% loc %]"
+                                                                href="[% ctx.opac_root %]/results?query=author%3a[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% loc %]"
                                                                 class='search_link'>[% attrs.author %]</a>
                                                         </em> &nbsp;&nbsp;
                                                         [% attrs.pubdate %]
@@ -139,7 +139,7 @@
                                                     <div style="float:right;">
                                                         <div style="border-bottom:1px dotted #ccc;padding-top:10px;"
                                                             class="results_aux_utils"><a
-                                                                href="place_hold?hold_target=[% rec.bre.id %]&hold_type=T" name="place_hold_link"><img
+                                                                href="[% ctx.opac_root %]/place_hold?hold_target=[% rec.bre.id %]&hold_type=T" name="place_hold_link"><img
                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
                                                                 alt="place hold" /><span
                                                                     style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 0a469eb..5f3ad5d 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -1,11 +1,11 @@
 [% PROCESS "default/opac/parts/org_selector.tt2" %]
 <div id="search-box">    
-    <form action="[% skin_root %]results" method="GET">
+    <form action="[% ctx.opac_root %]/results" method="GET">
     <table cellpadding="0" cellspacing="10" border="0">
         <tr>
             <td colspan="3">
                 <span class="search_catalog_lbl">Search the Catalog</span>
-                <a href="[% skin_root %]advanced"
+                <a href="[% ctx.opac_root %]/advanced"
                     id="home_adv_search_link"><span
                     class="adv_search_font">Advanced Search</span></a>
             </td>
@@ -54,7 +54,7 @@
     </table>
     </form>
     <div id="breadcrumb">
-        <a href="[% skin_root %]home">Catalog Home</a> &gt;
+        <a href="[% ctx.opac_root %]/home">Catalog Home</a> &gt;
     </div>
     <div class="clear-both"></div>
 </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
index 0da00a4..2db1254 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@ -1,14 +1,14 @@
-[% USE money = format('$%.2f'); %]
+[%- USE money = format('$%.2f');
+    ctx.opac_root = '/eg/opac' -%]
 <div id="header">
     <div class="float-left">
-        <a href="http://www.kcls.org"><img
-            alt="KCLS Logo"
+        <a href="http://www.kcls.org"><img alt="KCLS Logo"
             src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /></a>
     </div>
     <div class="float-right">
         [% IF !ctx.user %]
         <div id="your-acct-login">
-            <a href="[% skin_root %]login" id="home_myopac_link"><img
+            <a href="[% ctx.opac_root %]/login" id="home_myopac_link"><img
                 alt="Your Account Log in"
                 src="[% ctx.media_prefix %]/images/login-btn.png"
                 onmouseover="this.src='[% ctx.media_prefix %]/images/login-btn-hover.png';"
@@ -35,12 +35,12 @@
                             <img src="[% ctx.media_prefix %]/images/dash-divider.jpg" />
                         </td>
                         <td id="dash_corner_mid1c">
-                            <a href="[% skin_root %]myopac/main" class="pos-rel-top4"><img
+                            <a href="[% ctx.opac_root %]/myopac/main" class="pos-rel-top4"><img
                                 alt="[% l('My Account') %]"
                                 src="[% ctx.media_prefix %]/images/acct-btn.png"
                                 onmouseover="this.src='[% ctx.media_prefix %]/images/acct-btn-hover.png';"
                                 onmouseout="this.src='[% ctx.media_prefix %]/images/acct-btn.png';" /></a>
-                            <a href="[% skin_root %]logout" class="pos-rel-top4"
+                            <a href="[% ctx.opac_root %]/logout" class="pos-rel-top4"
                                 id="logout_link"><img
                                 alt="[% l('Logout') %]"
                                 src="[% ctx.media_prefix %]/images/logout-btn.png"
diff --git a/Open-ILS/web/templates/default/opac/parts/utils.tt2 b/Open-ILS/web/templates/default/opac/parts/utils.tt2
index e140225..aa70a6c 100644
--- a/Open-ILS/web/templates/default/opac/parts/utils.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/utils.tt2
@@ -9,7 +9,7 @@
                         <a href="javascript:history.go(-1)"
                             id="util_back_btn"><img alt="Back"
                             src="[% ctx.media_prefix %]/images/tool_back.png" /></a>
-                        <a href="[% skin_root %]home"
+                        <a href="[% ctx.opac_root %]/home"
                             id="util_home_btn"><img alt="Homepage"
                             src="[% ctx.media_prefix %]/images/tool_home.png" /></a>
                         <a href="javascript:window.print();"
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 25eafc8..d4351f2 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -18,13 +18,13 @@
         <div id="results_header_bar">
             <div id="results_header_inner">
                 <div class="results_header_btns">
-                    <a href="home"><img alt="Another Search"
+                    <a href="[% ctx.opac_root %]/home"><img alt="Another Search"
                         src="[% ctx.media_prefix %]/images/another_search.png"
                         onmouseover="this.src='[% ctx.media_prefix %]/images/another_search_hover.png';"
                         onmouseout="this.src='[% ctx.media_prefix %]/images/another_search.png';" /></a>
                 </div>
                 <div class="results_header_btns">
-                    <a href="advanced"><img alt="Advanced Search"
+                    <a href="[% ctx.opac_root %]/advanced"><img alt="Advanced Search"
                         src="[% ctx.media_prefix %]/images/adv_search.png"
                         onmouseover="this.src='[% ctx.media_prefix %]/images/adv_search_hover.png';"
                         onmouseout="this.src='[% ctx.media_prefix %]/images/adv_search.png';" /></a>

commit 8cf25f2f91244cfe99c6067d7af8bac8109c0b87
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 10 16:11:37 2011 -0500

    the user account "dashboard"/mini-myopac works on every page now

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index b3a8bbc..07eac9d 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -102,10 +102,47 @@ div.select-wrapper:hover {
 }
 
 #dash_user {
-	font-weight:bold;
-	text-transform:capitalize;
-}
-
+	font-weight: bold;
+	text-transform: capitalize;
+    position: relative;
+    top: 10px;
+}
+
+#dash_corner_mid1a {
+    vertical-align: top;
+    background: url('/images/dash-corner-mid1.png') repeat-x;
+    padding-left: 8px;
+}
+#dash_corner_mid1b {
+    background: url('/images/dash-corner-mid1.png') repeat-x;
+    padding: 0px 8px 0px 10px;
+}
+#dash_corner_mid1b img { position: relative; top: -1px; }
+#dash_corner_mid1c {
+    background: url('/images/dash-corner-mid1.png') repeat-x;
+    vertical-align: top;
+}
+#dash_corner_mid2a {
+    vertical-align: top;
+    width: 372px;
+    background: url('/images/dash-corner-mid2.png') repeat-x;
+}
+.dash-pos-out { position: relative; left: 3px; }
+.dash-pos-holds { position: relative; left: 100px; }
+.dash-align-out { text-align: right; width: 86px; }
+.dash-align-holds { text-align: right; width: 62px; }
+.dash-pos-pickup { position: relative; left: 170px; }
+.dash-align-pickup { text-align: right; width: 111px; }
+.dash-pos-fines { position: relative; left: 284px; }
+.dash-align-fines { text-align: right; width: 76px; }
+.pos-rel-top4 { position: relative; top: 4px; }
+#dash_number_row { position: relative; top: 6px; }
+#logout_link { left: 1px; }
+
+#dash_checked { color: #ffcc33; }
+#dash_holds { color: #ffcc33; }
+#dash_pickup { color: #1dd93c; }
+#dash_fines { color: #f41d36; }
 #header {
 	color: #fff;
 	padding: 26px 0px 26px 0px;
@@ -169,6 +206,12 @@ div.select-wrapper:hover {
 	padding-left:0px;
 }
 
+#gold-links-home {
+	margin:auto;
+	width:694px;
+	padding-left:0px;
+}
+
 #util-bar {
 	margin:auto;
 	width:974px;
@@ -441,7 +484,7 @@ div.select-wrapper:hover {
 #hp-buttons {
 	margin: auto;
 	margin-top: 6px;
-	width: 974px;
+	width: 694px; /* 974px; */
 }
 
 #hp-welcome {
@@ -467,7 +510,7 @@ div.select-wrapper:hover {
 
 #hp-banner {
 	margin: auto;
-	width:974px;
+	width: 694px; /* formerly 974px */
 	height: 213px;
 }
 
diff --git a/Open-ILS/web/templates/default/opac/parts/base.tt2 b/Open-ILS/web/templates/default/opac/parts/base.tt2
index 881b46e..ae1dac0 100644
--- a/Open-ILS/web/templates/default/opac/parts/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/base.tt2
@@ -6,11 +6,9 @@
             href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto.css" />
         <link rel="stylesheet" type="text/css"
             href="[% ctx.media_prefix %]/css/skin/default/opac/style.css" />
-        <link rel="stylesheet" type="text/css"
-            href="[% ctx.media_prefix %]/css/skin/default/opac/contentslider.css" />
+        [%# <link rel="unapi-server" type="application/xml" title="unAPI"
+            href="/opac/extras/unapi" />%]
         <title>Catalog - King County Library - [% ctx.page_title %]</title>
-        <link rel="unapi-server" type="application/xml" title="unAPI"
-            href="/opac/extras/unapi" />
         [% BLOCK html_head; END; # provide a default that can be overridden %]
         [% PROCESS html_head %]
     </head>
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
index 8918b6b..0da00a4 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@ -1,3 +1,4 @@
+[% USE money = format('$%.2f'); %]
 <div id="header">
     <div class="float-left">
         <a href="http://www.kcls.org"><img
@@ -5,6 +6,7 @@
             src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /></a>
     </div>
     <div class="float-right">
+        [% IF !ctx.user %]
         <div id="your-acct-login">
             <a href="[% skin_root %]login" id="home_myopac_link"><img
                 alt="Your Account Log in"
@@ -12,6 +14,95 @@
                 onmouseover="this.src='[% ctx.media_prefix %]/images/login-btn-hover.png';"
                 onmouseout="this.src='[% ctx.media_prefix %]/images/login-btn.png';" /></a>
         </div>
+        [% ELSE %]
+        <div id="dash_wrapper">
+            <div class="float-right">
+                <table cellpadding="0" cellspacing="0" border="0">
+                    <tr>
+                        <td>
+                            <img src="[% ctx.media_prefix %]/images/dash-corner-left1.png" />
+                        </td>
+                        <td id="dash_corner_mid1a">
+                            <span id="dash_user">
+                                [%  # XXX TODO: some kind of standard helper
+                                    # function in TT2 to render human names,
+                                    # i18n aware.
+                                    ctx.user.first_given_name %]
+                                [% ctx.user.family_name %]
+                            </span>
+                        </td>
+                        <td id="dash_corner_mid1b">
+                            <img src="[% ctx.media_prefix %]/images/dash-divider.jpg" />
+                        </td>
+                        <td id="dash_corner_mid1c">
+                            <a href="[% skin_root %]myopac/main" class="pos-rel-top4"><img
+                                alt="[% l('My Account') %]"
+                                src="[% ctx.media_prefix %]/images/acct-btn.png"
+                                onmouseover="this.src='[% ctx.media_prefix %]/images/acct-btn-hover.png';"
+                                onmouseout="this.src='[% ctx.media_prefix %]/images/acct-btn.png';" /></a>
+                            <a href="[% skin_root %]logout" class="pos-rel-top4"
+                                id="logout_link"><img
+                                alt="[% l('Logout') %]"
+                                src="[% ctx.media_prefix %]/images/logout-btn.png"
+                                onmouseover="this.src='[% ctx.media_prefix %]/images/logout-btn-hover.png';"
+                                onmouseout="this.src='[% ctx.media_prefix %]/images/logout-btn.png';" /></a>
+                        </td>
+                        <td>
+                            <img src="[% ctx.media_prefix %]/images/dash-corner-right1.png" />
+                        </td>
+                    </tr>
+                </table>
+            </div>
+            <div id="dashboard">
+                <div class="pos-abs">
+                    <div class="pos-rel-top4">
+                        <table cellpadding="0" cellspacing="0" border="0">
+                            <tr>
+                                <td>
+                                    <img src="[% ctx.media_prefix %]/images/dash-corner-left2.png" />
+                                </td>
+                                <td id="dash_corner_mid2a">
+                                    <div id="dash_number_row">
+                                        <div class="pos-abs">
+                                            <div class="dash-pos-out">
+                                                <div class="dash-align-out">
+                                                    <span id="dash_checked">[% ctx.user_stats.checkouts.out %]</span> [% l("Checked Out") %]
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <div class="pos-abs">
+                                            <div class="dash-pos-holds">
+                                                <div class="dash-align-holds">
+                                                    <span id="dash_holds">[% ctx.user_stats.holds.total %]</span> [% l("On Hold") %]
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <div class="pos-abs">
+                                            <div class="dash-pos-pickup">
+                                                <div class="dash-align-pickup">
+                                                    <span id="dash_pickup">[% ctx.user_stats.holds.ready %]</span> [% l("Ready for Pickup") %]
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <div class="pos-abs">
+                                            <div class="dash-pos-fines">
+                                                <div class="dash-align-fines">
+                                                    <span id="dash_fines">[% money(ctx.user_stats.fines.balance_owed) %]</span> [% l("Fines") %]
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </td>
+                                <td>
+                                    <img src="[% ctx.media_prefix %]/images/dash-corner-right2.png" />
+                                </td>
+                            </tr>
+                        </table>
+                    </div>
+                </div>
+            </div>
+        </div>
+        [% END %]
     </div>
     <div class="common-no-pad"></div>
 </div>

commit 84896be5ecb23d87ce2c3732d288d010bca0d337
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 10 14:04:56 2011 -0500

    whitespace and minor stuff

diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index 45f43b1..b91d3b7 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -5,6 +5,8 @@
 %]
 <div>
     <div id='xulholds_box' class='hide_me canvas' style='margin-top: 6px;'>
+        <!-- XXX TODO staff will need this to work ("advanced" hold placement)
+        later -->
         <center>
             <table class='data_grid' style='margin-top: 20px;'>
                 <tbody>
@@ -43,7 +45,7 @@
             <input type="hidden" name="hold_type"
                 value="[% CGI.param('hold_type') | html %]" />
             <input type="hidden" name="redirect_to"
-                value="[% CGI.param('redirect_to') | html %]" />
+                value="[% ctx.referer | replace('^http:', 'https:') | html %]" />
             <h1>Place Hold</h1>
             <p>
                 You would like to place a hold on
@@ -56,9 +58,9 @@
             </p>
             <p>
                 If you would like to change the library pick up location, select
-                from the &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                from the
                 [% PROCESS "default/opac/parts/org_selector.tt2";
-                    PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib %]<br />
+                    PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib %]<br class="clear-both" />
                 Location dropdown menu.
             </p>
             <p>If you use the Traveling Library Center (TLC) and ABC Express
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
index a3ddabf..8918b6b 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@ -1,26 +1,29 @@
-<!-- ****************** top_nav.xml ***************************** -->
 <div id="header">
-    <div class="float-left"><a
-        href="http://www.kcls.org"><img alt="KCLS Logo"
-        src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /></a></div>
+    <div class="float-left">
+        <a href="http://www.kcls.org"><img
+            alt="KCLS Logo"
+            src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /></a>
+    </div>
     <div class="float-right">
-        <div id="your-acct-login"><a
-            href="[% skin_root %]login" id="home_myopac_link"><img
-            alt="Your Account Log in"
-            src="[% ctx.media_prefix %]/images/login-btn.png"
-            onmouseover="this.src='[% ctx.media_prefix %]/images/login-btn-hover.png';"
-            onmouseout="this.src='[% ctx.media_prefix %]/images/login-btn.png';" /></a></div>
-
-
+        <div id="your-acct-login">
+            <a href="[% skin_root %]login" id="home_myopac_link"><img
+                alt="Your Account Log in"
+                src="[% ctx.media_prefix %]/images/login-btn.png"
+                onmouseover="this.src='[% ctx.media_prefix %]/images/login-btn-hover.png';"
+                onmouseout="this.src='[% ctx.media_prefix %]/images/login-btn.png';" /></a>
+        </div>
     </div>
     <div class="common-no-pad"></div>
 </div>
 <div id="gold-links-holder">
     <div id="gold-links">
         <div id="header-links">
-            <a href="http://www.kcls.org/usingthelibrary/index.cfm">Using the Library</a>
-            <a href="http://www.kcls.org/booksandreading/">Books &amp; Reading</a>
-            <a href="http://www.kcls.org/research/index.cfm">Research &amp; Homework</a>
+            <a href="http://www.kcls.org/usingthelibrary/index.cfm">Using
+                the Library</a>
+            <a href="http://www.kcls.org/booksandreading/">Books &amp;
+                Reading</a>
+            <a href="http://www.kcls.org/research/index.cfm">Research &amp;
+                Homework</a>
             <a href="http://www.kcls.org/programs/">Programs &amp; Classes</a>
             <a href="http://www.kcls.org/events/">Events</a>
             <a href="/opac/extras/mobile/">Mobile Catalog</a>
@@ -28,4 +31,3 @@
         </div>
     </div>
 </div>
-<!-- ****************** end: top_nav.xml ***************************** -->

commit 1ae3e98292227416543a44f10c74b4d8433ccfb9
Merge: 9f49869 7c046a3
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 10 13:16:00 2011 -0500

    Merge branch 'opac-tt-poc' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 9f49869b4c1823394a66317bb802972ce618cc2f
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 10 13:15:19 2011 -0500

    some progress on the place_hold page; ou selector improvements, etc

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 1dc5d31..b3a8bbc 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -518,12 +518,8 @@ div.select-wrapper:hover {
 	border-bottom: 1px solid black;
 }
 
-#main-content {
-    /* on devcatalog: width: 974px; margin:auto; padding-left:0px; */
-	width: 694px;
-	margin: auto;
-	padding-left: 17px;
-}
+#main-content-home { width: 694px; margin: auto; padding-left: 17px; }
+#main-content { width: 974px; margin:auto; padding-left: 0px; }
 
 #main-content .login_boxes {
 	border: 1px solid #dedede;
diff --git a/Open-ILS/web/templates/default/opac/home.tt2 b/Open-ILS/web/templates/default/opac/home.tt2
index f6c4ea5..be26963 100644
--- a/Open-ILS/web/templates/default/opac/home.tt2
+++ b/Open-ILS/web/templates/default/opac/home.tt2
@@ -6,7 +6,7 @@
         [% INCLUDE "default/opac/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
-        <div id="main-content">
+        <div id="main-content-home">
             <div class="common-full-pad"></div>
             [% INCLUDE "default/opac/parts/homesearch.tt2" %]
             <div class="common-full-pad"></div>	
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index 44fb6b3..f0beef9 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -28,7 +28,14 @@
     <tr>
         <td align='center'>
             [% l("Search Library") %]<br /><br />
-            [% INCLUDE "default/opac/parts/libselect.tt2" %]
+            <span id='depth_selector_span'>
+                [% PROCESS "default/opac/parts/org_selector.tt2";
+                    PROCESS build_org_selector name='loc' value=loc %]
+            </span>
+            <span id='lib_selector_span'>
+                <a id='lib_selector_link' class='classic_link'
+                    href='#'>[% l("Choose a library to search") %]</a>
+            </span>
             <br /><br />
             <span>[% l("Limit to Available") %]</span>
             <input type='checkbox' id='opac.result.limit2avail'/>
diff --git a/Open-ILS/web/templates/default/opac/parts/libselect.tt2 b/Open-ILS/web/templates/default/opac/parts/libselect.tt2
deleted file mode 100644
index 59cdfa6..0000000
--- a/Open-ILS/web/templates/default/opac/parts/libselect.tt2
+++ /dev/null
@@ -1,33 +0,0 @@
-[%  # XXX TODO probably put this BLOCK somewhere else so it can be used widely.
-    # Org Unit Selector Widget :
-    #   PROCESS build_org_selector id='selector-id' name='selector-name'
-    BLOCK build_org_selector;
-        first_run = 0;
-        IF !org_unit;
-            org_unit = ctx.aou_tree;
-            first_run = 1;
-%]
-    <select id='[% id %]' name='[% name %]'>
-    [% END %]
-        <option value='[% org_unit.id %]' [% IF org_unit.id == value %] selected='selected' [% END %]>
-            [%
-                pad = org_unit.ou_type.depth * 2;
-                FOR idx IN [0..pad]; '&nbsp;'; END;
-                org_unit.name;
-            %]
-        </option>
-        [% FOR child IN org_unit.children; PROCESS build_org_selector org_unit = child; END %]
-    [% IF first_run %]
-    </select>
-    [% END %]
-[% END %]
-
-<!-- ****************** libselect.xml ***************************** -->
-    <span id='depth_selector_span'>
-        [% PROCESS build_org_selector name='loc' value=loc %]
-    </span>
-    <span id='lib_selector_span'>
-        <a id='lib_selector_link' class='classic_link'
-            href='#'>[% l("Choose a library to search") %]</a>
-    </span>
-<!-- ****************** end: libselect.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
new file mode 100644
index 0000000..aa99e91
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
@@ -0,0 +1,23 @@
+[%
+    BLOCK build_org_selector_options; %]
+        <option value='[% walker.id %]' [% IF walker.id == value %] selected='selected' [% END %]>
+            [%
+                pad = walker.ou_type.depth * 2;
+                FOR idx IN [0..pad]; '&nbsp;'; END;
+                walker.name;
+            %]
+        </option>
+        [%  FOR child IN walker.children;
+            PROCESS build_org_selector_options walker=child value=value;
+        END;
+    END;
+
+    # XXX TODO probably put this BLOCK somewhere else so it can be used widely.
+    # Org Unit Selector Widget :
+    #   PROCESS build_org_selector id='selector-id' name='selector-name'
+    BLOCK build_org_selector;
+%]
+    <select id='[% id %]' name='[% name %]'>
+    [% PROCESS build_org_selector_options walker=(org_unit || ctx.aou_tree) value=value %]
+    </select>
+[%  END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index 7fc9f31..45f43b1 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -1,3 +1,8 @@
+[%  USE CGI;
+    PROCESS "default/opac/parts/marc_misc.tt2";
+    attrs = {marc_xml => ctx.marc_xml};
+    PROCESS get_marc_attrs args=attrs;
+%]
 <div>
     <div id='xulholds_box' class='hide_me canvas' style='margin-top: 6px;'>
         <center>
@@ -9,13 +14,16 @@
                             <input type='text' id='xul_recipient_barcode' />
                         </td>
                         <td>
-                            <input type='submit' value='[% l("Submit") %]' id='xul_recipient_barcode_submit' />
+                            <input type='submit' value='[% l("Submit") %]'
+                                id='xul_recipient_barcode_submit' />
                         </td>
                         <td>
                             <input type='submit' value='[% l("Cancel") %]' />
                         </td>
                         <td>
-                            <input type='submit' value='[% l("Place hold for my account") %]' id='xul_recipient_me' />
+                            <input type='submit'
+                                value='[% l("Place hold for my account") %]'
+                                id='xul_recipient_me' />
                         </td>
                     </tr>
                 </tbody>
@@ -28,28 +36,40 @@
         <b>[% l("Checking for possibility of hold fulfillment...") %]</b>
     </div>
     <div id='holds_box' class='canvas' style='margin-top: 6px;'>
-        <br/>
-        <h1>Place Hold</h1>
-        <p>
-        You would like to place a hold on
-        <strong>&quot;<span id="holds_title"></span>&quot;</strong>
-        to be picked up at
-        <strong>&quot;<span id="holds_pickup_lib"></span>&quot;</strong>.<br />
-        If this is correct, press <strong>SUBMIT</strong>.</p>
-        <p>
-            If you would like to change the library pick up location, select
-            from the &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            <select style="width:200px;" id="holds_org_selector"></select><br />
-            Location dropdown menu.
-        </p>
-        <p>If you use the Traveling Library Center (TLC) and ABC Express
-            services, please select "Outreach" to have the item delivered
-            during your scheduled visit.</p>
-        <a href="#" id="holds_submit"><img
-            alt="Submit" src="[% ctx.media_prefix %]/images/btnSubmit.png" /></a>
-        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-        <a href="#" id="holds_cancel"><img
-            alt="Cancel" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+        <form method="POST">
+            <br/>
+            <input type="hidden" name="hold_target"
+                value="[% CGI.param('hold_target') | html %]" />
+            <input type="hidden" name="hold_type"
+                value="[% CGI.param('hold_type') | html %]" />
+            <input type="hidden" name="redirect_to"
+                value="[% CGI.param('redirect_to') | html %]" />
+            <h1>Place Hold</h1>
+            <p>
+                You would like to place a hold on
+                <strong><q>[% attrs.title %]</q></strong>
+                to be picked up at
+                <strong>
+                    <q>[% ctx.find_aou(ctx.default_pickup_lib).name %].</q>
+                </strong><br />
+                If this is correct, press <strong>SUBMIT</strong>.
+            </p>
+            <p>
+                If you would like to change the library pick up location, select
+                from the &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                [% PROCESS "default/opac/parts/org_selector.tt2";
+                    PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib %]<br />
+                Location dropdown menu.
+            </p>
+            <p>If you use the Traveling Library Center (TLC) and ABC Express
+                services, please select "Outreach" to have the item delivered
+                during your scheduled visit.</p>
+            <input type="image" name="submit" value="submit" title="Submit"
+                alt="Submit" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
+            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            <a href="javascript:history.go(-1);" id="holds_cancel"><img
+                alt="Cancel" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+        </form>
         <br /><br />
         <p>* If you need your item today, and it is checked in at your
             library, please place your hold and then call your library to set it
@@ -124,7 +144,7 @@
                     <td class='holds_cell'>[% l("Contact email address") %]:</td>
                     <td class='holds_cell' id='holds_email'> 
                         <span class='hide_me' id='holds.no_email'>
-                           ([% l("Patron has no configured email address)" %])<br/>
+                           ([% l("Patron has no configured email address") %])<br/>
                            ([% l("See") %] <a class='classic_link' id='holds.no_email.my_account'>[% l("My Account") %]</a> [% l("for setting your email address") %])
                         </span>
                         <span class='hide_me' id='holds.no_email.xul'>
@@ -234,37 +254,37 @@
         </span>
     </div>
     <div id="anonListTable" class="hide_me" style="margin-top: 6px;">
-    <select id="holdsCacheSel" class="hide_me"></select><br />
-    <a href="#">Place hold on selected</a><br />
-    <a href="#">Remove selected</a>
-    
-    <table id="temp_list_holds" cellpadding='0' cellspacing='0' border='0'
-        style="margin-top:10px;">
-        <tr>
-            <td width="1%" style="padding-left:10px;">
-                <input type='checkbox' title='Select All'
-                    id='anon_selector' />
-            </td>
-            <td width="1%">
-            </td>
-            <td width="98%" style="padding-left:40px;">
-                <strong>Title</strong>
-            </td>
-        </tr>
-    </table>
-    <table width='100%' style="margin-left:7px;margin-bottom:10px;">
-        <thead>
-            <tr><td width='20'></td><td width='30'></td><td></td></tr>
-        </thead>
-        <tbody id="anonListParent">
-            <tr id="anonListTemp">
-              <td><input type='checkbox' name='anon_selector' /></td>
-              <td name="curr_row"></td>
-              <td name="title"></td>
+        <select id="holdsCacheSel" class="hide_me"></select><br />
+        <a href="#">Place hold on selected</a><br />
+        <a href="#">Remove selected</a>
+        
+        <table id="temp_list_holds" cellpadding='0' cellspacing='0' border='0'
+            style="margin-top:10px;">
+            <tr>
+                <td width="1%" style="padding-left:10px;">
+                    <input type='checkbox' title='Select All'
+                        id='anon_selector' />
+                </td>
+                <td width="1%">
+                </td>
+                <td width="98%" style="padding-left:40px;">
+                    <strong>Title</strong>
+                </td>
             </tr>
-        </tbody>
-    </table>
-    <a href="#">Back to search results</a>
+        </table>
+        <table width='100%' style="margin-left:7px;margin-bottom:10px;">
+            <thead>
+                <tr><td width='20'></td><td width='30'></td><td></td></tr>
+            </thead>
+            <tbody id="anonListParent">
+                <tr id="anonListTemp">
+                  <td><input type='checkbox' name='anon_selector' /></td>
+                  <td name="curr_row"></td>
+                  <td name="title"></td>
+                </tr>
+            </tbody>
+        </table>
+        <a href="#">Back to search results</a>
     </div>
 
     <span class='hide_me' id='format_words'>
@@ -283,5 +303,4 @@
     <span id='hold_failed_patron_barred' class='hide_me'>[% l("PATRON BARRED. Please see any notes in the \"Staff Notes\" section of your \"My Account\" page or contact your local library.") %]</span>
     <span id='invalid_hold' class='hide_me'>[% l("This hold is no longer valid. It's likely that the target for the hold was deleted from the system.  Please cancel this hold and place a new one.") %]</span>
     <span id='holds_invalid_recipient' class='hide_me'>[% l("The patron barcode entered as the hold recipient is invalid.") %]</span>
-
 </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 50ae309..0a469eb 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -1,3 +1,4 @@
+[% PROCESS "default/opac/parts/org_selector.tt2" %]
 <div id="search-box">    
     <form action="[% skin_root %]results" method="GET">
     <table cellpadding="0" cellspacing="10" border="0">
@@ -16,7 +17,7 @@
             <td>
                 <div id="search_box_wrapper">
                     <input type="text" id="search_box" name="query"
-                        value="[% query || l("Search Keyword") %]"
+                        value="[% query || l("Search Keyword") | html %]"
                         onfocus="if (this.value=='[% l("Search Keyword") %]'){this.value='';this.style.color='#000';}"
                         onblur="if (this.value==''){this.value='[% l("Search Keyword") %]';this.style.color='#999';}" />
                     <input name='page' type='hidden' value="0" />
@@ -41,7 +42,13 @@
                 [% INCLUDE "default/opac/parts/format_selector.tt2" %]
             </td>
             <td>
-                [% INCLUDE "default/opac/parts/libselect.tt2" %]
+                <span id='depth_selector_span'>
+                    [% PROCESS build_org_selector name='loc' value=loc %]
+                </span>
+                <span id='lib_selector_span'>
+                    <a id='lib_selector_link' class='classic_link'
+                        href='#'>[% l("Choose a library to search") %]</a>
+                </span>
             </td>
         </tr>
     </table>

commit 7c046a3f8cfb6e312890c1dcaf5ac082fca09a72
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Thu Feb 10 12:25:29 2011 -0500

    login form cleanup and implementation of login-failure handling; more to come

diff --git a/Open-ILS/web/templates/default/opac/parts/login/form.tt2 b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
index e140bcb..939cd17 100644
--- a/Open-ILS/web/templates/default/opac/parts/login/form.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
@@ -1,4 +1,6 @@
-<!-- ****************** login.xml ***************************** -->
+
+
+<!-- TODO: MOVE INTO SEPARATE FORGOT-PASSWORD PAGE 
 <div class="hide_me">
 	<div class='login_text color_1' style='padding: 4px; text-align: center;'>
 		<span>[% l("Login") %]</span>
@@ -50,21 +52,31 @@
     </tbody>
 </table>
 
+
 <span id='pw_no_match' class='hide_me'>[% l("Passwords do not match") %]</span>
 <span id='pw_update_successful' class='hide_me'>[% l("Password successfully updated") %]</span>
 <span id='pw_not_strong' class='hide_me'>
     [% l("The password provided is not strong enough.") %]
-    [% l("The password must be at least 7 characters in length,
- contain at least one letter (a-z/A-Z),
- and contain at least one number.") %]
+    [% l("The password must be at least 7 characters in length, contain at least one letter (a-z/A-Z), and contain at least one number.") %]
 </span>
-<span id='patron_card_inactive_alert' class='hide_me'>[% l("The barcode used to login is marked as inactive.  Please contact your local library.") %]</span>
-<span id='patron_inactive_alert' class='hide_me'>[% l("This account has been deactivated.  Please contact your local library.") %]</span>
-<span id='patron_login_failed' class='hide_me'>[% l("Login failed. The username or password provided was not valid.  Ensure Caps-Lock is off and try again or contact your local library.") %]</span>
 
-<div id="login_box">
+ ^== TODO: MOVE INTO SEPARATE FORGOT-PASSWORD PAGE  -->
+
+
+[% IF ctx.login_failed_event;
+    IF ctx.login_failed_event.textcode == 'PATRON_CARD_INACTIVE';
+        l("The barcode used to login is marked as inactive.  Please contact your local library.");
+    ELSIF ctx.login_failed_event.textcode == 'PATRON_INACTIVE';
+        l("This account has been deactivated.  Please contact your local library.");
+    ELSE;
+        l("Login failed. The username or password provided was not valid.  Ensure Caps-Lock is off and try again or contact your local library.");
+    END;
+END %]
+
+
+<div>
     <div style="height:20px;"></div>
-    <form id='login_form' method='POST'>
+    <form method='POST'>
         <table cellpadding="0" cellspacing="0" border="0">
             <tr>
                 <td valign="top" width="676" class="login_boxes left_brain">
@@ -79,16 +91,18 @@
                         </tr>
                         <tr>
                             <td width="42%" class="lbl1">
-                                Library Card Number or Username<br />
+                                [% l('Library Card Number or Username') %]
+                                <br />
                                 <span class="lbl2">
-                                    Please include leading zeros and no spaces.
-                                    <br /> Example: 0026626051</span>
+                                    [% l('Please include leading zeros and no spaces.') %]
+                                    <br/>
+                                    [% l('Example: 0026626051') %]
+                                </span>
                                 <br /><br />
                             </td>
                             <td width="58%" valign="top">
                                 <div class="input_bg">
-                                    <input type="text" name="username"
-                                        id="login_username" />
+                                    <input type="text" name="username"/>
                                 </div>
                             </td>
                         </tr>
@@ -99,33 +113,27 @@
                         </tr>
                         <tr>
                             <td valign="top" class="lbl1">
-                                PIN Number or Password<br />
-                                <span class="lbl2">If this is your first time
-                                    logging in, please enter<br />
-                                    the last 4 digits of your phone number.<br />
-                                    Example: 0926</span>
+                                [% l('PIN Number or Password') %]<br />
+                                <span class="lbl2">
+                                    [% l('If this is your first time logging in, please enter [_1] the last 4 digits of your phone number. [_2] Example: 0926', '<br/>', '<br/>') %]
+                                </span>
                             </td>
                             <td valign="top">
                                 <div class="input_bg">
-                                    <input name="password" type="password" id="login_password" />
+                                    <input name="password" type="password" />
                                 </div>
                                 <div style="padding-top:7px;">
                                     <input type='hidden'
                                         name='redirect_to'
                                         value='[% CGI.param('redirect_to') || ctx.referer | replace('^http:', 'https:') %]' />
-                                    <input class="hide_me" type="checkbox"
-                                        id="remember_me" name="remember_me" />
-                                    <label class="hide_me"
-                                        style="position:relative;top:-2px;"
-                                        for="remember_me">Remember Me?</label>
+                                    <input type="checkbox" name="persist" /> [% l('Remember Me?') %]
                                 </div>
                                 <div style="padding-top:14px;">
-                                    <a href="#" id="login_button"><img
-                                        alt="Log in" src="[% ctx.media_prefix %]/images/login-btn2.png" /></a>
-                                    <input class="hide_me"
-                                        id="login_form_submit" type="submit" />
-                                    <a href="#"
+                                    <input type='image' alt="Log in" src="[% ctx.media_prefix %]/images/login-btn2.png" />
+                                    <!-- TODO
+                                    <a href="reset_password"
                                         style="position:relative;top:-13px;left:2px;font-size:10px;">Forgot your PIN?</a>
+                                    -->
                                 </div>
 	                        </td>
                         </tr>
@@ -133,22 +141,20 @@
                     <br /><br />
                 </td>
 	            <td><div style="width:10px;"></div></td>
-                <td class="login_boxes right_brain" align="center"
-                    valign="top" width="291">
-                    <a href="http://www.kcls.org/about/contact/"><img
-                        src="[% ctx.media_prefix %]/images/questions.png"
-                        alt="Questions?" style="margin-top:29px;" /></a>
+                <td class="login_boxes right_brain" align="center" valign="top" width="291">
+
+                    <a href="http://www.kcls.org/about/contact/"><img 
+                        src="[% ctx.media_prefix %]/images/questions.png" alt="[% l('Questions?') %]" style="margin-top:29px;" /></a>
+
 	                <div style="width:182px;color:black;padding:5px 25px;">
-                        Visit our FAQs section for answers to common questions
-                        about how to use your account.
+                        [% l('Visit our FAQs section for answers to common questions about how to use your account.') %]
 	                </div>
+
                     <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm#FAQs"><img
-                        alt="FAQs" src="[% ctx.media_prefix %]/images/faqs-btn.png"
-                        style="margin-top:13px;" /></a>
+                        alt="[% l('FAQs') %]" src="[% ctx.media_prefix %]/images/faqs-btn.png" style="margin-top:13px;" /></a>
 	            </td>
             </tr>
         </table>
     </form>
     <div class="clear-both"></div>
 </div>
-<!-- ****************** end: login.xml ***************************** -->

commit 2b9beb11b25603682e134af840af23fe24233005
Author: berick <berick at esilibrary.com>
Date:   Thu Feb 10 11:56:59 2011 -0500

    added i18n filter support for translating text blocks via filters; more login form cleanup; moved some global USE's into topnav

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index fb72913..3a62f4f 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -82,7 +82,7 @@ sub load {
     # ----------------------------------------------------------------
     unless($self->cgi->https and $self->editor->requestor) {
         # If a secure resource is requested insecurely, redirect to the login page
-        my $url = 'https://' . $self->apache->hostname . $self->ctx->{base_path} . "/opac/login";
+        my $url = 'https://' . $self->apache->hostname . $self->ctx->{opac_root} . "/login";
         $self->apache->print($self->cgi->redirect(-url => $url));
         return Apache2::Const::REDIRECT;
     }
@@ -198,6 +198,7 @@ sub load_helpers {
         );
     };
 
+    # retrieve and cache org unit setting values
     $ctx->{get_org_setting} = sub {
         my($org_id, $setting) = @_;
         $cache{org_settings}{$org_id} = {} unless $cache{org_settings}{$org_id};
@@ -218,6 +219,8 @@ sub load_common {
     my $ctx = $self->ctx;
 
     $ctx->{referer} = $self->cgi->referer;
+    $ctx->{path_info} = $self->cgi->path_info;
+    $ctx->{opac_root} = $ctx->{base_path} . "/opac"; # absolute base url
     $ctx->{is_staff} = ($self->apache->headers_in->get('User-Agent') =~ 'oils_xulrunner');
 
     if($e->authtoken($self->cgi->cookie('ses'))) {
@@ -259,7 +262,7 @@ sub load_login {
     my $org_unit = $cgi->param('loc') || $ctx->{aou_tree}->()->id;
     my $persist = $cgi->param('persist');
 
-    # initial log form loading
+    # initial log form only
     return Apache2::Const::OK unless $username and $password;
 
 	my $seed = $U->simplereq(
@@ -310,7 +313,7 @@ sub load_login {
 sub load_logout {
     my $self = shift;
 
-    my $url = 'http://' . $self->apache->hostname . $self->ctx->{base_path} . "/opac/home";
+    my $url = 'http://' . $self->apache->hostname . $self->ctx->{opac_root} . "/home";
 
     $self->apache->print(
         $self->cgi->redirect(
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index 807af47..63836f8 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -50,7 +50,8 @@ sub handler {
     my $tt = Template->new({
         OUTPUT => ($as_xml) ?  sub { parse_as_xml($r, $ctx, @_); } : $r,
         INCLUDE_PATH => $ctx->{template_paths},
-        DEBUG => $ctx->{debug_template}
+        DEBUG => $ctx->{debug_template},
+        PLUGINS => {EGI18N => 'OpenILS::WWW::EGWeb::I18NFilter'}
     });
 
     unless($tt->process($template, {ctx => $ctx, l => set_text_handler($ctx, $r)})) {
@@ -75,7 +76,8 @@ sub set_text_handler {
         $lh_cache{$locale} = $lh_cache{'en_US'};
     }
 
-    return sub { return $lh_cache{$locale}->maketext(@_); };
+    return $OpenILS::WWW::EGWeb::I18NFilter::maketext = 
+        sub { return $lh_cache{$locale}->maketext(@_); };
 }
 
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/I18NFilter.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/I18NFilter.pm
new file mode 100644
index 0000000..cc931fa
--- /dev/null
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/I18NFilter.pm
@@ -0,0 +1,19 @@
+package OpenILS::WWW::EGWeb::I18NFilter;
+use Template::Plugin::Filter;
+use base qw(Template::Plugin::Filter);
+our $DYNAMIC = 1;
+our $maketext;
+
+sub filter {
+    my ($self, $text, $args) = @_;
+    return $maketext->($text, @$args);
+}
+
+sub init {
+    my $self = shift;
+    $self->install_filter('l');
+    return $self;
+}
+
+1;
+
diff --git a/Open-ILS/web/templates/default/opac/login.tt2 b/Open-ILS/web/templates/default/opac/login.tt2
index 3b2e392..2452281 100644
--- a/Open-ILS/web/templates/default/opac/login.tt2
+++ b/Open-ILS/web/templates/default/opac/login.tt2
@@ -1,3 +1,4 @@
+[% USE CGI %]
 [%  WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = "Account Login" %]
diff --git a/Open-ILS/web/templates/default/opac/parts/login/form.tt2 b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
index 939cd17..38a6a2d 100644
--- a/Open-ILS/web/templates/default/opac/parts/login/form.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
@@ -1,6 +1,5 @@
-
-
 <!-- TODO: MOVE INTO SEPARATE FORGOT-PASSWORD PAGE 
+
 <div class="hide_me">
 	<div class='login_text color_1' style='padding: 4px; text-align: center;'>
 		<span>[% l("Login") %]</span>
@@ -62,17 +61,20 @@
 
  ^== TODO: MOVE INTO SEPARATE FORGOT-PASSWORD PAGE  -->
 
-
-[% IF ctx.login_failed_event;
+[% IF ctx.login_failed_event %]
+<div id='login-failed-message'>
+[%
     IF ctx.login_failed_event.textcode == 'PATRON_CARD_INACTIVE';
         l("The barcode used to login is marked as inactive.  Please contact your local library.");
     ELSIF ctx.login_failed_event.textcode == 'PATRON_INACTIVE';
         l("This account has been deactivated.  Please contact your local library.");
     ELSE;
-        l("Login failed. The username or password provided was not valid.  Ensure Caps-Lock is off and try again or contact your local library.");
+        l("Login failed. The username or password provided was not valid.  
+            Ensure Caps-Lock is off and try again or contact your local library.");
     END;
-END %]
-
+%]
+</div>
+[% END %]
 
 <div>
     <div style="height:20px;"></div>
@@ -84,8 +86,8 @@ END %]
                         width="100%">
                         <tr>
 	                        <td colspan="2" style="padding-bottom: 10px;">
-                                <h1>Log in to Your Account</h1>
-                                Please enter the following information:
+                                <h1>[% l('Log in to Your Account') %]</h1>
+                                [% l('Please enter the following information:') %]
                                 <br /><br />
                             </td>
                         </tr>
@@ -115,7 +117,9 @@ END %]
                             <td valign="top" class="lbl1">
                                 [% l('PIN Number or Password') %]<br />
                                 <span class="lbl2">
-                                    [% l('If this is your first time logging in, please enter [_1] the last 4 digits of your phone number. [_2] Example: 0926', '<br/>', '<br/>') %]
+                                    [% | l('<br/>', '<br/>') %]
+                                       If this is your first time logging in, please enter [_1] the last 4 digits of your phone number. [_2] Example: 0926
+                                    [% END %]
                                 </span>
                             </td>
                             <td valign="top">
@@ -123,13 +127,20 @@ END %]
                                     <input name="password" type="password" />
                                 </div>
                                 <div style="padding-top:7px;">
-                                    <input type='hidden'
-                                        name='redirect_to'
-                                        value='[% CGI.param('redirect_to') || ctx.referer | replace('^http:', 'https:') %]' />
+                                    [%
+                                        # If no redirect is offered or it's leading us back to the 
+                                        # login form, redirect the user to My Account
+                                        redirect = CGI.param('redirect_to') || ctx.referer;
+                                        IF !redirect OR redirect.match(ctx.path_info _ '$');
+                                            redirect = CGI.url('-full' => 1) _ '/opac/myopac/main';
+                                        END;
+                                        redirect = redirect  | replace('^http:', 'https:');
+                                    %]
+                                    <input type='hidden' name='redirect_to' value='[% redirect %]'/>
                                     <input type="checkbox" name="persist" /> [% l('Remember Me?') %]
                                 </div>
                                 <div style="padding-top:14px;">
-                                    <input type='image' alt="Log in" src="[% ctx.media_prefix %]/images/login-btn2.png" />
+                                    <input type='image' alt="[% l('Log in') %]" src="[% ctx.media_prefix %]/images/login-btn2.png" />
                                     <!-- TODO
                                     <a href="reset_password"
                                         style="position:relative;top:-13px;left:2px;font-size:10px;">Forgot your PIN?</a>
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
index a3ddabf..dbd398c 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@ -1,4 +1,8 @@
 <!-- ****************** top_nav.xml ***************************** -->
+[% 
+    USE CGI; 
+    USE EGI18N;
+%]
 <div id="header">
     <div class="float-left"><a
         href="http://www.kcls.org"><img alt="KCLS Logo"

commit 3e8f8e7b9e6e024864870e008bfc1b4fea5c73a0
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Thu Feb 10 11:14:41 2011 -0500

    added support for login via barcode and persistent logins; capturing login failures; use cache infrastructure for fetching/caching cmf objects

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 4c27e6a..fb72913 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -113,7 +113,7 @@ sub load_helpers {
     my $ctx = $self->ctx;
 
     # fetch-on-demand-and-cache subs for commonly used public data
-    my @public_classes = qw/ccs aout cifm citm clm/;
+    my @public_classes = qw/ccs aout cifm citm clm cmf/;
 
     for my $hint (@public_classes) {
 
@@ -250,29 +250,43 @@ sub load_home {
 sub load_login {
     my $self = shift;
     my $cgi = $self->cgi;
+    my $ctx = $self->ctx;
 
-    $self->ctx->{page} = 'login';
+    $ctx->{page} = 'login';
 
     my $username = $cgi->param('username');
     my $password = $cgi->param('password');
+    my $org_unit = $cgi->param('loc') || $ctx->{aou_tree}->()->id;
+    my $persist = $cgi->param('persist');
 
+    # initial log form loading
     return Apache2::Const::OK unless $username and $password;
 
 	my $seed = $U->simplereq(
         'open-ils.auth', 
-		'open-ils.auth.authenticate.init',
-        $username);
+		'open-ils.auth.authenticate.init', $username);
+
+    my $args = {	
+        username => $username, 
+        password => md5_hex($seed . md5_hex($password)), 
+        type => ($persist) ? 'persist' : 'opac' 
+    };
+
+    my $bc_regex = $ctx->{get_org_setting}->($org_unit, 'opac.barcode_regex');
+
+    $args->{barcode} = delete $args->{username} 
+        if $bc_regex and $username =~ /$bc_regex/;
 
 	my $response = $U->simplereq(
-        'open-ils.auth', 
-		'open-ils.auth.authenticate.complete', 
-		{	username => $username, 
-			password => md5_hex($seed . md5_hex($password)), 
-			type => 'opac' 
-        }
-    );
+        'open-ils.auth', 'open-ils.auth.authenticate.complete', $args);
+
+    if($U->event_code($response)) { 
+        # login failed, report the reason to the template
+        $ctx->{login_failed_event} = $response;
+        return Apache2::Const::OK;
+    }
 
-    # XXX check event, redirect as necessary
+    # login succeeded, redirect as necessary
 
     my $home = $self->apache->unparsed_uri;
     $home =~ s/\/login/\/home/;
@@ -285,7 +299,7 @@ sub load_login {
                 -path => '/',
                 -secure => 1,
                 -value => $response->{payload}->{authtoken},
-                -expires => CORE::time + $response->{payload}->{authtime}
+                -expires => ($persist) ? CORE::time + $response->{payload}->{authtime} : undef
             )
         )
     );
@@ -366,13 +380,6 @@ sub load_rresults {
     my $search = OpenSRF::AppSession->create('open-ils.search');
     my $facet_req = $search->request('open-ils.search.facet_cache.retrieve', $results->{facet_key}, 10);
 
-    unless($cache{cmf}) {
-        $cache{cmf} = $e->search_config_metabib_field({id => {'!=' => undef}});
-        $ctx->{metabib_field} = $cache{cmf};
-        #$cache{cmc} = $e->search_config_metabib_class({name => {'!=' => undef}});
-        #$ctx->{metabib_class} = $cache{cmc};
-    }
-
     my @data;
     while(my $resp = $bre_req->recv) {
         my $bre = $resp->content; 
@@ -402,10 +409,7 @@ sub load_rresults {
 
     my $facets = $facet_req->gather(1);
 
-    for my $cmf_id (keys %$facets) {  # quick-n-dirty
-        my ($cmf) = grep { $_->id eq $cmf_id } @{$cache{cmf}};
-        $facets->{$cmf_id} = {cmf => $cmf, data => $facets->{$cmf_id}};
-    }
+    $facets->{$_} = {cmf => $ctx->{find_cmf}->($_), data => $facets->{$_}} for keys %$facets;  # quick-n-dirty
     $ctx->{search_facets} = $facets;
 
     return Apache2::Const::OK;

commit 0dda01ca37bd982cca74f035fd03d97d2486a2cb
Merge: ac357a7 04267c8
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Feb 9 17:59:44 2011 -0500

    Merge branch 'opac-tt-poc' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit ac357a7cf4b4a787c25b62afd43eb10410fa1459
Merge: 4971896 91ed777
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Feb 9 17:15:09 2011 -0500

    Merge branch 'master' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 49718967bc10697f6fe9bf076e9fba5ad6bf44e3
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Feb 9 16:11:28 2011 -0500

    misc work on the results page, including:
    
    hold placement link,
    result prev/next page links on top and bottom,
    edition and physical description,
    add in previously missing filtersort template

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 1dc531f..1dc5d31 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -623,22 +623,18 @@ div.select-wrapper:hover {
 	margin:0;
 }
 
-#results_header_nav1 {
+.results_header_nav1 {
 	padding: 5px 7px 6px 0px;
 	border-bottom: 1px dotted #ccc;
 }
 
-#results_header_nav1 .h1 {
+.results_header_nav1 .h1 {
 	font-size:14px;
 	font-weight:bold;
 	color:#074079;
 }
 
-#start_end_links_span {
-	font-size: 11px;
-}
-
-#start_end_links_span2 {
+.start_end_links_span {
 	font-size: 11px;
 }
 
@@ -652,9 +648,8 @@ div.select-wrapper:hover {
 	margin-top: 20px;
 }
 
-#result_numbers1 {
-	font-size: 11px;
-	padding-left:15px;
+.result_numbers {
+	font-size: 11px; padding-left:15px; white-space: nowrap; width: 320px;
 }
 
 .result_table_subtable { width: 100%; border-collapse: collapse; border: 0; }
@@ -892,3 +887,4 @@ div.select-wrapper:hover {
 #rdetail_copy_info_table { font-size: 8pt; }
 #rdetail_copy_info_table td { padding: 3px; }
 .search_page_nav_link { cursor: pointer; }
+#opac.result.sort { width: 160px; }
diff --git a/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2 b/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
index 4b5708e..6f678b2 100644
--- a/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
@@ -10,6 +10,16 @@
         args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
         args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
         args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
+        args.edition = xml.findnodes('//*[@tag="250"]/*[@code="a"]').textContent ||
+            xml.findnodes('//*[@tag="534"]/*[@code="b"]').textContent ||
+            xml.findnodes('//*[@tag="775"]/*[@code="b"]').textContent;
+        phys = xml.findnodes(
+            '//*[@tag="300"]/*[@code="a" or @code="b" or @code="c" or @code="e"]'
+        );
+        phys_content = [];
+        FOR p IN phys; phys_content.push(p.textContent); END;
+        args.phys_desc = phys_content.join("");
+
         # clean up the ISBN
         args.isbn_clean = args.isbn.replace('\ .*', '');
 
diff --git a/Open-ILS/web/templates/default/opac/parts/result/filtersort.tt2 b/Open-ILS/web/templates/default/opac/parts/result/filtersort.tt2
new file mode 100644
index 0000000..cee0f82
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/result/filtersort.tt2
@@ -0,0 +1,19 @@
+<!-- ****************** filtersort.xml ***************************** -->
+    <select class="results_header_sel" id='opac.result.sort' onchange='searchBarSubmit(true);'>
+        <option selected='selected' value=''>[% l("Sort Results by Relevance") %]</option>
+        <optgroup label='[% l("Sort Results by Title") %]'>
+            <option id='opac.result.title.a2z' label='&common.a2z.titla;' value='title.asc'>[% l("Title: A to Z") %]</option>
+            <option id='opac.result.title.z2a' label='&common.z2a.titla;' value='title.desc'>[% l("Title: Z to A") %]</option>
+        </optgroup>
+        <optgroup label='[% l("Sort Results by Author") %]'>
+            <option id='opac.result.author.a2z' label='[% l("Author: A to Z") %]' value='author.asc'>[% l("Author: A to Z") %]</option>
+            <option id='opac.result.author.z2a' label='[% l("Author: Z to A") %]' value='author.desc'>[% l("Author: Z to A") %]</option>
+        </optgroup>
+        <optgroup label='[% l("Sort Results by Publication Date") %]'>
+            <option id='opac.result.pubdate.new2old' label='[% l("Date: Newest to Oldest") %]' 
+                value='pubdate.desc'>[% l("Date: Newest to Oldest") %]</option>
+            <option id='opac.result.pubdate.old2new' label='[% l("Date: Oldest to Newest") %]' 
+                value='pubdate.asc'>[% l("Date: Oldest to Newest") %]</option>
+        </optgroup>
+    </select>
+<!-- ****************** end: filtersort.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/result/header.tt2 b/Open-ILS/web/templates/default/opac/parts/result/header.tt2
index c7e2f58..67f6193 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/header.tt2
@@ -11,12 +11,12 @@
     IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
 %]
 <div style="height: 10px;"></div>
-<div id="results_header_nav1">
+[% BLOCK results_count_header %]
+<div class="results_header_nav1">
     <table cellpadding="0" cellspacing="0" border="0" width="100%">
         <tr>
             <td class="h1" width="116">Search Results</td>
-            <td valign="bottom" nowrap="nowrap" width="320"
-                style="white-space:nowrap;" id="result_numbers1">
+            <td valign="bottom" nowrap="nowrap" class="result_number">
                 [% l("Results") %]
                 <strong>[% ctx.result_start %]</strong>
                 &nbsp;-
@@ -31,20 +31,20 @@
                 </span>
             </td>
             <td align="right" valign="bottom">
-                <span id='start_end_links_span'>
+                <span class='start_end_links_span'>
                     [% IF page > 0 %]
-                    <a class='search_page_nav_link' id='prev_link'
+                    <a class='search_page_nav_link'
                         href="[% np_link _ '&page=' _ (page - 1) %]"
                         title='[% l("Previous page") %]'>
                         <span class="nav_arrow_fix">&#9668;</span> Previous
                     </a>
                     [% END %]
-                    <span class='hide_me' id='result_info_div'
+                    <span class='hide_me'
                         style='padding-left: 11px; padding-right:11px;'>
-                        <span id="nav_pages"></span>
+                        <span></span>
                     </span>
                     [% IF (page + 1) < page_count %]
-                    <a class='search_page_nav_link' id='next_link'
+                    <a class='search_page_nav_link'
                         href="[% np_link _ '&page=' _ (page + 1) %]"
                         title='[% l("Next page") %]'>
                         Next <span class="nav_arrow_fix">&#9658;</span>
@@ -55,3 +55,6 @@
         </tr>
     </table>
 </div>
+[% END %]
+[% ctx.results_count_header = PROCESS results_count_header;
+    ctx.results_count_header %]
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index ab5b9e6..1474fb6 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -73,18 +73,18 @@
                                                             </td>
                                                             <td>[% attrs.isbn %]</td>
                                                         </tr>
-                                                        <tr name="results_edition_tr" class="hide_me">
+                                                        <tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
                                                             <td valign="top">
                                                                 <strong>Edition:</strong>
                                                             </td>
-                                                            <td> <span name="results_edition"></span></td>
+                                                            <td>[% attrs.edition %]</td>
                                                         </tr>
-                                                        <tr name="results_phys_desc_tr" class="hide_me">
+                                                        <tr name="results_phys_desc_tr" class="[% attrs.phys_desc ? '' : 'hide_me' %]">
                                                             <td nowrap="nowrap" valign="top">
                                                                 <strong>Phys. Desc.:</strong>
                                                             </td>
                                                             <td>
-                                                                <span name="results_phys_desc"></span>
+                                                                [% args.phys_desc %]
                                                             </td>
                                                         </tr>
                                                     </table>
@@ -139,7 +139,7 @@
                                                     <div style="float:right;">
                                                         <div style="border-bottom:1px dotted #ccc;padding-top:10px;"
                                                             class="results_aux_utils"><a
-                                                                href="javascript:;" name="place_hold_link"><img
+                                                                href="place_hold?hold_target=[% rec.bre.id %]&hold_type=T" name="place_hold_link"><img
                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
                                                                 alt="place hold" /><span
                                                                     style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
@@ -204,60 +204,8 @@
         </tr>
     </table>
 </div>
-
 <div>
-    <table id='' style="width:100%;">
-        <tbody id=''>
-            <tr class="hide_me">
-                <td class='result_table_row' width="100%">
-                    <!--#include virtual="result_info.xml"-->
-                </td>
-            </tr>
-            <!-- Template for displaying a search result.  This row template
-            is cloned and inserted for each result returned -->
-        </tbody>
-    </table>
-    <!-- ====================== -->
-    <div class="">
-        <table
-            style='width: 100%;margin-top:20px;border-top:1px dotted #ccc;padding-top:8px;'
-            id='result_info_2' class='hide_me'>
-            <tbody>
-                <tr>
-                    <td valign="top">
-                        <span class='hide_me' id='result_info_div2'
-                            style='font-size: 11px;'>
-                            <span> [% l("Results") %] </span>
-                            <b id='offset_start2'> </b>
-                            <span>&nbsp;- </span>
-                            <b id='offset_end2'> </b>
-                            <span>&nbsp;[% l("of") %] </span>
-                            <b id='result_count2'> </b>
-                            <span style='padding-left: 6px;'> (page </span>
-                            <span id='current_page2'> </span>
-                            <span>&nbsp;[% l("of") %] </span>
-                            <span id='num_pages2'> </span>
-                        </span>
-                    </td>
-                    <td valign="top" id='next_prev_links2' align="right">
-                    <span id='start_end_links_span2' class='hide_me'>
-                        <a class='search_page_nav_link' id='prev_link2'
-                            title='[% l("Previous page") %]' style="cursor:pointer;">
-                            <span class="nav_arrow_fix">&#9668;</span> Previous
-                        </a>
-                        <span id="nav_pages2"
-                            style='padding-left: 11px; padding-right:13px;'></span>
-                        <a class='search_page_nav_link' id='next_link2'
-                            title='[% l("Next page") %]' style="cursor:pointer;">
-                            Next <span class="nav_arrow_fix">&#9658;</span>
-                        </a>
-                        </span>
-                    </td>
-                </tr>
-            </tbody>
-        </table>
-    </div>
+    [% ctx.results_count_header %]
     <!-- ChiliFresh XXX script TODO -->
 </div>
 <!-- ****************** end: result_table.xml ***************************** -->
-
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index c24eb35..25eafc8 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -18,7 +18,7 @@
         <div id="results_header_bar">
             <div id="results_header_inner">
                 <div class="results_header_btns">
-                    <a href="index.xml"><img alt="Another Search"
+                    <a href="home"><img alt="Another Search"
                         src="[% ctx.media_prefix %]/images/another_search.png"
                         onmouseover="this.src='[% ctx.media_prefix %]/images/another_search_hover.png';"
                         onmouseout="this.src='[% ctx.media_prefix %]/images/another_search.png';" /></a>
@@ -38,16 +38,14 @@
                 </div>
                 <div class="results_header_div"></div>
                 <div class="results_header_lbl">Sort by</div>
-        <!--#if expr="$OILS_PAGE='rresult.xml' || $OILS_PAGE='mresult.xml'"-->
-        <!--#include virtual="result/filtersort.xml" -->
-        <!--#endif -->
+                [% INCLUDE "default/opac/parts/result/filtersort.tt2" %]
                 <div class="results_header_div"></div>
-                <div class="results_header_lbl">View</div>
+                <!-- XXX still needed?<div class="results_header_lbl">View</div>
                 <select class="results_header_sel">
                     <option>Simple</option>
                     <option>Detailed</option>
                 </select>
-                <div class="results_header_div"></div>
+                <div class="results_header_div"></div> -->
                 <input type="checkbox" id="limit_to_available" />
                 <label for="limit_to_available" class="results_header_lbl">
                     Limit to available items

commit ee2cc4798e691c45022322e2173f2cc2241daf7e
Merge: 1df9d37 aca56e2
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Feb 9 16:01:01 2011 -0500

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 1df9d37914ff46e404197ea38f4f8949754ad6db
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Feb 9 13:14:51 2011 -0500

    remove duplicate variable def

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
index 9c982d3..d26df13 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -2658,8 +2658,6 @@ sub batch_uber_hold {
 
 sub uber_hold_impl {
     my($e, $hold_id, $args) = @_;
-
-	my $resp = {};
     $args ||= {};
 
 	my $hold = $e->retrieve_action_hold_request(

commit 04267c89d2ba7884884881610724763ed38d1de3
Merge: 2883a77 91ed777
Author: berick <berick at esilibrary.com>
Date:   Wed Feb 9 12:29:59 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 2883a774560b8ec6929708cdcf80408306e413cd
Author: berick <berick at esilibrary.com>
Date:   Wed Feb 9 12:29:26 2011 -0500

    if no locale config is present in oils_web, assume en_US exists and is valid

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index 8f19a07..807af47 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -246,6 +246,8 @@ sub load_locale_handlers {
     my $ctx = shift;
     my $locales = $ctx->{locales};
 
+    $locales->{en_US} = {} unless exists $locales->{en_US};
+
     for my $lang (keys %$locales) {
         my $messages = $locales->{$lang};
         $messages = '' if ref $messages; # empty {}

commit aca56e2f6e44b4158fe5184a82f00054fac25e51
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 8 18:12:05 2011 -0500

    hey, maybe I should commit sometime today
    
    results page partly working. woof.

diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index ef6f49d..1dc531f 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -657,7 +657,7 @@ div.select-wrapper:hover {
 	padding-left:15px;
 }
 
-
+.result_table_subtable { width: 100%; border-collapse: collapse; border: 0; }
 
 
 
@@ -891,4 +891,4 @@ div.select-wrapper:hover {
 }
 #rdetail_copy_info_table { font-size: 8pt; }
 #rdetail_copy_info_table td { padding: 3px; }
-
+.search_page_nav_link { cursor: pointer; }
diff --git a/Open-ILS/web/templates/default/opac/parts/libselect.tt2 b/Open-ILS/web/templates/default/opac/parts/libselect.tt2
index f41d0e4..59cdfa6 100644
--- a/Open-ILS/web/templates/default/opac/parts/libselect.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/libselect.tt2
@@ -24,7 +24,7 @@
 
 <!-- ****************** libselect.xml ***************************** -->
     <span id='depth_selector_span'>
-        [% PROCESS build_org_selector name='loc' %]
+        [% PROCESS build_org_selector name='loc' value=loc %]
     </span>
     <span id='lib_selector_span'>
         <a id='lib_selector_link' class='classic_link'
diff --git a/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2 b/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
new file mode 100644
index 0000000..4b5708e
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2
@@ -0,0 +1,52 @@
+[% 
+    # Extract MARC fields from XML
+    #   get_marc_attrs( { marc_xml => doc } )
+    BLOCK get_marc_attrs;
+        xml = args.marc_xml;
+        args.isbn = xml.findnodes('//*[@tag="020"]/*[@code="a"]').shift.textContent;
+        args.upc = xml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
+        args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
+        args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
+        args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
+        args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
+        args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
+        # clean up the ISBN
+        args.isbn_clean = args.isbn.replace('\ .*', '');
+
+        # KCLS-specific stuff; needs to change
+        args.mattype = xml.findnodes('//*[@tag="998"]/*[@code="d"]').textContent;
+        args.kcls_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent;
+
+    END;
+
+    icon_by_mattype = {     # XXX KCLS-specific
+        "a" => "media_book.jpg",
+        "b" => "media_magazines.jpg",
+        "c" => "media_printedmusic.jpg",
+        "d" => "media_microform.jpg",
+        "e" => "media_equipment.jpg",
+        "f" => "media_films.jpg",
+        "g" => "",
+        "h" => "media_dvd.jpg",
+        "i" => "media_bookoncassette.jpg",
+        "j" => "media_musiccd.jpg",
+        "k" => "media_musiccassette.jpg",
+        "l" => "media_musicrecord.jpg",
+        "m" => "media_software.jpg",
+        "n" => "media_bookoncd.jpg",
+        "o" => "media_kit.jpg",
+        "p" => "media_newspaper.jpg",
+        "q" => "media_largeprint.jpg",
+        "r" => "media_3dobject.jpg",
+        "s" => "media_slide.jpg",
+        "t" => "media_online.jpg",
+        "u" => "media_eaudio.jpg",
+        "v" => "media_ebooktext.jpg",
+        "w" => "media_eaudio.jpg",
+        "x" => "media_downloadmusic.jpg",
+        "y" => "media_downloadvideo.jpg",
+        "z" => "media_map.jpg",
+        "2" => "media_cassettewithbook.jpg",
+        "5" => "media_cdwithbook.jpg"
+    };
+%]
diff --git a/Open-ILS/web/templates/default/opac/parts/result/header.tt2 b/Open-ILS/web/templates/default/opac/parts/result/header.tt2
index 07e1382..c7e2f58 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/header.tt2
@@ -1,36 +1,55 @@
+[%  q = query | url;
+    np_link = '?query=' _ q;
+    IF loc;
+        np_link = np_link _ "&loc=" _ loc;
+    END;
+    IF depth or depth == 0;
+        np_link = np_link _ "&depth=" _ depth;
+    END;
+    ctx.result_start = 1 + ctx.page_size * page;
+    ctx.result_stop = 1 + ctx.page_size * (page + 1);
+    IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
+%]
 <div style="height: 10px;"></div>
 <div id="results_header_nav1">
     <table cellpadding="0" cellspacing="0" border="0" width="100%">
         <tr>
             <td class="h1" width="116">Search Results</td>
-            <td valign="bottom" nowrap="nowrap" width="320" style="white-space:nowrap;" class="hide_me" id="result_numbers1">
-                <span> [% l("Results") %] </span>
-                <span id='offset_start' style='font-weight:bold'></span>
-                <span>&nbsp;- </span>
-                <span id='offset_end' style='font-weight:bold'></span>
-                <span>&nbsp;[% l("of") %] </span>
-                <span id='result_count' style='font-weight:bold'></span>
+            <td valign="bottom" nowrap="nowrap" width="320"
+                style="white-space:nowrap;" id="result_numbers1">
+                [% l("Results") %]
+                <strong>[% ctx.result_start %]</strong>
+                &nbsp;-
+                <strong>[% ctx.result_stop  %] </strong>
+                &nbsp;[% l("of") %]
+                <strong>[% ctx.hit_count %]</strong>
                 <span style='padding-left: 6px;'>
                     (page
+                    <strong>[% page + 1 %]</strong>
+                    &nbsp;[% l("of") %]
+                    <strong>[% page_count %]</strong>)
                 </span>
-                <span id='current_page'></span>
-                <span>&nbsp;[% l("of") %] </span>
-                <span id='num_pages'></span>)
             </td>
             <td align="right" valign="bottom">
-                <span id='start_end_links_span' class='hide_me'>
+                <span id='start_end_links_span'>
+                    [% IF page > 0 %]
                     <a class='search_page_nav_link' id='prev_link'
-                        title='[% l("Previous page") %]' style="cursor:pointer;">
+                        href="[% np_link _ '&page=' _ (page - 1) %]"
+                        title='[% l("Previous page") %]'>
                         <span class="nav_arrow_fix">&#9668;</span> Previous
                     </a>
+                    [% END %]
                     <span class='hide_me' id='result_info_div'
                         style='padding-left: 11px; padding-right:11px;'>
                         <span id="nav_pages"></span>
                     </span>
+                    [% IF (page + 1) < page_count %]
                     <a class='search_page_nav_link' id='next_link'
-                        title='[% l("Next page") %]' style="cursor:pointer;">
+                        href="[% np_link _ '&page=' _ (page + 1) %]"
+                        title='[% l("Next page") %]'>
                         Next <span class="nav_arrow_fix">&#9658;</span>
                     </a>
+                    [% END %]
                 </span>
             </td>
         </tr>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 0d2a569..ab5b9e6 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -1,7 +1,7 @@
-<!-- Search results are spit into this table -->
+[%  PROCESS "default/opac/parts/marc_misc.tt2";
+    SET result_count = ctx.result_start; %]
 <!-- ****************** result_table.xml ***************************** -->
 <div id="result_table_div">
-    
     <table cellpadding="0" cellspacing="0" border="0" width="100%">
         <tr>
             <td valign="top" width="1" style="padding-right:20px;">
@@ -14,63 +14,64 @@
                 <table id="res_table" cellpadding="0" cellspacing="0"
                     border="0" width="100%" style="margin-top:10px;">
                     <tbody id="result_table">
-                        <tr id='result_table_template' class='hide_me'>
-                            <td class='result_table_row' align='left'
-                                width='100%'>
-                                <table cellpadding="0" cellspacing="0"
-                                    border="0" width="100%"
-                                    class='result_table_subtable'
-                                    id="results_table"
-                                    style="border-collapse: collapse;">
+                    [%  FOR rec IN ctx.records;
+                            attrs = {marc_xml => rec.marc_xml};
+                            PROCESS get_marc_attrs args=attrs %]
+                        <tr>
+                            <td class='result_table_row' align='left' width='100%'>
+                                <table cellpadding="0" cellspacing="0" class='result_table_subtable'>
                                     <tbody class='result_table_subtbody'>
                                         <tr name='counts_row'>
                                             <td width="58" valign="top"
                                                 style="font-weight:bold;padding-left:10px;"
-                                                name="results_row_count">1.
-                                            </td>
+                                                name="results_row_count">[%
+                                                    result_count; result_count = result_count + 1
+                                                %].</td>
                                             <td class='result_table_pic_header'
                                                 width="78" nowrap="nowrap" valign="top">
-                                                <a><img alt="Image of item"
+                                                [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
+                                                <a href="record/[% rec.bre.id %]"><img alt="Image of item"
                                                         name='item_jacket' class='result_table_pic'
-                                                        src='${ident}' /></a><br />
+                                                        src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a><br />
+                                                [% END %]
                                             </td>
                                             <td class='result_table_title_cell'
                                                 name='result_table_title_cell'
                                                 valign="top">
-                                                <div style="font-weight:bold;">
-                                                    <a title="[% l("View titles for this record") %]"
-                                                        name='item_title' class='search_link'>
-                                                    </a>
+                                                <div class="bold">
+                                                    <a title="[% attrs.title %]" name='item_title'
+                                                        href="record/[% rec.bre.id %]"
+                                                        class='search_link'>[% attrs.title %]</a>
                                                 </div>
                                                 <span style="font-size:11px;">
                                                     <div>
                                                         <em>
-                                                            <a title="[% l("Perform an Author Search") %]" name='item_author' class='search_link'></a>
+                                                            <a title="[% l("Perform an Author Search") %]"
+                                                                name='item_author'
+                                                                href="results?query=author%3a[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% loc %]"
+                                                                class='search_link'>[% attrs.author %]</a>
                                                         </em> &nbsp;&nbsp;
-                                                        <span name="results_pub_date"></span>
+                                                        [% attrs.pubdate %]
                                                     </div>
                                                     <table cellpadding="0" cellspacing="0" border="0"
                                                         class="results_info_table">
                                                         <tr name='bib_cn_list' class='result_table_title_cell'>
                                                             <td colspan='2'>
-                                                                <span><strong>Call number:</strong></span>
+                                                                <strong>Call number:</strong>
+                                                                [% args.kcls_cn %]
                                                             </td>
                                                         </tr>
-                                                        <tr name="results_pub_tr" class="hide_me">
+                                                        <tr name="results_pub_tr" class="[% attrs.publisher ? '' : 'hide_me' %]">
                                                             <td valign="top">
                                                                 <strong>Publisher:</strong>
                                                             </td>
-                                                            <td>
-                                                                <span name="results_pub"></span>
-                                                            </td>
+                                                            <td>[% attrs.publisher; %]</td>
                                                         </tr>
-                                                        <tr name="results_isbn_tr" class="hide_me">
+                                                        <tr name="results_isbn_tr" class="[% attrs.isbn ? '' : 'hide_me' %]">
                                                             <td valign="top">
                                                                 <strong>ISBN:</strong>
                                                             </td>
-                                                            <td>
-                                                                <span name="results_isbn"></span>
-                                                            </td>
+                                                            <td>[% attrs.isbn %]</td>
                                                         </tr>
                                                         <tr name="results_edition_tr" class="hide_me">
                                                             <td valign="top">
@@ -99,7 +100,7 @@
                                                 <div class="hide_me">
                                                     <span name='result_table_extra_span' class='hide_me'>
                                                         <span name='result_table_pub_box'
-                                                            style='padding-left: 10px;'> 
+                                                            style='padding-left: 10px;'>
                                                             <span name='result_table_edition_span'
                                                                 style='padding-left: 10px;'></span> |
                                                             <span name='result_table_pub_span'> </span> |
@@ -115,8 +116,8 @@
                                                 class='result_table_format_cell' align="center" width="1"
                                                 style="padding:0px 10px;">
                                                 <img alt="Format" src="" class="hide_me" name="" />
-                                                <span class='hide_me' 
-                                                    style='color: #9999FF; padding-left: 10px; font-size: 7pt; font-weight: 300;'> 
+                                                <span class='hide_me'
+                                                    style='color: #9999FF; padding-left: 10px; font-size: 7pt; font-weight: 300;'>
                                                     <span>[% l("Match Score: ") %] </span>
                                                     <span name='relevancy_span'> </span>
                                                 </span>
@@ -165,13 +166,17 @@
                                                         </div>
                                                     </div>
                                                     <div style="float:right;margin-right:17px;">
-                                                        <img alt="Format" class="hide_me" src=""
-                                                        name="result_mat_type" />
+                                                    [%  key = attrs.mattype;
+                                                        format_desc = ctx.find_citm(key).value;
+                                                        icon_filename = icon_by_mattype.$key;
+                                                        IF icon_filename; %]
+                                                        <img alt="[% format_desc %]" title="[% format_desc %]"
+                                                            src="[% ctx.media_prefix _ '/images/' _ icon_filename %]" />
+                                                    [% END %]
                                                     </div>
                                                 </div>
                                             </td>
                                         </tr>
-                            
                                         <!-- Placeholder for ChiliFresh Review -->
                                         <tr class="hide_me" name="chilifreshReview">
                                             <td></td>
@@ -182,7 +187,6 @@
                                                 </div>
                                             </td>
                                         </tr>
-                            
                                         <tr>
                                             <td colspan="5">
                                                 <div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div>
@@ -193,15 +197,16 @@
                                 </table>
                             </td>
                         </tr>
+                    [% END %]
                     </tbody>
                 </table>
             </td>
         </tr>
-    </table>  
+    </table>
 </div>
 
 <div>
-    <table id='' style="width:100%;"> 
+    <table id='' style="width:100%;">
         <tbody id=''>
             <tr class="hide_me">
                 <td class='result_table_row' width="100%">
@@ -222,7 +227,7 @@
                     <td valign="top">
                         <span class='hide_me' id='result_info_div2'
                             style='font-size: 11px;'>
-                            <span> [% l("Results") %] </span> 
+                            <span> [% l("Results") %] </span>
                             <b id='offset_start2'> </b>
                             <span>&nbsp;- </span>
                             <b id='offset_end2'> </b>
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index df39f4f..c24eb35 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -1,12 +1,21 @@
-[%  WRAPPER "default/opac/parts/base.tt2";
+[%  USE CGI;
+    USE POSIX;
+
+    WRAPPER "default/opac/parts/base.tt2";
     INCLUDE "default/opac/parts/topnav.tt2";
-    ctx.page_title = "Search Results" %]
+    ctx.page_title = "Search Results";
+
+    page = CGI.param('page') || 0;
+    query = CGI.param('query');
+    loc = CGI.param('loc');
+    page_count = POSIX.ceil(ctx.hit_count / ctx.page_size);
+%]
     <div id="search-wrapper">
         [% INCLUDE "default/opac/parts/utils.tt2" %]
         [% INCLUDE "default/opac/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
-        <div id="results_header_bar"><!-- XXX give #results_header_bar its own file -->
+        <div id="results_header_bar">
             <div id="results_header_inner">
                 <div class="results_header_btns">
                     <a href="index.xml"><img alt="Another Search"

commit 5c66beff78796041272215a0ac183374074727ae
Merge: 1289e7f 181a045
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 7 17:45:29 2011 -0500

    Merge branch 'master' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 1289e7ff7822adf27c08728f0e86fd8badb3a075
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 7 17:44:46 2011 -0500

    home page looks like kcls prod version now rather than dev

diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
index c081193..61355d6 100644
--- a/Open-ILS/web/css/skin/default/opac/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -182,3 +182,5 @@
 .opac-auto-193 { width: 91px; }
 #cn_browse { width: 95%; text-align: center; padding: 15px; }
 .opac-auto-195 { width: 99%; text-align: center }
+#homesearch_thing { width: 664px; height: 117px; background: #bda964; }
+#mystery_thing { width: 664px; height: 35px; background: #ffffff; }
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 091e8b8..ef6f49d 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -506,6 +506,12 @@ div.select-wrapper:hover {
 	font-weight: bold;
 }
 
+#hp-ql-bottom img {
+    position:relative;
+    top:-1px;
+    left:2px;
+}
+
 #content-wrapper {
 	background: white;
 	min-height: 260px;
@@ -513,9 +519,10 @@ div.select-wrapper:hover {
 }
 
 #main-content {
-	width: 974px;
-	margin:auto;
-	padding-left:0px;
+    /* on devcatalog: width: 974px; margin:auto; padding-left:0px; */
+	width: 694px;
+	margin: auto;
+	padding-left: 17px;
 }
 
 #main-content .login_boxes {
diff --git a/Open-ILS/web/images/hp-links-left.jpg b/Open-ILS/web/images/hp-links-left.jpg
index e7806c3..0b8c9cf 100644
Binary files a/Open-ILS/web/images/hp-links-left.jpg and b/Open-ILS/web/images/hp-links-left.jpg differ
diff --git a/Open-ILS/web/images/hp-links-right.jpg b/Open-ILS/web/images/hp-links-right.jpg
index 0b713d9..63812f9 100644
Binary files a/Open-ILS/web/images/hp-links-right.jpg and b/Open-ILS/web/images/hp-links-right.jpg differ
diff --git a/Open-ILS/web/templates/default/opac/parts/homesearch.tt2 b/Open-ILS/web/templates/default/opac/parts/homesearch.tt2
index 72c4242..2021f16 100644
--- a/Open-ILS/web/templates/default/opac/parts/homesearch.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/homesearch.tt2
@@ -1,87 +1,64 @@
-<!-- ****************** homesearch.xml ***************************** -->
-<div id="hp-banner">
-  <div id="hp-welcome">
-    <h1>Welcome to the<br />New Library Catalog!</h1>
-    Featuring enhanced holds, management<br />tools, improved self checkout, and more.<br /><br />
-    <a href="http://www.kcls.org/newcatalog" id="learn_more">Learn more &raquo;</a>
-    <br /><br />
-    <div id="paginate-homebanner">
-      
-<!-- ************************************ home page rotator navigator start ************************************* -->
-    <!-- these are presumably temporary anyway, no need to use css -->
-      <a class="toc" href="#1" rel="1" style="background:gray;"></a>
-      <a class="toc" href="#2" rel="2" style="background:#ffc331;"></a>
-      <a class="toc" href="#3" rel="3" style="background:pink;"></a>
-      <a class="toc" href="#4" rel="4" style="background:#2bb0fd;"></a>
-      <a class="toc" href="#5" rel="5" style="background:#54987f;"></a>
-      <a class="toc" href="#6" rel="6" style="background:#decc92;"></a>
-      <a class="toc" href="#7" rel="7" style="background:white;"></a>
-<!-- **************************************** home page navigator end ******************************************* -->
-
-<!-- DON'T TOUCH THESE NEXT 4 LINES! -->
-    </div>
-  </div>
-  <div id="they_said_dont_touch">
-    <div id="homebanner" class="sliderwrapper">
-  
-<!-- ************************************ home page banner start ********************************************** -->
-    <div class="contentdiv" style="background:white;">
-      <a href="http://www.kcls.org/newcatalog"><img alt="New catalog" src="[% ctx.media_prefix %]/images/banner1.jpg" /></a>
-    </div>
-    <div class="contentdiv" style="background:#ffc331;">
-      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
-      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
-    </div>
-    <div class="contentdiv" style="background:pink;">
-      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
-      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
-    </div>
-    <div class="contentdiv" style="background:#2bb0fd;">
-      <br />
-      <img src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /><br />
-      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
-      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
-    </div>
-    <div class="contentdiv" style="background:#54987f;">
-      <div style="width:700px;height:30px;border:1px solid red;"></div>
-      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
-      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
-    </div>
-    <div class="contentdiv" style="background:#decc92;">
-      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
-      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
-    </div>
-    <div class="contentdiv" style="background:white;">
-      <table cellpadding="0" cellspacing="0" border="0" style="width:100%;height:100%;"><tr><td align="center" style="width:100%;height:100%;border:1px solid black;">
-        They call me Box Boy.
-      </td></tr></table>
-    </div>
-<!-- ************************************* home page banner end *********************************************** -->
-  </div>
-        <div id="new_cat_link_holder">
-            <div class="pos-rel">
-                <a href="http://www.kcls.org/newcatalog"></a>
-            </div>
-        </div>
-        <img alt="New catalog" src="[% ctx.media_prefix %]/images/banner1.jpg" />
-    </div>
+<div style='width:664px;height:35px;background:#FFFFFF;'>
+    <strong><center></center></strong>
 </div>
-
-<div id="hp-buttons">
+<div id='hp-banner'>
+    <a href='http://www.kcls.org/newcatalog/'><img
+        src='[% ctx.media_prefix %]/images/golive.jpg'
+        alt='new catalog' title='New Catalog Information' /></a>
+</div>
+<div id='hp-buttons'>
     <div class="float-left">
-        <img src="[% ctx.media_prefix %]/images/hp-links-left.jpg" />
+        <img src='[% ctx.media_prefix %]/images/hp-links-left.jpg' />
+    </div>
+    <div class="float-left">
+	    <div id='homesearch_thing'>
+	        <table cellpadding='0' cellspacing='5' border='0' id='hp-ql-table'>
+                <tr>
+                    <td colspan='4'>
+                        <span class="opac-auto-029">
+                            [% l("Browse for") %]:
+                        </span>
+                    </td>
+                </tr>
+                <tr>
+                    <td>
+                        <a href='http://www.kcls.org/booksandreading/'>books</a>
+                    </td>
+                    <td>
+                        <a href='http://www.kcls.org/movies/movies_browse.cfm'>movies</a>
+                    </td>
+                    <td>
+                        <a href='http://www.kcls.org/ecollection/'>downloads</a>
+                    </td>
+                    <td>
+                        <a href='http://www.kcls.org/websites/'>websites</a>
+                    </td>
+                </tr>
+                <tr>
+                    <td>
+                        <a href='http://www.kcls.org/music/'>music</a>
+                    </td>
+                    <td>
+                        <a href='http://www.kcls.org/databases/subject_categories.cfm#17'>magazines</a>
+                    </td>
+                    <td>
+                        <a href='http://www.kcls.org/databases/'>databases</a>
+                    </td>
+                    <td>
+                        <a href='http://www.kcls.org/answers/'>answers</a>
+                    </td>
+                </tr>
+	        </table>
+	    </div>
+	    <div id='hp-ql-bottom'>
+            <a href='http://www.kcls.org/locations'>Locations:
+                Find a Library Near You!
+                <img src='[% ctx.media_prefix %]/images/arrow-right.png' /></a>
+
+	    </div>
     </div>
     <div class="float-left">
-    <div id="home-buttons-inner">
-      <table cellpadding="0" cellspacing="5" border="0" id="hp-ql-table">
-          <tr><td colspan="4"><span class="opac-auto-029">Browse for:</span></td></tr>
-        <tr><td><a href="http://www.kcls.org/booksandreading/">books</a></td><td><a href="http://www.kcls.org/movies/movies_browse.cfm">movies</a></td><td><a href="http://www.kcls.org/ecollection/">downloads</a></td><td><a href="http://www.kcls.org/websites/">websites</a></td></tr>
-        <tr><td><a href="http://www.kcls.org/music/">music</a></td><td><a href="http://www.kcls.org/databases/subject_categories.cfm#17">magazines</a></td><td><a href="http://www.kcls.org/databases/">databases</a></td><td><a href="http://www.kcls.org/answers/">answers</a></td></tr>
-      </table>
+        <img src='[% ctx.media_prefix %]/images/hp-links-right.jpg' />
     </div>
-  </div>
-  <div class="float-left"><img src="[% ctx.media_prefix %]/images/hp-links-right.jpg" /></div>
-  <div class="float-right"><a href="http://www.kcls.org/locations"><img alt="Locations" src="[% ctx.media_prefix %]/images/locations.jpg" /></a></div>
-  <div class="clear-both"></div>
+    <div class="clear-both"></div>
 </div>
-<!-- ****************** end: homesearch.xml ***************************** -->

commit 1b9f22f9f62ad68cd2ca89935d85cfd1759d6165
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 7 17:10:38 2011 -0500

    basic search "works" inasmuch as it leads to a GET request against the
    results page as it should. not that the results page itself works yet.

diff --git a/Open-ILS/web/templates/default/opac/parts/libselect.tt2 b/Open-ILS/web/templates/default/opac/parts/libselect.tt2
index 678fcc9..f41d0e4 100644
--- a/Open-ILS/web/templates/default/opac/parts/libselect.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/libselect.tt2
@@ -1,6 +1,30 @@
+[%  # XXX TODO probably put this BLOCK somewhere else so it can be used widely.
+    # Org Unit Selector Widget :
+    #   PROCESS build_org_selector id='selector-id' name='selector-name'
+    BLOCK build_org_selector;
+        first_run = 0;
+        IF !org_unit;
+            org_unit = ctx.aou_tree;
+            first_run = 1;
+%]
+    <select id='[% id %]' name='[% name %]'>
+    [% END %]
+        <option value='[% org_unit.id %]' [% IF org_unit.id == value %] selected='selected' [% END %]>
+            [%
+                pad = org_unit.ou_type.depth * 2;
+                FOR idx IN [0..pad]; '&nbsp;'; END;
+                org_unit.name;
+            %]
+        </option>
+        [% FOR child IN org_unit.children; PROCESS build_org_selector org_unit = child; END %]
+    [% IF first_run %]
+    </select>
+    [% END %]
+[% END %]
+
 <!-- ****************** libselect.xml ***************************** -->
     <span id='depth_selector_span'>
-        <select id='depth_selector'><!-- XXX TODO --></select>
+        [% PROCESS build_org_selector name='loc' %]
     </span>
     <span id='lib_selector_span'>
         <a id='lib_selector_link' class='classic_link'
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 559f1a5..50ae309 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -1,4 +1,5 @@
 <div id="search-box">    
+    <form action="[% skin_root %]results" method="GET">
     <table cellpadding="0" cellspacing="10" border="0">
         <tr>
             <td colspan="3">
@@ -14,18 +15,19 @@
             </td>
             <td>
                 <div id="search_box_wrapper">
-                    <input type="text" id="search_box"
-                        value="Search Keyword"
-                        onfocus="if (this.value=='Search Keyword'){this.value='';this.style.color='#000';}"
-                        onblur="if (this.value==''){this.value='Search Keyword';this.style.color='#999';}" />
-                    <input id='facet_box' type='hidden' />
+                    <input type="text" id="search_box" name="query"
+                        value="[% query || l("Search Keyword") %]"
+                        onfocus="if (this.value=='[% l("Search Keyword") %]'){this.value='';this.style.color='#000';}"
+                        onblur="if (this.value==''){this.value='[% l("Search Keyword") %]';this.style.color='#999';}" />
+                    <input name='page' type='hidden' value="0" />
                 </div>
             </td>
             <td valign="top">
                 <div class="pos-abs">
                     <div class="opac-auto-143">
-                        <input type="button" id="search_submit" value="GO"
-                            class="hide_me" /><a href="#"
+                        <input type="submit" id="search_submit" value="GO"
+                            class="hide_me" /><a
+                                href="javascript:document.getElementById('search_submit').click();"
                                 id="search_submit_alt"><img
                                 alt="Search" src="[% ctx.media_prefix %]/images/go-btn.png"
                             onmouseover="this.src='[% ctx.media_prefix %]/images/go-btn-hover.png';"
@@ -43,15 +45,9 @@
             </td>
         </tr>
     </table>
-    <div class="hide_me">
-        <input type="checkbox" id="opac.result.limit2avail" />
-        <label class="opac-auto-143"
-            for="opac.result.limit2avail">
-            <span class="ten-px">Limit to available items</span>
-        </label>
-      </div>
-      <div id="breadcrumb">
-          <a href="[% skin_root %]home">Catalog Home</a> &gt;
-      </div>
+    </form>
+    <div id="breadcrumb">
+        <a href="[% skin_root %]home">Catalog Home</a> &gt;
+    </div>
     <div class="clear-both"></div>
 </div>

commit 7aefacf2bfac861fc33359dd0b53b27635637466
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 7 16:53:28 2011 -0500

    login page working (just for login, not the extras like "remember me")

diff --git a/Open-ILS/web/templates/default/opac/parts/login/form.tt2 b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
index ac27109..e140bcb 100644
--- a/Open-ILS/web/templates/default/opac/parts/login/form.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
@@ -64,7 +64,7 @@
 
 <div id="login_box">
     <div style="height:20px;"></div>
-    <form id='login_form' method='POST' action='#'>
+    <form id='login_form' method='POST'>
         <table cellpadding="0" cellspacing="0" border="0">
             <tr>
                 <td valign="top" width="676" class="login_boxes left_brain">
@@ -87,7 +87,7 @@
                             </td>
                             <td width="58%" valign="top">
                                 <div class="input_bg">
-                                    <input type="text" name="opacUser"
+                                    <input type="text" name="username"
                                         id="login_username" />
                                 </div>
                             </td>
@@ -107,9 +107,12 @@
                             </td>
                             <td valign="top">
                                 <div class="input_bg">
-                                    <input name="opacPass" type="password" id="login_password" />
+                                    <input name="password" type="password" id="login_password" />
                                 </div>
                                 <div style="padding-top:7px;">
+                                    <input type='hidden'
+                                        name='redirect_to'
+                                        value='[% CGI.param('redirect_to') || ctx.referer | replace('^http:', 'https:') %]' />
                                     <input class="hide_me" type="checkbox"
                                         id="remember_me" name="remember_me" />
                                     <label class="hide_me"

commit 2519f02ee60cebd34bd9c2df52aaff906bb8d6d5
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 7 16:46:39 2011 -0500

    ctx.media_prefix for all images and css

diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 747451d..8e6cc43 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -4,19 +4,19 @@
 <div id='myopac_checked_div' style="padding:0px;">
     <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;">
         <div class="align selected" id="checked_label">
-            <img src="/images/sub_checked_out_on.jpg" />
+            <img src="[% ctx.media_prefix %]/images/sub_checked_out_on.jpg" />
         </div>
         <div class="align" id="checked_hist_link">
             <a class="" href="#"><img
-                src="/images/sub_checked_hist_off.jpg" /></a>
+                src="[% ctx.media_prefix %]/images/sub_checked_hist_off.jpg" /></a>
         </div>
         <div class="align hide_me" id="checked_link">
             <a href="#">
-                <img src="/images/sub_checked_out_off.jpg" />
+                <img src="[% ctx.media_prefix %]/images/sub_checked_out_off.jpg" />
             </a>
         </div>
         <div class="align selected hide_me" id="checked_hist_label">
-            <img src="/images/sub_checked_hist_on.jpg" />
+            <img src="[% ctx.media_prefix %]/images/sub_checked_hist_on.jpg" />
         </div>    
         <div class="clear-both"></div>
     </div>
@@ -40,11 +40,11 @@
                 <td style="padding-left:9px;">
                     <a class="hide_me" href="#"><img
                         alt="Save"
-                        src="/images/save-btn.png" /></a>
+                        src="[% ctx.media_prefix %]/images/save-btn.png" /></a>
                 </td>
                 <td style="padding-left:5px;">
                     <a href="#"><img alt="Renewing Help"
-                        src="/images/question-mark.png" /></a>
+                        src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
                 </td>
             </tr>
         </table>
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index ed9f112..c239066 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -4,18 +4,18 @@
 <div id='myopac_holds_div'>
     <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;">
         <div class="align selected" id="holds_label">
-            <img src="/images/sub_holds_on.jpg" />
+            <img src="[% ctx.media_prefix %]/images/sub_holds_on.jpg" />
         </div>
         <div class="align hide_me" id="holds_hist_link">
             <a href="#"><img
-                src="/images/sub_holds_hist_off.jpg" /></a>
+                src="[% ctx.media_prefix %]/images/sub_holds_hist_off.jpg" /></a>
         </div>
         <div class="align hide_me" id="holds_link">
             <a href="#"><img
-                src="/images/sub_holds_off.jpg" /></a>
+                src="[% ctx.media_prefix %]/images/sub_holds_off.jpg" /></a>
         </div>
         <div class="align selected hide_me" id="holds_hist_label">
-            <img src="/images/sub_holds_hist_on.jpg" />
+            <img src="[% ctx.media_prefix %]/images/sub_holds_hist_on.jpg" />
         </div>	
         <div class="clear-both"></div>
     </div>
@@ -54,12 +54,12 @@
                 <td width="1" style="padding-left:9px;">
                     <a href="#"><img
                         alt="Save"
-                        src="/images/save-btn.png" /></a>
+                        src="[% ctx.media_prefix %]/images/save-btn.png" /></a>
                 </td>
                 <td width="1" style="padding-left:5px;">
                     <a href="#"><img
                         alt="Holds Help"
-                        src="/images/question-mark.png" /></a>
+                        src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
                 </td>
                 <td align="right">
                     <select class="hide_me" id="holds_sort">
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index c156ce1..2123f4b 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -15,7 +15,7 @@
                 Share this list?
                 <a href="#"><img
                     alt="Sharing Help"
-                    src="/images/question-mark.png" /></a>
+                    src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
             </td>
             <td>
                 <input type="radio" value="0" name="shareList"
@@ -29,10 +29,10 @@
         </tr>
     </table>
     <a href="#"><img
-        alt="Submit" src="/images/btnSubmit.png" /></a>
+        alt="Submit" src="[% ctx.media_prefix %]/images/btnSubmit.png" /></a>
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     <a href="#"><img
-        alt="Cancel" src="/images/btnCancel.png" /></a>
+        alt="Cancel" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
 </div>
 <div id='myopac_bookbag_div' style="padding:5px;">
     <div class="header_middle">
@@ -47,9 +47,9 @@
                 <a href="#"
                     style="position:relative;top:-3px;left:-5px;"><img
                     alt="Saving Help"
-                    src="/images/question-mark.png" /></a>
+                    src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
                 <a id='acct_lists_save' href="#"><img alt="Save"
-                    src="/images/save-btn.png" /></a>
+                    src="[% ctx.media_prefix %]/images/save-btn.png" /></a>
             </div>
         </div>
     </div>
@@ -67,7 +67,7 @@
                         <td>
                             <a href="#"><img
                                 alt="Anonymous List Help"
-                                src="/images/question-mark.png" /></a>
+                                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
                         </td>
                     </tr>
                 </table>
@@ -105,7 +105,7 @@
                     <div style="float:left;padding:5px 0px 0px 10px;">
                         <a target='_blank' name='share_list_rss'
                             class='hide_me'><img alt="RSS Feed" border="0"
-                            src="/opac/images/small-rss.png"
+                            src="/opac[% ctx.media_prefix %]/images/small-rss.png"
                             title="You are sharing this list"/></a>
                     </div>
                     <div style="float:left;padding:5px 0px 0px 10px;">
@@ -178,7 +178,7 @@
                     <a name='myopac_bb_published_atom'
                         class='unadorned_link hide_me'>
                         <img alt="RSS Feed" border="0"
-                        src="/opac/images/small-rss.png"
+                        src="/opac[% ctx.media_prefix %]/images/small-rss.png"
                         title="[% l("ATOM Feed") %]" />
                     </a>
                 </td>
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index abeef06..1dfaf71 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -9,30 +9,30 @@
         <div id="myopac_sum_fines">
             <div style="position:absolute;">
                 <div style="position:relative;top:-15px;left:-23px;">
-                    <img src="/images/acct_sum_fines_tl.png" />
+                    <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tl.png" />
                 </div>
             </div>
             <div style="position:absolute;">
                 <div style="position:relative;top:-15px;left:172px;">
-                    <img src="/images/acct_sum_fines_tr.png" />
+                    <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tr.png" />
                 </div>
             </div>
             <div style="position:absolute;">
                 <div style="position:relative;top:161px;left:-23px;">
-                    <img src="/images/acct_sum_fines_bl.png" />
+                    <img src="[% ctx.media_prefix %]/images/acct_sum_fines_bl.png" />
                 </div>
             </div>
             <div style="position:absolute;">
                 <div style="position:relative;top:161px;left:172px;">
-                    <img src="/images/acct_sum_fines_br.png" />
+                    <img src="[% ctx.media_prefix %]/images/acct_sum_fines_br.png" />
                 </div>
             </div>
             Fines: <span id="myopac_sum_fines_bal">$0.00</span><br />
             <a class="hide_me" href="#" id="pay_fines_btn1"><img
                 alt="Pay Fines"
-                onmouseover="this.src='/images/pay-fines-btn-hover.png';"
-                onmouseout="this.src='/images/pay-fines-btn.png';"
-                src="/images/pay-fines-btn.png"
+                onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
+                onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
+                src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
                 style="position:relative;top:5px;" /></a>
         </div>
         <div style="width:662px;">
@@ -240,8 +240,8 @@
                 </table>
             </div>
             <a href="#"><img alt="Pay Fines"
-                onmouseover="this.src='/images/pay-fines-btn-hover.png';"
-                src="/images/pay-fines-btn.png"
+                onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
+                src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
                 style="position:relative;top:5px;" /></a>
             <br/>
         </div>
@@ -330,7 +330,7 @@
                         <div style="position:absolute;">
                             <div style="position:relative;left:80px;">
                                 <a href="#"><img
-                                    src="/images/question-mark.png" /></a>
+                                    src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
                             </div>
                         </div>
                         Security Code
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
index 9788b0e..ea6fb15 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
@@ -7,33 +7,33 @@
             <div style="float:left;">
                 <div class="align selected"
                      id="prefs_info_lbl"><img src=
-                     "/images/sub_prefs_info_on.jpg" /></div>
+                     "[% ctx.media_prefix %]/images/sub_prefs_info_on.jpg" /></div>
 
                 <div class="align hide_me"
                      id="prefs_info_link">
                     <a href="#"><img src=
-                         "/images/sub_prefs_info_off.jpg" /></a>
+                         "[% ctx.media_prefix %]/images/sub_prefs_info_off.jpg" /></a>
                 </div>
 
                 <div class="align"
                      id="prefs_notify_link">
                     <a href="#"><img src=
-                         "/images/sub_prefs_notify_off.jpg" /></a>
+                         "[% ctx.media_prefix %]/images/sub_prefs_notify_off.jpg" /></a>
                 </div>
 
                 <div class="align selected hide_me"
                      id="prefs_notify_lbl"><img src=
-                     "/images/sub_prefs_notify_on.jpg" /></div>
+                     "[% ctx.media_prefix %]/images/sub_prefs_notify_on.jpg" /></div>
 
                 <div class="align"
                      id="prefs_search_link">
                     <a href="#"><img src=
-                         "/images/sub_prefs_search_off.jpg" /></a>
+                         "[% ctx.media_prefix %]/images/sub_prefs_search_off.jpg" /></a>
                 </div>
 
                 <div class="align selected hide_me"
                      id="prefs_search_lbl"><img src=
-                     "/images/sub_prefs_search_on.jpg" /></div>
+                     "[% ctx.media_prefix %]/images/sub_prefs_search_on.jpg" /></div>
             </div>
 
             <div style="float:right;width:65px;">
@@ -42,7 +42,7 @@
                         <a id='acct_prefs_save'
                              class='hide_me'
                              href="#"><img alt="Save"
-                             src="/images/save-btn.png" /></a>
+                             src="[% ctx.media_prefix %]/images/save-btn.png" /></a>
                     </div>
                 </div>
             </div>
@@ -77,7 +77,7 @@
                                 <a href="#">
                                 <img alt="Search Hits Help"
                                      src=
-                                     "/images/question-mark.png" /></a>
+                                     "[% ctx.media_prefix %]/images/question-mark.png" /></a>
                             </div>
                         </div><select id='prefs_hits_per'
                             style="position:relative;z-index:100;">
@@ -399,7 +399,7 @@
                                     <a href="#">
                                     <img alt="Username Help"
                                          src=
-                                         "/images/question-mark.png" /></a>
+                                         "[% ctx.media_prefix %]/images/question-mark.png" /></a>
                                 </div>
                             </div>[% l("Username") %]
                         </td>
@@ -600,7 +600,7 @@
                                     <td>
                                         <a href="#"><img
                                             alt="Address Help"
-                                            src="/images/question-mark.png" /></a>
+                                            src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
                                     </td>
                                 </tr>
                             </table>
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index 58cce8b..44fb6b3 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -256,7 +256,7 @@
     <tr class='border_4_2'>
         <td align="left" colspan='2'>
             <!-- XXX TODO make a real form, and make this a real submitter -->
-        <img src="/images/search_btn.gif" alt="Search"  style="cursor:pointer;" />
+        <img src="[% ctx.media_prefix %]/images/search_btn.gif" alt="Search"  style="cursor:pointer;" />
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <!-- XXX TODO make a real form, and make this a real resetter -->
         <a href="javascript:;" style="position: relative; top: -9px;">Reset Form</a>
@@ -288,7 +288,7 @@
         <div style='margin-top: 8px;' class='adv_quick_search_submit'>
             <!-- XXX TODO make a real form, and make a real submitter (quick
             submit, FKA advGenericSearch() -->
-            <img src="/images/search_btn.gif"
+            <img src="[% ctx.media_prefix %]/images/search_btn.gif"
                 alt="Search" id="adv_quick_submit" style="cursor:pointer;" />
         </div>
     </div>
@@ -325,7 +325,7 @@
             href='javascript:advAddMARC();'>[% l("Add Row") %]</a>
         <!-- XXX TODO make a real form, and make a real submitter (FKA
         advMARCRun()) -->
-        <img alt="Search" src="/images/search_btn.gif"
+        <img alt="Search" src="[% ctx.media_prefix %]/images/search_btn.gif"
             style="cursor:pointer;" />
     </div>
 </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/base.tt2 b/Open-ILS/web/templates/default/opac/parts/base.tt2
index 7921cd3..881b46e 100644
--- a/Open-ILS/web/templates/default/opac/parts/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/base.tt2
@@ -3,11 +3,11 @@
     <head>
         <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
         <link rel="stylesheet" type="text/css"
-            href="/css/skin/default/opac/semiauto.css" />
+            href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto.css" />
         <link rel="stylesheet" type="text/css"
-            href="/css/skin/default/opac/style.css" />
+            href="[% ctx.media_prefix %]/css/skin/default/opac/style.css" />
         <link rel="stylesheet" type="text/css"
-            href="/css/skin/default/opac/contentslider.css" />
+            href="[% ctx.media_prefix %]/css/skin/default/opac/contentslider.css" />
         <title>Catalog - King County Library - [% ctx.page_title %]</title>
         <link rel="unapi-server" type="application/xml" title="unAPI"
             href="/opac/extras/unapi" />
diff --git a/Open-ILS/web/templates/default/opac/parts/homesearch.tt2 b/Open-ILS/web/templates/default/opac/parts/homesearch.tt2
index 03fc3bd..72c4242 100644
--- a/Open-ILS/web/templates/default/opac/parts/homesearch.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/homesearch.tt2
@@ -26,7 +26,7 @@
   
 <!-- ************************************ home page banner start ********************************************** -->
     <div class="contentdiv" style="background:white;">
-      <a href="http://www.kcls.org/newcatalog"><img alt="New catalog" src="/images/banner1.jpg" /></a>
+      <a href="http://www.kcls.org/newcatalog"><img alt="New catalog" src="[% ctx.media_prefix %]/images/banner1.jpg" /></a>
     </div>
     <div class="contentdiv" style="background:#ffc331;">
       test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
@@ -38,7 +38,7 @@
     </div>
     <div class="contentdiv" style="background:#2bb0fd;">
       <br />
-      <img src="/images/KCLS_logo_horiz.gif" /><br />
+      <img src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /><br />
       test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
       test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
     </div>
@@ -63,13 +63,13 @@
                 <a href="http://www.kcls.org/newcatalog"></a>
             </div>
         </div>
-        <img alt="New catalog" src="/images/banner1.jpg" />
+        <img alt="New catalog" src="[% ctx.media_prefix %]/images/banner1.jpg" />
     </div>
 </div>
 
 <div id="hp-buttons">
     <div class="float-left">
-        <img src="/images/hp-links-left.jpg" />
+        <img src="[% ctx.media_prefix %]/images/hp-links-left.jpg" />
     </div>
     <div class="float-left">
     <div id="home-buttons-inner">
@@ -80,8 +80,8 @@
       </table>
     </div>
   </div>
-  <div class="float-left"><img src="/images/hp-links-right.jpg" /></div>
-  <div class="float-right"><a href="http://www.kcls.org/locations"><img alt="Locations" src="/images/locations.jpg" /></a></div>
+  <div class="float-left"><img src="[% ctx.media_prefix %]/images/hp-links-right.jpg" /></div>
+  <div class="float-right"><a href="http://www.kcls.org/locations"><img alt="Locations" src="[% ctx.media_prefix %]/images/locations.jpg" /></a></div>
   <div class="clear-both"></div>
 </div>
 <!-- ****************** end: homesearch.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/login/form.tt2 b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
index cd9e78c..ac27109 100644
--- a/Open-ILS/web/templates/default/opac/parts/login/form.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
@@ -118,7 +118,7 @@
                                 </div>
                                 <div style="padding-top:14px;">
                                     <a href="#" id="login_button"><img
-                                        alt="Log in" src="/images/login-btn2.png" /></a>
+                                        alt="Log in" src="[% ctx.media_prefix %]/images/login-btn2.png" /></a>
                                     <input class="hide_me"
                                         id="login_form_submit" type="submit" />
                                     <a href="#"
@@ -133,14 +133,14 @@
                 <td class="login_boxes right_brain" align="center"
                     valign="top" width="291">
                     <a href="http://www.kcls.org/about/contact/"><img
-                        src="/images/questions.png"
+                        src="[% ctx.media_prefix %]/images/questions.png"
                         alt="Questions?" style="margin-top:29px;" /></a>
 	                <div style="width:182px;color:black;padding:5px 25px;">
                         Visit our FAQs section for answers to common questions
                         about how to use your account.
 	                </div>
                     <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm#FAQs"><img
-                        alt="FAQs" src="/images/faqs-btn.png"
+                        alt="FAQs" src="[% ctx.media_prefix %]/images/faqs-btn.png"
                         style="margin-top:13px;" /></a>
 	            </td>
             </tr>
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index 7548b56..7fc9f31 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -46,10 +46,10 @@
             services, please select "Outreach" to have the item delivered
             during your scheduled visit.</p>
         <a href="#" id="holds_submit"><img
-            alt="Submit" src="/images/btnSubmit.png" /></a>
+            alt="Submit" src="[% ctx.media_prefix %]/images/btnSubmit.png" /></a>
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <a href="#" id="holds_cancel"><img
-            alt="Cancel" src="/images/btnCancel.png" /></a>
+            alt="Cancel" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
         <br /><br />
         <p>* If you need your item today, and it is checked in at your
             library, please place your hold and then call your library to set it
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index 05cbd78..8a53826 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -20,7 +20,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("summary");'><img
-                    alt="" src="/images/rdetail_arrow.png" /></a>
+                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("summary");'
                     class="rdetail_extras_lbl">Summary</a>
             </div>
@@ -43,7 +43,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("subject");'><img
-                    alt="" src="/images/rdetail_arrow.png" /></a>
+                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("subject");' class="rdetail_extras_lbl">subject</a>
             </div>
         </div>
@@ -127,7 +127,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("content");'><img alt=""
-                    src="/images/rdetail_arrow.png" /></a>
+                    src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("content");' class="rdetail_extras_lbl">Contents</a>
             </div>
         </div>
@@ -143,7 +143,7 @@
             class="rdetail_extras hide_me" id="rdetail_authors_link"><div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("authors");'><img
-                    alt="" src="/images/rdetail_arrow.png" /></a>
+                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("authors");' class="rdetail_extras_lbl">Author</a>
             </div>
         </div>
@@ -164,7 +164,7 @@
             class="rdetail_extras hide_me" id="rdetail_series_link"><div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("series");'><img
-                    alt="" src="/images/rdetail_arrow.png" /></a>
+                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("series");'
                     class="rdetail_extras_lbl">series</a>
             </div>
@@ -180,7 +180,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("awards");'><img
-                    alt="" src="/images/rdetail_arrow.png" /></a>
+                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("awards");'
                     class="rdetail_extras_lbl">awards, reviews &amp; suggested reads</a>
             </div>
@@ -213,7 +213,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("reviews");'><img
-                    alt="" src="/images/rdetail_arrow.png" /></a>
+                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("reviews");'
                     class="rdetail_extras_lbl">[% l("Reviews") %]</a>
             </div>
@@ -226,7 +226,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("excerpt");'><img
-                    alt="" src="/images/rdetail_arrow.png" /></a>
+                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("excerpt");'
                     class="rdetail_extras_lbl">[% l("Excerpt") %]</a>
             </div>
@@ -239,7 +239,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("preview");'><img
-                    alt="" src="/images/rdetail_arrow.png" /></a>
+                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("preview");'
                     class="rdetail_extras_lbl">[% l("Preview") %]</a>
             </div>
@@ -252,7 +252,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("novelist");'><img
-                    alt="" src="/images/rdetail_arrow.png" /></a>
+                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("novelist");'
                     class="rdetail_extras_lbl">[% l("Suggestions by NoveList") %]</a>
             </div>
@@ -263,7 +263,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("cn");'><img
-                    alt="" src="/images/rdetail_arrow.png" /></a>
+                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("cn");'
                     class="rdetail_extras_lbl">[% l("Shelf Browser") %]</a>
             </div>
@@ -290,7 +290,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("copyinfo");'><img
-                    alt="" src="/images/rdetail_arrow.png" /></a>
+                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("copyinfo");'
                     class="rdetail_extras_lbl">[% l("Copy Summary") %]</a>
             </div>
@@ -302,7 +302,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("marc");'><img
-                    alt="" src="/images/rdetail_arrow.png" /></a>
+                    alt="" src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("marc");'
                     class="rdetail_extras_lbl">[% l("MARC Record") %]</a>
             </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 5e3ab90..e1d5e35 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -33,7 +33,7 @@
                                     <div style="border-bottom:1px dotted #ccc;padding-top:10px;"
                                         class="rdetail_aux_utils">
                                         <a href="place_hold" id="rdetail_place_hold"><img
-                                            src="/images/green_check.png" alt="place hold" />
+                                            src="[% ctx.media_prefix %]/images/green_check.png" alt="place hold" />
                                             <span style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
                                     </div>
                                     <div style="padding-top:6px;" class="rdetail_aux_utils">
@@ -45,7 +45,7 @@
                                         </div>
                                         <a href="#"><img
                                             alt="add to my list"
-                                            src="/images/clipboard.png" /></a>
+                                            src="[% ctx.media_prefix %]/images/clipboard.png" /></a>
                                     </div>
                                 </div>
                                 <div style="float:right;margin-right:17px;">
@@ -131,24 +131,24 @@
 
 <div id="rdetail_locs_expand">
     <a href="#"><img
-        src="/images/plus_sign.png" /></a>
+        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
     <a style="position:relative;top:-3px;" href="#">Show more locations</a>
 </div>
 
 <div id="rdetail_locs_collapse" class="hide_me">
     <a href="#"><img
-        src="/images/plus_sign.png" /></a>
+        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
     <a style="position:relative;top:-3px;" href="#">Collapse locations</a>
 </div>
 
 <div id="rdetail_extras_expand">
     <a href="#"><img
-        src="/images/plus_sign.png" /></a>
+        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
     <a style="position:relative;top:-3px;" href="#">Expand all tabs</a>
 </div>
 
 <div id="rdetail_extras_collapse" class="hide_me">
-    <a href="#"><img src="/images/plus_sign.png" /></a>
+    <a href="#"><img src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
     <a style="position:relative;top:-3px;" href="#">Collapse all tabs</a>
 </div>
 
@@ -168,11 +168,11 @@
                             </td>
                             <td width="1" valign="top" align="right" style="white-space:nowrap;">
                                 <a href="place_hold" id=''><img alt="Place Hold"
-                                    src="/images/place_hold.gif" /></a>
+                                    src="[% ctx.media_prefix %]/images/place_hold.gif" /></a>
                                 <a href="#" id="rd_reviews_and_more" target="_blank"><img
-                                    alt="Reviews and More" src="/images/reviews.gif" /></a>
+                                    alt="Reviews and More" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>
                                 <a href="#" id=""><img alt="Add to My List"
-                                    src="/images/add_mylist.gif" /></a>
+                                    src="[% ctx.media_prefix %]/images/add_mylist.gif" /></a>
                             </td>
                         </tr>
                     </table>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index a183ead..0d2a569 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -139,7 +139,7 @@
                                                         <div style="border-bottom:1px dotted #ccc;padding-top:10px;"
                                                             class="results_aux_utils"><a
                                                                 href="javascript:;" name="place_hold_link"><img
-                                                                src="/images/green_check.png"
+                                                                src="[% ctx.media_prefix %]/images/green_check.png"
                                                                 alt="place hold" /><span
                                                                     style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
                                                         </div>
@@ -154,13 +154,13 @@
                                                             <a href="javascript:;"
                                                                 name="result_my_list_link_img"><img
                                                                 alt="add to my list"
-                                                                src="/images/clipboard.png" /></a>
+                                                                src="[% ctx.media_prefix %]/images/clipboard.png" /></a>
                                                         </div>
                                                         <div style="padding-top:7px;" class="results_aux_utils">
                                                             <a title="Reviews and More" target="_blank"
                                                                 name="reviews_and_more" href="javascript:;"><img
                                                                 alt="reviews &amp; more"
-                                                                src="/images/starz.png" /> <span
+                                                                src="[% ctx.media_prefix %]/images/starz.png" /> <span
                                                                     style="position:relative;top:-5px;">Reviews &amp; More</span></a>
                                                         </div>
                                                     </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index 507afed..559f1a5 100644
--- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -27,9 +27,9 @@
                         <input type="button" id="search_submit" value="GO"
                             class="hide_me" /><a href="#"
                                 id="search_submit_alt"><img
-                                alt="Search" src="/images/go-btn.png"
-                            onmouseover="this.src='/images/go-btn-hover.png';"
-                            onmouseout="this.src='/images/go-btn.png';" /></a>
+                                alt="Search" src="[% ctx.media_prefix %]/images/go-btn.png"
+                            onmouseover="this.src='[% ctx.media_prefix %]/images/go-btn-hover.png';"
+                            onmouseout="this.src='[% ctx.media_prefix %]/images/go-btn.png';" /></a>
                     </div>
                 </div>
             </td>
diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
index 350959d..a3ddabf 100644
--- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
@@ -2,14 +2,14 @@
 <div id="header">
     <div class="float-left"><a
         href="http://www.kcls.org"><img alt="KCLS Logo"
-        src="/images/KCLS_logo_horiz.gif" /></a></div>
+        src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /></a></div>
     <div class="float-right">
         <div id="your-acct-login"><a
             href="[% skin_root %]login" id="home_myopac_link"><img
             alt="Your Account Log in"
-            src="/images/login-btn.png"
-            onmouseover="this.src='/images/login-btn-hover.png';"
-            onmouseout="this.src='/images/login-btn.png';" /></a></div>
+            src="[% ctx.media_prefix %]/images/login-btn.png"
+            onmouseover="this.src='[% ctx.media_prefix %]/images/login-btn-hover.png';"
+            onmouseout="this.src='[% ctx.media_prefix %]/images/login-btn.png';" /></a></div>
 
 
     </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/utils.tt2 b/Open-ILS/web/templates/default/opac/parts/utils.tt2
index d8dd56a..e140225 100644
--- a/Open-ILS/web/templates/default/opac/parts/utils.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/utils.tt2
@@ -3,27 +3,27 @@
             <div class="float-right">
                 <div class="pos-rel">
                     <img
-                        src="/images/utils-corner-left.png"
+                        src="[% ctx.media_prefix %]/images/utils-corner-left.png"
                         class="float-left" />
                     <div class="left-corner"> 
                         <a href="javascript:history.go(-1)"
                             id="util_back_btn"><img alt="Back"
-                            src="/images/tool_back.png" /></a>
+                            src="[% ctx.media_prefix %]/images/tool_back.png" /></a>
                         <a href="[% skin_root %]home"
                             id="util_home_btn"><img alt="Homepage"
-                            src="/images/tool_home.png" /></a>
+                            src="[% ctx.media_prefix %]/images/tool_home.png" /></a>
                         <a href="javascript:window.print();"
                             id="util_print_btn"><img alt="Print Page"
-                            src="/images/tool_print.png" /></a>
+                            src="[% ctx.media_prefix %]/images/tool_print.png" /></a>
                         <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm"
                             id="util_help_btn"><img alt="Help"
-                            src="/images/tool_help.png" /></a>
+                            src="[% ctx.media_prefix %]/images/tool_help.png" /></a>
                         <a href="javascript:history.go(+1)"
                             id="util_forw_btn"><img alt="Forward"
-                            src="/images/tool_forward.png" /></a>
+                            src="[% ctx.media_prefix %]/images/tool_forward.png" /></a>
                     </div>
                     <img
-                        src="/images/utils-corner-right.png"
+                        src="[% ctx.media_prefix %]/images/utils-corner-right.png"
                         class="float-left" />
                 </div>
             </div>
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 5e52f13..df39f4f 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -10,22 +10,22 @@
             <div id="results_header_inner">
                 <div class="results_header_btns">
                     <a href="index.xml"><img alt="Another Search"
-                        src="/images/another_search.png"
-                        onmouseover="this.src='/images/another_search_hover.png';"
-                        onmouseout="this.src='/images/another_search.png';" /></a>
+                        src="[% ctx.media_prefix %]/images/another_search.png"
+                        onmouseover="this.src='[% ctx.media_prefix %]/images/another_search_hover.png';"
+                        onmouseout="this.src='[% ctx.media_prefix %]/images/another_search.png';" /></a>
                 </div>
                 <div class="results_header_btns">
                     <a href="advanced"><img alt="Advanced Search"
-                        src="/images/adv_search.png"
-                        onmouseover="this.src='/images/adv_search_hover.png';"
-                        onmouseout="this.src='/images/adv_search.png';" /></a>
+                        src="[% ctx.media_prefix %]/images/adv_search.png"
+                        onmouseover="this.src='[% ctx.media_prefix %]/images/adv_search_hover.png';"
+                        onmouseout="this.src='[% ctx.media_prefix %]/images/adv_search.png';" /></a>
                 </div>
                 <div class="results_header_btns cached_list_div">
                     <a href="#" class="hide_me" id="cacheListLink"><img
                         alt="View My List"
-                        src="/images/view_my_list.png"
-                        onmouseover="this.src='/images/view_my_list_hover.png';"
-                        onmouseout="this.src='/images/view_my_list.png';" /></a>
+                        src="[% ctx.media_prefix %]/images/view_my_list.png"
+                        onmouseover="this.src='[% ctx.media_prefix %]/images/view_my_list_hover.png';"
+                        onmouseout="this.src='[% ctx.media_prefix %]/images/view_my_list.png';" /></a>
                 </div>
                 <div class="results_header_div"></div>
                 <div class="results_header_lbl">Sort by</div>

commit 2fcf69269eed8d0e9d3f5e4a05a22223bf91d7cb
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 7 16:41:20 2011 -0500

    Render entities as calls to l(). Goodbye DTD

diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 5d0790b..747451d 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -153,13 +153,13 @@
     </div>
     <div id='non_cat_circs_div' class='hide_me'>
         <br/>
-        <div style='text-align: center'><b>&myopac.checked.other.circ;</b></div>
+        <div style='text-align: center'><b>[% l("Other Circulations") %]</b></div>
         <table class='data_grid' width='100%'>
             <thead>
                 <tr>
-                    <td>&myopac.checked.circ.lib;</td>
-                    <td>&myopac.checked.item.type;</td>
-                    <td>&myopac.checked.circ.time;</td>
+                    <td>[% l("Circulating Library") %]</td>
+                    <td>[% l("Circulation Type") %]</td>
+                    <td>[% l("Please return by ...") %]</td>
                 </tr>
             </thead>
             <tbody id='non_cat_circs_tbody'>
@@ -171,9 +171,9 @@
             </tbody>
         </table>
     </div>
-    <div id='myopac_renew_success' class='hide_me'>&myopac.checked.renew.success;</div>
-    <span class='hide_me' id='myopac_renew_confirm'>&myopac.checked.renew.confirm;</span>
-    <span class='hide_me' id='myopac_renew_fail'>&myopac.checked.renew.fail;</span>
-   <span class='hide_me' id='myopac_renew_fail2'>&myopac.checked.renew.fail2;</span>
+    <div id='myopac_renew_success' class='hide_me'>[% l("item(s) successfully renewed") %]</div>
+    <span class='hide_me' id='myopac_renew_confirm'>[% l("Are you sure you wish to renew the selected item(s)?") %]</span>
+    <span class='hide_me' id='myopac_renew_fail'>[% l("The system is unable to renew the selected item at this time.  This usually means the item is needed to fulfill a hold.  Please see a librarian for further help.") %]</span>
+   <span class='hide_me' id='myopac_renew_fail2'>[% l("Library policy prevents the renewal of this item at this time.  Please see a librarian for further details.") %]</span>
 </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 4ed8e95..ed9f112 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -35,19 +35,19 @@
                 <td width="1">
                     <select id="acct_holds_actions">
                         <option id='myopac_holds_actions_none' value=''>
-                        -- &myopac.holds.actions; --
+                        -- [% l("Actions for selected holds") %] --
                         </option>
                         <option value='freeze'>
-                            &myopac.holds.freeze_selected;
+                            [% l("Suspend") %]
                         </option>
                         <option value='thaw'>
-                            &myopac.holds.thaw_selected;
+                            [% l("Activate") %]
                         </option>
                         <option value='thaw_date'>
-                            &myopac.holds.thaw_date_selected;
+                            [% l("Set Active Date") %]
                         </option>
                         <option value='cancel'>
-                            &myopac.holds.cancel_selected;
+                            [% l("Cancel") %]
                         </option>
                     </select>
                 </td>
@@ -175,30 +175,30 @@
     </div>
     <div id='holds_hist_table' class="hide_me">testing...</div>
 
-    <span id='myopac.holds.cancel.confirm' class='hide_me'>&myopac.holds.cancel.confirm;</span>
-    <span id='myopac.holds.freeze.confirm' class='hide_me'>&myopac.holds.freeze.confirm;</span>
-    <span id='myopac.holds.thaw.confirm' class='hide_me'>&myopac.holds.thaw.confirm;</span>
-    <span id='myopac.holds.thaw_date.confirm' class='hide_me'>&myopac.holds.thaw_date.confirm;</span>
-    <span id='myopac.holds.freeze.select_thaw' class='hide_me'>&myopac.holds.freeze.select_thaw;</span>
+    <span id='myopac.holds.cancel.confirm' class='hide_me'>[% l("Are you sure you wish to cancel the selected holds?") %]</span>
+    <span id='myopac.holds.freeze.confirm' class='hide_me'>[% l("Are you sure you wish to suspend the selected holds?  If an item has already been selected to fulfill the hold, it will not be suspended") %]</span>
+    <span id='myopac.holds.thaw.confirm' class='hide_me'>[% l("Are you sure you wish to activate the selected holds?") %]</span>
+    <span id='myopac.holds.thaw_date.confirm' class='hide_me'>[% l("Are you sure you wish to change the activate date for the selected holds?") %]</span>
+    <span id='myopac.holds.freeze.select_thaw' class='hide_me'>[% l("Select an automatic activation date.  If no date is chosen, the holds will remain suspended until they are manually activated.") %]</span>
 
     <table width='100%' id='myopac_holds_processing' class='hide_me'>
-        <tr><td>&myopac.holds.processing;</td></tr>
+        <tr><td>[% l("Processing holds... This may take a moment.") %]</td></tr>
     </table>
    
     <span class='hide_me' id='myopac_holds_cancel_verify'>
-    	&myopac.holds.verify;
+    	[% l("If you wish to cancel the selected hold, click OK, otherwise click Cancel.") %]
     </span>
 </div>
 <div id='myopac_holds_thaw_date_form' class='hide_me'>
     <div id='myopac_holds_freeze_select_thaw'>
-        &myopac.holds.freeze.select_thaw;
+        [% l("Select an automatic activation date.  If no date is chosen, the holds will remain suspended until they are manually activated.") %]
     </div>
     <p>
         <input size='10' maxlength='10'
             type='text' id='myopac_holds_thaw_date_input' />
     </p>
     <p>
-        <button>&common.submit;</button>
+        <button>[% l("Submit") %]</button>
     </p>
 </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
index 36badc3..c156ce1 100644
--- a/Open-ILS/web/templates/default/opac/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -141,19 +141,19 @@
         </div>
     </div>
     <div id='myopac_delete_bookbag_warn' class='hide_me'>
-        &myopac.delete.bookbag;
+        [% l("This will remove the selected bookbag and all items contained within the bookbag.  Are you sure you wish to continue?") %]
     </div>
     <div style='text-align: center; font-weight: bold;' 
-        class='hide_me' id='myopac_bookbags_none'>&myopac.no.bookbags;</div>
+        class='hide_me' id='myopac_bookbags_none'>[% l("You have not created any bookbags") %]</div>
     <table width='100%' class='data_grid data_grid_center hide_me'
         id='myopac_bookbag_table'>
         <thead>
             <tr>
-                <td>&common.name;</td>
-                <td>&myopac.bookbag.items;</td>
-                <td>&myopac.bookbag.shared;</td>
-                <td>&myopac.bookbag.toggle;</td>
-                <td>&myopac.bookbag.delete;</td>
+                <td>[% l("Name") %]</td>
+                <td>[% l("# Items") %]</td>
+                <td>[% l("Shared") %]</td>
+                <td>[% l("Share / Hide") %]</td>
+                <td>[% l("Delete this bookbag?") %]</td>
             </tr>
         </thead>
         <tbody id='myopac_bookbag_tbody'>
@@ -164,61 +164,61 @@
                 </td>
                 <td>
                     <span name='myopac_bookbag_item_count'> </span>
-                    <span> &myopac.items;</span>
+                    <span> [% l("Items") %]</span>
                 </td>
                 <td>
                     <span name='myopac_bb_published_no' class='hide_me'>
-                        &common.no;
+                        [% l("No") %]
                     </span>
                     <span name='myopac_bb_published_yes' class='hide_me'>
-                        &common.yes;
+                        [% l("Yes") %]
                     </span>
                     <a name='myopac_bb_published_view'
-                        class='classic_link hide_me'>&myopac.view;</a>
+                        class='classic_link hide_me'>[% l("(View)") %]</a>
                     <a name='myopac_bb_published_atom'
                         class='unadorned_link hide_me'>
                         <img alt="RSS Feed" border="0"
                         src="/opac/images/small-rss.png"
-                        title="&myopac.atom.feed;" />
+                        title="[% l("ATOM Feed") %]" />
                     </a>
                 </td>
                 <td>
                     <a name='myopac_bb_make_unpublished'
-                        class='classic_link hide_me'>&myopac.bookbag.hide;</a>
+                        class='classic_link hide_me'>[% l("Hide") %]</a>
                     <a name='myopac_bb_make_published'
-                        class='classic_link hide_me'>&myopac.bookbag.share;</a>
+                        class='classic_link hide_me'>[% l("Share this Bookbag") %]</a>
                 </td>
                 <td>
                     <a class='classic_link' href='#'
-                        name='myopac_container_delete'>&myopac.delete;</a>
+                        name='myopac_container_delete'>[% l("Delete") %]</a>
                 </td>
             </tr>
         </tbody>
     </table>
     <table width='100%' class='data_grid data_grid_center hide_me' style='margin-top: 10px;'>
         <thead>
-            <tr><td>&myopac.bookbag.create;</td></tr>
+            <tr><td>[% l("Create a new Bookbag") %]</td></tr>
         </thead>
         <tbody>
             <tr>
                 <td> 
                     <span style='padding-right: 5px;'>
-                        &myopac.bookbag.naming;
+                        [% l("Enter the name of the new Bookbag: ") %]
                     </span>
                     <input id='myopac_bookbag_new_name' type='text' /> 
                 </td>
             </tr>
             <tr>
                 <td>
-                    <span style='padding: 5px;'>&myopac.bookbag.share;</span>
+                    <span style='padding: 5px;'>[% l("Share this Bookbag") %]</span>
                     <a class='classic_link'
-                        href='#'><b>&common.help;</b></a>
-                    <span>&common.yes;</span>
+                        href='#'><b>[% l("(Help)") %]</b></a>
+                    <span>[% l("Yes") %]</span>
                     <input type='radio' name='bb_public' id='bb_public_yes'/>
-                    <span>&common.no;</span>
+                    <span>[% l("No") %]</span>
                     <input type='radio' name='bb_public' id='bb_public_no' checked='checked'/>
                     <input style='padding-left: 10px;' type='submit'
-                        value='&common.submit;' />
+                        value='[% l("Submit") %]' />
                 </td>
             </tr>
         </tbody>
@@ -229,15 +229,15 @@
     <div class='hide_me'
         style='width:100%; text-align:center; font-weight:700; margin-top:10px;'
         id='myopac_bookbag_no_items'>
-        &myopac.bookbag.no.items;
+        [% l("The selected bookbag contains no items...") %]
     </div>
     <table width='100%' class='hide_me data_grid data_grid_center'
         id='myopac_bookbag_items_table'>
         <thead> 
             <tr>
-                <td>&common.title;</td>
-                <td>&common.authors;</td>
-                <td>&myopac.bookbag.remove;</td>
+                <td>[% l("Title") %]</td>
+                <td>[% l("Authors") %]</td>
+                <td>[% l("Remove this item?") %]</td>
             </tr> 
         </thead>
         <tbody id='myopac_bookbag_items_tbody'>
@@ -249,32 +249,32 @@
                 <td name='myopac_bookbag_items_author'></td>
                 <td>
                     <a name='myopac_bookbag_items_remove'
-                        class='classic_link'>&myopac.remove.link;</a>
+                        class='classic_link'>[% l("remove") %]</a>
                 </td>    
             </tr>
         </tbody>
     </table>
-    <span id='bb_publish_text' class='hide_me'>&myopac.publish.text;</span>
+    <span id='bb_publish_text' class='hide_me'>[% l("Sharing a Bookbag means that the contents of the Bookbag will be visible to others.  To see the public view of a shared Bookbag, click the \"View\" link in the \"Shared\" column of the Bookbag list at the top of this page.") %]</span>
     <span id='myopac_remove_bb_item_confirm' class='hide_me'>
-        &myopac.item.confirm;
+        [% l("Are you sure you wish to remove this bookbag item?") %]
     </span>
     <span id='myopac_make_published_confirm' class='hide_me'>
-        &myopac.publish.confirm;
+        [% l("Sharing this bookbag will allow the contents of the bookbag to be seen by others.  Are you sure you wish to share this bookbag?") %]
     </span>
     <span id='myopac_make_unpublished_confirm' class='hide_me'>
-        &myopac.unpublish.confirm;
+        [% l("Are you sure you wish to hide this bookbag?") %]
     </span>
     <span id='myopac_bb_update_success' class='hide_me'>
-        &myopac.update.success;
+        [% l("The Bookbag was successfully updated.") %]
     </span>
     <span id='bb_create_warning' class='hide_me'>
-        &myopac.create.warning;
+        [% l("Warning: Adding items to a bookbag creates a link between you and the items in the database.  The contents of the bookbag are NOT publicly viewable unless the bookbag is shared. However, if you prefer not to have any link between your patron record and a particular item or items, we suggest that you do not place said items in a bookbag or that you avoid using bookbags all together.  Thank you.") %]
     </span>
     <span id='myopac_bb_what_are' class='hide_me'>
-        &myopac.describe.bookbags;
+        [% l("Bookbags are...") %]
     </span>
     <span class='hide_me' id='bb_update_success'>
-        &myopac.updated.success;
+        [% l("Bookbag successfully updated") %]
     </span>
 </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 42f020b..abeef06 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -103,23 +103,23 @@
                 <thead class='color_3'>
                     <tr>
                         <td colspan='3' style='padding: 6px'>
-                            <b>&myopac.fines.title;</b>
+                            <b>[% l("Summary") %]</b>
                         </td>
                     </tr>
                     <tr>
-                        <td width='33%'>&myopac.fines.owed;</td>
-                        <td width='33%'>&myopac.fines.paid;</td>
-                        <td width='33%'>&myopac.fines.balance;</td>
+                        <td width='33%'>[% l("Total Owed") %]</td>
+                        <td width='33%'>[% l("Total Paid") %]</td>
+                        <td width='33%'>[% l("Balance Owed") %]</td>
                     </tr>
                 </thead>
                 <tbody id='myopac_fines_summary_tbody'>
                     <tr id='myopac_fines_summary_loading'>
-                        <td>&myopac.fines.status;</td>
+                        <td>[% l("Loading...") %]</td>
                     </tr>
                     <tr id='myopac_fines_summary_row' class='hide_me'>
-                        <td id='myopac_fines_summary_total' >&common.currency;</td>
-                        <td id='myopac_fines_summary_paid' >&common.currency;</td>
-                        <td id='myopac_fines_summary_balance' style='color:red;font-weight: bold;'>&common.currency;</td>
+                        <td id='myopac_fines_summary_total' >[% l("\$") %]</td>
+                        <td id='myopac_fines_summary_paid' >[% l("\$") %]</td>
+                        <td id='myopac_fines_summary_balance' style='color:red;font-weight: bold;'>[% l("\$") %]</td>
                     </tr>
                 </tbody>
             </table>
@@ -136,19 +136,19 @@
                 <table width='100%' class='data_grid data_grid_center'
                     id='myopac_circ_trans_table'>
                     <thead>
-                    <!--<tr><td colspan='10' style='padding: 6px'><b>&myopac.fines.overdue;</b></td></tr>-->
+                    <!--<tr><td colspan='10' style='padding: 6px'><b>[% l("Overdue Materials") %]</b></td></tr>-->
                         <tr>
                             <td colspan='10' style='padding: 6px'>
                                 <b>Fines</b>
                             </td>
                         </tr>
                         <tr>
-                            <td>&common.title;</td>
-                            <td>&common.author;</td>
-                            <td>&myopac.fines.checkout;</td>
-                            <td>&myopac.fines.due;</td>
-                            <td>&myopac.fines.returned;</td>
-                            <td>&myopac.fines.balance;</td>
+                            <td>[% l("Title") %]</td>
+                            <td>[% l("Author") %]</td>
+                            <td>[% l("Checkout Date") %]</td>
+                            <td>[% l("Due Date") %]</td>
+                            <td>[% l("Date Returned") %]</td>
+                            <td>[% l("Balance Owed") %]</td>
                             <td align="center" nowrap="nowrap"
                                 style="white-space:nowrap;">
                                 <label for="pay_fines_box1">Pay Fines</label>
@@ -168,11 +168,11 @@
                             <td name='myopac_circ_trans_start'> </td>
                             <td name='myopac_circ_trans_due'> </td>
                             <td name='myopac_circ_trans_finished'>
-                                <span style='color:red;'>&myopac.fines.accruing;</span>
+                                <span style='color:red;'>[% l("(fines accruing)") %]</span>
                             </td>
                             <td>
                                 <span style='color: red; font-weight: bold;'
-                                    name='myopac_circ_trans_balance'>&common.currency;</span>
+                                    name='myopac_circ_trans_balance'>[% l("\$") %]</span>
                             </td>
                             <td align="center">
                                 <input type="checkbox" checked="checked"
@@ -193,16 +193,16 @@
                     <thead>
                         <tr>
                             <td colspan='8' style='padding: 6px'>
-                                <b>&myopac.fines.other;</b>
+                                <b>[% l("Other Fees") %]</b>
                             </td>
                         </tr>
                         <tr>
-                            <td width='16%'>&myopac.fines.time.start;</td>
-                            <td width='16%'>&myopac.fines.time.paid;</td>
-                            <td width='16%'>&myopac.fines.owed.initial;</td>
-                            <td width='16%'>&myopac.fines.paid.amount;</td>
-                            <td width='16%'>&myopac.fines.balance;</td>
-                            <td width='16%'>&myopac.fines.type;</td>
+                            <td width='16%'>[% l("Transaction Start Time") %]</td>
+                            <td width='16%'>[% l("Last Payment Time") %]</td>
+                            <td width='16%'>[% l("Initial Amount Owed") %]</td>
+                            <td width='16%'>[% l("Total Amount Paid") %]</td>
+                            <td width='16%'>[% l("Balance Owed") %]</td>
+                            <td width='16%'>[% l("Billing Type") %]</td>
                             <td width='4%' align="center" nowrap="nowrap"
                                 style="white-space:nowrap;">
                                 <label for="pay_fines_box2">Pay Fines</label>
@@ -218,16 +218,16 @@
                             <td name='myopac_trans_start'> </td>
                             <td name='myopac_trans_last_payment'> </td>
                             <td name='myopac_trans_init_amount'>
-                                &common.currency;
+                                [% l("\$") %]
                             </td>
                             <td name='myopac_trans_total_paid'>
-                                &common.currency;
+                                [% l("\$") %]
                             </td>
                             <td style='color:red; font-weight: bold;'>
                                 <span name='myopac_trans_balance_recur'
                                     class='hide_me'> * </span>
                                 <span name='myopac_trans_balance'>
-                                    &common.currency;
+                                    [% l("\$") %]
                                 </span>
                             </td>
                             <td name='myopac_trans_bill_type'></td>
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
index 3f5b497..9788b0e 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
@@ -65,11 +65,11 @@
         <table class="hide_me full-width" id="acct_search_main">
             <tbody id='myopac_prefs_tbody'>
                 <tr id='myopac_prefs_loading'>
-                    <td colspan='3'><b>&common.loading;</b></td>
+                    <td colspan='3'><b>[% l("Loading...") %]</b></td>
                 </tr>
 
                 <tr id='myopac_prefs_row'>
-                    <td width='20%'>&myopac.prefs.hits;</td>
+                    <td width='20%'>[% l("Search hits per page") %]</td>
 
                     <td>
                         <div style="position:absolute">
@@ -119,32 +119,32 @@
                 </tr><!-- FONT size preference -->
 
                 <tr class="hide_me">
-                    <td>&myopac.prefs.font;</td>
+                    <td>[% l("Default Font Size") %]</td>
 
                     <td><select id='prefs_def_font'>
                         <option value='regular'>
-                            &myopac.prefs.font.regular;
+                            [% l("Regular Font") %]
                         </option>
 
                         <option value='large'>
-                            &myopac.prefs.font.large;
+                            [% l("Large Font") %]
                         </option>
                     </select></td>
                 </tr>
 
                 <tr class="hide_me">
-                    <td>&myopac.prefs.search.location;</td>
+                    <td>[% l("Default Search Location") %]</td>
                     <td>
                         <div style='margin-bottom: 5px;'>
                             <input type='checkbox' id='myopac_pref_home_lib' />
-                                 &myopac.prefs.search.home;
+                                 [% l("Always search my home library by default.") %]
                         </div>
                         <select id='prefs_def_location'></select>
                     </td>
                 </tr>
 
                 <tr class="hide_me">
-                    <td>&myopac.prefs.search.range;</td>
+                    <td>[% l("Default Search Range") %]</td>
 
                     <td><select id='prefs_def_range'>
                         </select></td>
@@ -158,23 +158,23 @@
                id="acct_notify_main">
             <tbody>
                 <tr class="hide_me">
-                    <td><span>&myopac.prefs.holds.notify;</span> <a class=
+                    <td><span>[% l("Default Hold Notification Method") %]</span> <a class=
                     'classic_link'
-                       href='#'>&common.help;</a></td>
+                       href='#'>[% l("(Help)") %]</a></td>
 
                     <td style="padding-left:15px;"><select id=
                     'prefs_hold_notify'>
                         <option value='phone:email'
                                 selected='selected'>
-                            &myopac.prefs.holds.both;
+                            [% l("Use Phone and Email") %]
                         </option>
 
                         <option value='phone'>
-                            &myopac.prefs.holds.phone;
+                            [% l("Use Phone Only") %]
                         </option>
 
                         <option value='email'>
-                            &myopac.prefs.holds.email;
+                            [% l("Use Email Only") %]
                         </option>
                     </select></td>
                 </tr>
@@ -250,7 +250,9 @@
                         <tr>
                             <td width='100%'
                                 style='color:red;'>
-                                &myopac.summary.expired;</td>
+                                [% l("Your account expired on") %]
+                                <span id='myopac.expired.date'></span>!
+                                [% l("Please see a librarian to renew your account.") %]</td>
                         </tr>
                     </tbody>
                 </table>
@@ -263,7 +265,7 @@
                     <thead>
                         <tr>
                             <td colspan='2'>
-                            <b>&myopac.summary.notes;</b></td>
+                            <b>[% l("* Staff Notes *") %]</b></td>
                         </tr>
                     </thead>
 
@@ -281,7 +283,7 @@
                 <tbody id='myopac_summary_tbody'>
                     <tr>
                         <td width='30%'
-                            class='color_4 light_border'>&common.name;</td>
+                            class='color_4 light_border'>[% l("Name") %]</td>
 
                         <td class='light_border'><span id=
                         'myopac_summary_prefix'
@@ -299,7 +301,7 @@
 
                     <tr>
                         <td class='color_4 light_border'>
-                        &myopac.summary.phone.day;</td>
+                        [% l("Day Phone") %]</td>
 
                         <td class='light_border'
                             id='myopac_summary_dayphone'></td>
@@ -308,7 +310,7 @@
                            class="hide_me"
                            id='myopac_summary_phone1_change'
                            style=
-                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                           'text-decoration: underline;'>[% l("Change") %]</a></td>
                     </tr>
 
                     <tr id='myopac_update_phone1_row'
@@ -316,20 +318,20 @@
                         <td class='myopac_update_cell'
                             colspan='3'>
                             <span class='myopac_update_span'>
-                                Enter New &myopac.summary.phone.day;:
+                                Enter New [% l("Day Phone") %]:
                             </span>
 
                             <input type='text' size='24' id='myopac_new_phone1' />
                             <span class='myopac_update_span'>
                                 <button>
                                     <span class='myopac_update_span'>
-                                        &common.submit;</span>
+                                        [% l("Submit") %]</span>
                                 </button>
                             </span>
                             <span class='myopac_update_span'>
                                 <button>
                                     <span class='myopac_update_span'>
-                                        &common.cancel;</span>
+                                        [% l("Cancel") %]</span>
                                 </button>
                             </span>
                         </td>
@@ -337,7 +339,7 @@
 
                     <tr>
                         <td class='color_4 light_border'>
-                        &myopac.summary.phone.evening;</td>
+                        [% l("Evening Phone") %]</td>
 
                         <td class='light_border'
                             id='myopac_summary_eveningphone'></td>
@@ -346,25 +348,25 @@
                            class="hide_me"
                            id='myopac_summary_phone2_change'
                            style=
-                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                           'text-decoration: underline;'>[% l("Change") %]</a></td>
                     </tr>
 
                     <tr id='myopac_update_phone2_row'
                         class='hide_me'>
                         <td class='myopac_update_cell'
                             colspan='3'><span class='myopac_update_span'>New
-                            &myopac.summary.phone.evening;:</span>
+                            [% l("Evening Phone") %]:</span>
                             <input type='text' size='24' id='myopac_new_phone2' />
                             <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>&common.submit;</span></button></span>
+                                'myopac_update_span'>[% l("Submit") %]</span></button></span>
                             <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>&common.cancel;</span></button></span>
+                                'myopac_update_span'>[% l("Cancel") %]</span></button></span>
                         </td>
                     </tr>
 
                     <tr>
                         <td class='color_4 light_border'>
-                        &myopac.summary.phone.other;</td>
+                        [% l("Other Phone") %]</td>
 
                         <td class='light_border'
                             id='myopac_summary_otherphone'></td>
@@ -373,19 +375,19 @@
                            class="hide_me"
                            id='myopac_summary_phone3_change'
                            style=
-                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                           'text-decoration: underline;'>[% l("Change") %]</a></td>
                     </tr>
 
                     <tr id='myopac_update_phone3_row'
                         class='hide_me'>
                         <td class='myopac_update_cell'
                             colspan='3'><span class='myopac_update_span'>Enter
-                            New &myopac.summary.phone.other;:</span>
+                            New [% l("Other Phone") %]:</span>
                             <input type='text' size='24' id='myopac_new_phone3' />
                             <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>&common.submit;</span></button></span>
+                                'myopac_update_span'>[% l("Submit") %]</span></button></span>
                             <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>&common.cancel;</span></button></span>
+                                'myopac_update_span'>[% l("Cancel") %]</span></button></span>
                         </td>
                     </tr>
 
@@ -399,7 +401,7 @@
                                          src=
                                          "/images/question-mark.png" /></a>
                                 </div>
-                            </div>&common.username;
+                            </div>[% l("Username") %]
                         </td>
 
                         <td class='light_border'
@@ -409,32 +411,32 @@
                            class="hide_me"
                            id='myopac_summary_username_change'
                            style=
-                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                           'text-decoration: underline;'>[% l("Change") %]</a></td>
                     </tr>
 
                     <tr id='myopac_update_username_row'
                         class='hide_me'>
                         <td class='myopac_update_cell'
                             colspan='3'><span class=
-                            'myopac_update_span'>&myopac.summary.username.enter;</span>
+                            'myopac_update_span'>[% l("Enter new username:") %]</span>
                             <input type='text' size='24' id='myopac_new_username' />
                             <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>&common.submit;</span></button></span>
+                                'myopac_update_span'>[% l("Submit") %]</span></button></span>
                             <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>&common.cancel;</span></button></span>
+                                'myopac_update_span'>[% l("Cancel") %]</span></button></span>
                         </td>
                     </tr>
                     <tr>
                         <td class='color_4 light_border'>
-                        &common.password;</td>
+                        [% l("Password") %]</td>
                         <td class='light_border'
                             id='myopac_summary_password'>
-                            &myopac.summary.password.text;</td>
+                            [% l("(not shown)") %]</td>
                         <td class='light_border'><a href='#'
                            class="hide_me"
                            id='myopac_summary_password_change'
                            style=
-                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                           'text-decoration: underline;'>[% l("Change") %]</a></td>
                     </tr>
                     <tr id='myopac_update_password_row'
                         class='hide_me'>
@@ -445,7 +447,7 @@
                                     <tr>
                                         <td>
                                             <span class= 'myopac_update_span'>
-                                                &myopac.summary.password.current;
+                                                [% l("Enter current password:") %]
                                             </span>
                                         </td>
 
@@ -457,7 +459,7 @@
                                     </tr>
                                     <tr>
                                         <td><span class=
-                                        'myopac_update_span'>&myopac.summary.password.new;</span></td>
+                                        'myopac_update_span'>[% l("Enter new password:") %]</span></td>
 
                                         <td><input type='password'
                                                size='24'
@@ -467,7 +469,7 @@
 
                                     <tr>
                                         <td><span class=
-                                        'myopac_update_span'>&myopac.summary.password.reenter;</span></td>
+                                        'myopac_update_span'>[% l("Re-enter new password:") %]</span></td>
 
                                         <td>
                                             <input type='password'
@@ -478,15 +480,15 @@
                                 </tbody>
                             </table><span class=
                             'myopac_update_span'><button><span class=
-                            'myopac_update_span'>&common.submit;</span></button></span>
+                            'myopac_update_span'>[% l("Submit") %]</span></button></span>
                             <span class='myopac_update_span'><button><span class='myopac_update_span'>
-                            &common.cancel;</span></button></span>
+                            [% l("Cancel") %]</span></button></span>
                         </td>
                     </tr>
 
                     <tr>
                         <td class='color_4 light_border'>
-                        &myopac.summary.email;</td>
+                        [% l("Email Address") %]</td>
 
                         <td class='light_border'
                             id='myopac_summary_email'></td>
@@ -495,33 +497,33 @@
                            class="hide_me"
                            id='myopac_summary_email_change'
                            style=
-                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                           'text-decoration: underline;'>[% l("Change") %]</a></td>
                     </tr>
 
                     <tr id='myopac_update_email_row'
                         class='hide_me'>
                         <td class='myopac_update_cell' colspan='3'>
                             <span class= 'myopac_update_span'>
-                                &myopac.summary.email.new;
+                                [% l("Enter new email address:") %]
                             </span>
                             <input type='text' size='24' id='myopac_new_email' />
                             <span class='myopac_update_span'>
                                 <button>
                                     <span class= 'myopac_update_span'>
-                                        &common.submit;</span>
+                                        [% l("Submit") %]</span>
                                 </button>
                             </span>
                             <span class='myopac_update_span'>
                                 <button>
                                     <span class='myopac_update_span'>
-                                        &common.cancel;</span>
+                                        [% l("Cancel") %]</span>
                                 </button>
                             </span>
                         </td>
                     </tr>
                     <tr class="hide_me">
                         <td class='color_4 light_border'>
-                        &myopac.summary.id.primary;</td>
+                        [% l("Primary Identification") %]</td>
 
                         <td class='light_border'
                             id='myopac_summary_ident1'></td>
@@ -531,7 +533,7 @@
 
                     <tr>
                         <td class='color_4 light_border'>
-                        &myopac.summary.barcode;</td>
+                        [% l("Active Barcode") %]</td>
 
                         <td class='light_border'
                             id='myopac_summary_barcode'></td>
@@ -541,14 +543,14 @@
 
                     <tr>
                         <td class='color_4 light_border'>
-                        &myopac.summary.home;</td>
+                        [% l("Home Library") %]</td>
                         <td class='light_border'
                             id='myopac_summary_homelib'></td>
                         <td><a href='#'
                            class="hide_me"
                            id='myopac_summary_home_change'
                            style=
-                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                           'text-decoration: underline;'>[% l("Change") %]</a></td>
                     </tr>
                     <tr id='myopac_update_home_row'
                         class='hide_me'>
@@ -561,20 +563,20 @@
                             <span class='myopac_update_span'>
                                 <button>
                                     <span class= 'myopac_update_span'>
-                                        &common.submit;</span>
+                                        [% l("Submit") %]</span>
                                 </button>
                             </span>
                             <span class='myopac_update_span'>
                                 <button>
                                     <span class= 'myopac_update_span'>
-                                        &common.cancel;</span>
+                                        [% l("Cancel") %]</span>
                                 </button>
                             </span>
                         </td>
                     </tr>
                     <tr class="hide_me">
                         <td class='color_4 light_border'>
-                            &myopac.summary.genesis;
+                            [% l("Account Creation Date") %]
                         </td>
                         <td class='light_border'
                             id='myopac_summary_create_date'></td>
@@ -588,12 +590,12 @@
             <table width='100%' class='light_border data_grid'>
                 <thead>
                     <tr>
-                        <td>&myopac.summary.addresses;</td>
+                        <td>[% l("Addresses") %]</td>
 
                         <td id='myopac_pending_addr_td' class='hide_me'>
                             <table cellpadding="0" cellspacing="0" border="0">
                                 <tr>
-                                    <td>&myopac.summary.addresses.pending;</td>
+                                    <td>[% l("Pending Addresses") %]</td>
 
                                     <td>
                                         <a href="#"><img
@@ -610,41 +612,41 @@
                         <td>
                             <table>
                                 <tr>
-                                    <td>&myopac.summary.address.type;</td>
+                                    <td>[% l("Address Type") %]</td>
                                     <td name='myopac_addr_type'></td>
                                 </tr>
 
                                 <tr>
-                                    <td>&myopac.summary.address.street;</td>
+                                    <td>[% l("Street") %]</td>
                                     <td name='myopac_addr_street'></td>
                                 </tr>
                                 <tr>
-                                    <td>&myopac.summary.address.street;</td>
+                                    <td>[% l("Street") %]</td>
                                     <td name='myopac_addr_street2'></td>
                                 </tr>
 
                                 <tr>
-                                    <td>&myopac.summary.address.city;</td>
+                                    <td>[% l("City") %]</td>
                                     <td name='myopac_addr_city'></td>
                                 </tr>
 
                                 <tr>
-                                    <td>&myopac.summary.address.county;</td>
+                                    <td>[% l("County") %]</td>
                                     <td name='myopac_addr_county'></td>
                                 </tr>
 
                                 <tr>
-                                    <td>&myopac.summary.address.state;</td>
+                                    <td>[% l("State") %]</td>
                                     <td name='myopac_addr_state'></td>
                                 </tr>
 
                                 <tr>
-                                    <td>&myopac.summary.address.country;</td>
+                                    <td>[% l("Country") %]</td>
                                     <td name='myopac_addr_country'></td>
                                 </tr>
 
                                 <tr>
-                                    <td>&myopac.summary.address.zip;</td>
+                                    <td>[% l("Zip") %]</td>
                                     <td name='myopac_addr_zip'></td>
                                 </tr>
                                 <tr>
@@ -661,53 +663,53 @@
                             name='myopac_pending_addr_td'>
                             <table>
                                 <tr>
-                                    <td>&myopac.summary.address.type;</td>
+                                    <td>[% l("Address Type") %]</td>
 
                                     <td><input name=
                                     'myopac_pending_addr_type' /></td>
                                 </tr>
                                 <tr>
                                     <td>
-                                    &myopac.summary.address.street;</td>
+                                    [% l("Street") %]</td>
 
                                     <td><input name=
                                     'myopac_pending_addr_street' /></td>
                                 </tr>
                                 <tr>
-                                    <td>&myopac.summary.address.street;</td>
+                                    <td>[% l("Street") %]</td>
                                     <td>
                                         <input name='myopac_pending_addr_street2' />
                                     </td>
                                 </tr>
                                 <tr>
-                                    <td>&myopac.summary.address.city;</td>
+                                    <td>[% l("City") %]</td>
                                     <td>
                                         <input name='myopac_pending_addr_city' />
                                     </td>
                                 </tr>
                                 <tr>
-                                    <td>&myopac.summary.address.county;</td>
+                                    <td>[% l("County") %]</td>
 
                                     <td>
                                         <input name='myopac_pending_addr_county' />
                                     </td>
                                 </tr>
                                 <tr>
-                                    <td>&myopac.summary.address.state;</td>
+                                    <td>[% l("State") %]</td>
                                     <td>
                                         <input name='myopac_pending_addr_state' />
                                     </td>
                                 </tr>
 
                                 <tr>
-                                    <td>&myopac.summary.address.country;</td>
+                                    <td>[% l("Country") %]</td>
 
                                     <td>
                                         <input name='myopac_pending_addr_country' />
                                     </td>
                                 </tr>
                                 <tr>
-                                    <td>&myopac.summary.address.zip;</td>
+                                    <td>[% l("Zip") %]</td>
                                     <td><input name=
                                     'myopac_pending_addr_zip' /></td>
                                 </tr>
@@ -729,49 +731,49 @@
             </table>
         </div>
         <div class='hide_me' id='myopac_username_error'>
-            &myopac.summary.username.error;
+            [% l("Please enter a username") %]
         </div>
         <div class='hide_me' id='myopac_username_dup'>
-            &myopac.summary.username.dup;
+            [% l("The requested username is not available.  Please choose a different username.") %]
         </div>
         <div class='hide_me' id='myopac_username_success'>
-            &myopac.summary.username.success;
+            [% l("Username successfully updated") %]
         </div>
         <div class='hide_me' id='myopac_username_failure'>
-            &myopac.summary.username.failure;
+            [% l("Username update failed") %]
         </div>
         <div class='hide_me' id='myopac_email_error'>
-            &myopac.summary.email.error;
+            [% l("Please enter a valid email address") %]
         </div>
         <div class='hide_me' id='myopac_email_success'>
-            &myopac.summary.email.success;
+            [% l("Email address successfully updated") %]
         </div>
         <div class='hide_me' id='myopac_email_failure'>
-            &myopac.summary.email.failed;
+            [% l("Email address update failed") %]
         </div>
         <div class='hide_me' id='myopac_password_error'>
-            &myopac.summary.password.error;
+            [% l("Passwords are empty or do not match") %]
         </div>
         <div class='hide_me' id='myopac_password_success'>
-            &myopac.summary.password.success;
+            [% l("Password successfully updated") %]
         </div>
         <div class='hide_me' id='myopac_password_failure'>
-            &myopac.summary.password.failure;
+            [% l("Password update failed") %]
         </div>
         <span class='hide_me' id= 'myopac_invalid_username'>
-            &myopac.summary.username.invalid;
+            [% l("Username cannot contain spaces or have the same format as a barcode") %]
         </span>
         <span class='hide_me' id='myopac_addr_changes_saved'>
             Address Saved
         </span>
         <div class='hide_me' id='prefs_update_success'>
-            &myopac.prefs.save.success;
+            [% l("Preferences successfully updated") %]
         </div>
         <div class='hide_me' id='prefs_update_failure'>
-            &myopac.prefs.save.failed;
+            [% l("Preferences update failed!") %]
         </div>
         <span class='hide_me' id='myopac_pref_hold_notify_alert'>
-            &myopac.prefs.help;
+            [% l("This setting defines how you will be notified of holds that are ready to be picked up from the library.  By default, holds will use the notification style you choose here.  However, you will still have the option to change individual holds regardless of this setting.") %]
         </span>
     </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
index f1c3079..dd413b7 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
@@ -3,18 +3,18 @@
     <td align='left' width='100%' nowrap='nowrap'>
         <!-- select the search class -->
         <select name='type' style='margin-right: 7px;'>
-            <option value='keyword' selected='selected'>&common.keyword;</option>
-            <option value='title'>&common.title;</option>
-            <option value='author'>&common.author;</option>
-            <option value='subject'>&common.subject;</option>
-            <option value='series'>&common.series;</option>
+            <option value='keyword' selected='selected'>[% l("Keyword") %]</option>
+            <option value='title'>[% l("Title") %]</option>
+            <option value='author'>[% l("Author") %]</option>
+            <option value='subject'>[% l("Subject") %]</option>
+            <option value='series'>[% l("Series") %]</option>
             <option value='bibcn'>Bibliographic call number:</option>
             </select>
         <!-- select how to treat the text -->
         <select name='contains' style='margin-right: 7px;'>
-            <option value='contains'>&opac.advanced.refined.contains;</option>
-            <option value='nocontains'>&opac.advanced.refined.nocontains;</option>
-            <option value='exact'>&opac.advanced.refined.exact;</option>
+            <option value='contains'>[% l("Contains") %]</option>
+            <option value='nocontains'>[% l("Does not contain") %]</option>
+            <option value='exact'>[% l("Matches Exactly") %]</option>
         </select>
         <!-- search term -->
         <input type='text' size='18' name='term' style='margin-right: 3px;' />
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index 3c43904..58cce8b 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -8,7 +8,7 @@
                     <tr>
                         <td>
                             <div style="width:100%;" class="header_middle">
-                                &advanced.search.title;
+                                [% l("Search Input") %]
                             </div>
                         </td>
                     </tr>
@@ -18,7 +18,7 @@
                     <!-- add a new row -->
                     <tr id='adv_global_addrow'>
                         <td align='left' style="padding-top:7px;">
-                            <button>&advanced.search.submit;</button><!-- XXX TODO make a real form -->
+                            <button>[% l("Submit Search") %]</button><!-- XXX TODO make a real form -->
                         </td>
                     </tr>
                 </tbody>
@@ -27,10 +27,10 @@
     </tr>
     <tr>
         <td align='center'>
-            &advanced.search.library;<br /><br />
+            [% l("Search Library") %]<br /><br />
             [% INCLUDE "default/opac/parts/libselect.tt2" %]
             <br /><br />
-            <span>&result.limit2avail;</span>
+            <span>[% l("Limit to Available") %]</span>
             <input type='checkbox' id='opac.result.limit2avail'/>
         </td>
     </tr>
@@ -40,14 +40,14 @@
                 <thead>
                     <tr>
                         <td colspan='2' align='center'>
-                            &advanced.search.filters;
+                            [% l("Search Filters") %]
                         </td>
                     </tr>
                 </thead>
                 <tbody>
                     <tr>
                         <td align='right' class="hide_me">
-                            <span>&advanced.item.form;</span>
+                            <span>[% l("Item Form") %]</span>
                         </td>
                         <td align='left' class="hide_me">
                             <select multiple='multiple' size='3'
@@ -55,7 +55,7 @@
                             </select>    
                         </td>
                         <td align='right'>
-                            <span>&advanced.item.type;</span><br />
+                            <span>[% l("Item Type") %]</span><br />
                         </td>
                         <td align='left'>
                             <select multiple='multiple' size='3'
@@ -63,7 +63,7 @@
                             </select>    
                             <select multiple='multiple' size='3'
                                 id='adv_global_item_type_basic'>
-                                <option value=''>&opac.search.allFormats;</option>
+                                <option value=''>[% l("All Formats") %]</option>
                                 <option value='a'>Book</option>
                                 <option value='i'>Book on cassette</option>
                                 <option value='n'>Book on CD</option>
@@ -97,14 +97,14 @@
                             </select>    
                         </td>
                         <td align='right' class="hide_me">
-                            <span>&advanced.literary.form;</span>
+                            <span>[% l("Literary Form") %]</span>
                             <a id='adv_global_lit_form_link_adv'
                                 class='classic_link adv_adv_link'
-                                href='#'>&advanced.link;</a>
+                                href='#'>[% l("Advanced") %]</a>
 
                             <a id='adv_global_lit_form_link_basic'
                                 class='hide_me classic_link adv_adv_link'
-                                href='#'>&advanced.basic.link;</a>
+                                href='#'>[% l("Basic") %]</a>
                         </td>
                         <td align='left' class="hide_me">
                             <select multiple='multiple' size='3'
@@ -113,15 +113,15 @@
                             <select multiple='multiple' size='3'
                                 id='adv_global_lit_form_basic'>
                                 <option value='0 '>
-                                    &advanced.non.fiction;
+                                    [% l("Non Fiction") %]
                                 </option>
                                 <option value='1'>
-                                    &advanced.fiction;
+                                    [% l("Fiction") %]
                                 </option>
                             </select>    
                         </td>
                         <td align='right'>
-                            <span>&advanced.language;</span>
+                            <span>[% l("Language") %]</span>
                         </td>
                         <td align='left'>
                             <select multiple='multiple' size='3' id='adv_global_lang'>
@@ -130,14 +130,14 @@
                         </td>
 
                         <td align='right' class="hide_me">
-                            <span>&advanced.audience;</span>
+                            <span>[% l("Audience") %]</span>
                             <a id='adv_global_audience_link_adv'
                                 class='classic_link adv_adv_link'
-                                href='#'>&advanced.link;</a>
+                                href='#'>[% l("Advanced") %]</a>
 
                             <a id='adv_global_audience_link_basic'
                                 class='hide_me classic_link adv_adv_link'
-                                href='#'>&advanced.basic.link;</a>
+                                href='#'>[% l("Basic") %]</a>
                         </td>
                         <td align='left' class="hide_me">
                             <select multiple='multiple' size='3'
@@ -145,14 +145,14 @@
                             </select>
                             <select multiple='multiple' size='3'
                                 id='adv_global_audience_basic'>
-                                <option value='e '>&advanced.adult;</option>
-                                <option value='abcdj'>&advanced.juvenile;</option>
-                                <option value='fg '>&advanced.general;</option>
+                                <option value='e '>[% l("Adult") %]</option>
+                                <option value='abcdj'>[% l("Juvenile") %]</option>
+                                <option value='fg '>[% l("General") %]</option>
                             </select>
                         </td>
 
                         <td align='right' class="hide_me">
-                            <span>&advanced.biblevel;</span>
+                            <span>[% l("Bib Level") %]</span>
                         </td>
                         <td align='left' class="hide_me">
                             <select multiple='multiple' size='3'
@@ -162,21 +162,21 @@
                     </tr>
                     <tr>
                         <td align='right'>
-                            <span>&advanced.filter.pubyear;</span>
+                            <span>[% l("Publication Year") %]</span>
                         </td>
                         <td align='left'>
                             <select id='adv_global_pub_date_type'>
                                     <option value='equals' selected='selected'>
-                                        &advanced.filter.pubyear.equals;
+                                        [% l("Is") %]
                                     </option>
                                     <option value='before'>
-                                        &advanced.filter.pubyear.before;
+                                        [% l("Before") %]
                                     </option>
                                     <option value='after'>
-                                        &advanced.filter.pubyear.after;
+                                        [% l("After") %]
                                     </option>
                                     <option value='between'>
-                                        &advanced.filter.pubyear.between;
+                                        [% l("Between") %]
                                     </option>
                             </select>    
                             <div style='margin-top:5px;'>
@@ -184,7 +184,7 @@
                                     size='4' maxlength='4'/>
                                 <span id='adv_global_pub_date_2_span'
                                     class='hide_me'>
-                                    &common.and; <input
+                                    [% l("and") %] <input
                                         id='adv_global_pub_date_2' type='text'
                                         size='4' maxlength='4'/>
                                 </span>
@@ -193,7 +193,7 @@
                     </tr>
                     <!-- copy location selector -->
                     <tr id='adv_copy_location_filter_row' class='hide_me'>
-                        <td align='right'>&opac.advanced.copy_loc_filter;</td>
+                        <td align='right'>[% l("Shelving Location") %]</td>
                         <td align='left' id='adv_copy_location_filter_td'>
                             <select size='3'
                                 id='adv_copy_location_filter_select'
@@ -214,7 +214,7 @@
             
                             <thead>
                                 <tr>
-                                    <td align='center' width='50%'>&advanced.sort.criteria;</td>
+                                    <td align='center' width='50%'>[% l("Sort Criteria") %]</td>
                                     <td align='center'></td>
                                 </tr>
                             </thead>
@@ -223,24 +223,24 @@
                                 <tr>
                                     <td align=''>
                                         <select id='adv_global_sort_by'>
-                                            <option value='rel'>&advanced.relevance;</option>
-                                            <option value='title'>&common.title;</option>
-                                            <option value='author'>&common.author;</option>
-                                            <option value='pubdate'>&advanced.pubdate;</option>
+                                            <option value='rel'>[% l("Relevance") %]</option>
+                                            <option value='title'>[% l("Title") %]</option>
+                                            <option value='author'>[% l("Author") %]</option>
+                                            <option value='pubdate'>[% l("Publication date") %]</option>
                                         </select>
                                     </td>
                                 </tr>
                                 <tr>
                                     <td>
                                         <select id='adv_global_sort_dir' disabled='disabled'>
-                                            <option value='asc'>&advanced.sort.asc;</option>
-                                            <option value='desc'>&advanced.sort.desc;</option>
+                                            <option value='asc'>[% l("Ascending / A to Z") %]</option>
+                                            <option value='desc'>[% l("Descending / Z to A") %]</option>
                                         </select>
                                     </td>
                                 </tr>
                                 <tr>
                                     <td align='center' class="hide_me">
-                                        <span>&advanced.frbrize;</span>
+                                        <span>[% l("Group Formats and Editions") %]</span>
                                         <input id='adv_group_titles' type='checkbox' />
                                     </td>
                                     <td align='center'></td>
@@ -267,17 +267,17 @@
 
 <div id='adv_quick_search_sidebar' class='sidebar_chunk hide_me' style='text-align:center; margin-top: 20px; width:400px;'> 
     <div id='adv_quick_search'>
-        <div class='adv_quick_search color_4'><b>&sidebar.quick.search;</b></div>
+        <div class='adv_quick_search color_4'><b>[% l("Quick Search") %]</b></div>
         <div style='margin-top: 8px;'>
             <table><tbody><tr>
                 <td>
                     <select id='adv_quick_type'>
-                        <option value='isbn'>&opac.advanced.quick.isbn;</option>
-                        <option value='issn'>&opac.advanced.quick.issn;</option>
-                        <option value='cn'>&opac.advanced.quick.cn;</option>
-                        <option value='lccn'>&opac.advanced.quick.lccn;</option>
-                        <option value='tcn'>&opac.advanced.quick.tcn;</option>
-                        <option value='barcode'>&opac.advanced.quick.barcode;</option>
+                        <option value='isbn'>[% l("ISBN") %]</option>
+                        <option value='issn'>[% l("ISSN") %]</option>
+                        <option value='cn'>[% l("Call Number") %]</option>
+                        <option value='lccn'>[% l("LCCN") %]</option>
+                        <option value='tcn'>[% l("TCN") %]</option>
+                        <option value='barcode'>[% l("Item Barcode") %]</option>
                     </select>
                 </td><td>
                     <input type='text' id='adv_quick_text' size='16' />
@@ -297,24 +297,24 @@
 
 <div id='adv_marc_search_sidebar' class='sidebar_chunk hide_me'
     style='width:400px; margin-top: 20px;'> 
-    <div class='adv_quick_search color_4'><b>&search.marc;</b></div>
+    <div class='adv_quick_search color_4'><b>[% l("MARC Expert Search") %]</b></div>
     <table style='margin: 3px; width: 100%;' id='adv_sdbar_table'
         class='border_4_3'>
         <tbody>
             <tr>
-                <td align="right">&search.marc.tag;</td>
+                <td align="right">[% l("Tag:") %]</td>
                 <td align="left"><input name='advanced.marc.tag' maxlength='3' size='3' /></td>
-                <td align="right">&search.marc.subfield;</td>
+                <td align="right">[% l("Subfield:") %]</td>
                 <td align="left"><input name='advanced.marc.subfield' maxlength='1' size='1' /></td>
             </tr>
             <tr>
-                <td align="right">&search.marc.value;</td>
+                <td align="right">[% l("Value:") %]</td>
                 <td colspan='3' align="left"><input name='advanced.marc.value' size='18' /></td>
             </tr>
             <tr name='crow' class='hide_me'>
                 <td colspan='4' align='center'>
                     <a href='javascript:void(0);'
-                        class='classic_link'>&common.close;</a>
+                        class='classic_link'>[% l("close") %]</a>
                 </td>
             </tr>
         </tbody>
@@ -322,7 +322,7 @@
     <div id='adv_marc_submit' class='adv_quick_search_submit'>
         <a style='margin-right: 4px; position:relative;top:-10px;'
             class='classic_link'
-            href='javascript:advAddMARC();'>&search.marc.add.row;</a>
+            href='javascript:advAddMARC();'>[% l("Add Row") %]</a>
         <!-- XXX TODO make a real form, and make a real submitter (FKA
         advMARCRun()) -->
         <img alt="Search" src="/images/search_btn.gif"
diff --git a/Open-ILS/web/templates/default/opac/parts/cn_browse.tt2 b/Open-ILS/web/templates/default/opac/parts/cn_browse.tt2
index ce65236..282bfd9 100644
--- a/Open-ILS/web/templates/default/opac/parts/cn_browse.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/cn_browse.tt2
@@ -1,11 +1,11 @@
 <!-- ****************** cn_browse.xml ***************************** -->
 <div id='cn_browse' class='cn_browser'>
     <div id='cn_browse_loading' class='cn_browse_loading hide_me'>
-        &common.cn.loading;
+        [% l("Loading Callnumber Page...") %]
     </div>
     <div id='cn_browse_div'> 
         <div class='color_4'>
-            <span>&common.cn.browsing;</span>
+            <span>[% l("You are now browsing") %]</span>
             <b id='cn_browse_where'> </b>
         </div>
         <table class='data_grid bookshelf' width='100%'>
@@ -13,12 +13,12 @@
                 <tr>
                     <td>
                         <a id='cn_browse_next' class='classic_link' 
-                        href='javascript:cnBrowsePrev();'><b>&common.cn.previous;</b></a>
+                        href='javascript:cnBrowsePrev();'><b>[% l("&lt;&lt; Previous Page") %]</b></a>
                     </td>
-                    <td colspan='1' align='center'>&common.cn.shelf;</td>
+                    <td colspan='1' align='center'>[% l("Shelf Browser") %]</td>
                     <td>
                         <a id='cn_browse_prev' class='classic_link' 
-                            href='javascript:cnBrowseNext();'><b>&common.cn.next;</b></a>
+                            href='javascript:cnBrowseNext();'><b>[% l("Next Page &gt;&gt;") %]</b></a>
                     </td>
                 </tr>
             </thead>
diff --git a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
index 8f23865..5c3904c 100644
--- a/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
@@ -1,6 +1,6 @@
 <!-- ****************** format_selector.xml ***************************** -->
 <select id='format_selector'>
-    <option value=''>&opac.search.allFormats;</option>
+    <option value=''>[% l("All Formats") %]</option>
     <option value='a'>Book</option>
     <option value='i'>Book on cassette</option>
     <option value='n'>Book on CD</option>
@@ -31,12 +31,12 @@
     <option value='z'>Map</option>
     <option value='s'>Slide set</option>	
 <!--
-	<option value='at'>&opac.search.books;</option>
-	<option value='at-d'>&opac.search.largePrint;</option>
-	<option value='i'>&opac.search.audioBooks;</option>
-	<option value='g'>&opac.search.videoRecordings;</option>
-	<option value='j'>&opac.search.music;</option>
-	<option value='m'>&opac.search.electronic;</option>
+	<option value='at'>[% l("Books") %]</option>
+	<option value='at-d'>[% l("Large Print Books") %]</option>
+	<option value='i'>[% l("Audiobooks") %]</option>
+	<option value='g'>[% l("Video Recordings") %]</option>
+	<option value='j'>[% l("Music") %]</option>
+	<option value='m'>[% l("Electronic Resources") %]</option>
 -->
 </select>
 <!-- ****************** end: format_selector.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/libselect.tt2 b/Open-ILS/web/templates/default/opac/parts/libselect.tt2
index 4b5efc6..678fcc9 100644
--- a/Open-ILS/web/templates/default/opac/parts/libselect.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/libselect.tt2
@@ -4,6 +4,6 @@
     </span>
     <span id='lib_selector_span'>
         <a id='lib_selector_link' class='classic_link'
-            href='#'>&library.select.help;</a>
+            href='#'>[% l("Choose a library to search") %]</a>
     </span>
 <!-- ****************** end: libselect.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/login/form.tt2 b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
index d8e984c..cd9e78c 100644
--- a/Open-ILS/web/templates/default/opac/parts/login/form.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
@@ -1,7 +1,7 @@
 <!-- ****************** login.xml ***************************** -->
 <div class="hide_me">
 	<div class='login_text color_1' style='padding: 4px; text-align: center;'>
-		<span>&opac.login.login;</span>
+		<span>[% l("Login") %]</span>
 	</div>
 	<br/>
 </div>
@@ -16,47 +16,51 @@
 </div>
 <table id='change_pw_table' class='data_grid hide_me' style='margin-left: 20px;' width='95%'>
 	<thead>
-        <tr><td colspan='2' align='center'><b>&common.password;</b></td></tr>
+        <tr><td colspan='2' align='center'><b>[% l("Password") %]</b></td></tr>
     </thead>
     <tbody>
         <tr>
             <td colspan='2' style='padding:10px;'>
-                &login.first.time;
-                &common.password_criteria;
+                [% l("This appears to be the first time you have logged in.  You will need to change your password.") %]
+                [% l("The password must be at least 7 characters in length,
+ contain at least one letter (a-z/A-Z),
+ and contain at least one number.") %]
             </td>
         </tr>
         <tr>
-            <td>&login.password.current.enter;</td>
+            <td>[% l("Enter your current password") %]</td>
             <td><input type='password' id='change_pw_current'/></td>
         </tr>
         <tr>
-            <td>&login.password.new.enter;</td>
+            <td>[% l("Enter the new password") %]</td>
             <td><input type='password' id='change_pw_1'/></td>
         </tr>
         <tr>
-            <td>&login.password.new.reenter;</td>
+            <td>[% l("Re-type the new password for verification") %]</td>
             <td><input type='password' id='change_pw_2'/></td>
         </tr>
         <tr><td><br/></td><td/></tr>
         <tr class='color_1'>
             <td colspan='2' align='center'>
                 <span class='login_text' style='margin-right: 20px;'>
-                    <input type='submit' value='&login.password.update;'  id='change_pw_button'/>
+                    <input type='submit' value='[% l("Update Password") %]'  id='change_pw_button'/>
                 </span>
             </td>
         </tr>
     </tbody>
 </table>
 
-<span id='pw_no_match' class='hide_me'>&login.password.nomatch;</span>
-<span id='pw_update_successful' class='hide_me'>&login.password.success;</span>
+<span id='pw_no_match' class='hide_me'>[% l("Passwords do not match") %]</span>
+<span id='pw_update_successful' class='hide_me'>[% l("Password successfully updated") %]</span>
 <span id='pw_not_strong' class='hide_me'>
-    &login.password.strength;
-    &common.password_criteria;
+    [% l("The password provided is not strong enough.") %]
+    [% l("The password must be at least 7 characters in length,
+ contain at least one letter (a-z/A-Z),
+ and contain at least one number.") %]
 </span>
-<span id='patron_card_inactive_alert' class='hide_me'>&login.barcode.inactive;</span>
-<span id='patron_inactive_alert' class='hide_me'>&login.account.inactive;</span>
-<span id='patron_login_failed' class='hide_me'>&login.failed;</span>
+<span id='patron_card_inactive_alert' class='hide_me'>[% l("The barcode used to login is marked as inactive.  Please contact your local library.") %]</span>
+<span id='patron_inactive_alert' class='hide_me'>[% l("This account has been deactivated.  Please contact your local library.") %]</span>
+<span id='patron_login_failed' class='hide_me'>[% l("Login failed. The username or password provided was not valid.  Ensure Caps-Lock is off and try again or contact your local library.") %]</span>
 
 <div id="login_box">
     <div style="height:20px;"></div>
diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
index b2ce03d..7548b56 100644
--- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
@@ -4,18 +4,18 @@
             <table class='data_grid' style='margin-top: 20px;'>
                 <tbody>
                     <tr>
-                        <td>&opac.holds.xulRecipient;:</td>
+                        <td>[% l("Enter recipient barcode") %]:</td>
                         <td>
                             <input type='text' id='xul_recipient_barcode' />
                         </td>
                         <td>
-                            <input type='submit' value='&common.submit;' id='xul_recipient_barcode_submit' />
+                            <input type='submit' value='[% l("Submit") %]' id='xul_recipient_barcode_submit' />
                         </td>
                         <td>
-                            <input type='submit' value='&common.cancel;' />
+                            <input type='submit' value='[% l("Cancel") %]' />
                         </td>
                         <td>
-                            <input type='submit' value='&common.hold.place;' id='xul_recipient_me' />
+                            <input type='submit' value='[% l("Place hold for my account") %]' id='xul_recipient_me' />
                         </td>
                     </tr>
                 </tbody>
@@ -25,7 +25,7 @@
     <div id='check_holds_box' class='hide_me canvas' 
         style='margin-top: 6px; width: 100%; text-align: center'>
         <br/><br/><br/>
-        <b>&common.hold.check;</b>
+        <b>[% l("Checking for possibility of hold fulfillment...") %]</b>
     </div>
     <div id='holds_box' class='canvas' style='margin-top: 6px;'>
         <br/>
@@ -62,78 +62,78 @@
             <tbody>
                 <tr>
                     <td class='holds_cell color_1' 
-                        align='center' colspan='2'>&common.hold.create;</td>
+                        align='center' colspan='2'>[% l("Create / Edit a Hold") %]</td>
                 </tr>
                 <tr>
-                    <td class='holds_cell'>&opac.holds.recipient;:</td>
+                    <td class='holds_cell'>[% l("Recipient") %]:</td>
                     <td class='holds_cell' id='holds_recipient'> </td>
                 </tr>
                 <tr>
-                    <td class='holds_cell'>&common.title.label;</td>
+                    <td class='holds_cell'>[% l("Title:") %]</td>
                     <!-- <td class='holds_cell' id='holds_title'> </td> -->
                 </tr>
                 <tr>
-                    <td class='holds_cell'>&common.author;</td>
+                    <td class='holds_cell'>[% l("Author") %]</td>
                     <td class='holds_cell' id='holds_author'> </td>
                 </tr>
                 <tr>
-                    <td class='holds_cell'>&common.format;</td>
+                    <td class='holds_cell'>[% l("Format") %]</td>
                     <td class='holds_cell' id='holds_format'> </td>
                 </tr>
                 <tr id='hold_physical_desc_row'>
-                    <td class='holds_cell'>&common.physical.label;</td>
+                    <td class='holds_cell'>[% l("Physical Description:") %]</td>
                     <td class='holds_cell' id='holds_physical_desc'> </td>
                 </tr>
 
                 <tr class='hide_me' id='holds_cn_row'>
-                    <td class='holds_cell'>&common.call.number.label;</td>
+                    <td class='holds_cell'>[% l("Call Number:") %]</td>
                     <td class='holds_cell'><b id='holds_cn'/> </td>
                 </tr>
 
                 <tr class='hide_me' id='holds_copy_row'>
-                    <td class='holds_cell'>&common.copy.barcode.label;</td>
+                    <td class='holds_cell'>[% l("Copy Barcode:") %]</td>
                     <td class='holds_cell'><b id='holds_copy'/> </td>
                 </tr>
 
                 <tr class='hide_me' id='holds_type_row'>
-                    <td class='holds_cell'>&common.hold.type.label;</td>
+                    <td class='holds_cell'>[% l("Hold Type:") %]</td>
                     <td class='holds_cell hide_me' id='holds_is_cn'>
-                        <b>&common.hold.volume;</b>
+                        <b>[% l("Volume Hold") %]</b>
                     </td>
                     <td class='holds_cell hide_me' id='holds_is_copy'>
-                        <b>&common.hold.copy;</b>
+                        <b>[% l("Copy Hold") %]</b>
                     </td>
                 </tr>
                 <tr>
-                    <td class='holds_cell'>&opac.holds.contactPhone;:</td>
+                    <td class='holds_cell'>[% l("Contact telephone number") %]:</td>
                     <td class='holds_cell'>
                         <input id='holds_phone' size='13' maxlength='12'/>
                         <span style='margin-left: 4px; font-size: 7pt;'>
-                            &common.phone.format;
+                            [% l("(XXX-YYY-ZZZZ)") %]
                         </span>
                     </td>
                 </tr>
                 <tr>
-                    <td class='holds_cell'>&common.phone.enable;</td>
+                    <td class='holds_cell'>[% l("Enable phone notifications for this hold?") %]</td>
                     <td class='holds_cell'>
                         <input type='checkbox' id='holds_enable_phone'
                             checked='checked' />
                     </td>
                 </tr>
                 <tr>
-                    <td class='holds_cell'>&opac.holds.contactEmail;:</td>
+                    <td class='holds_cell'>[% l("Contact email address") %]:</td>
                     <td class='holds_cell' id='holds_email'> 
                         <span class='hide_me' id='holds.no_email'>
-                           &common.email.none;<br/>
-                           &common.email.set;
+                           ([% l("Patron has no configured email address)" %])<br/>
+                           ([% l("See") %] <a class='classic_link' id='holds.no_email.my_account'>[% l("My Account") %]</a> [% l("for setting your email address") %])
                         </span>
                         <span class='hide_me' id='holds.no_email.xul'>
-                           &common.email.none; 
+                           [% l("(Patron has no configured email address)") %] 
                         </span>
                     </td>
                 </tr>
                 <tr>
-                    <td class='holds_cell'>&common.email.enable;</td>
+                    <td class='holds_cell'>[% l("Enable email notifications for this hold?") %]</td>
                     <td class='holds_cell'>
                         <input type='checkbox' id='holds_enable_email'
                             checked='checked'/>
@@ -148,14 +148,14 @@
                 </tr>
                 -->
                 <tr>
-                    <td class='holds_cell'>&opac.holds.pickupLocation;</td>
+                    <td class='holds_cell'>[% l("Pickup location") %]</td>
                     <td class='holds_cell'>
                         <!-- <select id='holds_org_selector'> </select> -->
                     </td>
                 </tr>
 
                 <tr>
-                    <td class='holds_cell'>&opac.holds.expire_time;</td>
+                    <td class='holds_cell'>[% l("Expiration date") %]</td>
                     <td class='holds_cell'>
                         <input size='10' maxlength='10'
                          id='holds_expire_time' />
@@ -164,9 +164,9 @@
 
                 <tr>
                     <td class='holds_cell'>
-                        &opac.holds.freeze;
+                        [% l("Suspend this hold") %]
                         <a class='classic_link'
-                            href='#'>&common.help;</a>
+                            href='#'>[% l("(Help)") %]</a>
                         </td>
                     <td class='holds_cell'>
                         <input type='checkbox' id='holds_frozen_chkbox' /> 
@@ -176,7 +176,7 @@
                     <td class='holds_cell'>
                         <!-- XXX TODO there used to be script here dealing with
                         frozen holds -->
-                        &opac.holds.freeze.thaw_date;
+                        [% l("Automatically activate hold on:") %]
                     </td>
                     <td class='holds_cell'>
                         <input size='10' maxlength='10'
@@ -188,7 +188,7 @@
                     <td colspan='2' align='center'>
                         <div style='padding: 8px;'>
                             <a class='classic_link' href='#'
-                                style='padding: 5px;'>&common.hold.advanced;</a>
+                                style='padding: 5px;'>[% l("Advanced Hold Options") %]</a>
                         </div>
                     </td>
                 </tr>
@@ -197,40 +197,40 @@
 
                     <td class='holds_cell'>
                         <div style='margin-bottom: 5px;'>
-                            <span>&common.format.alternatives; </span>
+                            <span>[% l("Acceptable Alternative Formats:") %] </span>
                             <span><a class='classic_link' style='color:red;'
-                                    href='#'>&common.help;</a></span>
+                                    href='#'>[% l("(Help)") %]</a></span>
                         </div>
-                        <div>&common.control.click;</div>
+                        <div>[% l("(control-click to select multiple formats)") %]</div>
                     </td>
 
                     <td class='holds_cell'>
                         <select id='hold_alt_form_selector' multiple='multiple' style='width: 14em;'>
-                            <option value='at'    class='hide_me'>&opac.search.books;</option>
-                            <option value='at-d' class='hide_me'>&opac.search.largePrint;</option>
-                            <option value='i'        class='hide_me'>&opac.search.audioBooks;</option>
-                            <option value='g'        class='hide_me'>&opac.search.videoRecordings;</option>
-                            <option value='j'        class='hide_me'>&opac.search.music;</option>
+                            <option value='at'    class='hide_me'>[% l("Books") %]</option>
+                            <option value='at-d' class='hide_me'>[% l("Large Print Books") %]</option>
+                            <option value='i'        class='hide_me'>[% l("Audiobooks") %]</option>
+                            <option value='g'        class='hide_me'>[% l("Video Recordings") %]</option>
+                            <option value='j'        class='hide_me'>[% l("Music") %]</option>
                         </select>
                     </td>
                 </tr>
                 <tr>
                     <td class='holds_cell' align='center' colspan='2'>
-                        <!-- <button id='holds_submit'>&opac.holds.placeHold;</button> -->
-                        <button class='hide_me' id='holds_update'>&common.hold.update;</button>
+                        <!-- <button id='holds_submit'>[% l("Place Hold") %]</button> -->
+                        <button class='hide_me' id='holds_update'>[% l("Update Hold") %]</button>
                         <span style='padding: 20px;'> </span>
-                        <!-- <button id='holds_cancel'>&common.cancel;</button> -->
+                        <!-- <button id='holds_cancel'>[% l("Cancel") %]</button> -->
                     </td>
                 </tr>
             </tbody>
         </table>
-        <div class='hide_me' id='holds_success'>&opac.holds.success;</div>
-        <div class='hide_me' id='holds_failure'>&opac.holds.failure;</div>
+        <div class='hide_me' id='holds_success'>[% l("Hold was successfully placed") %]</div>
+        <div class='hide_me' id='holds_failure'>[% l("Hold was not successfully placed") %]</div>
         <span class='hide_me' id='holds_bad_phone'>
-            &common.phone.format.help;
+            [% l("The phone number does not have the correct format. The expected format is XXX-YYY-ZZZZ") %]
         </span>
         <span class='hide_me' id='hold_not_allowed'>
-            &common.hold.failed;
+            [% l("No items were found that could fulfill the requested holds.  It's possible that choosing a different format will result in a successful hold.  It is also possible that you have exceeded the number of allowable holds.  For further information, please consult your local librarian.") %]
         </span>
     </div>
     <div id="anonListTable" class="hide_me" style="margin-top: 6px;">
@@ -268,20 +268,20 @@
     </div>
 
     <span class='hide_me' id='format_words'>
-        <span name='at'>&opac.search.books;</span>
-        <span name='at-d'>&opac.search.largePrint;</span>
-        <span name='i'>&opac.search.audioBooks;</span>
-        <span name='g'>&opac.search.videoRecordings;</span>
-        <span name='j'>&opac.search.music;</span>
-        <span name='m'>&opac.search.electronic;</span>
+        <span name='at'>[% l("Books") %]</span>
+        <span name='at-d'>[% l("Large Print Books") %]</span>
+        <span name='i'>[% l("Audiobooks") %]</span>
+        <span name='g'>[% l("Video Recordings") %]</span>
+        <span name='j'>[% l("Music") %]</span>
+        <span name='m'>[% l("Electronic Resources") %]</span>
     </span>
 
-    <span class='hide_me' id='holds_explain_adv'>&holds.advanced_options;</span>
-    <span class='hide_me' id='holds_pick_good_org'>&common.hold.delivery;</span>
-    <span class='hide_me' id='hold_dup_exists'>&common.hold.exists;</span>
-    <span class='hide_me' id='hold_dup_exists_override'>&common.hold.exists.override;</span>
-    <span id='hold_failed_patron_barred' class='hide_me'>&common.hold.barred;</span>
-    <span id='invalid_hold' class='hide_me'>&common.hold.item.invalid;</span>
-    <span id='holds_invalid_recipient' class='hide_me'>&common.hold.patron.invalid;</span>
+    <span class='hide_me' id='holds_explain_adv'>[% l("If you wish to broaden the scope of your hold to include other versions of this title, select the formats that would be acceptable.  The first available copy will be sent to you.") %]</span>
+    <span class='hide_me' id='holds_pick_good_org'>[% l("Please select a physical location where your hold can be delivered.") %]</span>
+    <span class='hide_me' id='hold_dup_exists'>[% l("A hold already exists on the requested item.") %]</span>
+    <span class='hide_me' id='hold_dup_exists_override'>[% l("A hold already exists on the requested item. Would you like to create the hold anyway?") %]</span>
+    <span id='hold_failed_patron_barred' class='hide_me'>[% l("PATRON BARRED. Please see any notes in the \"Staff Notes\" section of your \"My Account\" page or contact your local library.") %]</span>
+    <span id='invalid_hold' class='hide_me'>[% l("This hold is no longer valid. It's likely that the target for the hold was deleted from the system.  Please cancel this hold and place a new one.") %]</span>
+    <span id='holds_invalid_recipient' class='hide_me'>[% l("The patron barcode entered as the hold recipient is invalid.") %]</span>
 
 </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/body.tt2 b/Open-ILS/web/templates/default/opac/parts/record/body.tt2
index b5a8219..719df27 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/body.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/body.tt2
@@ -12,20 +12,20 @@
             <span class="hide_me">
                 <a class='np_nav_link classic_link' id='np_start'
                     href='#'
-                    title="&rdetail.page.results;">&rdetail.start;</a>
+                    title="[% l("First results page") %]">[% l("Start") %]</a>
                 </span>
                 <a class='np_nav_link classic_link hide_me' id='np_prev'
                     href='#'
-                    title='&rdetail.page.previous;'><span
+                    title='[% l("Previous page") %]'><span
                         class="nav_arrow_fix">&#9668;</span> Previous</a>
                 <span style="padding:0px 10px;"> </span>
                 <a class='np_nav_link classic_link hide_me' id='np_next'
                     href='#'
-                    title='&rdetail.page.next;'>Next <span
+                    title='[% l("Next page") %]'>Next <span
                         class="nav_arrow_fix">&#9658;</span></a>
                 <span class="hide_me"><a class='np_nav_link classic_link'
                     id='np_end' href='#'
-                    title="&rdetail.page.last;">&rdetail.end;</a></span>
+                    title="[% l("Last results page") %]">[% l("End") %]</a></span>
         </div>
         <div class="clear-both"></div>
     </div>
@@ -47,31 +47,31 @@
         <tbody>
             <tr>
                 <td width='33%' align='left' class="hide_me">
-                    <span>&rdetail.detailMain.headerLabel;</span>
+                    <span>[% l("Record Summary") %]</span>
                 </td>
                 <td align='right' style='padding-right: 7px;' width='33%'>
                     <span id='rdetail_exp_refworks_span' class='hide_me'
                         style='padding-right: 7px;'>
-                        <a id='rdetail_exp_refworks'>&opac.holds.exportRefWorks;</a>
+                        <a id='rdetail_exp_refworks'>[% l("Export to RefWorks") %]</a>
                     </span>
                     <span style='padding-right: 7px;' class='hide_me'
                         id='rdetail_more_actions'>
                         <select id='rdetail_more_actions_selector'
                             style='max-width: 11em;' class="hide_me">
                             <option value='start'>
-                                &rdetail.more;
+                                [% l("More Actions...") %]
                             </option>
                             <option disabled='disabled'>
                                 --------------
                             </option>
                             <option disabled='disabled'>
-                                &rdetail.bookbag.add;
+                                [% l("Add to bookbag") %]
                             </option>
                             <option disabled='disabled'>
                                 --------------
                             </option>
                             <option value='new_bookbag'>
-                                &rdetail.bookbag.create;
+                                [% l("Create a new bookbag") %]
                             </option>
                         </select>
                     </span>
@@ -82,7 +82,7 @@
 
     <div style='font-weight: bold; padding: 5px; margin: 5px; width: 100%;'
         class='hide_me color_4' id='rdetail_deleted_exp'>
-        &rdetail.record.deleted;
+        [% l("This record has been deleted from the database.  We recommend that you remove this title from any bookbags it may have been added to.") %]
     </div>
 
     [% INCLUDE "default/opac/parts/record/summary.tt2" %]
@@ -98,16 +98,16 @@
     [% INCLUDE "default/opac/parts/record/extras.tt2" %]
 
     <div class='hide_me' id='rdetail_bb_none'>
-        &rdetail.none;
+        [% l("(none)") %]
     </div>
     <div class='hide_me' id='rdetail_bb_item_success'>
-        &rdetail.bookbag.add.success;
+        [% l("Item successfully added to bookbag") %]
     </div>
     <div class='hide_me' id='rdetail_bb_new'>
-        &rdetail.bookbag.name;
+        [% l("Enter the name of the new bookbag") %]
     </div>
     <div class='hide_me' id='rdetail_bb_success'>
-        &rdetail.bookbag.create.success;
+        [% l("Bookbag successfully created") %]
     </div>
 </div>
 <!-- ****************** end; page_rdetail.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
index ec75d0a..6d44776 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
@@ -4,17 +4,17 @@
         <tr style='border: 3px solid #E0E0E0;' id='rdetail_volume_details_row' templateRow='1'>
             <td colspan='10'>
                 <div style='text-align: center; margin-top: 6px; margin-bottom: 6px'>
-                    <a name='print' href='#' class='classic_link'>&rdetail.print;</a>
+                    <a name='print' href='#' class='classic_link'>[% l("print these details") %]</a>
                     <table class='data_grid data_grid_center' style='width: 100%'>
                         <thead>
                             <tr>
-                                <td width='33%'>&rdetail.cn.barcode;</td>
-                                <td>&common.status;</td>
-                                <td>&rdetail.cn.location;</td>
-                                <td name='age_protect_label' class='hide_me'>&rdetail.cn.hold.age;</td>
-                                <td name='create_date_label' class='hide_me'>&rdetail.cn.genesis;</td>
-                                <td name='holdable_label' class='hide_me'>&rdetail.cn.holdable;</td>
-                                <td name='due_date_label' class='hide_me'>&rdetail.cn.due;</td>
+                                <td width='33%'>[% l("Barcode") %]</td>
+                                <td>[% l("Status") %]</td>
+                                <td>[% l("Location") %]</td>
+                                <td name='age_protect_label' class='hide_me'>[% l("Age Hold Protection") %]</td>
+                                <td name='create_date_label' class='hide_me'>[% l("Create Date") %]</td>
+                                <td name='holdable_label' class='hide_me'>[% l("Holdable") %]</td>
+                                <td name='due_date_label' class='hide_me'>[% l("Due Date") %]</td>
                             </tr>
                         </thead>
                         <tbody name='copies_tbody' class='copy_details_table' width='100%'>
@@ -22,15 +22,15 @@
                                 <td>
                                     <span name='barcode'> </span>
                                     <a class='hide_me classic_link copy_more_info'
-                                        name='details_link'>&rdetail.cn.more;</a>
+                                        name='details_link'>[% l("more info...") %]</a>
                                     <a class='hide_me classic_link copy_more_info'
-                                        name='less_details_link'>&rdetail.cn.less;</a>
+                                        name='less_details_link'>[% l("less info") %]</a>
                                     <a class='hide_me classic_link copy_more_info'
-                                        name='copy_hold_link' href='#'>&rdetail.cn.hold;</a>
+                                        name='copy_hold_link' href='#'>[% l("place hold") %]</a>
                                 </td>
                                 <td name='status'> </td>
                                 <td name='location'> </td>
-                                <td name='age_protect_value' class='hide_me'>&rdetail.cn.disabled;</td>
+                                <td name='age_protect_value' class='hide_me'>[% l("- Disabled -") %]</td>
                                 <td name='create_date_value' class='hide_me'> </td>
                                 <td name='copy_holdable_td' class='hide_me'>
                                     <span name='copy_is_holdable'> </span>
@@ -47,10 +47,10 @@
                                             <tr name='extras_row' class='hide_me'>
                                                 <td name='type' width='20%'>
                                                     <span name='note' class='hide_me'>
-                                                        <b>&rdetail.cn.note;</b>
+                                                        <b>[% l("Copy Note") %]</b>
                                                     </span>
                                                     <span name='cat' class='hide_me'>
-                                                        <b>&rdetail.cn.category;</b>
+                                                        <b>[% l("Copy Category") %]</b>
                                                     </span>
                                                 </td>
                                                 <td>
@@ -69,29 +69,29 @@
     </tbody>
 </table>
 
-<span class='hide_me' id='rdetail.yes'>&common.yes;</span>
-<span class='hide_me' id='rdetail.no'>&common.no;</span>
+<span class='hide_me' id='rdetail.yes'>[% l("Yes") %]</span>
+<span class='hide_me' id='rdetail.no'>[% l("No") %]</span>
 
 <div id='rdetail_print_details' class='hide_me'>
     <div style='text-align: center; padding: 20px; width: 100%'>
         <div style='width:100%; border: 2px solid #E0F0E0; margin-bottom: 20px;'>
-            <input type='submit' value='&rdetail.cn.print;' onclick='window.print();' />
+            <input type='submit' value='[% l("Print Page") %]' onclick='window.print();' />
         </div>
         <div name='body'>
             <table>
                 <tbody name='tbody'>
-                    <tr><td>&common.library;</td><td colspan='2' name='lib'></td></tr>
-                    <tr><td>&common.title;</td><td colspan='2' name='title'></td></tr>
-                    <tr><td>&common.author;</td><td colspan='2' name='author'></td></tr>
-                    <tr><td>&common.edition;</td><td colspan='2' name='edition'></td></tr>
-                    <tr><td>&common.pubdate;</td><td colspan='2' name='pubdate'></td></tr>
-                    <tr><td>&common.publisher;</td><td colspan='2' name='publisher'></td></tr>
-                    <tr><td>&common.physical;</td><td colspan='2' name='phys'></td></tr>
+                    <tr><td>[% l("Library") %]</td><td colspan='2' name='lib'></td></tr>
+                    <tr><td>[% l("Title") %]</td><td colspan='2' name='title'></td></tr>
+                    <tr><td>[% l("Author") %]</td><td colspan='2' name='author'></td></tr>
+                    <tr><td>[% l("Edition") %]</td><td colspan='2' name='edition'></td></tr>
+                    <tr><td>[% l("Publication Date") %]</td><td colspan='2' name='pubdate'></td></tr>
+                    <tr><td>[% l("Publisher") %]</td><td colspan='2' name='publisher'></td></tr>
+                    <tr><td>[% l("Physical Description") %]</td><td colspan='2' name='phys'></td></tr>
                     <tr>
                         <td colspan='3' style='background: #E0F0E0;'> </td>
                     </tr>
                     <tr name='cnrow'>
-                        <td><b>&common.callnumber;</b></td>
+                        <td><b>[% l("Call Number") %]</b></td>
                         <td><b colspan='2' name='cn'></b></td>
                     </tr>
                 </tbody>
diff --git a/Open-ILS/web/templates/default/opac/parts/record/copyinfo.tt2 b/Open-ILS/web/templates/default/opac/parts/record/copyinfo.tt2
index 6c78071..8439eda 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/copyinfo.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/copyinfo.tt2
@@ -3,22 +3,22 @@
     <div style='width: 100%; text-align: center; padding-bottom: 5px;'>
         <span>
             <a href='javascript:void(0);' id='copy_info_local_link' 
-                class='rdetail_copy_nav_link hide_me classic_link'><b>&rdetail.copyInfo.local;</b></a>
+                class='rdetail_copy_nav_link hide_me classic_link'><b>[% l("View Copy Information for this location only") %]</b></a>
         </span>
         <span width=''>
             <a href='javascript:void(0);' id='copy_info_all_link' 
-                class='rdetail_copy_nav_link classic_link'><b>&rdetail.copyInfo.all;</b></a>
+                class='rdetail_copy_nav_link classic_link'><b>[% l("View copy information for all libraries") %]</b></a>
         </span>
     </div>
     <table id='rdetail_copy_info_table' class='data_grid'>
         <thead>
             <tr>
-                <td class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.library;</td>
-                <td class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.callnumber;</td>
+                <td class='rdetail_copy_info_header_cell'>[% l("Library") %]</td>
+                <td class='rdetail_copy_info_header_cell'>[% l("Callnumber") %]</td>
                 <td name='rdetail_copylocation_header' class='rdetail_copy_info_header_cell hide_me'>
-                    &rdetail.copyInfo.copylocation;
+                    [% l("Copy Location") %]
                 </td>
-                <td class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.actions;</td>
+                <td class='rdetail_copy_info_header_cell'>[% l("Actions") %]</td>
                 <td nowrap='nowrap' class='rdetail_copy_info_header_cell' id='rdetail_copy_info_status'> 
                     <div name='rdetail_status_cell'> </div>
                 </td>
@@ -28,22 +28,22 @@
             <tr id='rdetail_copy_info_row' class='hide_me'>
                 <td name='rdetail_library_cell'>
                     <a name='lib_print_link' class='hide_me classic_link'
-                        style='font-size: 8pt; padding-left: 20px;'>&rdetail.copyInfo.print;</a>
+                        style='font-size: 8pt; padding-left: 20px;'>[% l("Print Call Numbers for this library") %]</a>
                 </td>
                 <td name='rdetail_callnumber_cell'> </td>
                 <td class="hide_me" name='rdetail_copylocation_cell'> </td>
                 <td name='rdetail_actions_cell'> 
                     <div style='padding-bottom: 1px;'>
                         <a style='font-size: 8pt;'
-                            name='details' class='hide_me classic_link'>&rdetail.copyInfo.details;</a>
+                            name='details' class='hide_me classic_link'>[% l("Copy Details") %]</a>
                     </div>
                     <div style='margin-top: 2px;'>
                         <a name='browse' style='font-size: 8pt;'
-                            class='hide_me classic_link'>&rdetail.copyInfo.browse;</a>
+                            class='hide_me classic_link'>[% l("Browse Call Numbers") %]</a>
                     </div>
                     <div style='margin-top: 2px;' name='hold_div' class='hide_me'>
                         <a name='hold' style='font-size: 8pt;' href='javascript:void(0);'
-                            class='classic_link'>&rdetail.copyInfo.hold;</a>
+                            class='classic_link'>[% l("Place Hold") %]</a>
                     </div>
                 </td>
                 <td nowrap='nowrap' class='rdetail_copy_count_cell vertical' 
@@ -52,7 +52,7 @@
             </tr>
             <tr id='rdetail_copy_info_loading'>
                 <td>
-                    &rdetail.loading;
+                    [% l("Loading copy information...") %]
                 </td>
             </tr>
         </tbody>
@@ -63,6 +63,6 @@
         </tbody>
     </table> -->
     <br/><br/>
-    <div id='rdetail_copy_info_none' class='hide_me'>&rdetail.noneAvailable;</div>
+    <div id='rdetail_copy_info_none' class='hide_me'>[% l(" * There are no copies in this location") %]</div>
 </div> <!-- copy info -->
 <!-- ****************** end: rdetail_copyinfo.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index 394bfa8..05cbd78 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -6,7 +6,7 @@
                 <td id='rdetail_annotation_link' class='hide_me rdetail_extras_td'
                     style='padding-right: 15px; padding-left: 15px;' >
                     <a href='javascript:rdetailShowExtra("annotation");' 
-                        class='classic_link'>&rdetail.extras.annotation;</a>
+                        class='classic_link'>[% l("Annotation") %]</a>
                 </td>
             </tr>
         </thead>
@@ -14,7 +14,7 @@
 
     <div id='rdetail_extras_div' style='width: 100%;'> 
         <div id='rdetail_extras_loading' class='hide_me' 
-            style='padding: 10px;'>&common.loading;</div>
+            style='padding: 10px;'>[% l("Loading...") %]</div>
 
         <div rel="rdetail_summary_div" rel2="summary" class="rdetail_extras hide_me" id="rdetail_summary_link">
             <div class="rdetail_extras_hr"></div>
@@ -135,7 +135,7 @@
         <div id='rdetail_content_div' class='rdetail_extras_div hide_me'>
             <strong>Contents:</strong>
             <div id='rdetail_content_div_inner' style="padding-bottom:10px;"></div>
-            <strong>&rdetail.extras.toc;:</strong>
+            <strong>[% l("Table of Contents") %]:</strong>
             <div id='rdetail_toc_div' class='rdetail_extras_div'></div>
         </div>
         
@@ -215,7 +215,7 @@
                 <a href='javascript:rdetailShowExtra("reviews");'><img
                     alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("reviews");'
-                    class="rdetail_extras_lbl">&rdetail.extras.reviews;</a>
+                    class="rdetail_extras_lbl">[% l("Reviews") %]</a>
             </div>
         </div>
 
@@ -228,7 +228,7 @@
                 <a href='javascript:rdetailShowExtra("excerpt");'><img
                     alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("excerpt");'
-                    class="rdetail_extras_lbl">&rdetail.extras.excerpt;</a>
+                    class="rdetail_extras_lbl">[% l("Excerpt") %]</a>
             </div>
         </div>
 
@@ -241,7 +241,7 @@
                 <a href='javascript:rdetailShowExtra("preview");'><img
                     alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("preview");'
-                    class="rdetail_extras_lbl">&rdetail.extras.preview;</a>
+                    class="rdetail_extras_lbl">[% l("Preview") %]</a>
             </div>
         </div>
 
@@ -254,7 +254,7 @@
                 <a href='javascript:rdetailShowExtra("novelist");'><img
                     alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("novelist");'
-                    class="rdetail_extras_lbl">&rdetail.extras.novelist;</a>
+                    class="rdetail_extras_lbl">[% l("Suggestions by NoveList") %]</a>
             </div>
         </div>
 
@@ -265,19 +265,19 @@
                 <a href='javascript:rdetailShowExtra("cn");'><img
                     alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("cn");'
-                    class="rdetail_extras_lbl">&rdetail.extras.browser;</a>
+                    class="rdetail_extras_lbl">[% l("Shelf Browser") %]</a>
             </div>
         </div>
 
         <div id='rdetail_cn_browse_div' style='text-align: center;' class='hide_me'>
             <div id='cn_browse_none' class='hide_me color_4'
                 style='width: 90%; text-align: center; margin: 10px;'>
-                &rdetail.extras.call.null;
+                [% l("There are no call numbers for this item at this location.") %]
             </div>
 
             <div id='rdetail_cn_browse_select_div' 
                 style='width: 100%; border: 1px solid black; padding: 6px; margin-top: 5px;'>
-                <span>&rdetail.extras.call.local; </span>
+                <span>[% l("Local Call Numbers:") %] </span>
                 <select id='cn_browse_selector'> </select>
             </div>
             [% INCLUDE "default/opac/parts/cn_browse.tt2" %]
@@ -292,7 +292,7 @@
                 <a href='javascript:rdetailShowExtra("copyinfo");'><img
                     alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("copyinfo");'
-                    class="rdetail_extras_lbl">&rdetail.extras.summary;</a>
+                    class="rdetail_extras_lbl">[% l("Copy Summary") %]</a>
             </div>
         </div>
 
@@ -304,16 +304,16 @@
                 <a href='javascript:rdetailShowExtra("marc");'><img
                     alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("marc");'
-                    class="rdetail_extras_lbl">&rdetail.extras.marc;</a>
+                    class="rdetail_extras_lbl">[% l("MARC Record") %]</a>
             </div>
         </div>
         <div id='rdetail_marc_div' class='rdetail_extras_div hide_me'>
             <div id='rdetail_view_marc_box'></div>
         </div>
     </div>
-    <div id='rdetail_preview_full_text' class='hide_me'>&rdetail.extras.preview.fulltext;</div>
-    <div id='rdetail_preview_title' class='hide_me'>&rdetail.extras.preview.title;</div>
-    <div id='rdetail_preview_badge' class='hide_me'>&rdetail.extras.preview.badge;</div>
+    <div id='rdetail_preview_full_text' class='hide_me'>[% l("Full text") %]</div>
+    <div id='rdetail_preview_title' class='hide_me'>[% l("See the full text of this book.") %]</div>
+    <div id='rdetail_preview_badge' class='hide_me'>[% l("Show a preview of this book from Google Book Search") %]</div>
 </div>
 
 <!-- XXX TODO Novelist stuff here? -->
diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
index 755ad25..5e3ab90 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
@@ -11,10 +11,10 @@
                     src='${ident.small}' /></a>
                 <br />
                 <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
-                    <div>&opac.image_provided;</div>
+                    <div>[% l("Image provided by") %]</div>
                     <div>
-                        <a target='_blank' href='&vendor.base_link;'
-                            class='classic_link' id='rdetail.jacket_attrib_link'>&vendor.name;</a>
+                        <a target='_blank' href='[% l("http://amazon.com/dp/") %]'
+                            class='classic_link' id='rdetail.jacket_attrib_link'>[% l("Amazon") %]</a>
                     </div>
                 </div>
             </td>
@@ -24,8 +24,8 @@
                     <tr>
                         <td valign="top">
                             <span class="rdetail_item" id='rdetail_title'></span><br />
-                            <span style="color:#545454;">&common.author;: </span>
-                            <em><a title='&rdetail.author.search;' id='rdetail_author'></a></em>
+                            <span style="color:#545454;">[% l("Author") %]: </span>
+                            <em><a title='[% l("Perform an author search") %]' id='rdetail_author'></a></em>
                         </td>
                         <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
                             <div style="width:230px;text-align:left;margin-top:3px;">
@@ -59,21 +59,21 @@
                     <table border="0" cellpadding="0" width="100%">
                         <tr>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_isbn_lbl" class="">&common.isbn;</strong>
+                                <strong id="rdetail_isbn_lbl" class="">[% l("ISBN") %]</strong>
                             </td>
                             <td valign="top" id='rdetail_isbn'></td>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_phys_lbl" class="">&common.physical;</strong>
+                                <strong id="rdetail_phys_lbl" class="">[% l("Physical Description") %]</strong>
                             </td>
                             <td valign="top" id='rdetail_physical_desc'></td>
                         </tr>
                         <tr>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_ed_lbl" class="">&common.edition;</strong>
+                                <strong id="rdetail_ed_lbl" class="">[% l("Edition") %]</strong>
                             </td>
                             <td valign="top" id='rdetail_edition'></td>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_form_lbl" class="">&common.format;</strong>
+                                <strong id="rdetail_form_lbl" class="">[% l("Format") %]</strong>
                             </td>
                             <td valign="top">
                                 <img alt="Format" id='' class='tor_pic hide_me' />
@@ -82,7 +82,7 @@
                         </tr>
                         <tr>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_pubdate_lbl" class="">&common.pubdate;</strong>
+                                <strong id="rdetail_pubdate_lbl" class="">[% l("Publication Date") %]</strong>
                             </td>
                             <td valign="top" id='rdetail_pubdate'></td>
                             <td nowrap='nowrap' valign="top">
@@ -92,11 +92,11 @@
                         </tr>
                         <tr>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_pub_lbl" class="">&common.publisher;</strong>
+                                <strong id="rdetail_pub_lbl" class="">[% l("Publisher") %]</strong>
                             </td>
                             <td valign="top" id='rdetail_publisher'></td>
                             <td nowrap='nowrap' valign="top">
-                                <strong id="rdetail_sub_lbl" class="">&rdetail.summary.subjects;</strong>
+                                <strong id="rdetail_sub_lbl" class="">[% l("Subjects") %]</strong>
                             </td>
                             <td valign="top"></td>
                         </tr>
@@ -163,7 +163,7 @@
                         <tr>
                             <td valign="top">
                                 <div style="padding-bottom:7px;">
-                                    <strong>&common.title;:</strong>
+                                    <strong>[% l("Title") %]:</strong>
                                 </div>
                             </td>
                             <td width="1" valign="top" align="right" style="white-space:nowrap;">
diff --git a/Open-ILS/web/templates/default/opac/parts/result/header.tt2 b/Open-ILS/web/templates/default/opac/parts/result/header.tt2
index e9613ff..07e1382 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/header.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/header.tt2
@@ -4,23 +4,23 @@
         <tr>
             <td class="h1" width="116">Search Results</td>
             <td valign="bottom" nowrap="nowrap" width="320" style="white-space:nowrap;" class="hide_me" id="result_numbers1">
-                <span> &common.results; </span>
+                <span> [% l("Results") %] </span>
                 <span id='offset_start' style='font-weight:bold'></span>
                 <span>&nbsp;- </span>
                 <span id='offset_end' style='font-weight:bold'></span>
-                <span>&nbsp;&common.of; </span>
+                <span>&nbsp;[% l("of") %] </span>
                 <span id='result_count' style='font-weight:bold'></span>
                 <span style='padding-left: 6px;'>
                     (page
                 </span>
                 <span id='current_page'></span>
-                <span>&nbsp;&common.of; </span>
+                <span>&nbsp;[% l("of") %] </span>
                 <span id='num_pages'></span>)
             </td>
             <td align="right" valign="bottom">
                 <span id='start_end_links_span' class='hide_me'>
                     <a class='search_page_nav_link' id='prev_link'
-                        title='&rdetail.page.previous;' style="cursor:pointer;">
+                        title='[% l("Previous page") %]' style="cursor:pointer;">
                         <span class="nav_arrow_fix">&#9668;</span> Previous
                     </a>
                     <span class='hide_me' id='result_info_div'
@@ -28,7 +28,7 @@
                         <span id="nav_pages"></span>
                     </span>
                     <a class='search_page_nav_link' id='next_link'
-                        title='&rdetail.page.next;' style="cursor:pointer;">
+                        title='[% l("Next page") %]' style="cursor:pointer;">
                         Next <span class="nav_arrow_fix">&#9658;</span>
                     </a>
                 </span>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2 b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
index 0514d31..a35876a 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
@@ -48,45 +48,45 @@
     </div>
     <div class="hide_me">
         <div style='text-align: center; padding-bottom: 8px;' class="hide_me">
-            <div id='result_low_hits_msg' class='hide_me'>&result.lowhits.few;</div>
-            <div id='result_zero_hits_msg' class='hide_me'>&result.lowhits.zero;</div>
+            <div id='result_low_hits_msg' class='hide_me'>[% l("Few hits were returned for your search.") %]</div>
+            <div id='result_zero_hits_msg' class='hide_me'>[% l("Zero hits were returned for your search.") %]</div>
         </div>
 
         <!-- spell checker -->
         <div id='did_you_mean' class='lowhits_div hide_me'>
-            <span>&result.lowhits.did.you.mean; </span>
+            <span>[% l("Maybe you meant:") %] </span>
             <!-- <a class='classic_link' id='spell_check_link'> </a> -->
         </div>
 
         <div id='low_hits_remove_format' class='lowhits_div hide_me'>
-            <span>&result.lowhits.formats; </span>
-            <a id='low_hits_remove_format_link' class='classic_link'>&result.lowhits.formats.search;</a>
+            <span>[% l("You will find more hits when searching all item formats:") %] </span>
+            <a id='low_hits_remove_format_link' class='classic_link'>[% l("Search again with all formats?") %]</a>
         </div>
 
         <div id='low_hits_cross_ref' class='lowhits_div hide_me'>
-            <span>&result.lowhits.related;</span>
+            <span>[% l("You may also like to try these related searches:") %]</span>
             <div style='padding: 5px;'>
                 <a id='low_hits_xref_link' class='classic_link' style='padding-right: 5px;'> </a>
             </div>
         </div>
 
         <div id='low_hits_expand_range' class='lowhits_div hide_me'>
-            <span>&result.lowhits.expand; </span>
+            <span>[% l("You may also wish to expand your search range to:") %] </span>
             <a id='low_hits_expand_link' class='classic_link' style='padding-right: 5px;'> </a>
         </div>
 
         <div id='low_hits_search_type' class='lowhits_div hide_me'>
-            <span>&result.lowhits.class;</span>
+            <span>[% l("You can try searching the same terms by:") %]</span>
             <a id='low_hits_title_search' class='hide_me classic_link' 
-                style='padding-right: 5px;'>&result.lowhits.title;</a>
+                style='padding-right: 5px;'>[% l("title") %]</a>
             <a id='low_hits_author_search' class='hide_me classic_link' 
-                style='padding-right: 5px;'>&result.lowhits.author;</a>
+                style='padding-right: 5px;'>[% l("author") %]</a>
             <a id='low_hits_subject_search' class='hide_me classic_link' 
-                style='padding-right: 5px;'>&result.lowhits.subject;</a>
+                style='padding-right: 5px;'>[% l("subject") %]</a>
             <a id='low_hits_series_search' class='hide_me classic_link' 
-                    style='padding-right: 5px;'>&result.lowhits.series;</a>
+                    style='padding-right: 5px;'>[% l("series") %]</a>
             <a id='low_hits_keyword_search' class='hide_me classic_link' 
-                style='padding-right: 5px;'>&result.lowhits.keyword;</a>
+                style='padding-right: 5px;'>[% l("keyword") %]</a>
         </div>
     </div>
 </div>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
index 5e2778a..a183ead 100644
--- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
@@ -38,14 +38,14 @@
                                                 name='result_table_title_cell'
                                                 valign="top">
                                                 <div style="font-weight:bold;">
-                                                    <a title="&result.table.keyword;"
+                                                    <a title="[% l("View titles for this record") %]"
                                                         name='item_title' class='search_link'>
                                                     </a>
                                                 </div>
                                                 <span style="font-size:11px;">
                                                     <div>
                                                         <em>
-                                                            <a title="&result.table.author;" name='item_author' class='search_link'></a>
+                                                            <a title="[% l("Perform an Author Search") %]" name='item_author' class='search_link'></a>
                                                         </em> &nbsp;&nbsp;
                                                         <span name="results_pub_date"></span>
                                                     </div>
@@ -117,7 +117,7 @@
                                                 <img alt="Format" src="" class="hide_me" name="" />
                                                 <span class='hide_me' 
                                                     style='color: #9999FF; padding-left: 10px; font-size: 7pt; font-weight: 300;'> 
-                                                    <span>&common.relevancy; </span>
+                                                    <span>[% l("Match Score: ") %] </span>
                                                     <span name='relevancy_span'> </span>
                                                 </span>
                                                 <!-- Empty span used for creating unAPI links -->
@@ -130,7 +130,7 @@
                                                 <span name="googleBooksLink" class="hide_me">
                                                     <a style='padding-left: 8px;'
                                                         class='classic_link hide_me'
-                                                        name="googleBooks-link">&result.googleBooks.browse;</a>
+                                                        name="googleBooks-link">[% l("Browse in Google Books Search") %]</a>
                                                 </span>
                                             </td>
                                             <td nowrap='nowrap' width="1" align="right">
@@ -222,28 +222,28 @@
                     <td valign="top">
                         <span class='hide_me' id='result_info_div2'
                             style='font-size: 11px;'>
-                            <span> &common.results; </span> 
+                            <span> [% l("Results") %] </span> 
                             <b id='offset_start2'> </b>
                             <span>&nbsp;- </span>
                             <b id='offset_end2'> </b>
-                            <span>&nbsp;&common.of; </span>
+                            <span>&nbsp;[% l("of") %] </span>
                             <b id='result_count2'> </b>
                             <span style='padding-left: 6px;'> (page </span>
                             <span id='current_page2'> </span>
-                            <span>&nbsp;&common.of; </span>
+                            <span>&nbsp;[% l("of") %] </span>
                             <span id='num_pages2'> </span>
                         </span>
                     </td>
                     <td valign="top" id='next_prev_links2' align="right">
                     <span id='start_end_links_span2' class='hide_me'>
                         <a class='search_page_nav_link' id='prev_link2'
-                            title='&rdetail.page.previous;' style="cursor:pointer;">
+                            title='[% l("Previous page") %]' style="cursor:pointer;">
                             <span class="nav_arrow_fix">&#9668;</span> Previous
                         </a>
                         <span id="nav_pages2"
                             style='padding-left: 11px; padding-right:13px;'></span>
                         <a class='search_page_nav_link' id='next_link2'
-                            title='&rdetail.page.next;' style="cursor:pointer;">
+                            title='[% l("Next page") %]' style="cursor:pointer;">
                             Next <span class="nav_arrow_fix">&#9658;</span>
                         </a>
                         </span>
diff --git a/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
index 9bde3bf..a7c6326 100644
--- a/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
@@ -1,10 +1,10 @@
 <!-- ****************** stypes_selector.xml ***************************** -->
 <select id='search_type_selector'>
-	<option value='keyword' selected='selected'>&common.keyword;</option>
-	<option value='title'>&common.title;</option>
-	<option value='author'>&common.author;</option>
-	<option value='subject'>&common.subject;</option>
-	<option value='series'>&common.series;</option>
+	<option value='keyword' selected='selected'>[% l("Keyword") %]</option>
+	<option value='title'>[% l("Title") %]</option>
+	<option value='author'>[% l("Author") %]</option>
+	<option value='subject'>[% l("Subject") %]</option>
+	<option value='series'>[% l("Series") %]</option>
 	<option value='cn'>Call Number</option>
 </select>
 <!-- ****************** end: stypes_selector.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/tips.tt2 b/Open-ILS/web/templates/default/opac/parts/tips.tt2
index 95a9b35..f4e73ed 100644
--- a/Open-ILS/web/templates/default/opac/parts/tips.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/tips.tt2
@@ -2,10 +2,10 @@
 <div class="hide_me">
     <div id='tips' class='tips hide_me'>
         <div class='hide_me'>
-            <span>&common.tips.tip1;</span>
-            <span>&common.tips.tip2;</span>
+            <span>[% l("Click on a folder icon in the sidebar to access related quick searches") %]</span>
+            <span>[% l("If you don't find what you want try expanding your search using the range selector at the right of the search bar") %]</span>
         </div>
-        <strong>&tips.label;</strong>
+        <strong>[% l("Tip:") %]</strong>
     </div>
 </div>
 <!-- ****************** end: tips.xml ***************************** -->

commit d20c608f2e74d20a95cc5da5b6106638a303e47b
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 7 15:35:14 2011 -0500

    preparing a could of docs for entitization (fix wrong ent references)

diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index d14f7ff..5d0790b 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -153,7 +153,7 @@
     </div>
     <div id='non_cat_circs_div' class='hide_me'>
         <br/>
-        <div style='text-align: center'><b>&myopac.common.other.circ;</b></div>
+        <div style='text-align: center'><b>&myopac.checked.other.circ;</b></div>
         <table class='data_grid' width='100%'>
             <thead>
                 <tr>
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
index f6816f6..3f5b497 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
@@ -65,7 +65,7 @@
         <table class="hide_me full-width" id="acct_search_main">
             <tbody id='myopac_prefs_tbody'>
                 <tr id='myopac_prefs_loading'>
-                    <td colspan='3'><b>&myopac.loading;</b></td>
+                    <td colspan='3'><b>&common.loading;</b></td>
                 </tr>
 
                 <tr id='myopac_prefs_row'>
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
index 8bcb977..f1c3079 100644
--- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
@@ -8,7 +8,7 @@
             <option value='author'>&common.author;</option>
             <option value='subject'>&common.subject;</option>
             <option value='series'>&common.series;</option>
-            <option value='bibcn'>&common.bibcn;</option>
+            <option value='bibcn'>Bibliographic call number:</option>
             </select>
         <!-- select how to treat the text -->
         <select name='contains' style='margin-right: 7px;'>
diff --git a/Open-ILS/web/templates/default/opac/parts/login/form.tt2 b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
index b07d4e7..d8e984c 100644
--- a/Open-ILS/web/templates/default/opac/parts/login/form.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
@@ -16,7 +16,7 @@
 </div>
 <table id='change_pw_table' class='data_grid hide_me' style='margin-left: 20px;' width='95%'>
 	<thead>
-        <tr><td colspan='2' align='center'><b>&login.password;</b></td></tr>
+        <tr><td colspan='2' align='center'><b>&common.password;</b></td></tr>
     </thead>
     <tbody>
         <tr>

commit b6112dcf5cc22e7b4025f238dd7a9a7c1a65c016
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 7 14:01:39 2011 -0500

    Shove the POC out of the way, move the KCLS-derived stuff in

diff --git a/Open-ILS/web/templates/default/kcls-wire/home.tt2 b/Open-ILS/web/templates/default/kcls-wire/home.tt2
deleted file mode 100644
index e9a0516..0000000
--- a/Open-ILS/web/templates/default/kcls-wire/home.tt2
+++ /dev/null
@@ -1,15 +0,0 @@
-[%  WRAPPER "default/kcls-wire/parts/base.tt2";
-    INCLUDE "default/kcls-wire/parts/topnav.tt2";
-    ctx.page_title = "Home" %]
-    <div id="search-wrapper">
-        [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
-        [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
-    </div>
-    <div id="content-wrapper">
-        <div id="main-content">
-            <div class="common-full-pad"></div>
-            [% INCLUDE "default/kcls-wire/parts/homesearch.tt2" %]
-            <div class="common-full-pad"></div>	
-        </div>
-    </div>
-[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/login.tt2 b/Open-ILS/web/templates/default/kcls-wire/login.tt2
deleted file mode 100644
index 5957397..0000000
--- a/Open-ILS/web/templates/default/kcls-wire/login.tt2
+++ /dev/null
@@ -1,14 +0,0 @@
-[%  WRAPPER "default/kcls-wire/parts/base.tt2";
-    INCLUDE "default/kcls-wire/parts/topnav.tt2";
-    ctx.page_title = "Account Login" %]
-    <div id="search-wrapper">
-        [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
-        [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
-    </div>
-    <div id="content-wrapper">
-        <div id="main-content">
-            [% INCLUDE "default/kcls-wire/parts/login/form.tt2" %]
-            <div class="clear-both very-big-height"></div>	
-        </div>
-    </div>
-[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2
deleted file mode 100644
index 67e1316..0000000
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2
+++ /dev/null
@@ -1,179 +0,0 @@
-[%  WRAPPER "default/kcls-wire/parts/base.tt2" +
-        "default/kcls-wire/parts/myopac/base.tt2";
-    myopac_page = "circs"  %]
-<div id='myopac_checked_div' style="padding:0px;">
-    <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;">
-        <div class="align selected" id="checked_label">
-            <img src="/images/sub_checked_out_on.jpg" />
-        </div>
-        <div class="align" id="checked_hist_link">
-            <a class="" href="#"><img
-                src="/images/sub_checked_hist_off.jpg" /></a>
-        </div>
-        <div class="align hide_me" id="checked_link">
-            <a href="#">
-                <img src="/images/sub_checked_out_off.jpg" />
-            </a>
-        </div>
-        <div class="align selected hide_me" id="checked_hist_label">
-            <img src="/images/sub_checked_hist_on.jpg" />
-        </div>    
-        <div class="clear-both"></div>
-    </div>
-    
-    <div class="header_middle">
-        <span id="acct_checked_header" style="float:left;">
-            Current Items Checked Out
-        </span>
-        <span style="float:right;">
-            <a class="hide_me" href="#">Export List</a>
-        </span>
-    </div>
-    <div class="clear-both"></div>
-    <div id='checked_main'>
-        <table cellpadding='0' cellspacing='0' border='0'
-            style="padding:8px 0px 6px 0px;">
-            <tr>
-                <td>
-                    <a href="#">Renew Selected Titles</a>
-                </td>
-                <td style="padding-left:9px;">
-                    <a class="hide_me" href="#"><img
-                        alt="Save"
-                        src="/images/save-btn.png" /></a>
-                </td>
-                <td style="padding-left:5px;">
-                    <a href="#"><img alt="Renewing Help"
-                        src="/images/question-mark.png" /></a>
-                </td>
-            </tr>
-        </table>
-        <table id="acct_checked_main_header" cellpadding='0' cellspacing='0'
-            border='0'>
-            <tr>
-                <td width="1%" style="padding-left:10px;">
-                    <input type="checkbox" id="check_all_checked" />
-                </td>
-                <td width="40%" style="padding-left:5px;">
-                    <span title="Click to sort" style="cursor:pointer;">
-                        Title
-                    </span> /
-                    <span title="Click to sort" style="cursor:pointer;">
-                        Author
-                    </span>
-                </td>
-                <td width="8%" style="padding-right:5px;" align="center">
-                    <span title="Click to sort" style="cursor:pointer;">
-                        Renews<br />Left
-                    </span>
-                </td>
-                <td width="13%" style="padding-left:5px;">
-                    <span title="Click to sort" style="cursor:pointer;">Due Date
-                    </span>
-                </td>
-                <td width="16%">
-                    <span title="Click to sort" style="cursor:pointer;">barcode</span>
-                </td>
-                <td width="22%">
-                    <span title="Click to sort" style="cursor:pointer;">call number</span>
-                </td>
-            </tr>
-        </table>
-   
-        <div id="checked_temp_parent">
-            <div id="acct_checked_temp">
-                <table cellpadding='0' cellspacing='0' border='0'
-                    style="margin-top:5px;">
-                    <tr>
-                        <td width="1%" style="padding-left:10px;" valign="top">
-                            <input type="checkbox" name="check_all_checked" />
-                        </td>
-                        <td width="40%"
-                            style="padding-left:5px;padding-bottom:10px;"
-                            name="author">
-                            <a href="#" name="title"></a>
-                        </td>
-                        <td width="8%" name="renewals" align="center"></td>
-                        <td width="13%" style="padding-left:5px;"
-                            name="due_date"></td>
-                        <td width="16%" name="barcode"></td>
-                        <td width="22%" name="call_number"></td>
-                    </tr>
-                </table>
-            </div>
-        </div>
-    </div>
-    <div id='checked_hist' class="hide_me" style="padding-top:8px;">
-        <table id="acct_checked_hist_header" cellpadding='0' cellspacing='0'
-            border='0' width='100%'>
-            <tr>
-                <td width="45%" style="padding-left:15px;">
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Title</span> /
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Author</span>
-                </td>
-                <td width="22%"
-                    style="white-space:nowrap;padding-left:5px;">
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Call Number</span>
-                </td>
-                <td width="11%">
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Checkout</span>
-                </td>
-                <td width="11%">
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Due Date</span>
-                </td>
-                <td width="11%">
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Returned</span>
-                </td>
-            </tr>
-        </table>
-        <table cellpadding='0' cellspacing='0' border='0'
-            style="margin-top:5px;" width="100%">
-            <tbody id="acct_checked_hist_parent">
-                <tr id="acct_checked_hist_temp">
-                    <td width="45%"
-                        style="padding-left:15px;padding-bottom:10px;">
-                        <a href="#" name="title"></a> /
-                        <span name="author"></span>
-                    </td>
-                    <td width="22%" style="padding-left:5px;"
-                        name="call_number"></td>
-                    <td width="11%" name="checkout"></td>
-                    <td width="11%" name="due_date"></td>
-                    <td width="11%" name="returned"
-                        nowrap="nowrap" style="white-space:nowrap;"></td>
-                </tr>
-            </tbody>
-        </table>
-    </div>
-    <div id='non_cat_circs_div' class='hide_me'>
-        <br/>
-        <div style='text-align: center'><b>&myopac.common.other.circ;</b></div>
-        <table class='data_grid' width='100%'>
-            <thead>
-                <tr>
-                    <td>&myopac.checked.circ.lib;</td>
-                    <td>&myopac.checked.item.type;</td>
-                    <td>&myopac.checked.circ.time;</td>
-                </tr>
-            </thead>
-            <tbody id='non_cat_circs_tbody'>
-                <tr id='non_cat_circs_row'>
-                    <td name='circ_lib'/>
-                    <td name='item_type'/>
-                    <td name='circ_time'/>
-                </tr>
-            </tbody>
-        </table>
-    </div>
-    <div id='myopac_renew_success' class='hide_me'>&myopac.checked.renew.success;</div>
-    <span class='hide_me' id='myopac_renew_confirm'>&myopac.checked.renew.confirm;</span>
-    <span class='hide_me' id='myopac_renew_fail'>&myopac.checked.renew.fail;</span>
-   <span class='hide_me' id='myopac_renew_fail2'>&myopac.checked.renew.fail2;</span>
-</div>
-[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
deleted file mode 100644
index e97a3cd1..0000000
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
+++ /dev/null
@@ -1,204 +0,0 @@
-[%  WRAPPER "default/kcls-wire/parts/base.tt2" +
-        "default/kcls-wire/parts/myopac/base.tt2";
-    myopac_page = "holds"  %]
-<div id='myopac_holds_div'>
-    <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;">
-        <div class="align selected" id="holds_label">
-            <img src="/images/sub_holds_on.jpg" />
-        </div>
-        <div class="align hide_me" id="holds_hist_link">
-            <a href="#"><img
-                src="/images/sub_holds_hist_off.jpg" /></a>
-        </div>
-        <div class="align hide_me" id="holds_link">
-            <a href="#"><img
-                src="/images/sub_holds_off.jpg" /></a>
-        </div>
-        <div class="align selected hide_me" id="holds_hist_label">
-            <img src="/images/sub_holds_hist_on.jpg" />
-        </div>	
-        <div class="clear-both"></div>
-    </div>
-    <div class="header_middle">
-        <span id="acct_holds_header" style="float:left;">
-            Current Items on Hold
-        </span>
-        <span style="float:right;">
-            <a class="hide_me" href="#">Export List</a>
-        </span>
-    </div>
-    <div class="clear-both"></div>
-    <div id='holds_main'>
-        <table cellpadding='0' cellspacing='0' border='0'
-            style="padding:8px 0px 6px 0px;">
-            <tr>
-                <td width="1">
-                    <select id="acct_holds_actions">
-                        <option id='myopac_holds_actions_none' value=''>
-                        -- &myopac.holds.actions; --
-                        </option>
-                        <option value='freeze'>
-                            &myopac.holds.freeze_selected;
-                        </option>
-                        <option value='thaw'>
-                            &myopac.holds.thaw_selected;
-                        </option>
-                        <option value='thaw_date'>
-                            &myopac.holds.thaw_date_selected;
-                        </option>
-                        <option value='cancel'>
-                            &myopac.holds.cancel_selected;
-                        </option>
-                    </select>
-                </td>
-                <td width="1" style="padding-left:9px;">
-                    <a href="#"><img
-                        alt="Save"
-                        src="/images/save-btn.png" /></a>
-                </td>
-                <td width="1" style="padding-left:5px;">
-                    <a href="#"><img
-                        alt="Holds Help"
-                        src="/images/question-mark.png" /></a>
-                </td>
-                <td align="right">
-                    <select class="hide_me" id="holds_sort">
-                        <option value="">-- Sort By --</option>
-                        <option value="title">Title</option>
-                        <option value="pickup">PickUp Location</option>
-                        <option value="status">Status</option>
-                    </select>
-                </td>
-            </tr>
-        </table>
-        <table id="acct_holds_main_header" cellpadding='0' cellspacing='0'
-            border='0' width="100%">
-            <tr>
-                <td width="36" align="center">
-                    <input type="checkbox" id="check_all_holds" />
-                </td>
-                <td width="138">
-                    <span title="Click to sort"
-                        style="cursor:pointer;">
-                        Title
-                    </span>
-                </td>
-                <td width="123">
-                    <span title="Click to sort" style="cursor:pointer;">Author</span>
-                </td>
-                <td width="64">
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Format</span>
-                </td>
-                <td width="136">
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Pickup Location</span>
-                </td>
-                <td width="104">Activate</td>
-                <td width="106">Cancel if not<br />filled by</td>
-                <td width="95">Active</td>
-                <td width="172">
-                    <span title="Click to sort"
-                        style="cursor:pointer;">Status</span>
-                </td>
-            </tr>
-        </table>
-        <div class="hide_me">
-            <select id="hold_pickup_lib_temp" name="hold_pickup_lib_sel"
-                class="hide_me" style="width:125px;height:21px;"></select>
-        </div>
-
-        <table cellpadding='0' cellspacing='0' border='0' width="100%">
-            <tbody id="holds_temp_parent">
-                <tr id="acct_holds_temp" name="acct_holds_temp"
-                    class="acct_holds_temp">
-                    <td width="36" align="center" style="text-align:center;">
-                        <input type="checkbox" name="check_all_holds" />
-                    </td>
-                    <td width="138">
-                        <div style="margin-top:10px;margin-bottom:10px;">
-                            <a href="#" name="myopac_holds_title_link"></a>
-                        </div>
-                    </td>
-                    <td width="123">
-                        <div style="margin-top:10px;margin-bottom:10px;"
-                            name="myopac_holds_author"></div>
-                    </td>
-                    <td width="64">
-                        <div style="width:26px;height:23px;margin-top:6px;margin-bottom:6px;"
-                            name="myopac_holds_formats">
-                        </div>
-                    </td>
-                    <td width="136">
-                        <span name="hold_pickup_lib_span"></span>
-                        <span name="hold_pickup_lib"></span>
-                    </td>
-                    <td width="104">
-                        <input
-                            title="Enter a date (e.g. 10/21/2010)"
-                            class="hide_me" style="width:91px;"
-                            name="activate_box" type="text" />
-                            <span name="activate_date"></span>
-                    </td>
-                    <td width="106">
-                        <input title="Enter a date (e.g. 10/21/2010)"
-                            class="hide_me" style="width:91px;"
-                            name="hold_expires_box" type="text" />
-                            <span name="hold_expires"></span>
-                    </td>
-                    <td width="95">
-                        <select name="hold_active_sel"
-                            style="width:90px;" class="hide_me">
-                            <option value="f">Active</option>
-                            <option value="t">Suspended</option>
-                        </select>
-                        <span name="hold_active"></span>
-                    </td>
-                    <td width="110">
-                        <div name="acct_holds_status"
-                            style="margin-top:10px;margin-bottom:10px;">
-                            <span class="hide_me"
-                                name="hold_ready_expire"></span>
-                        </div>
-                    </td>
-                    <td width="62" align="right"
-                        style="text-align:right;padding-right:7px;">
-                        <a name="hold_edit_link" href="#">Edit</a>
-                        <a href="#" name="hold_save_link"
-                            class="hide_me">Save</a>
-                        <a href="#" name="hold_cancel_link"
-                            class="hide_me">Back</a>
-                    </td>
-                </tr>
-            </tbody>
-        </table>
-    </div>
-    <div id='holds_hist_table' class="hide_me">testing...</div>
-
-    <span id='myopac.holds.cancel.confirm' class='hide_me'>&myopac.holds.cancel.confirm;</span>
-    <span id='myopac.holds.freeze.confirm' class='hide_me'>&myopac.holds.freeze.confirm;</span>
-    <span id='myopac.holds.thaw.confirm' class='hide_me'>&myopac.holds.thaw.confirm;</span>
-    <span id='myopac.holds.thaw_date.confirm' class='hide_me'>&myopac.holds.thaw_date.confirm;</span>
-    <span id='myopac.holds.freeze.select_thaw' class='hide_me'>&myopac.holds.freeze.select_thaw;</span>
-
-    <table width='100%' id='myopac_holds_processing' class='hide_me'>
-        <tr><td>&myopac.holds.processing;</td></tr>
-    </table>
-   
-    <span class='hide_me' id='myopac_holds_cancel_verify'>
-    	&myopac.holds.verify;
-    </span>
-</div>
-<div id='myopac_holds_thaw_date_form' class='hide_me'>
-    <div id='myopac_holds_freeze_select_thaw'>
-        &myopac.holds.freeze.select_thaw;
-    </div>
-    <p>
-        <input size='10' maxlength='10'
-            type='text' id='myopac_holds_thaw_date_input' />
-    </p>
-    <p>
-        <button>&common.submit;</button>
-    </p>
-</div>
-[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
deleted file mode 100644
index 53c50d5..0000000
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
+++ /dev/null
@@ -1,421 +0,0 @@
-[%  WRAPPER "default/kcls-wire/parts/base.tt2" +
-        "default/kcls-wire/parts/myopac/base.tt2";
-    myopac_page = "main"  %]
-<div id='myopac_summary_div' style="padding:0px;">
-    <div id="acct_sum">
-        <div style="width:742px;float:left;">
-            <div class="header_middle">Account Summary</div>
-        </div>
-        <div id="myopac_sum_fines">
-            <div style="position:absolute;">
-                <div style="position:relative;top:-15px;left:-23px;">
-                    <img src="/images/acct_sum_fines_tl.png" />
-                </div>
-            </div>
-            <div style="position:absolute;">
-                <div style="position:relative;top:-15px;left:172px;">
-                    <img src="/images/acct_sum_fines_tr.png" />
-                </div>
-            </div>
-            <div style="position:absolute;">
-                <div style="position:relative;top:161px;left:-23px;">
-                    <img src="/images/acct_sum_fines_bl.png" />
-                </div>
-            </div>
-            <div style="position:absolute;">
-                <div style="position:relative;top:161px;left:172px;">
-                    <img src="/images/acct_sum_fines_br.png" />
-                </div>
-            </div>
-            Fines: <span id="myopac_sum_fines_bal">$0.00</span><br />
-            <a class="hide_me" href="#" id="pay_fines_btn1"><img
-                alt="Pay Fines"
-                onmouseover="this.src='/images/pay-fines-btn-hover.png';"
-                onmouseout="this.src='/images/pay-fines-btn.png';"
-                src="/images/pay-fines-btn.png"
-                style="position:relative;top:5px;" /></a>
-        </div>
-        <div style="width:662px;">
-            <div style="float:left;">
-                <div style="padding:10px 0px;" id="myopac_sum_name"></div>
-                <div class="acct_sum_row">
-                    <table width="100%" cellspacing="0" cellpadding="0">
-                        <tr>
-                            <td>
-                                Items Currently Checked out
-                                <span id="myopac_sum_checked" class="view_link">
-                                    (0)
-                                </span>
-                            </td>
-                            <td align="right" class="view_link">
-                                <a href="circs">View All</a>
-                            </td>
-                        </tr>
-                    </table>
-                </div>
-                <div class="acct_sum_row">
-                    <table width="100%" cellspacing="0" cellpadding="0">
-                        <tr>
-                            <td>
-                                Items Currently on Hold
-                                <span id="myopac_sum_holds" class="view_link">
-                                    (0)
-                                </span>
-                            </td>
-                            <td align="right" class="view_link">
-                                <a href="holds">View All</a>
-                            </td>
-                        </tr>
-                    </table>
-                </div>
-                <div class="acct_sum_row">
-                    <table width="100%" cellspacing="0" cellpadding="0">
-                        <tr>
-                            <td>
-                                Items ready for pickup
-                                <span id="myopac_sum_pickup" class="view_link">
-                                    (0)
-                                </span>
-                            </td>
-                            <td align="right" class="view_link">
-                                <a href="#">View All</a>
-                            </td>
-                        </tr>
-                    </table>
-                </div>
-                <div class="acct_sum_row" id="myopac_sum_fines_slim">
-                    <table width="100%" cellspacing="0" cellpadding="0">
-                        <tr>
-                            <td>Fees &amp; Fines</td>
-                            <td align="right" class="view_link">
-                                <a class="hide_me"
-                                    id="show_fines_link"
-                                    href="#">Show Overdue Materials</a>
-                            </td>
-                        </tr>
-                    </table>
-                </div>
-            </div>
-        </div>
-        <div class="clear-both"></div>
-        <div id='myopac_fines_div'>
-            <table width='100%' class='data_grid data_grid_center'>
-                <thead class='color_3'>
-                    <tr>
-                        <td colspan='3' style='padding: 6px'>
-                            <b>&myopac.fines.title;</b>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td width='33%'>&myopac.fines.owed;</td>
-                        <td width='33%'>&myopac.fines.paid;</td>
-                        <td width='33%'>&myopac.fines.balance;</td>
-                    </tr>
-                </thead>
-                <tbody id='myopac_fines_summary_tbody'>
-                    <tr id='myopac_fines_summary_loading'>
-                        <td>&myopac.fines.status;</td>
-                    </tr>
-                    <tr id='myopac_fines_summary_row' class='hide_me'>
-                        <td id='myopac_fines_summary_total' >&common.currency;</td>
-                        <td id='myopac_fines_summary_paid' >&common.currency;</td>
-                        <td id='myopac_fines_summary_balance' style='color:red;font-weight: bold;'>&common.currency;</td>
-                    </tr>
-                </tbody>
-            </table>
-        <!--
-        <div id='accrue_explanation' class='hide_me'>
-            <span>Transactions whose balances are marked with a</span>
-            <span style='color:red; font-weight: bold'>*</span>
-            <span>will continue to accrue fines until the checked out item is returned.</span>
-        </div>
-        -->
-        <!-- Table for circulation transactions only -->
-            <div id='myopac_circ_trans_div' class='hide_me'>
-                <br/><hr/><br/>
-                <table width='100%' class='data_grid data_grid_center'
-                    id='myopac_circ_trans_table'>
-                    <thead>
-                    <!--<tr><td colspan='10' style='padding: 6px'><b>&myopac.fines.overdue;</b></td></tr>-->
-                        <tr>
-                            <td colspan='10' style='padding: 6px'>
-                                <b>Fines</b>
-                            </td>
-                        </tr>
-                        <tr>
-                            <td>&common.title;</td>
-                            <td>&common.author;</td>
-                            <td>&myopac.fines.checkout;</td>
-                            <td>&myopac.fines.due;</td>
-                            <td>&myopac.fines.returned;</td>
-                            <td>&myopac.fines.balance;</td>
-                            <td align="center" nowrap="nowrap"
-                                style="white-space:nowrap;">
-                                <label for="pay_fines_box1">Pay Fines</label>
-                                <br />
-                                <input id="pay_fines_box1" checked="checked"
-                                    type="checkbox"
-                                    title="Click to (un)select all fines" />
-                            </td>
-                        </tr>
-                    </thead>
-                    <tbody id='myopac_circ_trans_tbody'>
-                        <tr id='myopac_circ_trans_row'>
-                            <td>
-                                <a class='classic_link' name='myopac_circ_trans_title'> </a>
-                            </td>
-                            <td name='myopac_circ_trans_author'> </td>
-                            <td name='myopac_circ_trans_start'> </td>
-                            <td name='myopac_circ_trans_due'> </td>
-                            <td name='myopac_circ_trans_finished'>
-                                <span style='color:red;'>&myopac.fines.accruing;</span>
-                            </td>
-                            <td>
-                                <span style='color: red; font-weight: bold;'
-                                    name='myopac_circ_trans_balance'>&common.currency;</span>
-                            </td>
-                            <td align="center">
-                                <input type="checkbox" checked="checked"
-                                    name="selector" title="pay this fine" />
-                            </td>
-                        </tr>
-                    </tbody>
-                </table>
-            </div>
-
-            <!-- Table for all non-circulation transactions -->
-            <div id='myopac_trans_div' class='hide_me'>
-                <br/>
-                <hr style="border-bottom:none;*height:0px;" color="#dcdbdb" />
-                <br/>
-                <table width='100%' class='data_grid data_grid_center'
-                    id='myopac_trans_table'>
-                    <thead>
-                        <tr>
-                            <td colspan='8' style='padding: 6px'>
-                                <b>&myopac.fines.other;</b>
-                            </td>
-                        </tr>
-                        <tr>
-                            <td width='16%'>&myopac.fines.time.start;</td>
-                            <td width='16%'>&myopac.fines.time.paid;</td>
-                            <td width='16%'>&myopac.fines.owed.initial;</td>
-                            <td width='16%'>&myopac.fines.paid.amount;</td>
-                            <td width='16%'>&myopac.fines.balance;</td>
-                            <td width='16%'>&myopac.fines.type;</td>
-                            <td width='4%' align="center" nowrap="nowrap"
-                                style="white-space:nowrap;">
-                                <label for="pay_fines_box2">Pay Fines</label>
-                                <br />
-                                <input id="pay_fines_box2" checked="checked"
-                                    type="checkbox"
-                                    title="Click to (un)select all fines" />
-                            </td>
-                        </tr>
-                    </thead>
-                    <tbody id='myopac_trans_tbody'>
-                        <tr id='myopac_trans_row'>
-                            <td name='myopac_trans_start'> </td>
-                            <td name='myopac_trans_last_payment'> </td>
-                            <td name='myopac_trans_init_amount'>
-                                &common.currency;
-                            </td>
-                            <td name='myopac_trans_total_paid'>
-                                &common.currency;
-                            </td>
-                            <td style='color:red; font-weight: bold;'>
-                                <span name='myopac_trans_balance_recur'
-                                    class='hide_me'> * </span>
-                                <span name='myopac_trans_balance'>
-                                    &common.currency;
-                                </span>
-                            </td>
-                            <td name='myopac_trans_bill_type'></td>
-                            <td align="center">
-                                <input type="checkbox" name='selector'
-                                    title='pay this fine' checked="checked" />
-                            </td>
-                        </tr>
-                    </tbody>
-                </table>
-            </div>
-            <a href="#"><img alt="Pay Fines"
-                onmouseover="this.src='/images/pay-fines-btn-hover.png';"
-                src="/images/pay-fines-btn.png"
-                style="position:relative;top:5px;" /></a>
-            <br/>
-        </div>
-    </div>
-    <div id="pay_fines_now" class="hide_me">
-        <table id='oils-selfck-cc-payment-table'>
-            <tbody>
-                <tr>
-                    <td><div style="width:129px;"></div></td>
-                    <td><div style="width:195px;"></div></td>
-                    <td><div style="width:324px;"></div></td>
-                </tr>
-                <tr>
-                    <td colspan='2'><strong>Billing Information</strong></td>
-                    <td rowspan='13' valign='top'>
-                        Selected fines you are paying for:
-                        <table cellpadding="0" cellspacing="5" border="0">
-                            <thead>
-                                <tr>
-                                    <td>
-                                        <strong>Name</strong>
-                                    </td>
-                                    <td>
-                                        <strong>Amount</strong>
-                                    </td>
-                                </tr>
-                            </thead>
-                            <tbody id="selectedFines">
-                            </tbody>
-                        </table>
-                        <br />
-                        <div id='oils-selfck-cc-payment-summary'>
-                            Total amount to pay:
-                            <strong>$<span></span></strong>
-                        </div>
-                        <br />
-                        Click <strong>Cancel</strong> to go back and (un)select
-                        other fines.
-                    </td>
-                </tr>
-                <tr>
-                    <td>First Name</td>
-                    <td><input jsId='oilsSelfckCCFName' /></td>
-                </tr>
-                <tr>
-                    <td>Last Name</td>
-                    <td><input jsId='oilsSelfckCCLName' /></td>
-                </tr>
-                <tr>
-                    <td>Street Address</td>
-                    <td><input jsId='oilsSelfckCCStreet' /></td>
-                </tr>
-                <tr>
-                    <td>City</td>
-                    <td><input jsId='oilsSelfckCCCity' /></td>
-                </tr>
-                <tr>
-                    <td>State or Province</td>
-                    <td><input jsId='oilsSelfckCCState' /></td>
-                </tr>
-                <tr>
-                    <td>ZIP or Postal Code</td>
-                    <td><input jsId='oilsSelfckCCZip' /></td>
-                </tr>
-                <tr>
-                  <td colspan='2'><strong>Credit Card Information</strong></td>
-                </tr>
-                <!-- Technically not needed since card type is derived from the CC number
-                <tr>
-                    <td>Type of Card</td>
-                    <td>
-                        <select jsId='oilsSelfckCCType' required='true'>
-                            <option value='VISA'>VISA</option>
-                            <option value='MasterCard'>MasterCard</option>
-                            <option value='American Express'>American Express</option>
-                        </select>
-                    </td>
-                </tr>
-                -->
-                <tr>
-                    <td>Credit Card #</td>
-                    <td><input jsId='oilsSelfckCCNumber' /></td>
-                </tr>
-                <tr>
-                    <td>
-                        <div style="position:absolute;">
-                            <div style="position:relative;left:80px;">
-                                <a href="#"><img
-                                    src="/images/question-mark.png" /></a>
-                            </div>
-                        </div>
-                        Security Code
-                    </td>
-                    <td>
-                        <input jsId='oilsSelfckCCCVV' />
-                    </td>
-                </tr>
-                <tr>
-                    <td>Exipration Month</td>
-                    <td>
-                        <select jsId='oilsSelfckCCMonth'>
-                            <option value='01' selected='selected'>January</option>
-                            <option value='02'>February</option>
-                            <option value='03'>March</option>
-                            <option value='04'>April</option>
-                            <option value='05'>May</option>
-                            <option value='06'>June</option>
-                            <option value='07'>July</option>
-                            <option value='08'>August</option>
-                            <option value='09'>September</option>
-                            <option value='10'>October</option>
-                            <option value='11'>November</option>
-                            <option value='12'>December</option>
-                        </select>
-                    </td>
-                </tr>
-                <tr>
-                    <td>Expiration Year</td>
-                    <td>
-                      <select jsId='oilsSelfckCCYear'>
-                        <option value='2011'>2011</option>
-                        <option value='2012'>2012</option>
-                        <option value='2013'>2013</option>
-                        <option value='2014'>2014</option>
-                        <option value='2015'>2015</option>
-                        <option value='2016'>2016</option>
-                        <option value='2017'>2017</option>
-                        <option value='2018'>2018</option>
-                        <option value='2019'>2019</option>
-                      </select>
-                    </td>
-                </tr>
-                <tr class="hide_me">
-                    <td>Edit Billing Address</td>
-                    <td>
-                        <input jsId='oilsSelfckEditDetails'/>
-                    </td>
-                </tr>
-                <tr>
-                    <td colspan='2' align="center">
-                        <button jsId='oilsSelfckCCSubmit'>
-                            Submit Payment
-                        </button>
-                        <button>
-                            Cancel
-                        </button>
-                    </td>
-                </tr>
-                <tr>
-                    <td colspan="3">
-                        <br />
-                        Important! You must have a printed receipt to be
-                        eligible for a refund on lost items (regulations allow
-                        for no exceptions).
-                        <br />
-                        <strong>
-                            To ensure your necessary receipt information is
-                            not lost, enter your email address above and a
-                            receipt will be emailed to you. Otherwise, make
-                            certain you have a printed receipt in hand before
-                            closing the payment receipt screen.
-                        </strong>
-                        <br />
-                        Refunds are not available for parts and pieces, overdue
-                        fines, or items that do not display a specific title in
-                        My Account. For a full list of refundable and
-                        non-refundable items, visit
-                        <a href="http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm">http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm</a><br /><br />
-                        This site uses VeriSign SSL encryption to ensure your
-                        privacy.
-                    </td>
-                </tr>
-            </tbody>
-        </table>
-    </div>
-</div>
-[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
deleted file mode 100644
index 94aea21..0000000
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
+++ /dev/null
@@ -1,777 +0,0 @@
-[%  WRAPPER "default/kcls-wire/parts/base.tt2" +
-        "default/kcls-wire/parts/myopac/base.tt2";
-    myopac_page = "prefs"  %]
-    <div id='myopac_prefs_div'>
-        <div id="acct_prefs_tabs"
-             style="padding-bottom: 12px;color:#666;">
-            <div style="float:left;">
-                <div class="align selected"
-                     id="prefs_info_lbl"><img src=
-                     "/images/sub_prefs_info_on.jpg" /></div>
-
-                <div class="align hide_me"
-                     id="prefs_info_link">
-                    <a href="#"><img src=
-                         "/images/sub_prefs_info_off.jpg" /></a>
-                </div>
-
-                <div class="align"
-                     id="prefs_notify_link">
-                    <a href="#"><img src=
-                         "/images/sub_prefs_notify_off.jpg" /></a>
-                </div>
-
-                <div class="align selected hide_me"
-                     id="prefs_notify_lbl"><img src=
-                     "/images/sub_prefs_notify_on.jpg" /></div>
-
-                <div class="align"
-                     id="prefs_search_link">
-                    <a href="#"><img src=
-                         "/images/sub_prefs_search_off.jpg" /></a>
-                </div>
-
-                <div class="align selected hide_me"
-                     id="prefs_search_lbl"><img src=
-                     "/images/sub_prefs_search_on.jpg" /></div>
-            </div>
-
-            <div style="float:right;width:65px;">
-                <div style="position:absolute">
-                    <div style="position:relative;top:75px;">
-                        <a id='acct_prefs_save'
-                             class='hide_me'
-                             href="#"><img alt="Save"
-                             src="/images/save-btn.png" /></a>
-                    </div>
-                </div>
-            </div>
-
-            <div class="clear-both"></div>
-        </div>
-
-        <div class="header_middle">
-            <span id="acct_prefs_header">
-                Account Information and Preferences
-            </span>
-            <span class="float-right">
-                <a class="hide_me"
-                    href="#">Export List</a>
-            </span>
-        </div>
-
-        <div class="clear-both normal-height"></div>
-
-        <table class="hide_me full-width" id="acct_search_main">
-            <tbody id='myopac_prefs_tbody'>
-                <tr id='myopac_prefs_loading'>
-                    <td colspan='3'><b>&myopac.loading;</b></td>
-                </tr>
-
-                <tr id='myopac_prefs_row'>
-                    <td width='20%'>&myopac.prefs.hits;</td>
-
-                    <td>
-                        <div style="position:absolute">
-                            <div style="position:relative;top:0px;left:55px;">
-                                <a href="#">
-                                <img alt="Search Hits Help"
-                                     src=
-                                     "/images/question-mark.png" /></a>
-                            </div>
-                        </div><select id='prefs_hits_per'
-                            style="position:relative;z-index:100;">
-                            <option value='5'>
-                                5
-                            </option>
-
-                            <option value='8'>
-                                8
-                            </option>
-
-                            <option value='10'>
-                                10
-                            </option>
-
-                            <option value='15'>
-                                15
-                            </option>
-
-                            <option value='20'>
-                                20
-                            </option>
-
-                            <option value='25'>
-                                25
-                            </option>
-
-                            <option value='50'>
-                                50
-                            </option>
-                        </select>
-                    </td>
-                </tr>
-
-                <tr>
-                    <td colspan="2"><label for="circHistStart">Keep history of
-                    checked out items?</label> <input type="checkbox"
-                           id="circHistStart" /></td>
-                </tr><!-- FONT size preference -->
-
-                <tr class="hide_me">
-                    <td>&myopac.prefs.font;</td>
-
-                    <td><select id='prefs_def_font'>
-                        <option value='regular'>
-                            &myopac.prefs.font.regular;
-                        </option>
-
-                        <option value='large'>
-                            &myopac.prefs.font.large;
-                        </option>
-                    </select></td>
-                </tr>
-
-                <tr class="hide_me">
-                    <td>&myopac.prefs.search.location;</td>
-                    <td>
-                        <div style='margin-bottom: 5px;'>
-                            <input type='checkbox' id='myopac_pref_home_lib' />
-                                 &myopac.prefs.search.home;
-                        </div>
-                        <select id='prefs_def_location'></select>
-                    </td>
-                </tr>
-
-                <tr class="hide_me">
-                    <td>&myopac.prefs.search.range;</td>
-
-                    <td><select id='prefs_def_range'>
-                        </select></td>
-                </tr>
-            </tbody>
-        </table><a href=
-        "http://www.kcls.org/usingthelibrary/catalog_help/library_elf.cfm"><u>Try
-        Library Elf-to manage library materials!</u></a>
-
-        <table class="hide_me"
-               id="acct_notify_main">
-            <tbody>
-                <tr class="hide_me">
-                    <td><span>&myopac.prefs.holds.notify;</span> <a class=
-                    'classic_link'
-                       href='#'>&common.help;</a></td>
-
-                    <td style="padding-left:15px;"><select id=
-                    'prefs_hold_notify'>
-                        <option value='phone:email'
-                                selected='selected'>
-                            &myopac.prefs.holds.both;
-                        </option>
-
-                        <option value='phone'>
-                            &myopac.prefs.holds.phone;
-                        </option>
-
-                        <option value='email'>
-                            &myopac.prefs.holds.email;
-                        </option>
-                    </select></td>
-                </tr>
-
-                <tr>
-                    <td style="padding-top:10px;"><strong>Pick Up Notice for
-                    Holds</strong><br />
-                    <input type="checkbox"
-                           id="opac.hold_notify.email"
-                           name="opac.hold_notify.email" /> <label for=
-                           "opac.hold_notify.email">Email</label><br />
-                    <input type="checkbox"
-                           id="opac.hold_notify.phone"
-                           name="opac.hold_notify.phone" /> <label for=
-                           "opac.hold_notify.phone">Phone</label>
-                           <b>(Temporarily phone notification will generate a
-                           mailed paper notice.)</b></td>
-                </tr>
-
-                <tr>
-                    <td style="padding-top:10px;"><strong>Expire Notice for
-                    Holds</strong><br />
-                    <input type="checkbox"
-                           id="notification.hold.expire.email"
-                           name="notification.hold.expire.email" /> <label for=
-                           "notification.hold.expire.email">Email</label></td>
-                </tr>
-
-                <tr>
-                    <td style="padding-top:10px;"><strong>Cancel Notice for
-                    Holds</strong><br />
-                    <input type="checkbox"
-                           id="notification.hold.cancel.email"
-                           name="notification.hold.cancel.email" /> <label for=
-                           "notification.hold.cancel.email">Email</label></td>
-                </tr>
-
-                <tr>
-                    <td style="padding-top:10px;"><strong>Overdue First
-                    Notice</strong><br />
-                    <input type="checkbox"
-                           id="notification.overdue.first.email"
-                           name="notification.overdue.first.email" />
-                           <label for=
-                           "notification.overdue.first.email">Email</label><br />
-                    <input type="checkbox"
-                           id="notification.overdue.first.phone"
-                           name="notification.overdue.first.phone" />
-                           <label for=
-                           "notification.overdue.first.phone">Phone</label>
-                           <b>(Temporarily phone notification will generate a
-                           mailed paper notice.)</b></td>
-                </tr>
-
-                <tr>
-                    <td style="padding-top:10px;"><strong>Courtesy
-                    Notice</strong><br />
-                    <input type="checkbox"
-                           id="notification.predue.email"
-                           name="notification.predue.email" /> <label for=
-                           "notification.predue.email">Email</label><br /></td>
-                </tr>
-            </tbody>
-        </table>
-
-        <div id="acct_info_main">
-            <div id='myopac.expired.alert'
-                 class='hide_me'
-                 style='margin-bottom: 20px;'>
-                <table class='data_grid'
-                       width='100%'>
-                    <tbody>
-                        <tr>
-                            <td width='100%'
-                                style='color:red;'>
-                                &myopac.summary.expired;</td>
-                        </tr>
-                    </tbody>
-                </table>
-            </div>
-
-            <div id='myopac.notes.div'
-                 class='hide_me'>
-                <table class='data_grid'
-                       width='100%'>
-                    <thead>
-                        <tr>
-                            <td colspan='2'>
-                            <b>&myopac.summary.notes;</b></td>
-                        </tr>
-                    </thead>
-
-                    <tbody id='myopac.notes.tbody'>
-                        <tr id='myopac.notes.tr'>
-                            <td><b name='title'></b> : <span name=
-                            'value'></span></td>
-                        </tr>
-                    </tbody>
-                </table><br />
-            </div>
-
-            <table width='70%'
-                   class='light_border data_grid'>
-                <tbody id='myopac_summary_tbody'>
-                    <tr>
-                        <td width='30%'
-                            class='color_4 light_border'>&common.name;</td>
-
-                        <td class='light_border'><span id=
-                        'myopac_summary_prefix'
-                              style='padding-right: 5px;'></span> <span id=
-                              'myopac_summary_first'
-                              style='padding-right: 5px;'></span> <span id=
-                              'myopac_summary_middle'
-                              style='padding-right: 5px;'></span> <span id=
-                              'myopac_summary_last'
-                              style='padding-right: 5px;'></span> <span id=
-                              'myopac_summary_suffix'></span></td>
-
-                        <td></td>
-                    </tr>
-
-                    <tr>
-                        <td class='color_4 light_border'>
-                        &myopac.summary.phone.day;</td>
-
-                        <td class='light_border'
-                            id='myopac_summary_dayphone'></td>
-
-                        <td class='light_border'><a href='#'
-                           class="hide_me"
-                           id='myopac_summary_phone1_change'
-                           style=
-                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
-                    </tr>
-
-                    <tr id='myopac_update_phone1_row'
-                        class='hide_me'>
-                        <td class='myopac_update_cell'
-                            colspan='3'>
-                            <span class='myopac_update_span'>
-                                Enter New &myopac.summary.phone.day;:
-                            </span>
-
-                            <input type='text' size='24' id='myopac_new_phone1' />
-                            <span class='myopac_update_span'>
-                                <button>
-                                    <span class='myopac_update_span'>
-                                        &common.submit;</span>
-                                </button>
-                            </span>
-                            <span class='myopac_update_span'>
-                                <button>
-                                    <span class='myopac_update_span'>
-                                        &common.cancel;</span>
-                                </button>
-                            </span>
-                        </td>
-                    </tr>
-
-                    <tr>
-                        <td class='color_4 light_border'>
-                        &myopac.summary.phone.evening;</td>
-
-                        <td class='light_border'
-                            id='myopac_summary_eveningphone'></td>
-
-                        <td class='light_border'><a href='#'
-                           class="hide_me"
-                           id='myopac_summary_phone2_change'
-                           style=
-                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
-                    </tr>
-
-                    <tr id='myopac_update_phone2_row'
-                        class='hide_me'>
-                        <td class='myopac_update_cell'
-                            colspan='3'><span class='myopac_update_span'>New
-                            &myopac.summary.phone.evening;:</span>
-                            <input type='text' size='24' id='myopac_new_phone2' />
-                            <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>&common.submit;</span></button></span>
-                            <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>&common.cancel;</span></button></span>
-                        </td>
-                    </tr>
-
-                    <tr>
-                        <td class='color_4 light_border'>
-                        &myopac.summary.phone.other;</td>
-
-                        <td class='light_border'
-                            id='myopac_summary_otherphone'></td>
-
-                        <td class='light_border'><a href='#'
-                           class="hide_me"
-                           id='myopac_summary_phone3_change'
-                           style=
-                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
-                    </tr>
-
-                    <tr id='myopac_update_phone3_row'
-                        class='hide_me'>
-                        <td class='myopac_update_cell'
-                            colspan='3'><span class='myopac_update_span'>Enter
-                            New &myopac.summary.phone.other;:</span>
-                            <input type='text' size='24' id='myopac_new_phone3' />
-                            <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>&common.submit;</span></button></span>
-                            <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>&common.cancel;</span></button></span>
-                        </td>
-                    </tr>
-
-                    <tr>
-                        <td class='color_4 light_border'>
-                            <div style="position:absolute">
-                                <div style=
-                                "position:relative;left:70px;top:-3px;">
-                                    <a href="#">
-                                    <img alt="Username Help"
-                                         src=
-                                         "/images/question-mark.png" /></a>
-                                </div>
-                            </div>&common.username;
-                        </td>
-
-                        <td class='light_border'
-                            id='myopac_summary_username'></td>
-
-                        <td class='light_border'><a href='#'
-                           class="hide_me"
-                           id='myopac_summary_username_change'
-                           style=
-                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
-                    </tr>
-
-                    <tr id='myopac_update_username_row'
-                        class='hide_me'>
-                        <td class='myopac_update_cell'
-                            colspan='3'><span class=
-                            'myopac_update_span'>&myopac.summary.username.enter;</span>
-                            <input type='text' size='24' id='myopac_new_username' />
-                            <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>&common.submit;</span></button></span>
-                            <span class='myopac_update_span'><button><span class=
-                                'myopac_update_span'>&common.cancel;</span></button></span>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='color_4 light_border'>
-                        &common.password;</td>
-                        <td class='light_border'
-                            id='myopac_summary_password'>
-                            &myopac.summary.password.text;</td>
-                        <td class='light_border'><a href='#'
-                           class="hide_me"
-                           id='myopac_summary_password_change'
-                           style=
-                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
-                    </tr>
-                    <tr id='myopac_update_password_row'
-                        class='hide_me'>
-                        <td class='myopac_update_cell'
-                            colspan='3'>
-                            <table>
-                                <tbody>
-                                    <tr>
-                                        <td>
-                                            <span class= 'myopac_update_span'>
-                                                &myopac.summary.password.current;
-                                            </span>
-                                        </td>
-
-                                        <td>
-                                            <input type='password'
-                                               size='24'
-                                               id='myopac_current_password' />
-                                           </td>
-                                    </tr>
-                                    <tr>
-                                        <td><span class=
-                                        'myopac_update_span'>&myopac.summary.password.new;</span></td>
-
-                                        <td><input type='password'
-                                               size='24'
-                                               id='myopac_new_password' />
-                                           </td>
-                                    </tr>
-
-                                    <tr>
-                                        <td><span class=
-                                        'myopac_update_span'>&myopac.summary.password.reenter;</span></td>
-
-                                        <td>
-                                            <input type='password'
-                                                size='24'
-                                                id='myopac_new_password2' />
-                                        </td>
-                                    </tr>
-                                </tbody>
-                            </table><span class=
-                            'myopac_update_span'><button><span class=
-                            'myopac_update_span'>&common.submit;</span></button></span>
-                            <span class='myopac_update_span'><button><span class='myopac_update_span'>
-                            &common.cancel;</span></button></span>
-                        </td>
-                    </tr>
-
-                    <tr>
-                        <td class='color_4 light_border'>
-                        &myopac.summary.email;</td>
-
-                        <td class='light_border'
-                            id='myopac_summary_email'></td>
-
-                        <td class='light_border'><a href='#'
-                           class="hide_me"
-                           id='myopac_summary_email_change'
-                           style=
-                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
-                    </tr>
-
-                    <tr id='myopac_update_email_row'
-                        class='hide_me'>
-                        <td class='myopac_update_cell' colspan='3'>
-                            <span class= 'myopac_update_span'>
-                                &myopac.summary.email.new;
-                            </span>
-                            <input type='text' size='24' id='myopac_new_email' />
-                            <span class='myopac_update_span'>
-                                <button>
-                                    <span class= 'myopac_update_span'>
-                                        &common.submit;</span>
-                                </button>
-                            </span>
-                            <span class='myopac_update_span'>
-                                <button>
-                                    <span class='myopac_update_span'>
-                                        &common.cancel;</span>
-                                </button>
-                            </span>
-                        </td>
-                    </tr>
-                    <tr class="hide_me">
-                        <td class='color_4 light_border'>
-                        &myopac.summary.id.primary;</td>
-
-                        <td class='light_border'
-                            id='myopac_summary_ident1'></td>
-
-                        <td></td>
-                    </tr>
-
-                    <tr>
-                        <td class='color_4 light_border'>
-                        &myopac.summary.barcode;</td>
-
-                        <td class='light_border'
-                            id='myopac_summary_barcode'></td>
-
-                        <td></td>
-                    </tr>
-
-                    <tr>
-                        <td class='color_4 light_border'>
-                        &myopac.summary.home;</td>
-                        <td class='light_border'
-                            id='myopac_summary_homelib'></td>
-                        <td><a href='#'
-                           class="hide_me"
-                           id='myopac_summary_home_change'
-                           style=
-                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
-                    </tr>
-                    <tr id='myopac_update_home_row'
-                        class='hide_me'>
-                        <td class='myopac_update_cell'
-                            colspan='3'>
-                            <span class='myopac_update_span'>
-                                New home library:</span>
-                            <select id='myopac_new_home'>
-                            </select>
-                            <span class='myopac_update_span'>
-                                <button>
-                                    <span class= 'myopac_update_span'>
-                                        &common.submit;</span>
-                                </button>
-                            </span>
-                            <span class='myopac_update_span'>
-                                <button>
-                                    <span class= 'myopac_update_span'>
-                                        &common.cancel;</span>
-                                </button>
-                            </span>
-                        </td>
-                    </tr>
-                    <tr class="hide_me">
-                        <td class='color_4 light_border'>
-                            &myopac.summary.genesis;
-                        </td>
-                        <td class='light_border'
-                            id='myopac_summary_create_date'></td>
-                        <td></td>
-                    </tr>
-                </tbody>
-            </table><br />
-            <hr style="border-bottom:none;*height:0px;" color="#DCDBDB" />
-            <br />
-
-            <table width='100%' class='light_border data_grid'>
-                <thead>
-                    <tr>
-                        <td>&myopac.summary.addresses;</td>
-
-                        <td id='myopac_pending_addr_td' class='hide_me'>
-                            <table cellpadding="0" cellspacing="0" border="0">
-                                <tr>
-                                    <td>&myopac.summary.addresses.pending;</td>
-
-                                    <td>
-                                        <a href="#"><img
-                                            alt="Address Help"
-                                            src="/images/question-mark.png" /></a>
-                                    </td>
-                                </tr>
-                            </table>
-                        </td>
-                    </tr>
-                </thead>
-                <tbody id='myopac_addr_tbody'>
-                    <tr id='myopac_addr_row' class='light_border'>
-                        <td>
-                            <table>
-                                <tr>
-                                    <td>&myopac.summary.address.type;</td>
-                                    <td name='myopac_addr_type'></td>
-                                </tr>
-
-                                <tr>
-                                    <td>&myopac.summary.address.street;</td>
-                                    <td name='myopac_addr_street'></td>
-                                </tr>
-                                <tr>
-                                    <td>&myopac.summary.address.street;</td>
-                                    <td name='myopac_addr_street2'></td>
-                                </tr>
-
-                                <tr>
-                                    <td>&myopac.summary.address.city;</td>
-                                    <td name='myopac_addr_city'></td>
-                                </tr>
-
-                                <tr>
-                                    <td>&myopac.summary.address.county;</td>
-                                    <td name='myopac_addr_county'></td>
-                                </tr>
-
-                                <tr>
-                                    <td>&myopac.summary.address.state;</td>
-                                    <td name='myopac_addr_state'></td>
-                                </tr>
-
-                                <tr>
-                                    <td>&myopac.summary.address.country;</td>
-                                    <td name='myopac_addr_country'></td>
-                                </tr>
-
-                                <tr>
-                                    <td>&myopac.summary.address.zip;</td>
-                                    <td name='myopac_addr_zip'></td>
-                                </tr>
-                                <tr>
-                                    <td name='myopac_addr_edit_td'
-                                        colspan='2' class='hide_me'>
-                                        <a class='classic_link'
-                                            name='myopac_addr_edit_link'
-                                            href='#'>Edit Address</a>
-                                    </td>
-                                </tr>
-                            </table>
-                        </td>
-                        <td class='hide_me'
-                            name='myopac_pending_addr_td'>
-                            <table>
-                                <tr>
-                                    <td>&myopac.summary.address.type;</td>
-
-                                    <td><input name=
-                                    'myopac_pending_addr_type' /></td>
-                                </tr>
-                                <tr>
-                                    <td>
-                                    &myopac.summary.address.street;</td>
-
-                                    <td><input name=
-                                    'myopac_pending_addr_street' /></td>
-                                </tr>
-                                <tr>
-                                    <td>&myopac.summary.address.street;</td>
-                                    <td>
-                                        <input name='myopac_pending_addr_street2' />
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td>&myopac.summary.address.city;</td>
-                                    <td>
-                                        <input name='myopac_pending_addr_city' />
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td>&myopac.summary.address.county;</td>
-
-                                    <td>
-                                        <input name='myopac_pending_addr_county' />
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td>&myopac.summary.address.state;</td>
-                                    <td>
-                                        <input name='myopac_pending_addr_state' />
-                                    </td>
-                                </tr>
-
-                                <tr>
-                                    <td>&myopac.summary.address.country;</td>
-
-                                    <td>
-                                        <input name='myopac_pending_addr_country' />
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td>&myopac.summary.address.zip;</td>
-                                    <td><input name=
-                                    'myopac_pending_addr_zip' /></td>
-                                </tr>
-                                <tr>
-                                    <td name='myopac_addr_edit_td' colspan='2'>
-                                        <a class='classic_link'
-                                            name='myopac_pending_addr_edit_link'
-                                            href='#'>Save Changes</a>
-                                        <a style='padding-left:10px;'
-                                            class='classic_link'
-                                            name='myopac_pending_addr_del_link'
-                                            href='#'>Discard Pending Address</a>
-                                    </td>
-                                </tr>
-                            </table>
-                        </td>
-                    </tr>
-                </tbody>
-            </table>
-        </div>
-        <div class='hide_me' id='myopac_username_error'>
-            &myopac.summary.username.error;
-        </div>
-        <div class='hide_me' id='myopac_username_dup'>
-            &myopac.summary.username.dup;
-        </div>
-        <div class='hide_me' id='myopac_username_success'>
-            &myopac.summary.username.success;
-        </div>
-        <div class='hide_me' id='myopac_username_failure'>
-            &myopac.summary.username.failure;
-        </div>
-        <div class='hide_me' id='myopac_email_error'>
-            &myopac.summary.email.error;
-        </div>
-        <div class='hide_me' id='myopac_email_success'>
-            &myopac.summary.email.success;
-        </div>
-        <div class='hide_me' id='myopac_email_failure'>
-            &myopac.summary.email.failed;
-        </div>
-        <div class='hide_me' id='myopac_password_error'>
-            &myopac.summary.password.error;
-        </div>
-        <div class='hide_me' id='myopac_password_success'>
-            &myopac.summary.password.success;
-        </div>
-        <div class='hide_me' id='myopac_password_failure'>
-            &myopac.summary.password.failure;
-        </div>
-        <span class='hide_me' id= 'myopac_invalid_username'>
-            &myopac.summary.username.invalid;
-        </span>
-        <span class='hide_me' id='myopac_addr_changes_saved'>
-            Address Saved
-        </span>
-        <div class='hide_me' id='prefs_update_success'>
-            &myopac.prefs.save.success;
-        </div>
-        <div class='hide_me' id='prefs_update_failure'>
-            &myopac.prefs.save.failed;
-        </div>
-        <span class='hide_me' id='myopac_pref_hold_notify_alert'>
-            &myopac.prefs.help;
-        </span>
-    </div>
-[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/place_hold.tt2 b/Open-ILS/web/templates/default/kcls-wire/place_hold.tt2
deleted file mode 100644
index 2bf000a..0000000
--- a/Open-ILS/web/templates/default/kcls-wire/place_hold.tt2
+++ /dev/null
@@ -1,15 +0,0 @@
-[%  WRAPPER "default/kcls-wire/parts/base.tt2";
-    INCLUDE "default/kcls-wire/parts/topnav.tt2";
-    ctx.page_title = "Place Hold" %]
-    <div id="search-wrapper">
-        [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
-        [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
-    </div>
-    <div id="content-wrapper">
-        <div id="main-content">
-            <div class="common-full-pad"></div>	
-            [% INCLUDE "default/kcls-wire/parts/place_hold.tt2" %]
-            <div class="common-full-pad"></div>	
-        </div>
-    </div>
-[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/record.tt2 b/Open-ILS/web/templates/default/kcls-wire/record.tt2
deleted file mode 100644
index 59d2ef8..0000000
--- a/Open-ILS/web/templates/default/kcls-wire/record.tt2
+++ /dev/null
@@ -1,14 +0,0 @@
-[%  WRAPPER "default/kcls-wire/parts/base.tt2";
-    INCLUDE "default/kcls-wire/parts/topnav.tt2";
-    ctx.page_title = "Record Detail" %]
-    <div id="search-wrapper">
-        [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
-        [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
-    </div>
-    <div id="content-wrapper">
-        <div id="main-content">
-            [% INCLUDE "default/kcls-wire/parts/record/body.tt2" %]
-            <div class="common-full-pad"></div>	
-        </div>
-    </div>
-[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/results.tt2 b/Open-ILS/web/templates/default/kcls-wire/results.tt2
deleted file mode 100644
index e281aac..0000000
--- a/Open-ILS/web/templates/default/kcls-wire/results.tt2
+++ /dev/null
@@ -1,60 +0,0 @@
-[%  WRAPPER "default/kcls-wire/parts/base.tt2";
-    INCLUDE "default/kcls-wire/parts/topnav.tt2";
-    ctx.page_title = "Search Results" %]
-    <div id="search-wrapper">
-        [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
-        [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
-    </div>
-    <div id="content-wrapper">
-        <div id="results_header_bar"><!-- XXX give #results_header_bar its own file -->
-            <div id="results_header_inner">
-                <div class="results_header_btns">
-                    <a href="index.xml"><img alt="Another Search"
-                        src="/images/another_search.png"
-                        onmouseover="this.src='/images/another_search_hover.png';"
-                        onmouseout="this.src='/images/another_search.png';" /></a>
-                </div>
-                <div class="results_header_btns">
-                    <a href="advanced"><img alt="Advanced Search"
-                        src="/images/adv_search.png"
-                        onmouseover="this.src='/images/adv_search_hover.png';"
-                        onmouseout="this.src='/images/adv_search.png';" /></a>
-                </div>
-                <div class="results_header_btns cached_list_div">
-                    <a href="#" class="hide_me" id="cacheListLink"><img
-                        alt="View My List"
-                        src="/images/view_my_list.png"
-                        onmouseover="this.src='/images/view_my_list_hover.png';"
-                        onmouseout="this.src='/images/view_my_list.png';" /></a>
-                </div>
-                <div class="results_header_div"></div>
-                <div class="results_header_lbl">Sort by</div>
-        <!--#if expr="$OILS_PAGE='rresult.xml' || $OILS_PAGE='mresult.xml'"-->
-        <!--#include virtual="result/filtersort.xml" -->
-        <!--#endif -->
-                <div class="results_header_div"></div>
-                <div class="results_header_lbl">View</div>
-                <select class="results_header_sel">
-                    <option>Simple</option>
-                    <option>Detailed</option>
-                </select>
-                <div class="results_header_div"></div>
-                <input type="checkbox" id="limit_to_available" />
-                <label for="limit_to_available" class="results_header_lbl">
-                    Limit to available items
-                </label>
-                <div class="clear-both"></div>
-            </div>
-        </div>
-        <div id="main-content">
-            <div id="tehResultsPage">
-                [% INCLUDE "default/kcls-wire/parts/result/header.tt2" %]
-                <div id="rresults_page">
-                    [% INCLUDE "default/kcls-wire/parts/result/table.tt2" %]
-                    [% INCLUDE "default/kcls-wire/parts/result/lowhits.tt2" %]
-                </div>
-            </div>
-            <div class="common-full-pad"></div>    
-        </div>
-    </div>
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac/base.tt2 b/Open-ILS/web/templates/default/opac-poc/base.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/base.tt2
rename to Open-ILS/web/templates/default/opac-poc/base.tt2
diff --git a/Open-ILS/web/templates/default/opac/common.tt2 b/Open-ILS/web/templates/default/opac-poc/common.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/common.tt2
rename to Open-ILS/web/templates/default/opac-poc/common.tt2
diff --git a/Open-ILS/web/templates/default/opac/home.tt2 b/Open-ILS/web/templates/default/opac-poc/home.tt2
similarity index 100%
copy from Open-ILS/web/templates/default/opac/home.tt2
copy to Open-ILS/web/templates/default/opac-poc/home.tt2
diff --git a/Open-ILS/web/templates/default/opac/login.tt2 b/Open-ILS/web/templates/default/opac-poc/login.tt2
similarity index 100%
copy from Open-ILS/web/templates/default/opac/login.tt2
copy to Open-ILS/web/templates/default/opac-poc/login.tt2
diff --git a/Open-ILS/web/templates/default/opac/marc_attrs.tt2 b/Open-ILS/web/templates/default/opac-poc/marc_attrs.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/marc_attrs.tt2
rename to Open-ILS/web/templates/default/opac-poc/marc_attrs.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/_links.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/_links.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/_links.tt2
rename to Open-ILS/web/templates/default/opac-poc/myopac/_links.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/bookbags.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/bookbags.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/bookbags.tt2
rename to Open-ILS/web/templates/default/opac-poc/myopac/bookbags.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/circs.tt2
similarity index 100%
copy from Open-ILS/web/templates/default/opac/myopac/circs.tt2
copy to Open-ILS/web/templates/default/opac-poc/myopac/circs.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/fines.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/fines.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/fines.tt2
rename to Open-ILS/web/templates/default/opac-poc/myopac/fines.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/holds.tt2
similarity index 100%
copy from Open-ILS/web/templates/default/opac/myopac/holds.tt2
copy to Open-ILS/web/templates/default/opac-poc/myopac/holds.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/main.tt2
similarity index 100%
copy from Open-ILS/web/templates/default/opac/myopac/main.tt2
copy to Open-ILS/web/templates/default/opac-poc/myopac/main.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/prefs.tt2
similarity index 100%
copy from Open-ILS/web/templates/default/opac/myopac/prefs.tt2
copy to Open-ILS/web/templates/default/opac-poc/myopac/prefs.tt2
diff --git a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2 b/Open-ILS/web/templates/default/opac-poc/myopac/update_email.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/myopac/update_email.tt2
rename to Open-ILS/web/templates/default/opac-poc/myopac/update_email.tt2
diff --git a/Open-ILS/web/templates/default/opac/place_hold.tt2 b/Open-ILS/web/templates/default/opac-poc/place_hold.tt2
similarity index 100%
copy from Open-ILS/web/templates/default/opac/place_hold.tt2
copy to Open-ILS/web/templates/default/opac-poc/place_hold.tt2
diff --git a/Open-ILS/web/templates/default/opac/record.tt2 b/Open-ILS/web/templates/default/opac-poc/record.tt2
similarity index 100%
copy from Open-ILS/web/templates/default/opac/record.tt2
copy to Open-ILS/web/templates/default/opac-poc/record.tt2
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac-poc/results.tt2
similarity index 100%
copy from Open-ILS/web/templates/default/opac/results.tt2
copy to Open-ILS/web/templates/default/opac-poc/results.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2 b/Open-ILS/web/templates/default/opac/advanced.tt2
similarity index 76%
rename from Open-ILS/web/templates/default/kcls-wire/advanced.tt2
rename to Open-ILS/web/templates/default/opac/advanced.tt2
index aec0eec..6479a53 100644
--- a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
+++ b/Open-ILS/web/templates/default/opac/advanced.tt2
@@ -1,8 +1,8 @@
-[%  WRAPPER "default/kcls-wire/parts/base.tt2";
-    INCLUDE "default/kcls-wire/parts/topnav.tt2";
+[%  WRAPPER "default/opac/parts/base.tt2";
+    INCLUDE "default/opac/parts/topnav.tt2";
     ctx.page_title = "Advanced Search" %]
     <div id="search-wrapper">
-        [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/utils.tt2" %]
         <div id="adv_search_parent">
             <div id="adv_search_tabs">
                 <a href="#" alt="Advanced Search" id="adv_search"
@@ -17,7 +17,7 @@
     <div id="content-wrapper">
         <div id="main-content">
             <div class="advanced_div">
-            [% INCLUDE "default/kcls-wire/parts/advanced/search.tt2" %]
+            [% INCLUDE "default/opac/parts/advanced/search.tt2" %]
             </div>
             <div class="common-full-pad"></div>	
         </div>
diff --git a/Open-ILS/web/templates/default/opac/home.tt2 b/Open-ILS/web/templates/default/opac/home.tt2
index 03b2ad1..f6c4ea5 100644
--- a/Open-ILS/web/templates/default/opac/home.tt2
+++ b/Open-ILS/web/templates/default/opac/home.tt2
@@ -1,24 +1,15 @@
-[% ctx.page_title = "Home" %]
-
-[% BLOCK html_head %]
-<style>
-    #home_div { text-align: center; width: 100%; margin-top: 30px;}
-</style>
-[% END %]
-
-[% WRAPPER "default/opac/base.tt2" %]
-[% PROCESS "default/opac/common.tt2" %]
-
-<div id='home_div'>
-    <img src='/images/eg_logo.jpg'/>
-    <br/><br/>
-    <form action='./results' method='GET'>
-        <input type='text' name='query' size='50' value='[% query %]'/>
-        [% PROCESS build_org_selector name='loc' %]
-        <input type='submit' value='[% l('Go!') %]'/>
-        <input type='hidden' name='page' value='0'/>
-    </form>
-</div>
-
-
+[%  WRAPPER "default/opac/parts/base.tt2";
+    INCLUDE "default/opac/parts/topnav.tt2";
+    ctx.page_title = "Home" %]
+    <div id="search-wrapper">
+        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content">
+            <div class="common-full-pad"></div>
+            [% INCLUDE "default/opac/parts/homesearch.tt2" %]
+            <div class="common-full-pad"></div>	
+        </div>
+    </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/login.tt2 b/Open-ILS/web/templates/default/opac/login.tt2
index 1bae958..3b2e392 100644
--- a/Open-ILS/web/templates/default/opac/login.tt2
+++ b/Open-ILS/web/templates/default/opac/login.tt2
@@ -1,32 +1,14 @@
-[% BLOCK html_head %]
-<style>
-</style>
-[% END %]
-
-[% 
-    USE CGI;
-    WRAPPER "default/opac/base.tt2"; 
-    ctx.page_title = "Login";
-%]
-
-<div style='width:400px; text-align:center; border: 1px solid #888'>
-    <form method='POST'>
-        <table>
-            <tr>
-                <td>Username or Barcode</td>
-                <td><input name='username' type='text'/></td>
-            </tr>
-            <tr>
-                <td>Password</td>
-                <td><input name='password' type='password'/></td>
-            </tr>
-            <tr>
-                <td colspan='2' style='text-align:center'>
-                    <input type='submit'/>
-                </td>
-            </tr>
-        </table>
-        <input type='hidden' name='redirect_to' value='[% CGI.param('redirect_to') || ctx.referer | replace('^http:', 'https:') %]'/>
-    </form>
-</div>
+[%  WRAPPER "default/opac/parts/base.tt2";
+    INCLUDE "default/opac/parts/topnav.tt2";
+    ctx.page_title = "Account Login" %]
+    <div id="search-wrapper">
+        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content">
+            [% INCLUDE "default/opac/parts/login/form.tt2" %]
+            <div class="clear-both very-big-height"></div>	
+        </div>
+    </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 5f08d2e..d14f7ff 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -1,77 +1,179 @@
-[% BLOCK html_head %]
-<style>
-    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
-    table { border-collapse: collapse; }
-    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
-    #action_div { width: 95%; }
-    .renew-summary { float:left; padding-right: 10px;}
-    #action-buttons { float:right; }
-    .circ-table-odd { background-color:#ded; }
-    .failure-text { font-weight: bold; color: red; }
-    #circ-form { margin-top: 20px; }
-</style>
-[% END %]
-
-[% PROCESS "default/opac/common.tt2" %]
-[% WRAPPER "default/opac/base.tt2" %]
-[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "circs" %]
-
-[% IF ctx.circs.size == 0 %]
-<b>No Items Checked Out</b>
-[% STOP; END %]
-
-<form method='POST' id='circ-form'>
-    <div id='action_div'>
-        [% IF ctx.success_renewals > 0 %]
-            <div class='renew-summary'><b>Successfully renewed [% ctx.success_renewals %] items.</b></div>
-        [% END %]
-        [% IF ctx.failed_renewals > 0 %]
-            <div class='renew-summary'><b>Failed to renew [% ctx.failed_renewals %] items.</b></div>
-        [% END %]
-        <div id='action-buttons'>
-            <button type='submit' value='renew' name='action'>Renew Selected</button>
-            <button type='submit' value='renew_all' name='action'>Renew All</button>
+[%  WRAPPER "default/opac/parts/base.tt2" +
+        "default/opac/parts/myopac/base.tt2";
+    myopac_page = "circs"  %]
+<div id='myopac_checked_div' style="padding:0px;">
+    <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;">
+        <div class="align selected" id="checked_label">
+            <img src="/images/sub_checked_out_on.jpg" />
+        </div>
+        <div class="align" id="checked_hist_link">
+            <a class="" href="#"><img
+                src="/images/sub_checked_hist_off.jpg" /></a>
         </div>
+        <div class="align hide_me" id="checked_link">
+            <a href="#">
+                <img src="/images/sub_checked_out_off.jpg" />
+            </a>
+        </div>
+        <div class="align selected hide_me" id="checked_hist_label">
+            <img src="/images/sub_checked_hist_on.jpg" />
+        </div>    
+        <div class="clear-both"></div>
+    </div>
+    
+    <div class="header_middle">
+        <span id="acct_checked_header" style="float:left;">
+            Current Items Checked Out
+        </span>
+        <span style="float:right;">
+            <a class="hide_me" href="#">Export List</a>
+        </span>
     </div>
-    <table>
-        <thead>
+    <div class="clear-both"></div>
+    <div id='checked_main'>
+        <table cellpadding='0' cellspacing='0' border='0'
+            style="padding:8px 0px 6px 0px;">
             <tr>
-                <th>Title</th>
-                <th>Author</th>
-                <th>Due Date</th>
-                <th>Renewals Remaining</th>
-                <th>Select</th>
+                <td>
+                    <a href="#">Renew Selected Titles</a>
+                </td>
+                <td style="padding-left:9px;">
+                    <a class="hide_me" href="#"><img
+                        alt="Save"
+                        src="/images/save-btn.png" /></a>
+                </td>
+                <td style="padding-left:5px;">
+                    <a href="#"><img alt="Renewing Help"
+                        src="/images/question-mark.png" /></a>
+                </td>
             </tr>
-        </thead>
-        <tbody>
-            [% FOR circ IN ctx.circs %]
-                [% attrs = {marc_xml => circ.marc_xml}; %]
-                [% PROCESS get_marc_attrs args=attrs; %]
-
-                <tr [% IF loop.count % 2 == 1 %] class='circ-table-odd' [% END %]>
-                    <td><a href='../record/[% circ.circ.target_copy.call_number.record.id %]'>[% attrs.title %]</a></td>
-                    <td><a href='../results?query=au:[% attrs.author | url %]'>[% attrs.author %]</a></td>
-                    <td>[% date.format(ctx.parse_datetime(circ.circ.due_date),'%Y-%m-%d') %]</td>
-                    <td><em>[% circ.circ.renewal_remaining %]</em></td>
-                    <td><input name='circ' value='[% circ.circ.id %]' type='checkbox' 
-                        [% IF circ.circ.renewal_remaining < 1 %] disabled='disabled' [% END %]/></td>
-                </tr>
-
-                [% IF circ.renewal_response and circ.renewal_response.textcode != 'SUCCESS' %]
-                <tr [% IF loop.count % 2 == 1 %] class='circ-table-odd' [% END %]>
-                    <td colspan='0'>
-                        <div class='failure-text'>
-                            [% circ.renewal_response.textcode %] 
-                            [% IF circ.renewal_response.payload.fail_part and circ.renewal_response.payload.fail_part != circ.renewal_response.textcode %]
-                                [% circ.renewal_response.payload.fail_part %]
-                            [% END %]
-                        </div>
+        </table>
+        <table id="acct_checked_main_header" cellpadding='0' cellspacing='0'
+            border='0'>
+            <tr>
+                <td width="1%" style="padding-left:10px;">
+                    <input type="checkbox" id="check_all_checked" />
+                </td>
+                <td width="40%" style="padding-left:5px;">
+                    <span title="Click to sort" style="cursor:pointer;">
+                        Title
+                    </span> /
+                    <span title="Click to sort" style="cursor:pointer;">
+                        Author
+                    </span>
+                </td>
+                <td width="8%" style="padding-right:5px;" align="center">
+                    <span title="Click to sort" style="cursor:pointer;">
+                        Renews<br />Left
+                    </span>
+                </td>
+                <td width="13%" style="padding-left:5px;">
+                    <span title="Click to sort" style="cursor:pointer;">Due Date
+                    </span>
+                </td>
+                <td width="16%">
+                    <span title="Click to sort" style="cursor:pointer;">barcode</span>
+                </td>
+                <td width="22%">
+                    <span title="Click to sort" style="cursor:pointer;">call number</span>
+                </td>
+            </tr>
+        </table>
+   
+        <div id="checked_temp_parent">
+            <div id="acct_checked_temp">
+                <table cellpadding='0' cellspacing='0' border='0'
+                    style="margin-top:5px;">
+                    <tr>
+                        <td width="1%" style="padding-left:10px;" valign="top">
+                            <input type="checkbox" name="check_all_checked" />
+                        </td>
+                        <td width="40%"
+                            style="padding-left:5px;padding-bottom:10px;"
+                            name="author">
+                            <a href="#" name="title"></a>
+                        </td>
+                        <td width="8%" name="renewals" align="center"></td>
+                        <td width="13%" style="padding-left:5px;"
+                            name="due_date"></td>
+                        <td width="16%" name="barcode"></td>
+                        <td width="22%" name="call_number"></td>
+                    </tr>
+                </table>
+            </div>
+        </div>
+    </div>
+    <div id='checked_hist' class="hide_me" style="padding-top:8px;">
+        <table id="acct_checked_hist_header" cellpadding='0' cellspacing='0'
+            border='0' width='100%'>
+            <tr>
+                <td width="45%" style="padding-left:15px;">
+                    <span title="Click to sort"
+                        style="cursor:pointer;">Title</span> /
+                    <span title="Click to sort"
+                        style="cursor:pointer;">Author</span>
+                </td>
+                <td width="22%"
+                    style="white-space:nowrap;padding-left:5px;">
+                    <span title="Click to sort"
+                        style="cursor:pointer;">Call Number</span>
+                </td>
+                <td width="11%">
+                    <span title="Click to sort"
+                        style="cursor:pointer;">Checkout</span>
+                </td>
+                <td width="11%">
+                    <span title="Click to sort"
+                        style="cursor:pointer;">Due Date</span>
+                </td>
+                <td width="11%">
+                    <span title="Click to sort"
+                        style="cursor:pointer;">Returned</span>
+                </td>
+            </tr>
+        </table>
+        <table cellpadding='0' cellspacing='0' border='0'
+            style="margin-top:5px;" width="100%">
+            <tbody id="acct_checked_hist_parent">
+                <tr id="acct_checked_hist_temp">
+                    <td width="45%"
+                        style="padding-left:15px;padding-bottom:10px;">
+                        <a href="#" name="title"></a> /
+                        <span name="author"></span>
                     </td>
+                    <td width="22%" style="padding-left:5px;"
+                        name="call_number"></td>
+                    <td width="11%" name="checkout"></td>
+                    <td width="11%" name="due_date"></td>
+                    <td width="11%" name="returned"
+                        nowrap="nowrap" style="white-space:nowrap;"></td>
                 </tr>
-                [% END %]
-            [% END %]
-        </tbody>
-    </table>
-</form>
-
+            </tbody>
+        </table>
+    </div>
+    <div id='non_cat_circs_div' class='hide_me'>
+        <br/>
+        <div style='text-align: center'><b>&myopac.common.other.circ;</b></div>
+        <table class='data_grid' width='100%'>
+            <thead>
+                <tr>
+                    <td>&myopac.checked.circ.lib;</td>
+                    <td>&myopac.checked.item.type;</td>
+                    <td>&myopac.checked.circ.time;</td>
+                </tr>
+            </thead>
+            <tbody id='non_cat_circs_tbody'>
+                <tr id='non_cat_circs_row'>
+                    <td name='circ_lib'/>
+                    <td name='item_type'/>
+                    <td name='circ_time'/>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+    <div id='myopac_renew_success' class='hide_me'>&myopac.checked.renew.success;</div>
+    <span class='hide_me' id='myopac_renew_confirm'>&myopac.checked.renew.confirm;</span>
+    <span class='hide_me' id='myopac_renew_fail'>&myopac.checked.renew.fail;</span>
+   <span class='hide_me' id='myopac_renew_fail2'>&myopac.checked.renew.fail2;</span>
+</div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index ce09725..4ed8e95 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -1,94 +1,204 @@
-[% BLOCK html_head %]
-<style>
-    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
-    table { border-collapse: collapse; }
-    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
-    table tr:nth-child(odd) { background-color:#ded; }
-    #action_div { width: 95%; }
-    #action-buttons { float:right; }
-</style>
-[% END %]
-
-[%  PROCESS "default/opac/common.tt2";
-    WRAPPER "default/opac/base.tt2";
-    INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "holds" %]
-
-[% IF ctx.holds.size == 0 %]
-<b>No Items On Hold</b>
-[% STOP; END %]
-
-<form method='POST'>
-
-    <div id='action_div'>
-        <div id='action-buttons'>
-            <select name='action'>
-                <option value='cancel'>Cancel Selected</option>
-                <option value='cancel_all'>Cancel All</option>
-                <option value='suspend'>Suspend Selected</option>
-                <option value='suspend_all'>Suspend All</option>
-                <option value='activate'>Activate Selected</option>
-                <option value='activate_all'>Activate All</option>
-            </select>
-            <input type='Submit' value='Go'/>
+[%  WRAPPER "default/opac/parts/base.tt2" +
+        "default/opac/parts/myopac/base.tt2";
+    myopac_page = "holds"  %]
+<div id='myopac_holds_div'>
+    <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;">
+        <div class="align selected" id="holds_label">
+            <img src="/images/sub_holds_on.jpg" />
+        </div>
+        <div class="align hide_me" id="holds_hist_link">
+            <a href="#"><img
+                src="/images/sub_holds_hist_off.jpg" /></a>
         </div>
+        <div class="align hide_me" id="holds_link">
+            <a href="#"><img
+                src="/images/sub_holds_off.jpg" /></a>
+        </div>
+        <div class="align selected hide_me" id="holds_hist_label">
+            <img src="/images/sub_holds_hist_on.jpg" />
+        </div>	
+        <div class="clear-both"></div>
+    </div>
+    <div class="header_middle">
+        <span id="acct_holds_header" style="float:left;">
+            Current Items on Hold
+        </span>
+        <span style="float:right;">
+            <a class="hide_me" href="#">Export List</a>
+        </span>
     </div>
-    <table>
-        <thead>
+    <div class="clear-both"></div>
+    <div id='holds_main'>
+        <table cellpadding='0' cellspacing='0' border='0'
+            style="padding:8px 0px 6px 0px;">
             <tr>
-                <th>Title</th>
-                <th>Author</th>
-                <th>Formats</th>
-                <th>Pickup Location</th>
-                <th>Status</th>
-                <th>Active</th>
-                <th>Activate on...</th>
-                <th>Expiration Date</th>
-                <th>Select</th>
+                <td width="1">
+                    <select id="acct_holds_actions">
+                        <option id='myopac_holds_actions_none' value=''>
+                        -- &myopac.holds.actions; --
+                        </option>
+                        <option value='freeze'>
+                            &myopac.holds.freeze_selected;
+                        </option>
+                        <option value='thaw'>
+                            &myopac.holds.thaw_selected;
+                        </option>
+                        <option value='thaw_date'>
+                            &myopac.holds.thaw_date_selected;
+                        </option>
+                        <option value='cancel'>
+                            &myopac.holds.cancel_selected;
+                        </option>
+                    </select>
+                </td>
+                <td width="1" style="padding-left:9px;">
+                    <a href="#"><img
+                        alt="Save"
+                        src="/images/save-btn.png" /></a>
+                </td>
+                <td width="1" style="padding-left:5px;">
+                    <a href="#"><img
+                        alt="Holds Help"
+                        src="/images/question-mark.png" /></a>
+                </td>
+                <td align="right">
+                    <select class="hide_me" id="holds_sort">
+                        <option value="">-- Sort By --</option>
+                        <option value="title">Title</option>
+                        <option value="pickup">PickUp Location</option>
+                        <option value="status">Status</option>
+                    </select>
+                </td>
             </tr>
-        </thead>
-        <tbody>
-            [% FOR hold IN ctx.holds %]
-                [% attrs = {marc_xml => hold.marc_xml}; %]
-                [% PROCESS get_marc_attrs args=attrs; %]
+        </table>
+        <table id="acct_holds_main_header" cellpadding='0' cellspacing='0'
+            border='0' width="100%">
             <tr>
-                <td><a href='../record/[% hold.hold.bre.id %]'>[% attrs.title %]</a></td>
-                <td><a href='../results?query=au:[% attrs.author | url %]'>[% attrs.author %]</a></td>
-                <td>
-                    [%
-                        key = attrs.mattype;
-                        format_desc = ctx.find_citm(key).value;
-                        icon_filename = icon_by_mattype.$key;
-                        IF icon_filename;
-                    %]<!-- XXX in situations where we might show M-type holds, this won't be good enough -->
-                    <img alt="[% format_desc %]" title="[% format_desc %]"
-                        src="/images/mattype/[% icon_filename %]" />
-                    [%  END %]
+                <td width="36" align="center">
+                    <input type="checkbox" id="check_all_holds" />
+                </td>
+                <td width="138">
+                    <span title="Click to sort"
+                        style="cursor:pointer;">
+                        Title
+                    </span>
+                </td>
+                <td width="123">
+                    <span title="Click to sort" style="cursor:pointer;">Author</span>
+                </td>
+                <td width="64">
+                    <span title="Click to sort"
+                        style="cursor:pointer;">Format</span>
+                </td>
+                <td width="136">
+                    <span title="Click to sort"
+                        style="cursor:pointer;">Pickup Location</span>
+                </td>
+                <td width="104">Activate</td>
+                <td width="106">Cancel if not<br />filled by</td>
+                <td width="95">Active</td>
+                <td width="172">
+                    <span title="Click to sort"
+                        style="cursor:pointer;">Status</span>
                 </td>
-                <td>[% ctx.find_aou(hold.hold.hold.pickup_lib).name %]</td>
-                <td>[%
-                    IF hold.hold.status == 4;
-                        "Available";
-                    ELSIF hold.hold.estimated_wait;
-                        "Estimated wait (days): "; hold.hold.estimated_wait;
-                    ELSIF hold.hold.status == 3;
-                        "In Transit";
-                    ELSIF hold.hold.status < 3;
-                        "Waiting for copy";
-                    END;
-                %]</td>
-                <td>[% IF hold.hold.hold.frozen == 't' %] No [% ELSE %] Yes [% END %]</td>
-                <td>[% 
-                    IF hold.hold.hold.frozen == 't' AND hold.hold.hold.thaw_date;
-                        date.format(ctx.parse_datetime(hold.hold.hold.thaw_date),'%Y-%m-%d'); 
-                    ELSE;
-                        '-';
-                    END 
-                %]</td>
-                <td>[% hold.hold.hold.expire_time ? hold.hold.hold.expire_time : '-' %]</td>
-                <td><input type='checkbox' name='hold_id' value='[% hold.hold.hold.id %]'/></td>
             </tr>
-            [% END %]
-        </tbody>
+        </table>
+        <div class="hide_me">
+            <select id="hold_pickup_lib_temp" name="hold_pickup_lib_sel"
+                class="hide_me" style="width:125px;height:21px;"></select>
+        </div>
+
+        <table cellpadding='0' cellspacing='0' border='0' width="100%">
+            <tbody id="holds_temp_parent">
+                <tr id="acct_holds_temp" name="acct_holds_temp"
+                    class="acct_holds_temp">
+                    <td width="36" align="center" style="text-align:center;">
+                        <input type="checkbox" name="check_all_holds" />
+                    </td>
+                    <td width="138">
+                        <div style="margin-top:10px;margin-bottom:10px;">
+                            <a href="#" name="myopac_holds_title_link"></a>
+                        </div>
+                    </td>
+                    <td width="123">
+                        <div style="margin-top:10px;margin-bottom:10px;"
+                            name="myopac_holds_author"></div>
+                    </td>
+                    <td width="64">
+                        <div style="width:26px;height:23px;margin-top:6px;margin-bottom:6px;"
+                            name="myopac_holds_formats">
+                        </div>
+                    </td>
+                    <td width="136">
+                        <span name="hold_pickup_lib_span"></span>
+                        <span name="hold_pickup_lib"></span>
+                    </td>
+                    <td width="104">
+                        <input
+                            title="Enter a date (e.g. 10/21/2010)"
+                            class="hide_me" style="width:91px;"
+                            name="activate_box" type="text" />
+                            <span name="activate_date"></span>
+                    </td>
+                    <td width="106">
+                        <input title="Enter a date (e.g. 10/21/2010)"
+                            class="hide_me" style="width:91px;"
+                            name="hold_expires_box" type="text" />
+                            <span name="hold_expires"></span>
+                    </td>
+                    <td width="95">
+                        <select name="hold_active_sel"
+                            style="width:90px;" class="hide_me">
+                            <option value="f">Active</option>
+                            <option value="t">Suspended</option>
+                        </select>
+                        <span name="hold_active"></span>
+                    </td>
+                    <td width="110">
+                        <div name="acct_holds_status"
+                            style="margin-top:10px;margin-bottom:10px;">
+                            <span class="hide_me"
+                                name="hold_ready_expire"></span>
+                        </div>
+                    </td>
+                    <td width="62" align="right"
+                        style="text-align:right;padding-right:7px;">
+                        <a name="hold_edit_link" href="#">Edit</a>
+                        <a href="#" name="hold_save_link"
+                            class="hide_me">Save</a>
+                        <a href="#" name="hold_cancel_link"
+                            class="hide_me">Back</a>
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+    <div id='holds_hist_table' class="hide_me">testing...</div>
+
+    <span id='myopac.holds.cancel.confirm' class='hide_me'>&myopac.holds.cancel.confirm;</span>
+    <span id='myopac.holds.freeze.confirm' class='hide_me'>&myopac.holds.freeze.confirm;</span>
+    <span id='myopac.holds.thaw.confirm' class='hide_me'>&myopac.holds.thaw.confirm;</span>
+    <span id='myopac.holds.thaw_date.confirm' class='hide_me'>&myopac.holds.thaw_date.confirm;</span>
+    <span id='myopac.holds.freeze.select_thaw' class='hide_me'>&myopac.holds.freeze.select_thaw;</span>
+
+    <table width='100%' id='myopac_holds_processing' class='hide_me'>
+        <tr><td>&myopac.holds.processing;</td></tr>
     </table>
-</form> 
+   
+    <span class='hide_me' id='myopac_holds_cancel_verify'>
+    	&myopac.holds.verify;
+    </span>
+</div>
+<div id='myopac_holds_thaw_date_form' class='hide_me'>
+    <div id='myopac_holds_freeze_select_thaw'>
+        &myopac.holds.freeze.select_thaw;
+    </div>
+    <p>
+        <input size='10' maxlength='10'
+            type='text' id='myopac_holds_thaw_date_input' />
+    </p>
+    <p>
+        <button>&common.submit;</button>
+    </p>
+</div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2 b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
similarity index 99%
rename from Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
rename to Open-ILS/web/templates/default/opac/myopac/lists.tt2
index 796a5b1..36badc3 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/lists.tt2
@@ -1,5 +1,5 @@
-[%  WRAPPER "default/kcls-wire/parts/base.tt2" +
-        "default/kcls-wire/parts/myopac/base.tt2";
+[%  WRAPPER "default/opac/parts/base.tt2" +
+        "default/opac/parts/myopac/base.tt2";
     myopac_page = "lists"  %]
 <div
     style="margin-top: 6px;margin-left:20px;width:250px;padding:5px;"
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index 33a533e..42f020b 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -1,39 +1,421 @@
-[% BLOCK html_head %]
-<style>
-    table { text-align: center; padding: 20px; margin-top: 30px; border-collapse: collapse; }
-    table td { padding: 5px 15px 5px 15px; border-bottom: 1px solid #ddd; text-align: left;}
-    table tr:nth-child(odd) { background-color:#ded; }
-</style>
-[% END %]
-
-[% WRAPPER "default/opac/base.tt2" %]
-[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "main" %]
-<table>
-    <tr>
-        <td>First Name</td>
-        <td>[% ctx.user.first_given_name %]</td>
-    </tr>
-    <tr>
-        <td>Middle Name</td>
-        <td>[% ctx.user.second_given_name %]</td>
-    </tr>
-    <tr>
-        <td>Last Name</td>
-        <td>[% ctx.user.family_name %]</td>
-    </tr>
-    <tr>
-        <td>Library Card</td>
-        <td>[% ctx.user.card.barcode %]</td>
-    </tr>
-    <tr>
-        <td>Email Address</td>
-        <td>[% ctx.user.email %]</td>
-        <td><a href='update_email'>Change</a></td>
-    </tr>
-    <tr>
-        <td>Phone</td>
-        <td>[% ctx.user.day_phone %]</td>
-    </tr>
-</table>
+[%  WRAPPER "default/opac/parts/base.tt2" +
+        "default/opac/parts/myopac/base.tt2";
+    myopac_page = "main"  %]
+<div id='myopac_summary_div' style="padding:0px;">
+    <div id="acct_sum">
+        <div style="width:742px;float:left;">
+            <div class="header_middle">Account Summary</div>
+        </div>
+        <div id="myopac_sum_fines">
+            <div style="position:absolute;">
+                <div style="position:relative;top:-15px;left:-23px;">
+                    <img src="/images/acct_sum_fines_tl.png" />
+                </div>
+            </div>
+            <div style="position:absolute;">
+                <div style="position:relative;top:-15px;left:172px;">
+                    <img src="/images/acct_sum_fines_tr.png" />
+                </div>
+            </div>
+            <div style="position:absolute;">
+                <div style="position:relative;top:161px;left:-23px;">
+                    <img src="/images/acct_sum_fines_bl.png" />
+                </div>
+            </div>
+            <div style="position:absolute;">
+                <div style="position:relative;top:161px;left:172px;">
+                    <img src="/images/acct_sum_fines_br.png" />
+                </div>
+            </div>
+            Fines: <span id="myopac_sum_fines_bal">$0.00</span><br />
+            <a class="hide_me" href="#" id="pay_fines_btn1"><img
+                alt="Pay Fines"
+                onmouseover="this.src='/images/pay-fines-btn-hover.png';"
+                onmouseout="this.src='/images/pay-fines-btn.png';"
+                src="/images/pay-fines-btn.png"
+                style="position:relative;top:5px;" /></a>
+        </div>
+        <div style="width:662px;">
+            <div style="float:left;">
+                <div style="padding:10px 0px;" id="myopac_sum_name"></div>
+                <div class="acct_sum_row">
+                    <table width="100%" cellspacing="0" cellpadding="0">
+                        <tr>
+                            <td>
+                                Items Currently Checked out
+                                <span id="myopac_sum_checked" class="view_link">
+                                    (0)
+                                </span>
+                            </td>
+                            <td align="right" class="view_link">
+                                <a href="circs">View All</a>
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+                <div class="acct_sum_row">
+                    <table width="100%" cellspacing="0" cellpadding="0">
+                        <tr>
+                            <td>
+                                Items Currently on Hold
+                                <span id="myopac_sum_holds" class="view_link">
+                                    (0)
+                                </span>
+                            </td>
+                            <td align="right" class="view_link">
+                                <a href="holds">View All</a>
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+                <div class="acct_sum_row">
+                    <table width="100%" cellspacing="0" cellpadding="0">
+                        <tr>
+                            <td>
+                                Items ready for pickup
+                                <span id="myopac_sum_pickup" class="view_link">
+                                    (0)
+                                </span>
+                            </td>
+                            <td align="right" class="view_link">
+                                <a href="#">View All</a>
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+                <div class="acct_sum_row" id="myopac_sum_fines_slim">
+                    <table width="100%" cellspacing="0" cellpadding="0">
+                        <tr>
+                            <td>Fees &amp; Fines</td>
+                            <td align="right" class="view_link">
+                                <a class="hide_me"
+                                    id="show_fines_link"
+                                    href="#">Show Overdue Materials</a>
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+            </div>
+        </div>
+        <div class="clear-both"></div>
+        <div id='myopac_fines_div'>
+            <table width='100%' class='data_grid data_grid_center'>
+                <thead class='color_3'>
+                    <tr>
+                        <td colspan='3' style='padding: 6px'>
+                            <b>&myopac.fines.title;</b>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td width='33%'>&myopac.fines.owed;</td>
+                        <td width='33%'>&myopac.fines.paid;</td>
+                        <td width='33%'>&myopac.fines.balance;</td>
+                    </tr>
+                </thead>
+                <tbody id='myopac_fines_summary_tbody'>
+                    <tr id='myopac_fines_summary_loading'>
+                        <td>&myopac.fines.status;</td>
+                    </tr>
+                    <tr id='myopac_fines_summary_row' class='hide_me'>
+                        <td id='myopac_fines_summary_total' >&common.currency;</td>
+                        <td id='myopac_fines_summary_paid' >&common.currency;</td>
+                        <td id='myopac_fines_summary_balance' style='color:red;font-weight: bold;'>&common.currency;</td>
+                    </tr>
+                </tbody>
+            </table>
+        <!--
+        <div id='accrue_explanation' class='hide_me'>
+            <span>Transactions whose balances are marked with a</span>
+            <span style='color:red; font-weight: bold'>*</span>
+            <span>will continue to accrue fines until the checked out item is returned.</span>
+        </div>
+        -->
+        <!-- Table for circulation transactions only -->
+            <div id='myopac_circ_trans_div' class='hide_me'>
+                <br/><hr/><br/>
+                <table width='100%' class='data_grid data_grid_center'
+                    id='myopac_circ_trans_table'>
+                    <thead>
+                    <!--<tr><td colspan='10' style='padding: 6px'><b>&myopac.fines.overdue;</b></td></tr>-->
+                        <tr>
+                            <td colspan='10' style='padding: 6px'>
+                                <b>Fines</b>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>&common.title;</td>
+                            <td>&common.author;</td>
+                            <td>&myopac.fines.checkout;</td>
+                            <td>&myopac.fines.due;</td>
+                            <td>&myopac.fines.returned;</td>
+                            <td>&myopac.fines.balance;</td>
+                            <td align="center" nowrap="nowrap"
+                                style="white-space:nowrap;">
+                                <label for="pay_fines_box1">Pay Fines</label>
+                                <br />
+                                <input id="pay_fines_box1" checked="checked"
+                                    type="checkbox"
+                                    title="Click to (un)select all fines" />
+                            </td>
+                        </tr>
+                    </thead>
+                    <tbody id='myopac_circ_trans_tbody'>
+                        <tr id='myopac_circ_trans_row'>
+                            <td>
+                                <a class='classic_link' name='myopac_circ_trans_title'> </a>
+                            </td>
+                            <td name='myopac_circ_trans_author'> </td>
+                            <td name='myopac_circ_trans_start'> </td>
+                            <td name='myopac_circ_trans_due'> </td>
+                            <td name='myopac_circ_trans_finished'>
+                                <span style='color:red;'>&myopac.fines.accruing;</span>
+                            </td>
+                            <td>
+                                <span style='color: red; font-weight: bold;'
+                                    name='myopac_circ_trans_balance'>&common.currency;</span>
+                            </td>
+                            <td align="center">
+                                <input type="checkbox" checked="checked"
+                                    name="selector" title="pay this fine" />
+                            </td>
+                        </tr>
+                    </tbody>
+                </table>
+            </div>
 
+            <!-- Table for all non-circulation transactions -->
+            <div id='myopac_trans_div' class='hide_me'>
+                <br/>
+                <hr style="border-bottom:none;*height:0px;" color="#dcdbdb" />
+                <br/>
+                <table width='100%' class='data_grid data_grid_center'
+                    id='myopac_trans_table'>
+                    <thead>
+                        <tr>
+                            <td colspan='8' style='padding: 6px'>
+                                <b>&myopac.fines.other;</b>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td width='16%'>&myopac.fines.time.start;</td>
+                            <td width='16%'>&myopac.fines.time.paid;</td>
+                            <td width='16%'>&myopac.fines.owed.initial;</td>
+                            <td width='16%'>&myopac.fines.paid.amount;</td>
+                            <td width='16%'>&myopac.fines.balance;</td>
+                            <td width='16%'>&myopac.fines.type;</td>
+                            <td width='4%' align="center" nowrap="nowrap"
+                                style="white-space:nowrap;">
+                                <label for="pay_fines_box2">Pay Fines</label>
+                                <br />
+                                <input id="pay_fines_box2" checked="checked"
+                                    type="checkbox"
+                                    title="Click to (un)select all fines" />
+                            </td>
+                        </tr>
+                    </thead>
+                    <tbody id='myopac_trans_tbody'>
+                        <tr id='myopac_trans_row'>
+                            <td name='myopac_trans_start'> </td>
+                            <td name='myopac_trans_last_payment'> </td>
+                            <td name='myopac_trans_init_amount'>
+                                &common.currency;
+                            </td>
+                            <td name='myopac_trans_total_paid'>
+                                &common.currency;
+                            </td>
+                            <td style='color:red; font-weight: bold;'>
+                                <span name='myopac_trans_balance_recur'
+                                    class='hide_me'> * </span>
+                                <span name='myopac_trans_balance'>
+                                    &common.currency;
+                                </span>
+                            </td>
+                            <td name='myopac_trans_bill_type'></td>
+                            <td align="center">
+                                <input type="checkbox" name='selector'
+                                    title='pay this fine' checked="checked" />
+                            </td>
+                        </tr>
+                    </tbody>
+                </table>
+            </div>
+            <a href="#"><img alt="Pay Fines"
+                onmouseover="this.src='/images/pay-fines-btn-hover.png';"
+                src="/images/pay-fines-btn.png"
+                style="position:relative;top:5px;" /></a>
+            <br/>
+        </div>
+    </div>
+    <div id="pay_fines_now" class="hide_me">
+        <table id='oils-selfck-cc-payment-table'>
+            <tbody>
+                <tr>
+                    <td><div style="width:129px;"></div></td>
+                    <td><div style="width:195px;"></div></td>
+                    <td><div style="width:324px;"></div></td>
+                </tr>
+                <tr>
+                    <td colspan='2'><strong>Billing Information</strong></td>
+                    <td rowspan='13' valign='top'>
+                        Selected fines you are paying for:
+                        <table cellpadding="0" cellspacing="5" border="0">
+                            <thead>
+                                <tr>
+                                    <td>
+                                        <strong>Name</strong>
+                                    </td>
+                                    <td>
+                                        <strong>Amount</strong>
+                                    </td>
+                                </tr>
+                            </thead>
+                            <tbody id="selectedFines">
+                            </tbody>
+                        </table>
+                        <br />
+                        <div id='oils-selfck-cc-payment-summary'>
+                            Total amount to pay:
+                            <strong>$<span></span></strong>
+                        </div>
+                        <br />
+                        Click <strong>Cancel</strong> to go back and (un)select
+                        other fines.
+                    </td>
+                </tr>
+                <tr>
+                    <td>First Name</td>
+                    <td><input jsId='oilsSelfckCCFName' /></td>
+                </tr>
+                <tr>
+                    <td>Last Name</td>
+                    <td><input jsId='oilsSelfckCCLName' /></td>
+                </tr>
+                <tr>
+                    <td>Street Address</td>
+                    <td><input jsId='oilsSelfckCCStreet' /></td>
+                </tr>
+                <tr>
+                    <td>City</td>
+                    <td><input jsId='oilsSelfckCCCity' /></td>
+                </tr>
+                <tr>
+                    <td>State or Province</td>
+                    <td><input jsId='oilsSelfckCCState' /></td>
+                </tr>
+                <tr>
+                    <td>ZIP or Postal Code</td>
+                    <td><input jsId='oilsSelfckCCZip' /></td>
+                </tr>
+                <tr>
+                  <td colspan='2'><strong>Credit Card Information</strong></td>
+                </tr>
+                <!-- Technically not needed since card type is derived from the CC number
+                <tr>
+                    <td>Type of Card</td>
+                    <td>
+                        <select jsId='oilsSelfckCCType' required='true'>
+                            <option value='VISA'>VISA</option>
+                            <option value='MasterCard'>MasterCard</option>
+                            <option value='American Express'>American Express</option>
+                        </select>
+                    </td>
+                </tr>
+                -->
+                <tr>
+                    <td>Credit Card #</td>
+                    <td><input jsId='oilsSelfckCCNumber' /></td>
+                </tr>
+                <tr>
+                    <td>
+                        <div style="position:absolute;">
+                            <div style="position:relative;left:80px;">
+                                <a href="#"><img
+                                    src="/images/question-mark.png" /></a>
+                            </div>
+                        </div>
+                        Security Code
+                    </td>
+                    <td>
+                        <input jsId='oilsSelfckCCCVV' />
+                    </td>
+                </tr>
+                <tr>
+                    <td>Exipration Month</td>
+                    <td>
+                        <select jsId='oilsSelfckCCMonth'>
+                            <option value='01' selected='selected'>January</option>
+                            <option value='02'>February</option>
+                            <option value='03'>March</option>
+                            <option value='04'>April</option>
+                            <option value='05'>May</option>
+                            <option value='06'>June</option>
+                            <option value='07'>July</option>
+                            <option value='08'>August</option>
+                            <option value='09'>September</option>
+                            <option value='10'>October</option>
+                            <option value='11'>November</option>
+                            <option value='12'>December</option>
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td>Expiration Year</td>
+                    <td>
+                      <select jsId='oilsSelfckCCYear'>
+                        <option value='2011'>2011</option>
+                        <option value='2012'>2012</option>
+                        <option value='2013'>2013</option>
+                        <option value='2014'>2014</option>
+                        <option value='2015'>2015</option>
+                        <option value='2016'>2016</option>
+                        <option value='2017'>2017</option>
+                        <option value='2018'>2018</option>
+                        <option value='2019'>2019</option>
+                      </select>
+                    </td>
+                </tr>
+                <tr class="hide_me">
+                    <td>Edit Billing Address</td>
+                    <td>
+                        <input jsId='oilsSelfckEditDetails'/>
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan='2' align="center">
+                        <button jsId='oilsSelfckCCSubmit'>
+                            Submit Payment
+                        </button>
+                        <button>
+                            Cancel
+                        </button>
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan="3">
+                        <br />
+                        Important! You must have a printed receipt to be
+                        eligible for a refund on lost items (regulations allow
+                        for no exceptions).
+                        <br />
+                        <strong>
+                            To ensure your necessary receipt information is
+                            not lost, enter your email address above and a
+                            receipt will be emailed to you. Otherwise, make
+                            certain you have a printed receipt in hand before
+                            closing the payment receipt screen.
+                        </strong>
+                        <br />
+                        Refunds are not available for parts and pieces, overdue
+                        fines, or items that do not display a specific title in
+                        My Account. For a full list of refundable and
+                        non-refundable items, visit
+                        <a href="http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm">http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm</a><br /><br />
+                        This site uses VeriSign SSL encryption to ensure your
+                        privacy.
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+</div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
index d9a60ba..f6816f6 100644
--- a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
@@ -1,15 +1,777 @@
-[% BLOCK html_head %]
-<style>
-    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
-    table { border-collapse: collapse; }
-    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
-    table tr:nth-child(odd) { background-color:#ded; }
-</style>
-[% END %]
+[%  WRAPPER "default/opac/parts/base.tt2" +
+        "default/opac/parts/myopac/base.tt2";
+    myopac_page = "prefs"  %]
+    <div id='myopac_prefs_div'>
+        <div id="acct_prefs_tabs"
+             style="padding-bottom: 12px;color:#666;">
+            <div style="float:left;">
+                <div class="align selected"
+                     id="prefs_info_lbl"><img src=
+                     "/images/sub_prefs_info_on.jpg" /></div>
+
+                <div class="align hide_me"
+                     id="prefs_info_link">
+                    <a href="#"><img src=
+                         "/images/sub_prefs_info_off.jpg" /></a>
+                </div>
+
+                <div class="align"
+                     id="prefs_notify_link">
+                    <a href="#"><img src=
+                         "/images/sub_prefs_notify_off.jpg" /></a>
+                </div>
+
+                <div class="align selected hide_me"
+                     id="prefs_notify_lbl"><img src=
+                     "/images/sub_prefs_notify_on.jpg" /></div>
+
+                <div class="align"
+                     id="prefs_search_link">
+                    <a href="#"><img src=
+                         "/images/sub_prefs_search_off.jpg" /></a>
+                </div>
+
+                <div class="align selected hide_me"
+                     id="prefs_search_lbl"><img src=
+                     "/images/sub_prefs_search_on.jpg" /></div>
+            </div>
+
+            <div style="float:right;width:65px;">
+                <div style="position:absolute">
+                    <div style="position:relative;top:75px;">
+                        <a id='acct_prefs_save'
+                             class='hide_me'
+                             href="#"><img alt="Save"
+                             src="/images/save-btn.png" /></a>
+                    </div>
+                </div>
+            </div>
+
+            <div class="clear-both"></div>
+        </div>
+
+        <div class="header_middle">
+            <span id="acct_prefs_header">
+                Account Information and Preferences
+            </span>
+            <span class="float-right">
+                <a class="hide_me"
+                    href="#">Export List</a>
+            </span>
+        </div>
+
+        <div class="clear-both normal-height"></div>
+
+        <table class="hide_me full-width" id="acct_search_main">
+            <tbody id='myopac_prefs_tbody'>
+                <tr id='myopac_prefs_loading'>
+                    <td colspan='3'><b>&myopac.loading;</b></td>
+                </tr>
+
+                <tr id='myopac_prefs_row'>
+                    <td width='20%'>&myopac.prefs.hits;</td>
+
+                    <td>
+                        <div style="position:absolute">
+                            <div style="position:relative;top:0px;left:55px;">
+                                <a href="#">
+                                <img alt="Search Hits Help"
+                                     src=
+                                     "/images/question-mark.png" /></a>
+                            </div>
+                        </div><select id='prefs_hits_per'
+                            style="position:relative;z-index:100;">
+                            <option value='5'>
+                                5
+                            </option>
+
+                            <option value='8'>
+                                8
+                            </option>
+
+                            <option value='10'>
+                                10
+                            </option>
+
+                            <option value='15'>
+                                15
+                            </option>
+
+                            <option value='20'>
+                                20
+                            </option>
+
+                            <option value='25'>
+                                25
+                            </option>
+
+                            <option value='50'>
+                                50
+                            </option>
+                        </select>
+                    </td>
+                </tr>
+
+                <tr>
+                    <td colspan="2"><label for="circHistStart">Keep history of
+                    checked out items?</label> <input type="checkbox"
+                           id="circHistStart" /></td>
+                </tr><!-- FONT size preference -->
+
+                <tr class="hide_me">
+                    <td>&myopac.prefs.font;</td>
+
+                    <td><select id='prefs_def_font'>
+                        <option value='regular'>
+                            &myopac.prefs.font.regular;
+                        </option>
+
+                        <option value='large'>
+                            &myopac.prefs.font.large;
+                        </option>
+                    </select></td>
+                </tr>
+
+                <tr class="hide_me">
+                    <td>&myopac.prefs.search.location;</td>
+                    <td>
+                        <div style='margin-bottom: 5px;'>
+                            <input type='checkbox' id='myopac_pref_home_lib' />
+                                 &myopac.prefs.search.home;
+                        </div>
+                        <select id='prefs_def_location'></select>
+                    </td>
+                </tr>
+
+                <tr class="hide_me">
+                    <td>&myopac.prefs.search.range;</td>
+
+                    <td><select id='prefs_def_range'>
+                        </select></td>
+                </tr>
+            </tbody>
+        </table><a href=
+        "http://www.kcls.org/usingthelibrary/catalog_help/library_elf.cfm"><u>Try
+        Library Elf-to manage library materials!</u></a>
+
+        <table class="hide_me"
+               id="acct_notify_main">
+            <tbody>
+                <tr class="hide_me">
+                    <td><span>&myopac.prefs.holds.notify;</span> <a class=
+                    'classic_link'
+                       href='#'>&common.help;</a></td>
+
+                    <td style="padding-left:15px;"><select id=
+                    'prefs_hold_notify'>
+                        <option value='phone:email'
+                                selected='selected'>
+                            &myopac.prefs.holds.both;
+                        </option>
+
+                        <option value='phone'>
+                            &myopac.prefs.holds.phone;
+                        </option>
+
+                        <option value='email'>
+                            &myopac.prefs.holds.email;
+                        </option>
+                    </select></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Pick Up Notice for
+                    Holds</strong><br />
+                    <input type="checkbox"
+                           id="opac.hold_notify.email"
+                           name="opac.hold_notify.email" /> <label for=
+                           "opac.hold_notify.email">Email</label><br />
+                    <input type="checkbox"
+                           id="opac.hold_notify.phone"
+                           name="opac.hold_notify.phone" /> <label for=
+                           "opac.hold_notify.phone">Phone</label>
+                           <b>(Temporarily phone notification will generate a
+                           mailed paper notice.)</b></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Expire Notice for
+                    Holds</strong><br />
+                    <input type="checkbox"
+                           id="notification.hold.expire.email"
+                           name="notification.hold.expire.email" /> <label for=
+                           "notification.hold.expire.email">Email</label></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Cancel Notice for
+                    Holds</strong><br />
+                    <input type="checkbox"
+                           id="notification.hold.cancel.email"
+                           name="notification.hold.cancel.email" /> <label for=
+                           "notification.hold.cancel.email">Email</label></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Overdue First
+                    Notice</strong><br />
+                    <input type="checkbox"
+                           id="notification.overdue.first.email"
+                           name="notification.overdue.first.email" />
+                           <label for=
+                           "notification.overdue.first.email">Email</label><br />
+                    <input type="checkbox"
+                           id="notification.overdue.first.phone"
+                           name="notification.overdue.first.phone" />
+                           <label for=
+                           "notification.overdue.first.phone">Phone</label>
+                           <b>(Temporarily phone notification will generate a
+                           mailed paper notice.)</b></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Courtesy
+                    Notice</strong><br />
+                    <input type="checkbox"
+                           id="notification.predue.email"
+                           name="notification.predue.email" /> <label for=
+                           "notification.predue.email">Email</label><br /></td>
+                </tr>
+            </tbody>
+        </table>
+
+        <div id="acct_info_main">
+            <div id='myopac.expired.alert'
+                 class='hide_me'
+                 style='margin-bottom: 20px;'>
+                <table class='data_grid'
+                       width='100%'>
+                    <tbody>
+                        <tr>
+                            <td width='100%'
+                                style='color:red;'>
+                                &myopac.summary.expired;</td>
+                        </tr>
+                    </tbody>
+                </table>
+            </div>
+
+            <div id='myopac.notes.div'
+                 class='hide_me'>
+                <table class='data_grid'
+                       width='100%'>
+                    <thead>
+                        <tr>
+                            <td colspan='2'>
+                            <b>&myopac.summary.notes;</b></td>
+                        </tr>
+                    </thead>
+
+                    <tbody id='myopac.notes.tbody'>
+                        <tr id='myopac.notes.tr'>
+                            <td><b name='title'></b> : <span name=
+                            'value'></span></td>
+                        </tr>
+                    </tbody>
+                </table><br />
+            </div>
+
+            <table width='70%'
+                   class='light_border data_grid'>
+                <tbody id='myopac_summary_tbody'>
+                    <tr>
+                        <td width='30%'
+                            class='color_4 light_border'>&common.name;</td>
+
+                        <td class='light_border'><span id=
+                        'myopac_summary_prefix'
+                              style='padding-right: 5px;'></span> <span id=
+                              'myopac_summary_first'
+                              style='padding-right: 5px;'></span> <span id=
+                              'myopac_summary_middle'
+                              style='padding-right: 5px;'></span> <span id=
+                              'myopac_summary_last'
+                              style='padding-right: 5px;'></span> <span id=
+                              'myopac_summary_suffix'></span></td>
+
+                        <td></td>
+                    </tr>
+
+                    <tr>
+                        <td class='color_4 light_border'>
+                        &myopac.summary.phone.day;</td>
+
+                        <td class='light_border'
+                            id='myopac_summary_dayphone'></td>
+
+                        <td class='light_border'><a href='#'
+                           class="hide_me"
+                           id='myopac_summary_phone1_change'
+                           style=
+                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                    </tr>
+
+                    <tr id='myopac_update_phone1_row'
+                        class='hide_me'>
+                        <td class='myopac_update_cell'
+                            colspan='3'>
+                            <span class='myopac_update_span'>
+                                Enter New &myopac.summary.phone.day;:
+                            </span>
+
+                            <input type='text' size='24' id='myopac_new_phone1' />
+                            <span class='myopac_update_span'>
+                                <button>
+                                    <span class='myopac_update_span'>
+                                        &common.submit;</span>
+                                </button>
+                            </span>
+                            <span class='myopac_update_span'>
+                                <button>
+                                    <span class='myopac_update_span'>
+                                        &common.cancel;</span>
+                                </button>
+                            </span>
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td class='color_4 light_border'>
+                        &myopac.summary.phone.evening;</td>
+
+                        <td class='light_border'
+                            id='myopac_summary_eveningphone'></td>
+
+                        <td class='light_border'><a href='#'
+                           class="hide_me"
+                           id='myopac_summary_phone2_change'
+                           style=
+                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                    </tr>
+
+                    <tr id='myopac_update_phone2_row'
+                        class='hide_me'>
+                        <td class='myopac_update_cell'
+                            colspan='3'><span class='myopac_update_span'>New
+                            &myopac.summary.phone.evening;:</span>
+                            <input type='text' size='24' id='myopac_new_phone2' />
+                            <span class='myopac_update_span'><button><span class=
+                                'myopac_update_span'>&common.submit;</span></button></span>
+                            <span class='myopac_update_span'><button><span class=
+                                'myopac_update_span'>&common.cancel;</span></button></span>
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td class='color_4 light_border'>
+                        &myopac.summary.phone.other;</td>
+
+                        <td class='light_border'
+                            id='myopac_summary_otherphone'></td>
+
+                        <td class='light_border'><a href='#'
+                           class="hide_me"
+                           id='myopac_summary_phone3_change'
+                           style=
+                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                    </tr>
+
+                    <tr id='myopac_update_phone3_row'
+                        class='hide_me'>
+                        <td class='myopac_update_cell'
+                            colspan='3'><span class='myopac_update_span'>Enter
+                            New &myopac.summary.phone.other;:</span>
+                            <input type='text' size='24' id='myopac_new_phone3' />
+                            <span class='myopac_update_span'><button><span class=
+                                'myopac_update_span'>&common.submit;</span></button></span>
+                            <span class='myopac_update_span'><button><span class=
+                                'myopac_update_span'>&common.cancel;</span></button></span>
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td class='color_4 light_border'>
+                            <div style="position:absolute">
+                                <div style=
+                                "position:relative;left:70px;top:-3px;">
+                                    <a href="#">
+                                    <img alt="Username Help"
+                                         src=
+                                         "/images/question-mark.png" /></a>
+                                </div>
+                            </div>&common.username;
+                        </td>
+
+                        <td class='light_border'
+                            id='myopac_summary_username'></td>
+
+                        <td class='light_border'><a href='#'
+                           class="hide_me"
+                           id='myopac_summary_username_change'
+                           style=
+                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                    </tr>
+
+                    <tr id='myopac_update_username_row'
+                        class='hide_me'>
+                        <td class='myopac_update_cell'
+                            colspan='3'><span class=
+                            'myopac_update_span'>&myopac.summary.username.enter;</span>
+                            <input type='text' size='24' id='myopac_new_username' />
+                            <span class='myopac_update_span'><button><span class=
+                                'myopac_update_span'>&common.submit;</span></button></span>
+                            <span class='myopac_update_span'><button><span class=
+                                'myopac_update_span'>&common.cancel;</span></button></span>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class='color_4 light_border'>
+                        &common.password;</td>
+                        <td class='light_border'
+                            id='myopac_summary_password'>
+                            &myopac.summary.password.text;</td>
+                        <td class='light_border'><a href='#'
+                           class="hide_me"
+                           id='myopac_summary_password_change'
+                           style=
+                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                    </tr>
+                    <tr id='myopac_update_password_row'
+                        class='hide_me'>
+                        <td class='myopac_update_cell'
+                            colspan='3'>
+                            <table>
+                                <tbody>
+                                    <tr>
+                                        <td>
+                                            <span class= 'myopac_update_span'>
+                                                &myopac.summary.password.current;
+                                            </span>
+                                        </td>
+
+                                        <td>
+                                            <input type='password'
+                                               size='24'
+                                               id='myopac_current_password' />
+                                           </td>
+                                    </tr>
+                                    <tr>
+                                        <td><span class=
+                                        'myopac_update_span'>&myopac.summary.password.new;</span></td>
+
+                                        <td><input type='password'
+                                               size='24'
+                                               id='myopac_new_password' />
+                                           </td>
+                                    </tr>
+
+                                    <tr>
+                                        <td><span class=
+                                        'myopac_update_span'>&myopac.summary.password.reenter;</span></td>
+
+                                        <td>
+                                            <input type='password'
+                                                size='24'
+                                                id='myopac_new_password2' />
+                                        </td>
+                                    </tr>
+                                </tbody>
+                            </table><span class=
+                            'myopac_update_span'><button><span class=
+                            'myopac_update_span'>&common.submit;</span></button></span>
+                            <span class='myopac_update_span'><button><span class='myopac_update_span'>
+                            &common.cancel;</span></button></span>
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td class='color_4 light_border'>
+                        &myopac.summary.email;</td>
+
+                        <td class='light_border'
+                            id='myopac_summary_email'></td>
+
+                        <td class='light_border'><a href='#'
+                           class="hide_me"
+                           id='myopac_summary_email_change'
+                           style=
+                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                    </tr>
+
+                    <tr id='myopac_update_email_row'
+                        class='hide_me'>
+                        <td class='myopac_update_cell' colspan='3'>
+                            <span class= 'myopac_update_span'>
+                                &myopac.summary.email.new;
+                            </span>
+                            <input type='text' size='24' id='myopac_new_email' />
+                            <span class='myopac_update_span'>
+                                <button>
+                                    <span class= 'myopac_update_span'>
+                                        &common.submit;</span>
+                                </button>
+                            </span>
+                            <span class='myopac_update_span'>
+                                <button>
+                                    <span class='myopac_update_span'>
+                                        &common.cancel;</span>
+                                </button>
+                            </span>
+                        </td>
+                    </tr>
+                    <tr class="hide_me">
+                        <td class='color_4 light_border'>
+                        &myopac.summary.id.primary;</td>
+
+                        <td class='light_border'
+                            id='myopac_summary_ident1'></td>
+
+                        <td></td>
+                    </tr>
+
+                    <tr>
+                        <td class='color_4 light_border'>
+                        &myopac.summary.barcode;</td>
+
+                        <td class='light_border'
+                            id='myopac_summary_barcode'></td>
+
+                        <td></td>
+                    </tr>
+
+                    <tr>
+                        <td class='color_4 light_border'>
+                        &myopac.summary.home;</td>
+                        <td class='light_border'
+                            id='myopac_summary_homelib'></td>
+                        <td><a href='#'
+                           class="hide_me"
+                           id='myopac_summary_home_change'
+                           style=
+                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                    </tr>
+                    <tr id='myopac_update_home_row'
+                        class='hide_me'>
+                        <td class='myopac_update_cell'
+                            colspan='3'>
+                            <span class='myopac_update_span'>
+                                New home library:</span>
+                            <select id='myopac_new_home'>
+                            </select>
+                            <span class='myopac_update_span'>
+                                <button>
+                                    <span class= 'myopac_update_span'>
+                                        &common.submit;</span>
+                                </button>
+                            </span>
+                            <span class='myopac_update_span'>
+                                <button>
+                                    <span class= 'myopac_update_span'>
+                                        &common.cancel;</span>
+                                </button>
+                            </span>
+                        </td>
+                    </tr>
+                    <tr class="hide_me">
+                        <td class='color_4 light_border'>
+                            &myopac.summary.genesis;
+                        </td>
+                        <td class='light_border'
+                            id='myopac_summary_create_date'></td>
+                        <td></td>
+                    </tr>
+                </tbody>
+            </table><br />
+            <hr style="border-bottom:none;*height:0px;" color="#DCDBDB" />
+            <br />
+
+            <table width='100%' class='light_border data_grid'>
+                <thead>
+                    <tr>
+                        <td>&myopac.summary.addresses;</td>
+
+                        <td id='myopac_pending_addr_td' class='hide_me'>
+                            <table cellpadding="0" cellspacing="0" border="0">
+                                <tr>
+                                    <td>&myopac.summary.addresses.pending;</td>
+
+                                    <td>
+                                        <a href="#"><img
+                                            alt="Address Help"
+                                            src="/images/question-mark.png" /></a>
+                                    </td>
+                                </tr>
+                            </table>
+                        </td>
+                    </tr>
+                </thead>
+                <tbody id='myopac_addr_tbody'>
+                    <tr id='myopac_addr_row' class='light_border'>
+                        <td>
+                            <table>
+                                <tr>
+                                    <td>&myopac.summary.address.type;</td>
+                                    <td name='myopac_addr_type'></td>
+                                </tr>
+
+                                <tr>
+                                    <td>&myopac.summary.address.street;</td>
+                                    <td name='myopac_addr_street'></td>
+                                </tr>
+                                <tr>
+                                    <td>&myopac.summary.address.street;</td>
+                                    <td name='myopac_addr_street2'></td>
+                                </tr>
+
+                                <tr>
+                                    <td>&myopac.summary.address.city;</td>
+                                    <td name='myopac_addr_city'></td>
+                                </tr>
+
+                                <tr>
+                                    <td>&myopac.summary.address.county;</td>
+                                    <td name='myopac_addr_county'></td>
+                                </tr>
+
+                                <tr>
+                                    <td>&myopac.summary.address.state;</td>
+                                    <td name='myopac_addr_state'></td>
+                                </tr>
+
+                                <tr>
+                                    <td>&myopac.summary.address.country;</td>
+                                    <td name='myopac_addr_country'></td>
+                                </tr>
+
+                                <tr>
+                                    <td>&myopac.summary.address.zip;</td>
+                                    <td name='myopac_addr_zip'></td>
+                                </tr>
+                                <tr>
+                                    <td name='myopac_addr_edit_td'
+                                        colspan='2' class='hide_me'>
+                                        <a class='classic_link'
+                                            name='myopac_addr_edit_link'
+                                            href='#'>Edit Address</a>
+                                    </td>
+                                </tr>
+                            </table>
+                        </td>
+                        <td class='hide_me'
+                            name='myopac_pending_addr_td'>
+                            <table>
+                                <tr>
+                                    <td>&myopac.summary.address.type;</td>
+
+                                    <td><input name=
+                                    'myopac_pending_addr_type' /></td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                    &myopac.summary.address.street;</td>
+
+                                    <td><input name=
+                                    'myopac_pending_addr_street' /></td>
+                                </tr>
+                                <tr>
+                                    <td>&myopac.summary.address.street;</td>
+                                    <td>
+                                        <input name='myopac_pending_addr_street2' />
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>&myopac.summary.address.city;</td>
+                                    <td>
+                                        <input name='myopac_pending_addr_city' />
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>&myopac.summary.address.county;</td>
+
+                                    <td>
+                                        <input name='myopac_pending_addr_county' />
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>&myopac.summary.address.state;</td>
+                                    <td>
+                                        <input name='myopac_pending_addr_state' />
+                                    </td>
+                                </tr>
 
-[% WRAPPER "default/opac/base.tt2" %]
-[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "prefs" %]
-<p><em>XXX TODO Need to find out whether the list of pref fields can/should be generated
-    from db entries or something.</em></p>
+                                <tr>
+                                    <td>&myopac.summary.address.country;</td>
 
+                                    <td>
+                                        <input name='myopac_pending_addr_country' />
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>&myopac.summary.address.zip;</td>
+                                    <td><input name=
+                                    'myopac_pending_addr_zip' /></td>
+                                </tr>
+                                <tr>
+                                    <td name='myopac_addr_edit_td' colspan='2'>
+                                        <a class='classic_link'
+                                            name='myopac_pending_addr_edit_link'
+                                            href='#'>Save Changes</a>
+                                        <a style='padding-left:10px;'
+                                            class='classic_link'
+                                            name='myopac_pending_addr_del_link'
+                                            href='#'>Discard Pending Address</a>
+                                    </td>
+                                </tr>
+                            </table>
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+        </div>
+        <div class='hide_me' id='myopac_username_error'>
+            &myopac.summary.username.error;
+        </div>
+        <div class='hide_me' id='myopac_username_dup'>
+            &myopac.summary.username.dup;
+        </div>
+        <div class='hide_me' id='myopac_username_success'>
+            &myopac.summary.username.success;
+        </div>
+        <div class='hide_me' id='myopac_username_failure'>
+            &myopac.summary.username.failure;
+        </div>
+        <div class='hide_me' id='myopac_email_error'>
+            &myopac.summary.email.error;
+        </div>
+        <div class='hide_me' id='myopac_email_success'>
+            &myopac.summary.email.success;
+        </div>
+        <div class='hide_me' id='myopac_email_failure'>
+            &myopac.summary.email.failed;
+        </div>
+        <div class='hide_me' id='myopac_password_error'>
+            &myopac.summary.password.error;
+        </div>
+        <div class='hide_me' id='myopac_password_success'>
+            &myopac.summary.password.success;
+        </div>
+        <div class='hide_me' id='myopac_password_failure'>
+            &myopac.summary.password.failure;
+        </div>
+        <span class='hide_me' id= 'myopac_invalid_username'>
+            &myopac.summary.username.invalid;
+        </span>
+        <span class='hide_me' id='myopac_addr_changes_saved'>
+            Address Saved
+        </span>
+        <div class='hide_me' id='prefs_update_success'>
+            &myopac.prefs.save.success;
+        </div>
+        <div class='hide_me' id='prefs_update_failure'>
+            &myopac.prefs.save.failed;
+        </div>
+        <span class='hide_me' id='myopac_pref_hold_notify_alert'>
+            &myopac.prefs.help;
+        </span>
+    </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/advanced/global_row.tt2
rename to Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
similarity index 98%
rename from Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
rename to Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
index de9b3e2..3c43904 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
@@ -14,7 +14,7 @@
                     </tr>
                 </thead>
                 <tbody id='adv_global_tbody'>
-                    [% INCLUDE "default/kcls-wire/parts/advanced/global_row.tt2" %]
+                    [% INCLUDE "default/opac/parts/advanced/global_row.tt2" %]
                     <!-- add a new row -->
                     <tr id='adv_global_addrow'>
                         <td align='left' style="padding-top:7px;">
@@ -28,7 +28,7 @@
     <tr>
         <td align='center'>
             &advanced.search.library;<br /><br />
-            [% INCLUDE "default/kcls-wire/parts/libselect.tt2" %]
+            [% INCLUDE "default/opac/parts/libselect.tt2" %]
             <br /><br />
             <span>&result.limit2avail;</span>
             <input type='checkbox' id='opac.result.limit2avail'/>
@@ -125,7 +125,7 @@
                         </td>
                         <td align='left'>
                             <select multiple='multiple' size='3' id='adv_global_lang'>
-                                [% INCLUDE "default/kcls-wire/parts/item_lang_options.tt2" %]
+                                [% INCLUDE "default/opac/parts/item_lang_options.tt2" %]
                             </select>
                         </td>
 
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2 b/Open-ILS/web/templates/default/opac/parts/base.tt2
similarity index 94%
rename from Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
rename to Open-ILS/web/templates/default/opac/parts/base.tt2
index 06f804c..7921cd3 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/base.tt2
@@ -16,6 +16,6 @@
     </head>
     <body>
         [% content %] 
-        [% INCLUDE "default/kcls-wire/parts/footer.tt2" %]
+        [% INCLUDE "default/opac/parts/footer.tt2" %]
     </body>
 </html>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/cn_browse.tt2 b/Open-ILS/web/templates/default/opac/parts/cn_browse.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/cn_browse.tt2
rename to Open-ILS/web/templates/default/opac/parts/cn_browse.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/footer.tt2 b/Open-ILS/web/templates/default/opac/parts/footer.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/footer.tt2
rename to Open-ILS/web/templates/default/opac/parts/footer.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/format_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/format_selector.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/format_selector.tt2
rename to Open-ILS/web/templates/default/opac/parts/format_selector.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2 b/Open-ILS/web/templates/default/opac/parts/homesearch.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
rename to Open-ILS/web/templates/default/opac/parts/homesearch.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/item_lang_options.tt2 b/Open-ILS/web/templates/default/opac/parts/item_lang_options.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/item_lang_options.tt2
rename to Open-ILS/web/templates/default/opac/parts/item_lang_options.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2 b/Open-ILS/web/templates/default/opac/parts/libselect.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2
rename to Open-ILS/web/templates/default/opac/parts/libselect.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2 b/Open-ILS/web/templates/default/opac/parts/login/form.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2
rename to Open-ILS/web/templates/default/opac/parts/login/form.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2 b/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
similarity index 86%
rename from Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
rename to Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
index d47b55a..1eb24d3 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/myopac/base.tt2
@@ -7,10 +7,10 @@
     ];
     skin_root = "../"
 %]
-    [% INCLUDE "default/kcls-wire/parts/topnav.tt2" %]
+    [% INCLUDE "default/opac/parts/topnav.tt2" %]
     <div id="search-wrapper">
-        [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
-        [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
+        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
         <div id="myopac_tabs">
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/place_hold.tt2
rename to Open-ILS/web/templates/default/opac/parts/place_hold.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2 b/Open-ILS/web/templates/default/opac/parts/record/body.tt2
similarity index 97%
rename from Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2
rename to Open-ILS/web/templates/default/opac/parts/record/body.tt2
index d0f1dfd..b5a8219 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/body.tt2
@@ -85,7 +85,7 @@
         &rdetail.record.deleted;
     </div>
 
-    [% INCLUDE "default/kcls-wire/parts/record/summary.tt2" %]
+    [% INCLUDE "default/opac/parts/record/summary.tt2" %]
     <br />
     <div style="width:100%;" class="hide_me">
         <div style="float:right;" class="hide_me" id="lib_info_more">
@@ -95,7 +95,7 @@
             <button>...Less</button>
         </div>
     </div>
-    [% INCLUDE "default/kcls-wire/parts/record/extras.tt2" %]
+    [% INCLUDE "default/opac/parts/record/extras.tt2" %]
 
     <div class='hide_me' id='rdetail_bb_none'>
         &rdetail.none;
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2
rename to Open-ILS/web/templates/default/opac/parts/record/cn_details.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/copyinfo.tt2 b/Open-ILS/web/templates/default/opac/parts/record/copyinfo.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/record/copyinfo.tt2
rename to Open-ILS/web/templates/default/opac/parts/record/copyinfo.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
similarity index 98%
rename from Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2
rename to Open-ILS/web/templates/default/opac/parts/record/extras.tt2
index a1dc5bb..394bfa8 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2
@@ -280,10 +280,10 @@
                 <span>&rdetail.extras.call.local; </span>
                 <select id='cn_browse_selector'> </select>
             </div>
-            [% INCLUDE "default/kcls-wire/parts/cn_browse.tt2" %]
+            [% INCLUDE "default/opac/parts/cn_browse.tt2" %]
         </div>
 
-        [% INCLUDE "default/kcls-wire/parts/record/cn_details.tt2" %]
+        [% INCLUDE "default/opac/parts/record/cn_details.tt2" %]
 
         <div rel="rdetail_copy_info_div" rel2="copyinfo"
             class="rdetail_extras" id="rdetail_copy_info_link">
@@ -296,7 +296,7 @@
             </div>
         </div>
 
-        [% INCLUDE "default/kcls-wire/parts/record/copyinfo.tt2" %]
+        [% INCLUDE "default/opac/parts/record/copyinfo.tt2" %]
 
         <div rel="rdetail_marc_div" rel2="marc" class="rdetail_extras" id="rdetail_viewmarc_link">
             <div class="rdetail_extras_hr"></div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2
rename to Open-ILS/web/templates/default/opac/parts/record/summary.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/result/header.tt2 b/Open-ILS/web/templates/default/opac/parts/result/header.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/result/header.tt2
rename to Open-ILS/web/templates/default/opac/parts/result/header.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/result/lowhits.tt2 b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/result/lowhits.tt2
rename to Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/result/table.tt2
rename to Open-ILS/web/templates/default/opac/parts/result/table.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
similarity index 90%
rename from Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
rename to Open-ILS/web/templates/default/opac/parts/searchbar.tt2
index ec559f6..507afed 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2
@@ -10,7 +10,7 @@
         </tr>
         <tr>
             <td>
-                [% INCLUDE "default/kcls-wire/parts/stypes_selector.tt2" %]
+                [% INCLUDE "default/opac/parts/stypes_selector.tt2" %]
             </td>
             <td>
                 <div id="search_box_wrapper">
@@ -36,10 +36,10 @@
         </tr>
         <tr>
             <td>
-                [% INCLUDE "default/kcls-wire/parts/format_selector.tt2" %]
+                [% INCLUDE "default/opac/parts/format_selector.tt2" %]
             </td>
             <td>
-                [% INCLUDE "default/kcls-wire/parts/libselect.tt2" %]
+                [% INCLUDE "default/opac/parts/libselect.tt2" %]
             </td>
         </tr>
     </table>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/stypes_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/stypes_selector.tt2
rename to Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/tips.tt2 b/Open-ILS/web/templates/default/opac/parts/tips.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/tips.tt2
rename to Open-ILS/web/templates/default/opac/parts/tips.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
rename to Open-ILS/web/templates/default/opac/parts/topnav.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2 b/Open-ILS/web/templates/default/opac/parts/utils.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
rename to Open-ILS/web/templates/default/opac/parts/utils.tt2
diff --git a/Open-ILS/web/templates/default/opac/place_hold.tt2 b/Open-ILS/web/templates/default/opac/place_hold.tt2
index 91996ad..43e8ab2 100644
--- a/Open-ILS/web/templates/default/opac/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/place_hold.tt2
@@ -1,33 +1,15 @@
-[% BLOCK html_head %]
-<style>
-</style>
-[% END %]
-
-[% 
-    USE CGI;
-    PROCESS "default/opac/common.tt2";
-    WRAPPER "default/opac/base.tt2"; 
-    ctx.page_title = "Place Hold";
-    attrs = {marc_xml => ctx.marc_xml};
-    PROCESS get_marc_attrs args=attrs;
-%]
-
-
-<div>
-    <div>Placing hold on [% attrs.title %], by [% attrs.author %]</div>
-    [% IF ctx.hold_success %] 
-        <div>Succeeded</div>
-    [% ELSIF ctx.hold_failed %]
-        <div>Failed...</div>
-    [% ELSE %]
-    <form action='place_hold' method='POST'>
-        Choose a pickup Library [% PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib %]
-        <input type='Submit'/>
-        <input type='hidden' name='hold_target' value='[% CGI.param('hold_target') %]'/>
-        <input type='hidden' name='hold_type' value='[% CGI.param('hold_type') %]'/>
-        <input type='hidden' name='redirect_to' value='[% ctx.referer %]'/>
-    </form>
-    [% END %]
-</div>
-
+[%  WRAPPER "default/opac/parts/base.tt2";
+    INCLUDE "default/opac/parts/topnav.tt2";
+    ctx.page_title = "Place Hold" %]
+    <div id="search-wrapper">
+        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content">
+            <div class="common-full-pad"></div>	
+            [% INCLUDE "default/opac/parts/place_hold.tt2" %]
+            <div class="common-full-pad"></div>	
+        </div>
+    </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/record.tt2 b/Open-ILS/web/templates/default/opac/record.tt2
index 24f1203..f046ddd 100644
--- a/Open-ILS/web/templates/default/opac/record.tt2
+++ b/Open-ILS/web/templates/default/opac/record.tt2
@@ -1,82 +1,14 @@
-[% BLOCK html_head %]
-<style>
-    table { width: 100%; padding: 20px; margin-top: 30px; }
-    table { border-collapse: collapse; }
-    table td { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
-    table th { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
-    table tr:nth-child(even) { background-color:#ded; }
-    #record_table td { padding-left: 15px; padding-right: 15px; }
-</style>
-[% END %]
-
-[% 
-    WRAPPER "default/opac/base.tt2"; 
-    PROCESS "default/opac/common.tt2";
-    ctx.page_title = "Details";
-    record = ctx.record;
-    attrs = {marc_xml => ctx.marc_xml};
-    PROCESS get_marc_attrs args=attrs;
-%]
-
-<div id='detail_div'>
-    <table id='record_table' style='width:auto'>
-        <tr>
-            <td rowspan='10' style='width:55px; vertical-align:top; padding-right:4px;'>
-                [% IF attrs.isbn_clean || attrs.upc %]
-                <img width='50' height='70' src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% attrs.isbn_clean || attrs.upc %]'/>
-                [% END %]
-            </td>
-        </tr>
-        [% IF attrs.title %]<tr><td>Title</td><td>[% attrs.title %]</td></tr>[% END %]
-        [% IF attrs.author %]<tr><td>Author</td><td><a href='../results?query=au:[% attrs.author | uri %]'>[% attrs.author %]</a></td></tr>[% END %]
-        [% IF attrs.isbn %]<tr><td>ISBN</td><td>[% attrs.isbn %]</td></tr>[% END %]
-        [% IF attrs.issn %]<tr><td>ISSN</td><td>[% attrs.issn %]</td></tr>[% END %]
-        [% IF attrs.upc %]<tr><td>UPC</td><td>[% attrs.upc %]</td></tr>[% END %]
-        [% IF attrs.pubdate %]<tr><td>Publication Date</td><td>[% attrs.pubdate %]</td></tr>[% END %]
-        [% IF attrs.publisher %]<tr><td>Publishere</td><td>[% attrs.publisher %]</td></tr>[% END %]
-        <tr>
-            <td>Subjects</td>
-            <td>
-            [% FOR node IN ctx.marc_xml.findnodes('//*[@tag="650"]') %]
-                [% 
-                    s0 = node.childNodes.0.textContent;
-                    s1 = node.childNodes.1.textContent;
-                %]
-                [% IF s0 %]
-                    <a href='../results?query=su:[% s0 | url %]'>[% s0 %]</a>
-                    [% IF s1 %]
-                    <span>--</span>
-                    <a href='../results?query=su:[% s1 | url %]'>[% s1 %]</a>
-                    [% END %]
-                    <br/>
-                [% END %]
-            [% END %]
-            </td>
-        </tr>
-    </table>
-    <table id='copy_table'>
-        <thead>
-            <tr>
-                <th>Owning Lib</th>
-                <th>Call Number</th>
-                <th>Barcode</th>
-                <th>Status</th>
-            </tr>
-        </thead>
-        <tbody>
-        [% FOR acn IN record.call_numbers %]
-            [% FOR acp IN acn.copies %]
-                <tr>
-                    <td>[% ctx.find_aou(acn.owning_lib).shortname %]</td>
-                    <td>[% acn.label %]</td>
-                    <td>[% acp.barcode %]</td>
-                    <td>[% ctx.find_ccs(acp.status).name %]</td>
-                </tr>
-            [% END %]
-        [% END %]
-        </tbody>
-    </table>
-</div>
-
-
+[%  WRAPPER "default/opac/parts/base.tt2";
+    INCLUDE "default/opac/parts/topnav.tt2";
+    ctx.page_title = "Record Detail" %]
+    <div id="search-wrapper">
+        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content">
+            [% INCLUDE "default/opac/parts/record/body.tt2" %]
+            <div class="common-full-pad"></div>	
+        </div>
+    </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 9ecead4..5e52f13 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -1,117 +1,60 @@
-[% BLOCK html_head %]
-<style>
-    #body_table { width: 100%; margin-top: 20px; }
-    #left_block { width: 15%; vertical-align: top; }
-    #right_block { width: auto; vertical-align: top;}
-    #record_table { border-collapse: collapse; width:100%; }
-    #record_table td { padding: 3px; border-bottom: 1px solid #ddd; }
-    #record_table tr:nth-child(odd) { background-color:#ded; }
-    .record-table-odd { background-color:#ded; }
-    #form_div { text-align: center; width: 100%; margin-top: 10px;}
-    #links_div { margin-bottom: 10px; padding: 5px;}
-</style>
-[% END %]
-
-[% 
-    USE CGI;
-    USE POSIX;
-    WRAPPER "default/opac/base.tt2"; 
-    PROCESS "default/opac/common.tt2";
-    ctx.page_title = "Results";
-    page = CGI.param('page') || 0; 
-    query = CGI.param('query');
-    page_count = POSIX.ceil(ctx.hit_count / ctx.page_size);
-    loc = CGI.param('loc');
-%]
-
-<div id='form_div'>
-    <form action='./results' method='GET'>
-        <input type='text' name='query' size='50' value='[% query %]'/>
-        [% PROCESS build_org_selector name='loc' value=loc %]
-        <input type='submit'/>
-        <input type='hidden' name='page' value='0'/>
-    </form>
-</div>
-
-<table id='body_table'>
-    <tr>
-        <td id='left_block'>
-                [% IF ctx.user; %]
-                    <div id='links_div'>
-                        <div><a href='home'>Home</a></div>
-                        <div><a href='myopac/main'>Account</a></div>
-                        <div><a href='logout'>Logout</a></div>
-                    </div>
-                    <hr/>
-                    <table>
-                        <tr><td colspan='2' style='border-bottom:1px solid #9A9'>Signed in as [% ctx.user.usrname %]</td></tr>
-                        <tr><td>Total Holds</td><td>[% ctx.user_stats.holds.total %]</td></tr>
-                        <tr><td>Ready Holds</td><td>[% ctx.user_stats.holds.ready %]</td></tr>
-                        <tr><td>Items Out</td><td>[% ctx.user_stats.checkouts.out %]</td></tr>
-                        <tr><td>Fines</td><td>$[% ctx.user_stats.fines.balance_owed %]</td></tr>
-                    </table>
-                [% ELSE %]
-                    [% 
-                        login = CGI.url("-path" => 1).replace('^http:', 'https:').replace('/results','/login');
-                    %]
-                    <a href='[% login %]'>Login</a>
-                [% END %]
-            </div>
-            <div>
-                [% FOR facet_type IN ctx.search_facets.keys %]
-                    [% cmf = ctx.search_facets.$facet_type.cmf %]
-                    <b>[% cmf.label %]</b>
-                    <ul>
-                        [% FOR facet IN ctx.search_facets.$facet_type.data.keys %]
-                            [% facet_count = ctx.search_facets.$facet_type.data.$facet %]
-                            <li><a href='results?query=[% query | url %]&facet=[% cmf.field_class %]|[% cmf.name %][[% facet | url %]]'>[% facet_count %] / [% facet %]</a></li>
-                        [% END %]
-                    </ul>
-                [% END %]
+[%  WRAPPER "default/opac/parts/base.tt2";
+    INCLUDE "default/opac/parts/topnav.tt2";
+    ctx.page_title = "Search Results" %]
+    <div id="search-wrapper">
+        [% INCLUDE "default/opac/parts/utils.tt2" %]
+        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="results_header_bar"><!-- XXX give #results_header_bar its own file -->
+            <div id="results_header_inner">
+                <div class="results_header_btns">
+                    <a href="index.xml"><img alt="Another Search"
+                        src="/images/another_search.png"
+                        onmouseover="this.src='/images/another_search_hover.png';"
+                        onmouseout="this.src='/images/another_search.png';" /></a>
+                </div>
+                <div class="results_header_btns">
+                    <a href="advanced"><img alt="Advanced Search"
+                        src="/images/adv_search.png"
+                        onmouseover="this.src='/images/adv_search_hover.png';"
+                        onmouseout="this.src='/images/adv_search.png';" /></a>
+                </div>
+                <div class="results_header_btns cached_list_div">
+                    <a href="#" class="hide_me" id="cacheListLink"><img
+                        alt="View My List"
+                        src="/images/view_my_list.png"
+                        onmouseover="this.src='/images/view_my_list_hover.png';"
+                        onmouseout="this.src='/images/view_my_list.png';" /></a>
+                </div>
+                <div class="results_header_div"></div>
+                <div class="results_header_lbl">Sort by</div>
+        <!--#if expr="$OILS_PAGE='rresult.xml' || $OILS_PAGE='mresult.xml'"-->
+        <!--#include virtual="result/filtersort.xml" -->
+        <!--#endif -->
+                <div class="results_header_div"></div>
+                <div class="results_header_lbl">View</div>
+                <select class="results_header_sel">
+                    <option>Simple</option>
+                    <option>Detailed</option>
+                </select>
+                <div class="results_header_div"></div>
+                <input type="checkbox" id="limit_to_available" />
+                <label for="limit_to_available" class="results_header_lbl">
+                    Limit to available items
+                </label>
+                <div class="clear-both"></div>
             </div>
-        </td>
-        <td id='right_block'>
-            <div>
-                <span>[% l('Hits: [_1] / Page [_2] of [_3]', ctx.hit_count, page + 1, page_count) %]</span>
-                [% 
-                    q = query | url;
-                    np_link = '?query=' _ q;
-                    IF loc; np_link = np_link _ "&loc=" _ loc; END;
-                    IF depth or depth == 0; np_link = np_link _ "&depth=" _ depth; END;
-                %]
-                <a [% IF page > 0 %] href='[% np_link %]&page=[% page - 1 %]' [% END %]>Prev</a>  
-                <a [% IF (page + 1) < page_count %] href='[% np_link %]&page=[% page + 1 %]' [% END %]>Next</a>
+        </div>
+        <div id="main-content">
+            <div id="tehResultsPage">
+                [% INCLUDE "default/opac/parts/result/header.tt2" %]
+                <div id="rresults_page">
+                    [% INCLUDE "default/opac/parts/result/table.tt2" %]
+                    [% INCLUDE "default/opac/parts/result/lowhits.tt2" %]
+                </div>
             </div>
-            <table id='record_table'>
-                [%
-                FOR rec IN ctx.records;
-                    attrs = {marc_xml => rec.marc_xml};
-                    PROCESS get_marc_attrs args=attrs;
-                %]
-                <tr [% IF loop.count % 2 == 1 %] class='record-table-odd' [% END %]>
-                    <td style='width:52px;height:72px'>
-                        [% IF attrs.isbn %]
-                        <img width='50' height='70' src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% attrs.isbn_clean || attrs.upc %]'/>
-                        [% END %]
-                    </td>
-                    <td width='auto'>
-                        <div width='99%'>
-                            <div style='float:left'>
-                                <a href='record/[% rec.bre.id %]'>[% attrs.title %]</a>
-                            </div>
-                            <div style='float:right'>
-                                <span>[% rec.copy_counts.available %] / [% rec.copy_counts.visible %]</span>
-                                <span style='padding-left:10px;'><a href='place_hold?hold_target=[% rec.bre.id %]&hold_type=T'>Hold</a></span>
-                            </div>
-                        </div><br/>
-                        <div>[% attrs.author %]</div>
-                        <div>[% attrs.isbn || attrs.issn || attrs.upc %] [% attrs.publisher %] [% attrs.pubdate %]</div>
-                    </td>
-                </tr>
-                [% END %]
-            </table>
-        </td>
-    </tr>
-
-</table>
+            <div class="common-full-pad"></div>    
+        </div>
+    </div>
 [% END %]

commit 7e4e304b2cd1a828638a42094e508ce52970447f
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 7 12:36:35 2011 -0500

    Big move of css, images, js

diff --git a/Open-ILS/web/opac/skin/kcls-wire/css/contentslider.css b/Open-ILS/web/css/skin/default/opac/contentslider.css
similarity index 100%
rename from Open-ILS/web/opac/skin/kcls-wire/css/contentslider.css
rename to Open-ILS/web/css/skin/default/opac/contentslider.css
diff --git a/Open-ILS/web/opac/skin/kcls-wire/css/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css
similarity index 99%
rename from Open-ILS/web/opac/skin/kcls-wire/css/semiauto.css
rename to Open-ILS/web/css/skin/default/opac/semiauto.css
index 8e01ae1..c081193 100644
--- a/Open-ILS/web/opac/skin/kcls-wire/css/semiauto.css
+++ b/Open-ILS/web/css/skin/default/opac/semiauto.css
@@ -31,7 +31,7 @@
 .float-left { float: left; }
 .opac-auto-039 { float: left; font-weight: bold; padding-top: 5px; }
 .opac-auto-040 { float: left; padding: 5px 0px 0px 10px; }
-.left-corner { float: left; width: 163px; height: 30px; background: url('/opac/skin/kcls/graphics/utils-corner-mid.png') repeat-x top; }
+.left-corner { float: left; width: 163px; height: 30px; background: url('/images/utils-corner-mid.png') repeat-x top; }
 .opac-auto-043 { float: left; width: 300px; margin-top: 20px; }
 .float-right { float: right; }
 .opac-auto-045 { float: right; margin-right: 17px; }
diff --git a/Open-ILS/web/opac/skin/kcls-wire/css/style.css b/Open-ILS/web/css/skin/default/opac/style.css
similarity index 88%
rename from Open-ILS/web/opac/skin/kcls-wire/css/style.css
rename to Open-ILS/web/css/skin/default/opac/style.css
index b673f75..091e8b8 100644
--- a/Open-ILS/web/opac/skin/kcls-wire/css/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -76,11 +76,11 @@ div.select-wrapper {
 	display:inline-block;
 	position:relative;
 	z-index:2;
-	background:url('/opac/skin/kcls/graphics/dropdown.gif') no-repeat right center;
+	background:url('/images/dropdown.gif') no-repeat right center;
 }
 
 div.select-wrapper:hover {
-	background:url('/opac/skin/kcls/graphics/dropdown-hover.gif') no-repeat right center;
+	background:url('/images/dropdown-hover.gif') no-repeat right center;
 }
 
 #dash_wrapper {
@@ -220,7 +220,7 @@ div.select-wrapper:hover {
 	z-index:1;
 	width:150px;
 	height:30px;
-	background:url('/opac/skin/kcls/graphics/utils-corner-left.png') no-repeat left top;
+	background:url('/images/utils-corner-left.png') no-repeat left top;
 	padding-left: 3px;
 	color: white;
 	position:relative;
@@ -245,17 +245,17 @@ div.select-wrapper:hover {
 
 #adv_search {
 	width:156px;
-	background:url('/opac/skin/kcls/graphics/adv_search_on.gif') no-repeat bottom;
+	background:url('/images/adv_search_on.gif') no-repeat bottom;
 }
 
 #num_search {
 	width:156px;
-	background:url('/opac/skin/kcls/graphics/num_search_off.gif') no-repeat bottom;
+	background:url('/images/num_search_off.gif') no-repeat bottom;
 }
 
 #expert_search {
 	width:156px;
-	background:url('/opac/skin/kcls/graphics/expert_search_off.gif') no-repeat bottom;
+	background:url('/images/expert_search_off.gif') no-repeat bottom;
 }
 
 #acct_tabs {
@@ -278,38 +278,38 @@ div.select-wrapper:hover {
 }
 
 .acct-main-off {
-	background-image:url('/opac/skin/kcls/graphics/acct_summary_off.gif');
+	background-image:url('/images/acct_summary_off.gif');
 }
 .acct-main-on {
-	background-image:url('/opac/skin/kcls/graphics/acct_summary_on.gif');
+	background-image:url('/images/acct_summary_on.gif');
 }
 
 .acct-circs-off {
-	background-image:url('/opac/skin/kcls/graphics/acct_checked_out_off.gif');
+	background-image:url('/images/acct_checked_out_off.gif');
 }
 .acct-circs-on {
-	background-image:url('/opac/skin/kcls/graphics/acct_checked_out_on.gif');
+	background-image:url('/images/acct_checked_out_on.gif');
 }
 
 .acct-holds-off {
-	background-image:url('/opac/skin/kcls/graphics/acct_holds_off.gif');
+	background-image:url('/images/acct_holds_off.gif');
 }
 .acct-holds-on {
-	background-image:url('/opac/skin/kcls/graphics/acct_holds_on.gif');
+	background-image:url('/images/acct_holds_on.gif');
 }
 
 .acct-prefs-off {
-	background-image:url('/opac/skin/kcls/graphics/acct_prefs_off.gif');
+	background-image:url('/images/acct_prefs_off.gif');
 }
 .acct-prefs-on {
-	background-image:url('/opac/skin/kcls/graphics/acct_prefs_on.gif');
+	background-image:url('/images/acct_prefs_on.gif');
 }
 
 .acct-lists-off {
-	background-image:url('/opac/skin/kcls/graphics/acct_lists_off.gif');
+	background-image:url('/images/acct_lists_off.gif');
 }
 .acct-lists-on {
-	background-image:url('/opac/skin/kcls/graphics/acct_lists_on.gif');
+	background-image:url('/images/acct_lists_on.gif');
 }
 
 #rdetail_header {
@@ -448,7 +448,7 @@ div.select-wrapper:hover {
 	position:absolute;
 	width:295px;
 	height:192px;
-	background: url('/opac/skin/kcls/graphics/banner-bg.png') no-repeat;
+	background: url('/images/banner-bg.png') no-repeat;
 	color: #fff;
 	padding-left: 33px;
 	padding-top: 21px;
@@ -487,7 +487,7 @@ div.select-wrapper:hover {
 	height: 25px;
 	padding-top: 9px;
 	padding-left: 15px;
-	background: url('/opac/skin/kcls/graphics/button-bg.png') no-repeat;
+	background: url('/images/button-bg.png') no-repeat;
 }
 
 #hp-ql-bottom {
@@ -495,7 +495,7 @@ div.select-wrapper:hover {
 	height: 31px;
 	padding-left: 24px;
 	padding-top: 13px;
-	background: url('/opac/skin/kcls/graphics/hp-links-mid.jpg') repeat-x;
+	background: url('/images/hp-links-mid.jpg') repeat-x;
 }
 
 #hp-ql-bottom a {
@@ -520,7 +520,7 @@ div.select-wrapper:hover {
 
 #main-content .login_boxes {
 	border: 1px solid #dedede;
-	background:url('/opac/skin/kcls/graphics/login-bg.jpg') top repeat-x;
+	background:url('/images/login-bg.jpg') top repeat-x;
 	color: #333;
 }
 
@@ -548,7 +548,7 @@ div.select-wrapper:hover {
 
 #main-content .left_brain .input_bg {
 	padding:10px 10px 0px 13px;
-	background: url('/opac/skin/kcls/graphics/login-box-bg.jpg') no-repeat;
+	background: url('/images/login-box-bg.jpg') no-repeat;
 	width:167px;
 	height:29px;
 }
@@ -765,7 +765,7 @@ div.select-wrapper:hover {
 }
 
 #acct_checked_tabs .selected, #acct_holds_tabs .selected, #acct_prefs_tabs .selected {
-	/*background:url('/opac/skin/kcls/graphics/gray-arrow.png') left 3px no-repeat;*/
+	/*background:url('/images/gray-arrow.png') left 3px no-repeat;*/
 }
 
 #acct_checked_main_header, #acct_holds_main_header, #acct_checked_hist_header, #acct_list_header, #acct_list_header_anon, #temp_list_holds {
diff --git a/Open-ILS/web/images/KCLS_logo_horiz.gif b/Open-ILS/web/images/KCLS_logo_horiz.gif
new file mode 100644
index 0000000..8e1d56e
Binary files /dev/null and b/Open-ILS/web/images/KCLS_logo_horiz.gif differ
diff --git a/Open-ILS/web/images/acct-btn-hover.png b/Open-ILS/web/images/acct-btn-hover.png
new file mode 100644
index 0000000..1e6e20a
Binary files /dev/null and b/Open-ILS/web/images/acct-btn-hover.png differ
diff --git a/Open-ILS/web/images/acct-btn.png b/Open-ILS/web/images/acct-btn.png
new file mode 100644
index 0000000..c9b92cd
Binary files /dev/null and b/Open-ILS/web/images/acct-btn.png differ
diff --git a/Open-ILS/web/images/acct_checked_out_off.gif b/Open-ILS/web/images/acct_checked_out_off.gif
new file mode 100644
index 0000000..dcfcfcb
Binary files /dev/null and b/Open-ILS/web/images/acct_checked_out_off.gif differ
diff --git a/Open-ILS/web/images/acct_checked_out_on.gif b/Open-ILS/web/images/acct_checked_out_on.gif
new file mode 100644
index 0000000..f364d38
Binary files /dev/null and b/Open-ILS/web/images/acct_checked_out_on.gif differ
diff --git a/Open-ILS/web/images/acct_favs_off.gif b/Open-ILS/web/images/acct_favs_off.gif
new file mode 100644
index 0000000..5ffc024
Binary files /dev/null and b/Open-ILS/web/images/acct_favs_off.gif differ
diff --git a/Open-ILS/web/images/acct_favs_on.gif b/Open-ILS/web/images/acct_favs_on.gif
new file mode 100644
index 0000000..f96342a
Binary files /dev/null and b/Open-ILS/web/images/acct_favs_on.gif differ
diff --git a/Open-ILS/web/images/acct_holds_off.gif b/Open-ILS/web/images/acct_holds_off.gif
new file mode 100644
index 0000000..6179396
Binary files /dev/null and b/Open-ILS/web/images/acct_holds_off.gif differ
diff --git a/Open-ILS/web/images/acct_holds_on.gif b/Open-ILS/web/images/acct_holds_on.gif
new file mode 100644
index 0000000..d1c75bb
Binary files /dev/null and b/Open-ILS/web/images/acct_holds_on.gif differ
diff --git a/Open-ILS/web/images/acct_lists_off.gif b/Open-ILS/web/images/acct_lists_off.gif
new file mode 100644
index 0000000..9a5b2a2
Binary files /dev/null and b/Open-ILS/web/images/acct_lists_off.gif differ
diff --git a/Open-ILS/web/images/acct_lists_on.gif b/Open-ILS/web/images/acct_lists_on.gif
new file mode 100644
index 0000000..668b0c9
Binary files /dev/null and b/Open-ILS/web/images/acct_lists_on.gif differ
diff --git a/Open-ILS/web/images/acct_prefs_off.gif b/Open-ILS/web/images/acct_prefs_off.gif
new file mode 100644
index 0000000..c357add
Binary files /dev/null and b/Open-ILS/web/images/acct_prefs_off.gif differ
diff --git a/Open-ILS/web/images/acct_prefs_on.gif b/Open-ILS/web/images/acct_prefs_on.gif
new file mode 100644
index 0000000..67d1f47
Binary files /dev/null and b/Open-ILS/web/images/acct_prefs_on.gif differ
diff --git a/Open-ILS/web/images/acct_sum_fines_bl.png b/Open-ILS/web/images/acct_sum_fines_bl.png
new file mode 100644
index 0000000..d750579
Binary files /dev/null and b/Open-ILS/web/images/acct_sum_fines_bl.png differ
diff --git a/Open-ILS/web/images/acct_sum_fines_br.png b/Open-ILS/web/images/acct_sum_fines_br.png
new file mode 100644
index 0000000..8aa81f0
Binary files /dev/null and b/Open-ILS/web/images/acct_sum_fines_br.png differ
diff --git a/Open-ILS/web/images/acct_sum_fines_tl.png b/Open-ILS/web/images/acct_sum_fines_tl.png
new file mode 100644
index 0000000..17051c9
Binary files /dev/null and b/Open-ILS/web/images/acct_sum_fines_tl.png differ
diff --git a/Open-ILS/web/images/acct_sum_fines_tr.png b/Open-ILS/web/images/acct_sum_fines_tr.png
new file mode 100644
index 0000000..fb9dac3
Binary files /dev/null and b/Open-ILS/web/images/acct_sum_fines_tr.png differ
diff --git a/Open-ILS/web/images/acct_summary_off.gif b/Open-ILS/web/images/acct_summary_off.gif
new file mode 100644
index 0000000..63456c1
Binary files /dev/null and b/Open-ILS/web/images/acct_summary_off.gif differ
diff --git a/Open-ILS/web/images/acct_summary_on.gif b/Open-ILS/web/images/acct_summary_on.gif
new file mode 100644
index 0000000..99d4990
Binary files /dev/null and b/Open-ILS/web/images/acct_summary_on.gif differ
diff --git a/Open-ILS/web/images/add_mylist.gif b/Open-ILS/web/images/add_mylist.gif
new file mode 100644
index 0000000..a30b32d
Binary files /dev/null and b/Open-ILS/web/images/add_mylist.gif differ
diff --git a/Open-ILS/web/images/add_mylist_sel.gif b/Open-ILS/web/images/add_mylist_sel.gif
new file mode 100644
index 0000000..0448d21
Binary files /dev/null and b/Open-ILS/web/images/add_mylist_sel.gif differ
diff --git a/Open-ILS/web/images/add_mylist_sel.kcls.gif b/Open-ILS/web/images/add_mylist_sel.kcls.gif
new file mode 100644
index 0000000..45bd8b6
Binary files /dev/null and b/Open-ILS/web/images/add_mylist_sel.kcls.gif differ
diff --git a/Open-ILS/web/images/add_search_row_btn.gif b/Open-ILS/web/images/add_search_row_btn.gif
new file mode 100644
index 0000000..a48e68c
Binary files /dev/null and b/Open-ILS/web/images/add_search_row_btn.gif differ
diff --git a/Open-ILS/web/images/adv_search.png b/Open-ILS/web/images/adv_search.png
new file mode 100644
index 0000000..79fb08a
Binary files /dev/null and b/Open-ILS/web/images/adv_search.png differ
diff --git a/Open-ILS/web/images/adv_search_hover.png b/Open-ILS/web/images/adv_search_hover.png
new file mode 100644
index 0000000..0cb3fe1
Binary files /dev/null and b/Open-ILS/web/images/adv_search_hover.png differ
diff --git a/Open-ILS/web/images/adv_search_off.gif b/Open-ILS/web/images/adv_search_off.gif
new file mode 100644
index 0000000..a129b93
Binary files /dev/null and b/Open-ILS/web/images/adv_search_off.gif differ
diff --git a/Open-ILS/web/images/adv_search_on.gif b/Open-ILS/web/images/adv_search_on.gif
new file mode 100644
index 0000000..d0faa4f
Binary files /dev/null and b/Open-ILS/web/images/adv_search_on.gif differ
diff --git a/Open-ILS/web/images/another_search.png b/Open-ILS/web/images/another_search.png
new file mode 100644
index 0000000..4bcd214
Binary files /dev/null and b/Open-ILS/web/images/another_search.png differ
diff --git a/Open-ILS/web/images/another_search_hover.png b/Open-ILS/web/images/another_search_hover.png
new file mode 100644
index 0000000..08efaf5
Binary files /dev/null and b/Open-ILS/web/images/another_search_hover.png differ
diff --git a/Open-ILS/web/images/arrow-down.gif b/Open-ILS/web/images/arrow-down.gif
new file mode 100644
index 0000000..ebf64c4
Binary files /dev/null and b/Open-ILS/web/images/arrow-down.gif differ
diff --git a/Open-ILS/web/images/arrow-right.gif b/Open-ILS/web/images/arrow-right.gif
new file mode 100644
index 0000000..6c82655
Binary files /dev/null and b/Open-ILS/web/images/arrow-right.gif differ
diff --git a/Open-ILS/web/images/arrow-right.png b/Open-ILS/web/images/arrow-right.png
new file mode 100644
index 0000000..232a5e4
Binary files /dev/null and b/Open-ILS/web/images/arrow-right.png differ
diff --git a/Open-ILS/web/images/asknow_available.gif b/Open-ILS/web/images/asknow_available.gif
new file mode 100644
index 0000000..326c8d1
Binary files /dev/null and b/Open-ILS/web/images/asknow_available.gif differ
diff --git a/Open-ILS/web/images/banner-bg.png b/Open-ILS/web/images/banner-bg.png
new file mode 100644
index 0000000..6d990c5
Binary files /dev/null and b/Open-ILS/web/images/banner-bg.png differ
diff --git a/Open-ILS/web/images/banner1.jpg b/Open-ILS/web/images/banner1.jpg
new file mode 100644
index 0000000..28eaafc
Binary files /dev/null and b/Open-ILS/web/images/banner1.jpg differ
diff --git a/Open-ILS/web/images/btnCancel.png b/Open-ILS/web/images/btnCancel.png
new file mode 100644
index 0000000..4cfacaf
Binary files /dev/null and b/Open-ILS/web/images/btnCancel.png differ
diff --git a/Open-ILS/web/images/btnSubmit.png b/Open-ILS/web/images/btnSubmit.png
new file mode 100644
index 0000000..7a67408
Binary files /dev/null and b/Open-ILS/web/images/btnSubmit.png differ
diff --git a/Open-ILS/web/images/button-bg.png b/Open-ILS/web/images/button-bg.png
new file mode 100644
index 0000000..38390aa
Binary files /dev/null and b/Open-ILS/web/images/button-bg.png differ
diff --git a/Open-ILS/web/images/cancel_btn.gif b/Open-ILS/web/images/cancel_btn.gif
new file mode 100644
index 0000000..1cebf59
Binary files /dev/null and b/Open-ILS/web/images/cancel_btn.gif differ
diff --git a/Open-ILS/web/images/cd-small.png b/Open-ILS/web/images/cd-small.png
new file mode 100644
index 0000000..d2f8fb4
Binary files /dev/null and b/Open-ILS/web/images/cd-small.png differ
diff --git a/Open-ILS/web/images/clipboard.png b/Open-ILS/web/images/clipboard.png
new file mode 100644
index 0000000..b4bf071
Binary files /dev/null and b/Open-ILS/web/images/clipboard.png differ
diff --git a/Open-ILS/web/images/dash-corner-left1.png b/Open-ILS/web/images/dash-corner-left1.png
new file mode 100644
index 0000000..9559e8b
Binary files /dev/null and b/Open-ILS/web/images/dash-corner-left1.png differ
diff --git a/Open-ILS/web/images/dash-corner-left2.png b/Open-ILS/web/images/dash-corner-left2.png
new file mode 100644
index 0000000..5bc8112
Binary files /dev/null and b/Open-ILS/web/images/dash-corner-left2.png differ
diff --git a/Open-ILS/web/images/dash-corner-mid1.png b/Open-ILS/web/images/dash-corner-mid1.png
new file mode 100644
index 0000000..546b8a8
Binary files /dev/null and b/Open-ILS/web/images/dash-corner-mid1.png differ
diff --git a/Open-ILS/web/images/dash-corner-mid2.png b/Open-ILS/web/images/dash-corner-mid2.png
new file mode 100644
index 0000000..15af112
Binary files /dev/null and b/Open-ILS/web/images/dash-corner-mid2.png differ
diff --git a/Open-ILS/web/images/dash-corner-right1.png b/Open-ILS/web/images/dash-corner-right1.png
new file mode 100644
index 0000000..061afc9
Binary files /dev/null and b/Open-ILS/web/images/dash-corner-right1.png differ
diff --git a/Open-ILS/web/images/dash-corner-right2.png b/Open-ILS/web/images/dash-corner-right2.png
new file mode 100644
index 0000000..8663e0c
Binary files /dev/null and b/Open-ILS/web/images/dash-corner-right2.png differ
diff --git a/Open-ILS/web/images/dash-divider.jpg b/Open-ILS/web/images/dash-divider.jpg
new file mode 100644
index 0000000..19dda7d
Binary files /dev/null and b/Open-ILS/web/images/dash-divider.jpg differ
diff --git a/Open-ILS/web/images/dropdown-hover.gif b/Open-ILS/web/images/dropdown-hover.gif
new file mode 100644
index 0000000..1ac62ae
Binary files /dev/null and b/Open-ILS/web/images/dropdown-hover.gif differ
diff --git a/Open-ILS/web/images/dropdown.gif b/Open-ILS/web/images/dropdown.gif
new file mode 100644
index 0000000..3aab6fe
Binary files /dev/null and b/Open-ILS/web/images/dropdown.gif differ
diff --git a/Open-ILS/web/images/expert_search_off.gif b/Open-ILS/web/images/expert_search_off.gif
new file mode 100644
index 0000000..96b4f51
Binary files /dev/null and b/Open-ILS/web/images/expert_search_off.gif differ
diff --git a/Open-ILS/web/images/expert_search_on.gif b/Open-ILS/web/images/expert_search_on.gif
new file mode 100644
index 0000000..6a41861
Binary files /dev/null and b/Open-ILS/web/images/expert_search_on.gif differ
diff --git a/Open-ILS/web/images/faqs-btn.png b/Open-ILS/web/images/faqs-btn.png
new file mode 100644
index 0000000..38134ec
Binary files /dev/null and b/Open-ILS/web/images/faqs-btn.png differ
diff --git a/Open-ILS/web/images/go-btn-hover.png b/Open-ILS/web/images/go-btn-hover.png
new file mode 100644
index 0000000..9b878b2
Binary files /dev/null and b/Open-ILS/web/images/go-btn-hover.png differ
diff --git a/Open-ILS/web/images/go-btn.png b/Open-ILS/web/images/go-btn.png
new file mode 100644
index 0000000..24091c9
Binary files /dev/null and b/Open-ILS/web/images/go-btn.png differ
diff --git a/Open-ILS/web/images/go_but_long.gif b/Open-ILS/web/images/go_but_long.gif
new file mode 100644
index 0000000..79d2f9a
Binary files /dev/null and b/Open-ILS/web/images/go_but_long.gif differ
diff --git a/Open-ILS/web/images/golive.jpg b/Open-ILS/web/images/golive.jpg
new file mode 100644
index 0000000..8b34912
Binary files /dev/null and b/Open-ILS/web/images/golive.jpg differ
diff --git a/Open-ILS/web/images/gray-arrow.png b/Open-ILS/web/images/gray-arrow.png
new file mode 100644
index 0000000..bf56b6e
Binary files /dev/null and b/Open-ILS/web/images/gray-arrow.png differ
diff --git a/Open-ILS/web/images/green_check.png b/Open-ILS/web/images/green_check.png
new file mode 100644
index 0000000..9738bd8
Binary files /dev/null and b/Open-ILS/web/images/green_check.png differ
diff --git a/Open-ILS/web/images/header_left.gif b/Open-ILS/web/images/header_left.gif
new file mode 100644
index 0000000..9543795
Binary files /dev/null and b/Open-ILS/web/images/header_left.gif differ
diff --git a/Open-ILS/web/images/header_right.gif b/Open-ILS/web/images/header_right.gif
new file mode 100644
index 0000000..f00ff76
Binary files /dev/null and b/Open-ILS/web/images/header_right.gif differ
diff --git a/Open-ILS/web/images/hp-links-left.jpg b/Open-ILS/web/images/hp-links-left.jpg
new file mode 100644
index 0000000..e7806c3
Binary files /dev/null and b/Open-ILS/web/images/hp-links-left.jpg differ
diff --git a/Open-ILS/web/images/hp-links-mid.jpg b/Open-ILS/web/images/hp-links-mid.jpg
new file mode 100644
index 0000000..c9cdabf
Binary files /dev/null and b/Open-ILS/web/images/hp-links-mid.jpg differ
diff --git a/Open-ILS/web/images/hp-links-right.jpg b/Open-ILS/web/images/hp-links-right.jpg
new file mode 100644
index 0000000..0b713d9
Binary files /dev/null and b/Open-ILS/web/images/hp-links-right.jpg differ
diff --git a/Open-ILS/web/images/locations.jpg b/Open-ILS/web/images/locations.jpg
new file mode 100644
index 0000000..56e7785
Binary files /dev/null and b/Open-ILS/web/images/locations.jpg differ
diff --git a/Open-ILS/web/images/login-bg.jpg b/Open-ILS/web/images/login-bg.jpg
new file mode 100644
index 0000000..46fc85f
Binary files /dev/null and b/Open-ILS/web/images/login-bg.jpg differ
diff --git a/Open-ILS/web/images/login-bg2.jpg b/Open-ILS/web/images/login-bg2.jpg
new file mode 100644
index 0000000..2c38853
Binary files /dev/null and b/Open-ILS/web/images/login-bg2.jpg differ
diff --git a/Open-ILS/web/images/login-box-bg.jpg b/Open-ILS/web/images/login-box-bg.jpg
new file mode 100644
index 0000000..caf036d
Binary files /dev/null and b/Open-ILS/web/images/login-box-bg.jpg differ
diff --git a/Open-ILS/web/images/login-btn-hover.png b/Open-ILS/web/images/login-btn-hover.png
new file mode 100644
index 0000000..442f33f
Binary files /dev/null and b/Open-ILS/web/images/login-btn-hover.png differ
diff --git a/Open-ILS/web/images/login-btn.gif b/Open-ILS/web/images/login-btn.gif
new file mode 100644
index 0000000..69d6a56
Binary files /dev/null and b/Open-ILS/web/images/login-btn.gif differ
diff --git a/Open-ILS/web/images/login-btn.png b/Open-ILS/web/images/login-btn.png
new file mode 100644
index 0000000..5548b99
Binary files /dev/null and b/Open-ILS/web/images/login-btn.png differ
diff --git a/Open-ILS/web/images/login-btn2.png b/Open-ILS/web/images/login-btn2.png
new file mode 100644
index 0000000..ff4af14
Binary files /dev/null and b/Open-ILS/web/images/login-btn2.png differ
diff --git a/Open-ILS/web/images/logout-btn-hover.png b/Open-ILS/web/images/logout-btn-hover.png
new file mode 100644
index 0000000..411fc01
Binary files /dev/null and b/Open-ILS/web/images/logout-btn-hover.png differ
diff --git a/Open-ILS/web/images/logout-btn.png b/Open-ILS/web/images/logout-btn.png
new file mode 100644
index 0000000..bd31a47
Binary files /dev/null and b/Open-ILS/web/images/logout-btn.png differ
diff --git a/Open-ILS/web/images/media_3dobject.jpg b/Open-ILS/web/images/media_3dobject.jpg
new file mode 100644
index 0000000..21ee11d
Binary files /dev/null and b/Open-ILS/web/images/media_3dobject.jpg differ
diff --git a/Open-ILS/web/images/media_book.jpg b/Open-ILS/web/images/media_book.jpg
new file mode 100644
index 0000000..d928e6e
Binary files /dev/null and b/Open-ILS/web/images/media_book.jpg differ
diff --git a/Open-ILS/web/images/media_bookoncassette.jpg b/Open-ILS/web/images/media_bookoncassette.jpg
new file mode 100644
index 0000000..acc469e
Binary files /dev/null and b/Open-ILS/web/images/media_bookoncassette.jpg differ
diff --git a/Open-ILS/web/images/media_bookoncassettecd.jpg b/Open-ILS/web/images/media_bookoncassettecd.jpg
new file mode 100644
index 0000000..e288689
Binary files /dev/null and b/Open-ILS/web/images/media_bookoncassettecd.jpg differ
diff --git a/Open-ILS/web/images/media_bookoncd.jpg b/Open-ILS/web/images/media_bookoncd.jpg
new file mode 100644
index 0000000..9e49aed
Binary files /dev/null and b/Open-ILS/web/images/media_bookoncd.jpg differ
diff --git a/Open-ILS/web/images/media_cassettewithbook.jpg b/Open-ILS/web/images/media_cassettewithbook.jpg
new file mode 100644
index 0000000..c434af6
Binary files /dev/null and b/Open-ILS/web/images/media_cassettewithbook.jpg differ
diff --git a/Open-ILS/web/images/media_cdrom.jpg b/Open-ILS/web/images/media_cdrom.jpg
new file mode 100644
index 0000000..59f9702
Binary files /dev/null and b/Open-ILS/web/images/media_cdrom.jpg differ
diff --git a/Open-ILS/web/images/media_cdwithbook.jpg b/Open-ILS/web/images/media_cdwithbook.jpg
new file mode 100644
index 0000000..b1828d8
Binary files /dev/null and b/Open-ILS/web/images/media_cdwithbook.jpg differ
diff --git a/Open-ILS/web/images/media_downloadebook.jpg b/Open-ILS/web/images/media_downloadebook.jpg
new file mode 100644
index 0000000..ce97463
Binary files /dev/null and b/Open-ILS/web/images/media_downloadebook.jpg differ
diff --git a/Open-ILS/web/images/media_downloadmusic.jpg b/Open-ILS/web/images/media_downloadmusic.jpg
new file mode 100644
index 0000000..953b7e7
Binary files /dev/null and b/Open-ILS/web/images/media_downloadmusic.jpg differ
diff --git a/Open-ILS/web/images/media_downloadvideo.jpg b/Open-ILS/web/images/media_downloadvideo.jpg
new file mode 100644
index 0000000..e3abfc3
Binary files /dev/null and b/Open-ILS/web/images/media_downloadvideo.jpg differ
diff --git a/Open-ILS/web/images/media_dvd.jpg b/Open-ILS/web/images/media_dvd.jpg
new file mode 100644
index 0000000..905f623
Binary files /dev/null and b/Open-ILS/web/images/media_dvd.jpg differ
diff --git a/Open-ILS/web/images/media_eaudio.jpg b/Open-ILS/web/images/media_eaudio.jpg
new file mode 100644
index 0000000..0d810ba
Binary files /dev/null and b/Open-ILS/web/images/media_eaudio.jpg differ
diff --git a/Open-ILS/web/images/media_ebooktext.jpg b/Open-ILS/web/images/media_ebooktext.jpg
new file mode 100644
index 0000000..c45f944
Binary files /dev/null and b/Open-ILS/web/images/media_ebooktext.jpg differ
diff --git a/Open-ILS/web/images/media_equipment.jpg b/Open-ILS/web/images/media_equipment.jpg
new file mode 100644
index 0000000..47b8377
Binary files /dev/null and b/Open-ILS/web/images/media_equipment.jpg differ
diff --git a/Open-ILS/web/images/media_films.jpg b/Open-ILS/web/images/media_films.jpg
new file mode 100644
index 0000000..99b74a0
Binary files /dev/null and b/Open-ILS/web/images/media_films.jpg differ
diff --git a/Open-ILS/web/images/media_games.jpg b/Open-ILS/web/images/media_games.jpg
new file mode 100644
index 0000000..24d50ae
Binary files /dev/null and b/Open-ILS/web/images/media_games.jpg differ
diff --git a/Open-ILS/web/images/media_kit.jpg b/Open-ILS/web/images/media_kit.jpg
new file mode 100644
index 0000000..ea50e56
Binary files /dev/null and b/Open-ILS/web/images/media_kit.jpg differ
diff --git a/Open-ILS/web/images/media_language.jpg b/Open-ILS/web/images/media_language.jpg
new file mode 100644
index 0000000..0d86b5b
Binary files /dev/null and b/Open-ILS/web/images/media_language.jpg differ
diff --git a/Open-ILS/web/images/media_largeprint.jpg b/Open-ILS/web/images/media_largeprint.jpg
new file mode 100644
index 0000000..bd8b0a4
Binary files /dev/null and b/Open-ILS/web/images/media_largeprint.jpg differ
diff --git a/Open-ILS/web/images/media_magazines.jpg b/Open-ILS/web/images/media_magazines.jpg
new file mode 100644
index 0000000..e8bb737
Binary files /dev/null and b/Open-ILS/web/images/media_magazines.jpg differ
diff --git a/Open-ILS/web/images/media_map.jpg b/Open-ILS/web/images/media_map.jpg
new file mode 100644
index 0000000..9236724
Binary files /dev/null and b/Open-ILS/web/images/media_map.jpg differ
diff --git a/Open-ILS/web/images/media_microform.jpg b/Open-ILS/web/images/media_microform.jpg
new file mode 100644
index 0000000..7e7e0dc
Binary files /dev/null and b/Open-ILS/web/images/media_microform.jpg differ
diff --git a/Open-ILS/web/images/media_musiccassete.jpg b/Open-ILS/web/images/media_musiccassete.jpg
new file mode 100644
index 0000000..7d9a779
Binary files /dev/null and b/Open-ILS/web/images/media_musiccassete.jpg differ
diff --git a/Open-ILS/web/images/media_musiccassette.jpg b/Open-ILS/web/images/media_musiccassette.jpg
new file mode 100644
index 0000000..c4a673f
Binary files /dev/null and b/Open-ILS/web/images/media_musiccassette.jpg differ
diff --git a/Open-ILS/web/images/media_musiccd.jpg b/Open-ILS/web/images/media_musiccd.jpg
new file mode 100644
index 0000000..f82eaed
Binary files /dev/null and b/Open-ILS/web/images/media_musiccd.jpg differ
diff --git a/Open-ILS/web/images/media_musicrecord.jpg b/Open-ILS/web/images/media_musicrecord.jpg
new file mode 100644
index 0000000..4731692
Binary files /dev/null and b/Open-ILS/web/images/media_musicrecord.jpg differ
diff --git a/Open-ILS/web/images/media_newspaper.jpg b/Open-ILS/web/images/media_newspaper.jpg
new file mode 100644
index 0000000..8a7b769
Binary files /dev/null and b/Open-ILS/web/images/media_newspaper.jpg differ
diff --git a/Open-ILS/web/images/media_online.jpg b/Open-ILS/web/images/media_online.jpg
new file mode 100644
index 0000000..2f9cfcc
Binary files /dev/null and b/Open-ILS/web/images/media_online.jpg differ
diff --git a/Open-ILS/web/images/media_onlinejournal.jpg b/Open-ILS/web/images/media_onlinejournal.jpg
new file mode 100644
index 0000000..3528f1c
Binary files /dev/null and b/Open-ILS/web/images/media_onlinejournal.jpg differ
diff --git a/Open-ILS/web/images/media_podcasts.jpg b/Open-ILS/web/images/media_podcasts.jpg
new file mode 100644
index 0000000..c65727c
Binary files /dev/null and b/Open-ILS/web/images/media_podcasts.jpg differ
diff --git a/Open-ILS/web/images/media_printedmusic.jpg b/Open-ILS/web/images/media_printedmusic.jpg
new file mode 100644
index 0000000..2379dbd
Binary files /dev/null and b/Open-ILS/web/images/media_printedmusic.jpg differ
diff --git a/Open-ILS/web/images/media_projectedmedia.jpg b/Open-ILS/web/images/media_projectedmedia.jpg
new file mode 100644
index 0000000..99b74a0
Binary files /dev/null and b/Open-ILS/web/images/media_projectedmedia.jpg differ
diff --git a/Open-ILS/web/images/media_sheetmusic.jpg b/Open-ILS/web/images/media_sheetmusic.jpg
new file mode 100644
index 0000000..9207268
Binary files /dev/null and b/Open-ILS/web/images/media_sheetmusic.jpg differ
diff --git a/Open-ILS/web/images/media_slide.jpg b/Open-ILS/web/images/media_slide.jpg
new file mode 100644
index 0000000..62aca57
Binary files /dev/null and b/Open-ILS/web/images/media_slide.jpg differ
diff --git a/Open-ILS/web/images/media_software.jpg b/Open-ILS/web/images/media_software.jpg
new file mode 100644
index 0000000..090cee2
Binary files /dev/null and b/Open-ILS/web/images/media_software.jpg differ
diff --git a/Open-ILS/web/images/media_streamingaudio.jpg b/Open-ILS/web/images/media_streamingaudio.jpg
new file mode 100644
index 0000000..3efafe8
Binary files /dev/null and b/Open-ILS/web/images/media_streamingaudio.jpg differ
diff --git a/Open-ILS/web/images/media_streamingvideo.jpg b/Open-ILS/web/images/media_streamingvideo.jpg
new file mode 100644
index 0000000..ab9bf9c
Binary files /dev/null and b/Open-ILS/web/images/media_streamingvideo.jpg differ
diff --git a/Open-ILS/web/images/media_vhs.jpg b/Open-ILS/web/images/media_vhs.jpg
new file mode 100644
index 0000000..228d156
Binary files /dev/null and b/Open-ILS/web/images/media_vhs.jpg differ
diff --git a/Open-ILS/web/images/num_search_off.gif b/Open-ILS/web/images/num_search_off.gif
new file mode 100644
index 0000000..1062802
Binary files /dev/null and b/Open-ILS/web/images/num_search_off.gif differ
diff --git a/Open-ILS/web/images/num_search_on.gif b/Open-ILS/web/images/num_search_on.gif
new file mode 100644
index 0000000..f7d7829
Binary files /dev/null and b/Open-ILS/web/images/num_search_on.gif differ
diff --git a/Open-ILS/web/images/one_land.gif b/Open-ILS/web/images/one_land.gif
new file mode 100644
index 0000000..082b996
Binary files /dev/null and b/Open-ILS/web/images/one_land.gif differ
diff --git a/Open-ILS/web/images/pay-fines-btn-hover.png b/Open-ILS/web/images/pay-fines-btn-hover.png
new file mode 100644
index 0000000..b7708da
Binary files /dev/null and b/Open-ILS/web/images/pay-fines-btn-hover.png differ
diff --git a/Open-ILS/web/images/pay-fines-btn.png b/Open-ILS/web/images/pay-fines-btn.png
new file mode 100644
index 0000000..356433b
Binary files /dev/null and b/Open-ILS/web/images/pay-fines-btn.png differ
diff --git a/Open-ILS/web/images/pay_fines_btn.gif b/Open-ILS/web/images/pay_fines_btn.gif
new file mode 100644
index 0000000..eb4816f
Binary files /dev/null and b/Open-ILS/web/images/pay_fines_btn.gif differ
diff --git a/Open-ILS/web/images/place_hold.gif b/Open-ILS/web/images/place_hold.gif
new file mode 100644
index 0000000..3f72215
Binary files /dev/null and b/Open-ILS/web/images/place_hold.gif differ
diff --git a/Open-ILS/web/images/plus_sign.png b/Open-ILS/web/images/plus_sign.png
new file mode 100644
index 0000000..a17d58a
Binary files /dev/null and b/Open-ILS/web/images/plus_sign.png differ
diff --git a/Open-ILS/web/images/projectedmedia.jpg b/Open-ILS/web/images/projectedmedia.jpg
new file mode 100644
index 0000000..ba0e6d2
Binary files /dev/null and b/Open-ILS/web/images/projectedmedia.jpg differ
diff --git a/Open-ILS/web/images/question-mark.png b/Open-ILS/web/images/question-mark.png
new file mode 100644
index 0000000..b5f0f87
Binary files /dev/null and b/Open-ILS/web/images/question-mark.png differ
diff --git a/Open-ILS/web/images/questions.png b/Open-ILS/web/images/questions.png
new file mode 100644
index 0000000..9be69b2
Binary files /dev/null and b/Open-ILS/web/images/questions.png differ
diff --git a/Open-ILS/web/images/rdetail_arrow.png b/Open-ILS/web/images/rdetail_arrow.png
new file mode 100644
index 0000000..e464bf2
Binary files /dev/null and b/Open-ILS/web/images/rdetail_arrow.png differ
diff --git a/Open-ILS/web/images/reset_form_btn.gif b/Open-ILS/web/images/reset_form_btn.gif
new file mode 100644
index 0000000..6b70964
Binary files /dev/null and b/Open-ILS/web/images/reset_form_btn.gif differ
diff --git a/Open-ILS/web/images/reviews.gif b/Open-ILS/web/images/reviews.gif
new file mode 100644
index 0000000..b78fa25
Binary files /dev/null and b/Open-ILS/web/images/reviews.gif differ
diff --git a/Open-ILS/web/images/save-btn.png b/Open-ILS/web/images/save-btn.png
new file mode 100644
index 0000000..4565850
Binary files /dev/null and b/Open-ILS/web/images/save-btn.png differ
diff --git a/Open-ILS/web/images/save_btn.gif b/Open-ILS/web/images/save_btn.gif
new file mode 100644
index 0000000..f87282a
Binary files /dev/null and b/Open-ILS/web/images/save_btn.gif differ
diff --git a/Open-ILS/web/images/search_btn.gif b/Open-ILS/web/images/search_btn.gif
new file mode 100644
index 0000000..f2fdc9b
Binary files /dev/null and b/Open-ILS/web/images/search_btn.gif differ
diff --git a/Open-ILS/web/images/starz.png b/Open-ILS/web/images/starz.png
new file mode 100644
index 0000000..4a79dd4
Binary files /dev/null and b/Open-ILS/web/images/starz.png differ
diff --git a/Open-ILS/web/images/sub_checked_hist_off.jpg b/Open-ILS/web/images/sub_checked_hist_off.jpg
new file mode 100644
index 0000000..7fda1c3
Binary files /dev/null and b/Open-ILS/web/images/sub_checked_hist_off.jpg differ
diff --git a/Open-ILS/web/images/sub_checked_hist_on.jpg b/Open-ILS/web/images/sub_checked_hist_on.jpg
new file mode 100644
index 0000000..703aac1
Binary files /dev/null and b/Open-ILS/web/images/sub_checked_hist_on.jpg differ
diff --git a/Open-ILS/web/images/sub_checked_out_off.jpg b/Open-ILS/web/images/sub_checked_out_off.jpg
new file mode 100644
index 0000000..0573fbd
Binary files /dev/null and b/Open-ILS/web/images/sub_checked_out_off.jpg differ
diff --git a/Open-ILS/web/images/sub_checked_out_on.jpg b/Open-ILS/web/images/sub_checked_out_on.jpg
new file mode 100644
index 0000000..97bb178
Binary files /dev/null and b/Open-ILS/web/images/sub_checked_out_on.jpg differ
diff --git a/Open-ILS/web/images/sub_holds_hist_off.jpg b/Open-ILS/web/images/sub_holds_hist_off.jpg
new file mode 100644
index 0000000..020abe9
Binary files /dev/null and b/Open-ILS/web/images/sub_holds_hist_off.jpg differ
diff --git a/Open-ILS/web/images/sub_holds_hist_on.jpg b/Open-ILS/web/images/sub_holds_hist_on.jpg
new file mode 100644
index 0000000..020abe9
Binary files /dev/null and b/Open-ILS/web/images/sub_holds_hist_on.jpg differ
diff --git a/Open-ILS/web/images/sub_holds_off.jpg b/Open-ILS/web/images/sub_holds_off.jpg
new file mode 100644
index 0000000..b888359
Binary files /dev/null and b/Open-ILS/web/images/sub_holds_off.jpg differ
diff --git a/Open-ILS/web/images/sub_holds_on.jpg b/Open-ILS/web/images/sub_holds_on.jpg
new file mode 100644
index 0000000..9505638
Binary files /dev/null and b/Open-ILS/web/images/sub_holds_on.jpg differ
diff --git a/Open-ILS/web/images/sub_prefs_info_off.jpg b/Open-ILS/web/images/sub_prefs_info_off.jpg
new file mode 100644
index 0000000..896e227
Binary files /dev/null and b/Open-ILS/web/images/sub_prefs_info_off.jpg differ
diff --git a/Open-ILS/web/images/sub_prefs_info_on.jpg b/Open-ILS/web/images/sub_prefs_info_on.jpg
new file mode 100644
index 0000000..0895969
Binary files /dev/null and b/Open-ILS/web/images/sub_prefs_info_on.jpg differ
diff --git a/Open-ILS/web/images/sub_prefs_notify_off.jpg b/Open-ILS/web/images/sub_prefs_notify_off.jpg
new file mode 100644
index 0000000..55df9da
Binary files /dev/null and b/Open-ILS/web/images/sub_prefs_notify_off.jpg differ
diff --git a/Open-ILS/web/images/sub_prefs_notify_on.jpg b/Open-ILS/web/images/sub_prefs_notify_on.jpg
new file mode 100644
index 0000000..fd536a8
Binary files /dev/null and b/Open-ILS/web/images/sub_prefs_notify_on.jpg differ
diff --git a/Open-ILS/web/images/sub_prefs_search_off.jpg b/Open-ILS/web/images/sub_prefs_search_off.jpg
new file mode 100644
index 0000000..89115f6
Binary files /dev/null and b/Open-ILS/web/images/sub_prefs_search_off.jpg differ
diff --git a/Open-ILS/web/images/sub_prefs_search_on.jpg b/Open-ILS/web/images/sub_prefs_search_on.jpg
new file mode 100644
index 0000000..3eab9fa
Binary files /dev/null and b/Open-ILS/web/images/sub_prefs_search_on.jpg differ
diff --git a/Open-ILS/web/images/submit_btn.gif b/Open-ILS/web/images/submit_btn.gif
new file mode 100644
index 0000000..5286943
Binary files /dev/null and b/Open-ILS/web/images/submit_btn.gif differ
diff --git a/Open-ILS/web/images/tool_back.gif b/Open-ILS/web/images/tool_back.gif
new file mode 100644
index 0000000..37d1278
Binary files /dev/null and b/Open-ILS/web/images/tool_back.gif differ
diff --git a/Open-ILS/web/images/tool_back.png b/Open-ILS/web/images/tool_back.png
new file mode 100644
index 0000000..41a13e2
Binary files /dev/null and b/Open-ILS/web/images/tool_back.png differ
diff --git a/Open-ILS/web/images/tool_font.gif b/Open-ILS/web/images/tool_font.gif
new file mode 100644
index 0000000..9dc10a9
Binary files /dev/null and b/Open-ILS/web/images/tool_font.gif differ
diff --git a/Open-ILS/web/images/tool_forward.gif b/Open-ILS/web/images/tool_forward.gif
new file mode 100644
index 0000000..db0d800
Binary files /dev/null and b/Open-ILS/web/images/tool_forward.gif differ
diff --git a/Open-ILS/web/images/tool_forward.png b/Open-ILS/web/images/tool_forward.png
new file mode 100644
index 0000000..582a6b9
Binary files /dev/null and b/Open-ILS/web/images/tool_forward.png differ
diff --git a/Open-ILS/web/images/tool_help.gif b/Open-ILS/web/images/tool_help.gif
new file mode 100644
index 0000000..2a3de86
Binary files /dev/null and b/Open-ILS/web/images/tool_help.gif differ
diff --git a/Open-ILS/web/images/tool_help.png b/Open-ILS/web/images/tool_help.png
new file mode 100644
index 0000000..3007c20
Binary files /dev/null and b/Open-ILS/web/images/tool_help.png differ
diff --git a/Open-ILS/web/images/tool_home.gif b/Open-ILS/web/images/tool_home.gif
new file mode 100644
index 0000000..9b83ccf
Binary files /dev/null and b/Open-ILS/web/images/tool_home.gif differ
diff --git a/Open-ILS/web/images/tool_home.png b/Open-ILS/web/images/tool_home.png
new file mode 100644
index 0000000..0620200
Binary files /dev/null and b/Open-ILS/web/images/tool_home.png differ
diff --git a/Open-ILS/web/images/tool_mail.gif b/Open-ILS/web/images/tool_mail.gif
new file mode 100644
index 0000000..83c3573
Binary files /dev/null and b/Open-ILS/web/images/tool_mail.gif differ
diff --git a/Open-ILS/web/images/tool_print.gif b/Open-ILS/web/images/tool_print.gif
new file mode 100644
index 0000000..d3d7ee3
Binary files /dev/null and b/Open-ILS/web/images/tool_print.gif differ
diff --git a/Open-ILS/web/images/tool_print.png b/Open-ILS/web/images/tool_print.png
new file mode 100644
index 0000000..2c0dc0b
Binary files /dev/null and b/Open-ILS/web/images/tool_print.png differ
diff --git a/Open-ILS/web/images/utils-corner-left.png b/Open-ILS/web/images/utils-corner-left.png
new file mode 100644
index 0000000..db70a75
Binary files /dev/null and b/Open-ILS/web/images/utils-corner-left.png differ
diff --git a/Open-ILS/web/images/utils-corner-mid.png b/Open-ILS/web/images/utils-corner-mid.png
new file mode 100644
index 0000000..80d4857
Binary files /dev/null and b/Open-ILS/web/images/utils-corner-mid.png differ
diff --git a/Open-ILS/web/images/utils-corner-right.jpg b/Open-ILS/web/images/utils-corner-right.jpg
new file mode 100644
index 0000000..1559897
Binary files /dev/null and b/Open-ILS/web/images/utils-corner-right.jpg differ
diff --git a/Open-ILS/web/images/utils-corner-right.png b/Open-ILS/web/images/utils-corner-right.png
new file mode 100644
index 0000000..303ab75
Binary files /dev/null and b/Open-ILS/web/images/utils-corner-right.png differ
diff --git a/Open-ILS/web/images/utils-corner.jpg b/Open-ILS/web/images/utils-corner.jpg
new file mode 100644
index 0000000..4932a28
Binary files /dev/null and b/Open-ILS/web/images/utils-corner.jpg differ
diff --git a/Open-ILS/web/images/view_my_list.png b/Open-ILS/web/images/view_my_list.png
new file mode 100644
index 0000000..d5f1b83
Binary files /dev/null and b/Open-ILS/web/images/view_my_list.png differ
diff --git a/Open-ILS/web/images/view_my_list_hover.png b/Open-ILS/web/images/view_my_list_hover.png
new file mode 100644
index 0000000..369cb1a
Binary files /dev/null and b/Open-ILS/web/images/view_my_list_hover.png differ
diff --git a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
deleted file mode 100644
index d3aa658..0000000
--- a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
+++ /dev/null
@@ -1,177 +0,0 @@
-/* Some really basic utils copied mostly from old opac js:
- * opac_utils.js, utils.js, misc.js (kcls). */
-function _stub() { alert("XXX disconnected"); } /* for in progress work */
-
-function $(id) { return document.getElementById(id); }
-function $n(root, nodeName, attr) {
-    return findNodeByName(root, nodeName, attr);
-}
-
-function findNodeByName(root, nodeName, /* defaults to "name" */attr) {
-    if (!root || !nodeName) return null;
-    if (root.nodeType != 1) return null;
-    if (!attr) attr = "name";
-    if (root.getAttribute(attr) == nodeName || root[attr] == nodeName)
-        return root;
-
-    for (var i = 0; i != root.childNodes.length; i++) {
-        var n = findNodeByName(root.childNodes[i], nodeName);
-        if (n) return n;
-    }
-
-    return null;
-}
-
-function swapCSSClass(obj, old, newc) {
-	removeCSSClass(obj, old);
-	addCSSClass(obj, newc);
-}
-
-function addCSSClass(e,c) {
-    /* XXX I've seen much simpler implementation of this idea that just
-     * do a regexp replace on e.className.  Any reason why we're making
-     * it so hard here? I could see the justification if there's a certain
-     * browser that doesn't cooperate. */
-	if(!e || !c) return;
-
-	var css_class_string = e.className;
-	var css_class_array;
-
-	if(css_class_string)
-		css_class_array = css_class_string.split(/\s+/);
-
-	var string_ip = ""; /*strip out nulls*/
-	for (var css_class in css_class_array) {
-		if (css_class_array[css_class] == c) { return; }
-		if(css_class_array[css_class] !=null)
-			string_ip += css_class_array[css_class] + " ";
-	}
-	string_ip += c;
-	e.className = string_ip;
-}
-
-function removeCSSClass(e, c) {
-	if(!e || !c) return;
-
-	var css_class_string = '';
-
-	var css_class_array = e.className;
-	if( css_class_array )
-		css_class_array = css_class_array.split(/\s+/);
-
-	var first = 1;
-	for (var css_class in css_class_array) {
-		if (css_class_array[css_class] != c) {
-			if (first == 1) {
-				css_class_string = css_class_array[css_class];
-				first = 0;
-			} else {
-				css_class_string = css_class_string + ' ' +
-					css_class_array[css_class];
-			}
-		}
-	}
-	e.className = css_class_string;
-}
-
-function hideMe(obj) { addCSSClass(obj, "hide_me"); }
-function unHideMe(obj) { removeCSSClass(obj, "hide_me"); }
-
-function swapTabs(el) {
-    if (!el) return;
-
-    var tabs = [];
-    for (var i = 0; i < el.parentNode.childNodes.length; i++) {
-        var node = el.parentNode.childNodes[i];
-        if (node.nodeType == 1 && node.nodeName.toLowerCase() == "a")
-            tabs.push(node);
-    }
-
-    for (var n = 0; n < tabs.length; n++) {
-        var i = tabs[n];
-        if (i == el) {
-            unHideMe($(i.rel));
-            i.style.background = "url('/opac/skin/kcls/graphics/" +
-                i.id + "_on.gif') no-repeat bottom";
-        } else {
-            hideMe($(i.rel));
-            i.style.background = "url('/opac/skin/kcls/graphics/" +
-                i.id + "_off.gif') no-repeat bottom";
-        }
-    }
-}
-
-
-/* Returns the character code pressed that caused the event. */
-function grabCharCode(evt) {
-    // OLD CODE: evt = (evt) ? evt : ((window.event) ? event : null);
-    evt = evt || window.event || event || null;
-    if (evt) {
-    // OLD CODE: return (evt.charCode ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode));
-        return evt.which || evt.charCode || evt.keyCode;
-    } else {
-        return -1;
-    }
-}
-
-/* returns true if the user pressed enter */
-function userPressedEnter(evt) {
-    var code = grabCharCode(evt);
-    return (code == 13 || code == 3);
-}
-
-function setEnterFunc(node, func) {
-    if (!(node && func)) return;
-    node.onkeydown = function(evt) {
-        if (userPressedEnter(evt)) func();
-    };
-}
-
-function advAddGblRow() {
-    var tbody = $("adv_global_tbody");
-    var newrow = $("adv_global_trow").cloneNode(true);
-    tbody.insertBefore(newrow, $("adv_global_addrow"));
-    var input = $n(newrow, "term");
-    input.value = "";
-    setEnterFunc(input, _stub); /* XXX TODO make a real form and get rid of this? */
-    $n(newrow, 'type').focus();
-}
-
-var rdetailShowExtra = _stub; /* XXX TODO reimplement without JS? */
-var cnBrowsePrev = _stub;
-var cnBrowseNext = _stub;
-var rdetailNewBookbag = _stub; /* XXX TODO reimplement without JS? */
-var addMyList = _stub; /* XXX TODO we probably still need this one */
-var listSaveAction = _stub; /* XXX TODO we probably still need this one */
-var expandBoxes = _stub; /* XXX TODO possibly reimplement or replace */
-var iForgotMyPassword = _stub; /* XXX TODO possibly reimplement or replace */
-var switchSubPage = _stub;
-var myOPACRenewSelected = _stub;
-var myOPACCreateBookbag = _stub;
-var myOPACSavePrefs = _stub;
-var myOPACUpdatePhone = _stub;  /* XXX TODOD myOPACUpdate*() and the buttons where
-                                   the handlers are used should probably go
-                                   away completely */
-var myOPACUpdateUsername = _stub;
-var myOPACUpdatePassword = _stub;
-var myOPACUpdateEmail = _stub;
-var myOPACUpdateHomeOU = _stub;
-var myopacDoHoldAction = _stub;
-var myopacApplyThawDate = _stub;
-var showCachedList = _stub;
-var searchBarSubmit = _stub;
-var sortHolds = _stub; /* XXX TODO There was a method for sorting loaded holds
-                          in the DOM without reloading the page, but it was
-                          reliant on fieldmapper and some stock dojo
-                          libraries.  Could be reimplemented without deps
-                          if deemed worthwhile. */
-var showDetailedResults = _stub; /* XXX TODO for an old onchange handler that
-                                toggled between simple and detailed results
-                                in the rresults page.  */
-var showCanvas = _stub;
-var checkAll = _stub;
-var sortChecked = _stub;
-var sortCheckedHist = _stub;
-var showPaymentForm = _stub;
-var showFinesDiv = _stub;
-var fadeOut = _stub;    /* XXX TODO what the heck? not seen anywhere */
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2
index 047e30e..67e1316 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2
@@ -4,19 +4,19 @@
 <div id='myopac_checked_div' style="padding:0px;">
     <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;">
         <div class="align selected" id="checked_label">
-            <img src="/opac/skin/kcls/graphics/sub_checked_out_on.jpg" />
+            <img src="/images/sub_checked_out_on.jpg" />
         </div>
         <div class="align" id="checked_hist_link">
             <a class="" href="#"><img
-                src="/opac/skin/kcls/graphics/sub_checked_hist_off.jpg" /></a>
+                src="/images/sub_checked_hist_off.jpg" /></a>
         </div>
         <div class="align hide_me" id="checked_link">
             <a href="#">
-                <img src="/opac/skin/kcls/graphics/sub_checked_out_off.jpg" />
+                <img src="/images/sub_checked_out_off.jpg" />
             </a>
         </div>
         <div class="align selected hide_me" id="checked_hist_label">
-            <img src="/opac/skin/kcls/graphics/sub_checked_hist_on.jpg" />
+            <img src="/images/sub_checked_hist_on.jpg" />
         </div>    
         <div class="clear-both"></div>
     </div>
@@ -40,11 +40,11 @@
                 <td style="padding-left:9px;">
                     <a class="hide_me" href="#"><img
                         alt="Save"
-                        src="/opac/skin/kcls/graphics/save-btn.png" /></a>
+                        src="/images/save-btn.png" /></a>
                 </td>
                 <td style="padding-left:5px;">
                     <a href="#"><img alt="Renewing Help"
-                        src="/opac/skin/kcls/graphics/question-mark.png" /></a>
+                        src="/images/question-mark.png" /></a>
                 </td>
             </tr>
         </table>
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
index 387eaa3..e97a3cd1 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
@@ -4,18 +4,18 @@
 <div id='myopac_holds_div'>
     <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;">
         <div class="align selected" id="holds_label">
-            <img src="/opac/skin/kcls/graphics/sub_holds_on.jpg" />
+            <img src="/images/sub_holds_on.jpg" />
         </div>
         <div class="align hide_me" id="holds_hist_link">
             <a href="#"><img
-                src="/opac/skin/kcls/graphics/sub_holds_hist_off.jpg" /></a>
+                src="/images/sub_holds_hist_off.jpg" /></a>
         </div>
         <div class="align hide_me" id="holds_link">
             <a href="#"><img
-                src="/opac/skin/kcls/graphics/sub_holds_off.jpg" /></a>
+                src="/images/sub_holds_off.jpg" /></a>
         </div>
         <div class="align selected hide_me" id="holds_hist_label">
-            <img src="/opac/skin/kcls/graphics/sub_holds_hist_on.jpg" />
+            <img src="/images/sub_holds_hist_on.jpg" />
         </div>	
         <div class="clear-both"></div>
     </div>
@@ -54,12 +54,12 @@
                 <td width="1" style="padding-left:9px;">
                     <a href="#"><img
                         alt="Save"
-                        src="/opac/skin/kcls/graphics/save-btn.png" /></a>
+                        src="/images/save-btn.png" /></a>
                 </td>
                 <td width="1" style="padding-left:5px;">
                     <a href="#"><img
                         alt="Holds Help"
-                        src="/opac/skin/kcls/graphics/question-mark.png" /></a>
+                        src="/images/question-mark.png" /></a>
                 </td>
                 <td align="right">
                     <select class="hide_me" id="holds_sort">
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
index 9dd2c9e..796a5b1 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
@@ -15,7 +15,7 @@
                 Share this list?
                 <a href="#"><img
                     alt="Sharing Help"
-                    src="/opac/skin/kcls/graphics/question-mark.png" /></a>
+                    src="/images/question-mark.png" /></a>
             </td>
             <td>
                 <input type="radio" value="0" name="shareList"
@@ -29,10 +29,10 @@
         </tr>
     </table>
     <a href="#"><img
-        alt="Submit" src="/opac/skin/kcls/graphics/btnSubmit.png" /></a>
+        alt="Submit" src="/images/btnSubmit.png" /></a>
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     <a href="#"><img
-        alt="Cancel" src="/opac/skin/kcls/graphics/btnCancel.png" /></a>
+        alt="Cancel" src="/images/btnCancel.png" /></a>
 </div>
 <div id='myopac_bookbag_div' style="padding:5px;">
     <div class="header_middle">
@@ -47,9 +47,9 @@
                 <a href="#"
                     style="position:relative;top:-3px;left:-5px;"><img
                     alt="Saving Help"
-                    src="/opac/skin/kcls/graphics/question-mark.png" /></a>
+                    src="/images/question-mark.png" /></a>
                 <a id='acct_lists_save' href="#"><img alt="Save"
-                    src="/opac/skin/kcls/graphics/save-btn.png" /></a>
+                    src="/images/save-btn.png" /></a>
             </div>
         </div>
     </div>
@@ -67,7 +67,7 @@
                         <td>
                             <a href="#"><img
                                 alt="Anonymous List Help"
-                                src="/opac/skin/kcls/graphics/question-mark.png" /></a>
+                                src="/images/question-mark.png" /></a>
                         </td>
                     </tr>
                 </table>
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
index 5f76beb..53c50d5 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
@@ -9,30 +9,30 @@
         <div id="myopac_sum_fines">
             <div style="position:absolute;">
                 <div style="position:relative;top:-15px;left:-23px;">
-                    <img src="/opac/skin/kcls/graphics/acct_sum_fines_tl.png" />
+                    <img src="/images/acct_sum_fines_tl.png" />
                 </div>
             </div>
             <div style="position:absolute;">
                 <div style="position:relative;top:-15px;left:172px;">
-                    <img src="/opac/skin/kcls/graphics/acct_sum_fines_tr.png" />
+                    <img src="/images/acct_sum_fines_tr.png" />
                 </div>
             </div>
             <div style="position:absolute;">
                 <div style="position:relative;top:161px;left:-23px;">
-                    <img src="/opac/skin/kcls/graphics/acct_sum_fines_bl.png" />
+                    <img src="/images/acct_sum_fines_bl.png" />
                 </div>
             </div>
             <div style="position:absolute;">
                 <div style="position:relative;top:161px;left:172px;">
-                    <img src="/opac/skin/kcls/graphics/acct_sum_fines_br.png" />
+                    <img src="/images/acct_sum_fines_br.png" />
                 </div>
             </div>
             Fines: <span id="myopac_sum_fines_bal">$0.00</span><br />
             <a class="hide_me" href="#" id="pay_fines_btn1"><img
                 alt="Pay Fines"
-                onmouseover="this.src='/opac/skin/kcls/graphics/pay-fines-btn-hover.png';"
-                onmouseout="this.src='/opac/skin/kcls/graphics/pay-fines-btn.png';"
-                src="/opac/skin/kcls/graphics/pay-fines-btn.png"
+                onmouseover="this.src='/images/pay-fines-btn-hover.png';"
+                onmouseout="this.src='/images/pay-fines-btn.png';"
+                src="/images/pay-fines-btn.png"
                 style="position:relative;top:5px;" /></a>
         </div>
         <div style="width:662px;">
@@ -240,8 +240,8 @@
                 </table>
             </div>
             <a href="#"><img alt="Pay Fines"
-                onmouseover="this.src='/opac/skin/kcls/graphics/pay-fines-btn-hover.png';"
-                src="/opac/skin/kcls/graphics/pay-fines-btn.png"
+                onmouseover="this.src='/images/pay-fines-btn-hover.png';"
+                src="/images/pay-fines-btn.png"
                 style="position:relative;top:5px;" /></a>
             <br/>
         </div>
@@ -330,7 +330,7 @@
                         <div style="position:absolute;">
                             <div style="position:relative;left:80px;">
                                 <a href="#"><img
-                                    src="/opac/skin/kcls/graphics/question-mark.png" /></a>
+                                    src="/images/question-mark.png" /></a>
                             </div>
                         </div>
                         Security Code
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
index ff1a3ad..94aea21 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
@@ -7,33 +7,33 @@
             <div style="float:left;">
                 <div class="align selected"
                      id="prefs_info_lbl"><img src=
-                     "/opac/skin/kcls/graphics/sub_prefs_info_on.jpg" /></div>
+                     "/images/sub_prefs_info_on.jpg" /></div>
 
                 <div class="align hide_me"
                      id="prefs_info_link">
                     <a href="#"><img src=
-                         "/opac/skin/kcls/graphics/sub_prefs_info_off.jpg" /></a>
+                         "/images/sub_prefs_info_off.jpg" /></a>
                 </div>
 
                 <div class="align"
                      id="prefs_notify_link">
                     <a href="#"><img src=
-                         "/opac/skin/kcls/graphics/sub_prefs_notify_off.jpg" /></a>
+                         "/images/sub_prefs_notify_off.jpg" /></a>
                 </div>
 
                 <div class="align selected hide_me"
                      id="prefs_notify_lbl"><img src=
-                     "/opac/skin/kcls/graphics/sub_prefs_notify_on.jpg" /></div>
+                     "/images/sub_prefs_notify_on.jpg" /></div>
 
                 <div class="align"
                      id="prefs_search_link">
                     <a href="#"><img src=
-                         "/opac/skin/kcls/graphics/sub_prefs_search_off.jpg" /></a>
+                         "/images/sub_prefs_search_off.jpg" /></a>
                 </div>
 
                 <div class="align selected hide_me"
                      id="prefs_search_lbl"><img src=
-                     "/opac/skin/kcls/graphics/sub_prefs_search_on.jpg" /></div>
+                     "/images/sub_prefs_search_on.jpg" /></div>
             </div>
 
             <div style="float:right;width:65px;">
@@ -42,7 +42,7 @@
                         <a id='acct_prefs_save'
                              class='hide_me'
                              href="#"><img alt="Save"
-                             src="/opac/skin/kcls/graphics/save-btn.png" /></a>
+                             src="/images/save-btn.png" /></a>
                     </div>
                 </div>
             </div>
@@ -77,7 +77,7 @@
                                 <a href="#">
                                 <img alt="Search Hits Help"
                                      src=
-                                     "/opac/skin/kcls/graphics/question-mark.png" /></a>
+                                     "/images/question-mark.png" /></a>
                             </div>
                         </div><select id='prefs_hits_per'
                             style="position:relative;z-index:100;">
@@ -397,7 +397,7 @@
                                     <a href="#">
                                     <img alt="Username Help"
                                          src=
-                                         "/opac/skin/kcls/graphics/question-mark.png" /></a>
+                                         "/images/question-mark.png" /></a>
                                 </div>
                             </div>&common.username;
                         </td>
@@ -598,7 +598,7 @@
                                     <td>
                                         <a href="#"><img
                                             alt="Address Help"
-                                            src="/opac/skin/kcls/graphics/question-mark.png" /></a>
+                                            src="/images/question-mark.png" /></a>
                                     </td>
                                 </tr>
                             </table>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
index a86ef6a..de9b3e2 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
@@ -256,7 +256,7 @@
     <tr class='border_4_2'>
         <td align="left" colspan='2'>
             <!-- XXX TODO make a real form, and make this a real submitter -->
-        <img src="/opac/skin/kcls/graphics/search_btn.gif" alt="Search"  style="cursor:pointer;" />
+        <img src="/images/search_btn.gif" alt="Search"  style="cursor:pointer;" />
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <!-- XXX TODO make a real form, and make this a real resetter -->
         <a href="javascript:;" style="position: relative; top: -9px;">Reset Form</a>
@@ -288,7 +288,7 @@
         <div style='margin-top: 8px;' class='adv_quick_search_submit'>
             <!-- XXX TODO make a real form, and make a real submitter (quick
             submit, FKA advGenericSearch() -->
-            <img src="/opac/skin/kcls/graphics/search_btn.gif"
+            <img src="/images/search_btn.gif"
                 alt="Search" id="adv_quick_submit" style="cursor:pointer;" />
         </div>
     </div>
@@ -325,7 +325,7 @@
             href='javascript:advAddMARC();'>&search.marc.add.row;</a>
         <!-- XXX TODO make a real form, and make a real submitter (FKA
         advMARCRun()) -->
-        <img alt="Search" src="/opac/skin/kcls/graphics/search_btn.gif"
+        <img alt="Search" src="/images/search_btn.gif"
             style="cursor:pointer;" />
     </div>
 </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
index 93e2b65..06f804c 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
@@ -3,11 +3,11 @@
     <head>
         <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
         <link rel="stylesheet" type="text/css"
-            href="/opac/skin/kcls-wire/css/semiauto.css" />
+            href="/css/skin/default/opac/semiauto.css" />
         <link rel="stylesheet" type="text/css"
-            href="/opac/skin/kcls-wire/css/style.css" />
+            href="/css/skin/default/opac/style.css" />
         <link rel="stylesheet" type="text/css"
-            href="/opac/skin/kcls-wire/css/contentslider.css" />
+            href="/css/skin/default/opac/contentslider.css" />
         <title>Catalog - King County Library - [% ctx.page_title %]</title>
         <link rel="unapi-server" type="application/xml" title="unAPI"
             href="/opac/extras/unapi" />
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
index bfec1d2..03fc3bd 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
@@ -26,7 +26,7 @@
   
 <!-- ************************************ home page banner start ********************************************** -->
     <div class="contentdiv" style="background:white;">
-      <a href="http://www.kcls.org/newcatalog"><img alt="New catalog" src="/opac/skin/kcls/graphics/banner1.jpg" /></a>
+      <a href="http://www.kcls.org/newcatalog"><img alt="New catalog" src="/images/banner1.jpg" /></a>
     </div>
     <div class="contentdiv" style="background:#ffc331;">
       test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
@@ -38,7 +38,7 @@
     </div>
     <div class="contentdiv" style="background:#2bb0fd;">
       <br />
-      <img src="/opac/skin/kcls/graphics/KCLS_logo_horiz.gif" /><br />
+      <img src="/images/KCLS_logo_horiz.gif" /><br />
       test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
       test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
     </div>
@@ -63,13 +63,13 @@
                 <a href="http://www.kcls.org/newcatalog"></a>
             </div>
         </div>
-        <img alt="New catalog" src="/opac/skin/kcls/graphics/banner1.jpg" />
+        <img alt="New catalog" src="/images/banner1.jpg" />
     </div>
 </div>
 
 <div id="hp-buttons">
     <div class="float-left">
-        <img src="/opac/skin/kcls/graphics/hp-links-left.jpg" />
+        <img src="/images/hp-links-left.jpg" />
     </div>
     <div class="float-left">
     <div id="home-buttons-inner">
@@ -80,8 +80,8 @@
       </table>
     </div>
   </div>
-  <div class="float-left"><img src="/opac/skin/kcls/graphics/hp-links-right.jpg" /></div>
-  <div class="float-right"><a href="http://www.kcls.org/locations"><img alt="Locations" src="/opac/skin/kcls/graphics/locations.jpg" /></a></div>
+  <div class="float-left"><img src="/images/hp-links-right.jpg" /></div>
+  <div class="float-right"><a href="http://www.kcls.org/locations"><img alt="Locations" src="/images/locations.jpg" /></a></div>
   <div class="clear-both"></div>
 </div>
 <!-- ****************** end: homesearch.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2
index 8e1df13..4b5efc6 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2
@@ -4,6 +4,6 @@
     </span>
     <span id='lib_selector_span'>
         <a id='lib_selector_link' class='classic_link'
-            href='javascript:void(0)'>&library.select.help;</a>
+            href='#'>&library.select.help;</a>
     </span>
 <!-- ****************** end: libselect.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2
index 82bb33d..b07d4e7 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2
@@ -114,7 +114,7 @@
                                 </div>
                                 <div style="padding-top:14px;">
                                     <a href="#" id="login_button"><img
-                                        alt="Log in" src="/opac/skin/kcls/graphics/login-btn2.png" /></a>
+                                        alt="Log in" src="/images/login-btn2.png" /></a>
                                     <input class="hide_me"
                                         id="login_form_submit" type="submit" />
                                     <a href="#"
@@ -129,14 +129,14 @@
                 <td class="login_boxes right_brain" align="center"
                     valign="top" width="291">
                     <a href="http://www.kcls.org/about/contact/"><img
-                        src="/opac/skin/kcls/graphics/questions.png"
+                        src="/images/questions.png"
                         alt="Questions?" style="margin-top:29px;" /></a>
 	                <div style="width:182px;color:black;padding:5px 25px;">
                         Visit our FAQs section for answers to common questions
                         about how to use your account.
 	                </div>
                     <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm#FAQs"><img
-                        alt="FAQs" src="/opac/skin/kcls/graphics/faqs-btn.png"
+                        alt="FAQs" src="/images/faqs-btn.png"
                         style="margin-top:13px;" /></a>
 	            </td>
             </tr>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/place_hold.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/place_hold.tt2
index 61ab602..b2ce03d 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/place_hold.tt2
@@ -46,10 +46,10 @@
             services, please select "Outreach" to have the item delivered
             during your scheduled visit.</p>
         <a href="#" id="holds_submit"><img
-            alt="Submit" src="/opac/skin/kcls/graphics/btnSubmit.png" /></a>
+            alt="Submit" src="/images/btnSubmit.png" /></a>
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <a href="#" id="holds_cancel"><img
-            alt="Cancel" src="/opac/skin/kcls/graphics/btnCancel.png" /></a>
+            alt="Cancel" src="/images/btnCancel.png" /></a>
         <br /><br />
         <p>* If you need your item today, and it is checked in at your
             library, please place your hold and then call your library to set it
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2
index 5ae3fe1..a1dc5bb 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2
@@ -20,7 +20,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("summary");'><img
-                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                    alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("summary");'
                     class="rdetail_extras_lbl">Summary</a>
             </div>
@@ -43,7 +43,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("subject");'><img
-                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                    alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("subject");' class="rdetail_extras_lbl">subject</a>
             </div>
         </div>
@@ -127,7 +127,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("content");'><img alt=""
-                    src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                    src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("content");' class="rdetail_extras_lbl">Contents</a>
             </div>
         </div>
@@ -143,7 +143,7 @@
             class="rdetail_extras hide_me" id="rdetail_authors_link"><div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("authors");'><img
-                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                    alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("authors");' class="rdetail_extras_lbl">Author</a>
             </div>
         </div>
@@ -164,7 +164,7 @@
             class="rdetail_extras hide_me" id="rdetail_series_link"><div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("series");'><img
-                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                    alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("series");'
                     class="rdetail_extras_lbl">series</a>
             </div>
@@ -180,7 +180,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("awards");'><img
-                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                    alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("awards");'
                     class="rdetail_extras_lbl">awards, reviews &amp; suggested reads</a>
             </div>
@@ -213,7 +213,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("reviews");'><img
-                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                    alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("reviews");'
                     class="rdetail_extras_lbl">&rdetail.extras.reviews;</a>
             </div>
@@ -226,7 +226,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("excerpt");'><img
-                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                    alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("excerpt");'
                     class="rdetail_extras_lbl">&rdetail.extras.excerpt;</a>
             </div>
@@ -239,7 +239,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("preview");'><img
-                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                    alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("preview");'
                     class="rdetail_extras_lbl">&rdetail.extras.preview;</a>
             </div>
@@ -252,7 +252,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("novelist");'><img
-                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                    alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("novelist");'
                     class="rdetail_extras_lbl">&rdetail.extras.novelist;</a>
             </div>
@@ -263,7 +263,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("cn");'><img
-                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                    alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("cn");'
                     class="rdetail_extras_lbl">&rdetail.extras.browser;</a>
             </div>
@@ -290,7 +290,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("copyinfo");'><img
-                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                    alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("copyinfo");'
                     class="rdetail_extras_lbl">&rdetail.extras.summary;</a>
             </div>
@@ -302,7 +302,7 @@
             <div class="rdetail_extras_hr"></div>
             <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("marc");'><img
-                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                    alt="" src="/images/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("marc");'
                     class="rdetail_extras_lbl">&rdetail.extras.marc;</a>
             </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2
index 85cd9ea..755ad25 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2
@@ -33,7 +33,7 @@
                                     <div style="border-bottom:1px dotted #ccc;padding-top:10px;"
                                         class="rdetail_aux_utils">
                                         <a href="place_hold" id="rdetail_place_hold"><img
-                                            src="/opac/skin/kcls/graphics/green_check.png" alt="place hold" />
+                                            src="/images/green_check.png" alt="place hold" />
                                             <span style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
                                     </div>
                                     <div style="padding-top:6px;" class="rdetail_aux_utils">
@@ -45,7 +45,7 @@
                                         </div>
                                         <a href="#"><img
                                             alt="add to my list"
-                                            src="/opac/skin/kcls/graphics/clipboard.png" /></a>
+                                            src="/images/clipboard.png" /></a>
                                     </div>
                                 </div>
                                 <div style="float:right;margin-right:17px;">
@@ -131,24 +131,24 @@
 
 <div id="rdetail_locs_expand">
     <a href="#"><img
-        src="/opac/skin/kcls/graphics/plus_sign.png" /></a>
+        src="/images/plus_sign.png" /></a>
     <a style="position:relative;top:-3px;" href="#">Show more locations</a>
 </div>
 
 <div id="rdetail_locs_collapse" class="hide_me">
     <a href="#"><img
-        src="/opac/skin/kcls/graphics/plus_sign.png" /></a>
+        src="/images/plus_sign.png" /></a>
     <a style="position:relative;top:-3px;" href="#">Collapse locations</a>
 </div>
 
 <div id="rdetail_extras_expand">
     <a href="#"><img
-        src="/opac/skin/kcls/graphics/plus_sign.png" /></a>
+        src="/images/plus_sign.png" /></a>
     <a style="position:relative;top:-3px;" href="#">Expand all tabs</a>
 </div>
 
 <div id="rdetail_extras_collapse" class="hide_me">
-    <a href="#"><img src="/opac/skin/kcls/graphics/plus_sign.png" /></a>
+    <a href="#"><img src="/images/plus_sign.png" /></a>
     <a style="position:relative;top:-3px;" href="#">Collapse all tabs</a>
 </div>
 
@@ -168,11 +168,11 @@
                             </td>
                             <td width="1" valign="top" align="right" style="white-space:nowrap;">
                                 <a href="place_hold" id=''><img alt="Place Hold"
-                                    src="/opac/skin/kcls/graphics/place_hold.gif" /></a>
+                                    src="/images/place_hold.gif" /></a>
                                 <a href="#" id="rd_reviews_and_more" target="_blank"><img
-                                    alt="Reviews and More" src="/opac/skin/kcls/graphics/reviews.gif" /></a>
+                                    alt="Reviews and More" src="/images/reviews.gif" /></a>
                                 <a href="#" id=""><img alt="Add to My List"
-                                    src="/opac/skin/kcls/graphics/add_mylist.gif" /></a>
+                                    src="/images/add_mylist.gif" /></a>
                             </td>
                         </tr>
                     </table>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/result/table.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/result/table.tt2
index 2413ca6..5e2778a 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/result/table.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/result/table.tt2
@@ -139,7 +139,7 @@
                                                         <div style="border-bottom:1px dotted #ccc;padding-top:10px;"
                                                             class="results_aux_utils"><a
                                                                 href="javascript:;" name="place_hold_link"><img
-                                                                src="/opac/skin/kcls/graphics/green_check.png"
+                                                                src="/images/green_check.png"
                                                                 alt="place hold" /><span
                                                                     style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
                                                         </div>
@@ -154,13 +154,13 @@
                                                             <a href="javascript:;"
                                                                 name="result_my_list_link_img"><img
                                                                 alt="add to my list"
-                                                                src="/opac/skin/kcls/graphics/clipboard.png" /></a>
+                                                                src="/images/clipboard.png" /></a>
                                                         </div>
                                                         <div style="padding-top:7px;" class="results_aux_utils">
                                                             <a title="Reviews and More" target="_blank"
                                                                 name="reviews_and_more" href="javascript:;"><img
                                                                 alt="reviews &amp; more"
-                                                                src="/opac/skin/kcls/graphics/starz.png" /> <span
+                                                                src="/images/starz.png" /> <span
                                                                     style="position:relative;top:-5px;">Reviews &amp; More</span></a>
                                                         </div>
                                                     </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
index 70b30b6..ec559f6 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
@@ -27,9 +27,9 @@
                         <input type="button" id="search_submit" value="GO"
                             class="hide_me" /><a href="#"
                                 id="search_submit_alt"><img
-                                alt="Search" src="/opac/skin/kcls/graphics/go-btn.png"
-                            onmouseover="this.src='/opac/skin/kcls/graphics/go-btn-hover.png';"
-                            onmouseout="this.src='/opac/skin/kcls/graphics/go-btn.png';" /></a>
+                                alt="Search" src="/images/go-btn.png"
+                            onmouseover="this.src='/images/go-btn-hover.png';"
+                            onmouseout="this.src='/images/go-btn.png';" /></a>
                     </div>
                 </div>
             </td>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
index a088be3..350959d 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
@@ -2,14 +2,14 @@
 <div id="header">
     <div class="float-left"><a
         href="http://www.kcls.org"><img alt="KCLS Logo"
-        src="/opac/skin/kcls/graphics/KCLS_logo_horiz.gif" /></a></div>
+        src="/images/KCLS_logo_horiz.gif" /></a></div>
     <div class="float-right">
         <div id="your-acct-login"><a
             href="[% skin_root %]login" id="home_myopac_link"><img
             alt="Your Account Log in"
-            src="/opac/skin/kcls/graphics/login-btn.png"
-            onmouseover="this.src='/opac/skin/kcls/graphics/login-btn-hover.png';"
-            onmouseout="this.src='/opac/skin/kcls/graphics/login-btn.png';" /></a></div>
+            src="/images/login-btn.png"
+            onmouseover="this.src='/images/login-btn-hover.png';"
+            onmouseout="this.src='/images/login-btn.png';" /></a></div>
 
 
     </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
index 9685a7a..d8dd56a 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
@@ -3,27 +3,27 @@
             <div class="float-right">
                 <div class="pos-rel">
                     <img
-                        src="/opac/skin/kcls/graphics/utils-corner-left.png"
+                        src="/images/utils-corner-left.png"
                         class="float-left" />
                     <div class="left-corner"> 
                         <a href="javascript:history.go(-1)"
                             id="util_back_btn"><img alt="Back"
-                            src="/opac/skin/kcls/graphics/tool_back.png" /></a>
+                            src="/images/tool_back.png" /></a>
                         <a href="[% skin_root %]home"
                             id="util_home_btn"><img alt="Homepage"
-                            src="/opac/skin/kcls/graphics/tool_home.png" /></a>
+                            src="/images/tool_home.png" /></a>
                         <a href="javascript:window.print();"
                             id="util_print_btn"><img alt="Print Page"
-                            src="/opac/skin/kcls/graphics/tool_print.png" /></a>
+                            src="/images/tool_print.png" /></a>
                         <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm"
                             id="util_help_btn"><img alt="Help"
-                            src="/opac/skin/kcls/graphics/tool_help.png" /></a>
+                            src="/images/tool_help.png" /></a>
                         <a href="javascript:history.go(+1)"
                             id="util_forw_btn"><img alt="Forward"
-                            src="/opac/skin/kcls/graphics/tool_forward.png" /></a>
+                            src="/images/tool_forward.png" /></a>
                     </div>
                     <img
-                        src="/opac/skin/kcls/graphics/utils-corner-right.png"
+                        src="/images/utils-corner-right.png"
                         class="float-left" />
                 </div>
             </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/results.tt2 b/Open-ILS/web/templates/default/kcls-wire/results.tt2
index 9707ec6..e281aac 100644
--- a/Open-ILS/web/templates/default/kcls-wire/results.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/results.tt2
@@ -10,22 +10,22 @@
             <div id="results_header_inner">
                 <div class="results_header_btns">
                     <a href="index.xml"><img alt="Another Search"
-                        src="/opac/skin/kcls/graphics/another_search.png"
-                        onmouseover="this.src='/opac/skin/kcls/graphics/another_search_hover.png';"
-                        onmouseout="this.src='/opac/skin/kcls/graphics/another_search.png';" /></a>
+                        src="/images/another_search.png"
+                        onmouseover="this.src='/images/another_search_hover.png';"
+                        onmouseout="this.src='/images/another_search.png';" /></a>
                 </div>
                 <div class="results_header_btns">
                     <a href="advanced"><img alt="Advanced Search"
-                        src="/opac/skin/kcls/graphics/adv_search.png"
-                        onmouseover="this.src='/opac/skin/kcls/graphics/adv_search_hover.png';"
-                        onmouseout="this.src='/opac/skin/kcls/graphics/adv_search.png';" /></a>
+                        src="/images/adv_search.png"
+                        onmouseover="this.src='/images/adv_search_hover.png';"
+                        onmouseout="this.src='/images/adv_search.png';" /></a>
                 </div>
                 <div class="results_header_btns cached_list_div">
                     <a href="#" class="hide_me" id="cacheListLink"><img
                         alt="View My List"
-                        src="/opac/skin/kcls/graphics/view_my_list.png"
-                        onmouseover="this.src='/opac/skin/kcls/graphics/view_my_list_hover.png';"
-                        onmouseout="this.src='/opac/skin/kcls/graphics/view_my_list.png';" /></a>
+                        src="/images/view_my_list.png"
+                        onmouseover="this.src='/images/view_my_list_hover.png';"
+                        onmouseout="this.src='/images/view_my_list.png';" /></a>
                 </div>
                 <div class="results_header_div"></div>
                 <div class="results_header_lbl">Sort by</div>

commit dda8303133691d6be46b9306599c98f7fe243bca
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Feb 7 12:06:06 2011 -0500

    Remove a ton of javascript. A little more to come

diff --git a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2 b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
index 654a84b..aec0eec 100644
--- a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
@@ -5,14 +5,11 @@
         [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
         <div id="adv_search_parent">
             <div id="adv_search_tabs">
-                <a href="javascript:;" alt="Advanced Search" id="adv_search"
-                    onclick="swapTabs(this);"
+                <a href="#" alt="Advanced Search" id="adv_search"
                     rel="adv_global_search"></a>
-                <a href="javascript:;" alt="Numeric Search" id="num_search"
-                    onclick="swapTabs(this);"
+                <a href="#" alt="Numeric Search" id="num_search"
                     rel="adv_quick_search_sidebar"></a>
-                <a href="javascript:;" alt="Expert Search" id="expert_search"
-                    onclick="swapTabs(this);"
+                <a href="#" alt="Expert Search" id="expert_search"
                     rel="adv_marc_search_sidebar"></a>
             </div>
         </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/home.tt2 b/Open-ILS/web/templates/default/kcls-wire/home.tt2
index 88c748f..e9a0516 100644
--- a/Open-ILS/web/templates/default/kcls-wire/home.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/home.tt2
@@ -1,9 +1,6 @@
 [%  WRAPPER "default/kcls-wire/parts/base.tt2";
     INCLUDE "default/kcls-wire/parts/topnav.tt2";
     ctx.page_title = "Home" %]
-[% BLOCK html_head -%]
-<script type="text/javascript" src="/opac/skin/kcls/js/contentslider.js"></script>
-[%- END %]
     <div id="search-wrapper">
         [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
         [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/login.tt2 b/Open-ILS/web/templates/default/kcls-wire/login.tt2
index d45c4db..5957397 100644
--- a/Open-ILS/web/templates/default/kcls-wire/login.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/login.tt2
@@ -1,9 +1,6 @@
 [%  WRAPPER "default/kcls-wire/parts/base.tt2";
     INCLUDE "default/kcls-wire/parts/topnav.tt2";
     ctx.page_title = "Account Login" %]
-[% BLOCK html_head -%]
-<script type="text/javascript" src="/opac/skin/kcls/js/contentslider.js"></script>
-[%- END %]
     <div id="search-wrapper">
         [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
         [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2
index 8d5546f..047e30e 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2
@@ -7,12 +7,11 @@
             <img src="/opac/skin/kcls/graphics/sub_checked_out_on.jpg" />
         </div>
         <div class="align" id="checked_hist_link">
-            <a class="" href="javascript:;"
-                onclick="switchSubPage('checked','hist')"><img
+            <a class="" href="#"><img
                 src="/opac/skin/kcls/graphics/sub_checked_hist_off.jpg" /></a>
         </div>
         <div class="align hide_me" id="checked_link">
-            <a href="javascript:;" onclick="switchSubPage('checked','main')">
+            <a href="#">
                 <img src="/opac/skin/kcls/graphics/sub_checked_out_off.jpg" />
             </a>
         </div>
@@ -27,7 +26,7 @@
             Current Items Checked Out
         </span>
         <span style="float:right;">
-            <a class="hide_me" href="javascript:;">Export List</a>
+            <a class="hide_me" href="#">Export List</a>
         </span>
     </div>
     <div class="clear-both"></div>
@@ -36,19 +35,15 @@
             style="padding:8px 0px 6px 0px;">
             <tr>
                 <td>
-                    <a href="javascript:;"
-                        onclick="myOPACRenewSelected();">Renew
-                        Selected Titles</a>
+                    <a href="#">Renew Selected Titles</a>
                 </td>
                 <td style="padding-left:9px;">
-                    <a class="hide_me" href="javascript:;"><img
+                    <a class="hide_me" href="#"><img
                         alt="Save"
                         src="/opac/skin/kcls/graphics/save-btn.png" /></a>
                 </td>
                 <td style="padding-left:5px;">
-                    <a href="javascript:;"
-                        onclick="alert('To Renew an individual title, select box and click Renew Selected Titles');"><img
-                        alt="Renewing Help"
+                    <a href="#"><img alt="Renewing Help"
                         src="/opac/skin/kcls/graphics/question-mark.png" /></a>
                 </td>
             </tr>
@@ -57,40 +52,30 @@
             border='0'>
             <tr>
                 <td width="1%" style="padding-left:10px;">
-                    <input type="checkbox" id="check_all_checked"
-                    onclick="checkAll($('checked_temp_parent'), this.id);" />
+                    <input type="checkbox" id="check_all_checked" />
                 </td>
                 <td width="40%" style="padding-left:5px;">
-                    <span title="Click to sort"
-                        onclick="sortChecked('title');" style="cursor:pointer;">
+                    <span title="Click to sort" style="cursor:pointer;">
                         Title
                     </span> /
-                    <span title="Click to sort"
-                        onclick="sortChecked('author');" style="cursor:pointer;">
+                    <span title="Click to sort" style="cursor:pointer;">
                         Author
                     </span>
                 </td>
                 <td width="8%" style="padding-right:5px;" align="center">
-                    <span title="Click to sort"
-                        onclick="sortChecked('renews');"
-                        style="cursor:pointer;">
+                    <span title="Click to sort" style="cursor:pointer;">
                         Renews<br />Left
                     </span>
                 </td>
                 <td width="13%" style="padding-left:5px;">
-                    <span title="Click to sort"
-                        onclick="sortChecked('due');"
-                        style="cursor:pointer;">Due Date
+                    <span title="Click to sort" style="cursor:pointer;">Due Date
                     </span>
                 </td>
                 <td width="16%">
-                    <span title="Click to sort"
-                        onclick="sortChecked('barcode');"
-                        style="cursor:pointer;">barcode</span>
+                    <span title="Click to sort" style="cursor:pointer;">barcode</span>
                 </td>
                 <td width="22%">
-                    <span title="Click to sort" onclick="sortChecked('cn');"
-                        style="cursor:pointer;">call number</span>
+                    <span title="Click to sort" style="cursor:pointer;">call number</span>
                 </td>
             </tr>
         </table>
@@ -106,7 +91,7 @@
                         <td width="40%"
                             style="padding-left:5px;padding-bottom:10px;"
                             name="author">
-                            <a href="javascript:;" name="title"></a>
+                            <a href="#" name="title"></a>
                         </td>
                         <td width="8%" name="renewals" align="center"></td>
                         <td width="13%" style="padding-left:5px;"
@@ -124,31 +109,25 @@
             <tr>
                 <td width="45%" style="padding-left:15px;">
                     <span title="Click to sort"
-                        onclick="sortCheckedHist('title');"
                         style="cursor:pointer;">Title</span> /
                     <span title="Click to sort"
-                        onclick="sortCheckedHist('author');"
                         style="cursor:pointer;">Author</span>
                 </td>
                 <td width="22%"
                     style="white-space:nowrap;padding-left:5px;">
                     <span title="Click to sort"
-                        onclick="sortCheckedHist('cn');"
                         style="cursor:pointer;">Call Number</span>
                 </td>
                 <td width="11%">
                     <span title="Click to sort"
-                        onclick="sortCheckedHist('checkout');"
                         style="cursor:pointer;">Checkout</span>
                 </td>
                 <td width="11%">
                     <span title="Click to sort"
-                        onclick="sortCheckedHist('due');"
                         style="cursor:pointer;">Due Date</span>
                 </td>
                 <td width="11%">
                     <span title="Click to sort"
-                        onclick="sortCheckedHist('returned');"
                         style="cursor:pointer;">Returned</span>
                 </td>
             </tr>
@@ -159,7 +138,7 @@
                 <tr id="acct_checked_hist_temp">
                     <td width="45%"
                         style="padding-left:15px;padding-bottom:10px;">
-                        <a href="javascript:;" name="title"></a> /
+                        <a href="#" name="title"></a> /
                         <span name="author"></span>
                     </td>
                     <td width="22%" style="padding-left:5px;"
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
index b176867..387eaa3 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
@@ -7,13 +7,11 @@
             <img src="/opac/skin/kcls/graphics/sub_holds_on.jpg" />
         </div>
         <div class="align hide_me" id="holds_hist_link">
-            <a href="javascript:;"
-                onclick="switchSubPage('holds','hist');"><img
+            <a href="#"><img
                 src="/opac/skin/kcls/graphics/sub_holds_hist_off.jpg" /></a>
         </div>
         <div class="align hide_me" id="holds_link">
-            <a href="javascript:;"
-                onclick="switchSubPage('holds','main');"><img
+            <a href="#"><img
                 src="/opac/skin/kcls/graphics/sub_holds_off.jpg" /></a>
         </div>
         <div class="align selected hide_me" id="holds_hist_label">
@@ -26,7 +24,7 @@
             Current Items on Hold
         </span>
         <span style="float:right;">
-            <a class="hide_me" href="javascript:;">Export List</a>
+            <a class="hide_me" href="#">Export List</a>
         </span>
     </div>
     <div class="clear-both"></div>
@@ -54,19 +52,17 @@
                     </select>
                 </td>
                 <td width="1" style="padding-left:9px;">
-                    <a href="javascript:;" onclick="myopacDoHoldAction();"><img
+                    <a href="#"><img
                         alt="Save"
                         src="/opac/skin/kcls/graphics/save-btn.png" /></a>
                 </td>
                 <td width="1" style="padding-left:5px;">
-                    <a href="javascript:;"
-                        onclick="alert('Suspend your hold for pick up at a later date. Edit individual items with the Edit link or check the Title box to select all, select action and Save.');"><img
+                    <a href="#"><img
                         alt="Holds Help"
                         src="/opac/skin/kcls/graphics/question-mark.png" /></a>
                 </td>
                 <td align="right">
-                    <select class="hide_me" id="holds_sort"
-                        onchange="sortHolds(this.options[this.selectedIndex].value);">
+                    <select class="hide_me" id="holds_sort">
                         <option value="">-- Sort By --</option>
                         <option value="title">Title</option>
                         <option value="pickup">PickUp Location</option>
@@ -79,28 +75,23 @@
             border='0' width="100%">
             <tr>
                 <td width="36" align="center">
-                    <input type="checkbox" id="check_all_holds"
-                        onclick="checkAll($('holds_temp_parent'), this.id);" />
+                    <input type="checkbox" id="check_all_holds" />
                 </td>
                 <td width="138">
                     <span title="Click to sort"
-                        onclick="sortHolds('title');" style="cursor:pointer;">
+                        style="cursor:pointer;">
                         Title
                     </span>
                 </td>
                 <td width="123">
-                    <span title="Click to sort"
-                        onclick="sortHolds('author');"
-                        style="cursor:pointer;">Author</span>
+                    <span title="Click to sort" style="cursor:pointer;">Author</span>
                 </td>
                 <td width="64">
                     <span title="Click to sort"
-                        onclick="sortHolds('format');"
                         style="cursor:pointer;">Format</span>
                 </td>
                 <td width="136">
                     <span title="Click to sort"
-                        onclick="sortHolds('pickup');"
                         style="cursor:pointer;">Pickup Location</span>
                 </td>
                 <td width="104">Activate</td>
@@ -108,7 +99,6 @@
                 <td width="95">Active</td>
                 <td width="172">
                     <span title="Click to sort"
-                        onclick="sortHolds('status');"
                         style="cursor:pointer;">Status</span>
                 </td>
             </tr>
@@ -127,7 +117,7 @@
                     </td>
                     <td width="138">
                         <div style="margin-top:10px;margin-bottom:10px;">
-                            <a href="javascript:;" name="myopac_holds_title_link"></a>
+                            <a href="#" name="myopac_holds_title_link"></a>
                         </div>
                     </td>
                     <td width="123">
@@ -173,10 +163,10 @@
                     </td>
                     <td width="62" align="right"
                         style="text-align:right;padding-right:7px;">
-                        <a name="hold_edit_link" href="javascript:;">Edit</a>
-                        <a href="javascript:;" name="hold_save_link"
+                        <a name="hold_edit_link" href="#">Edit</a>
+                        <a href="#" name="hold_save_link"
                             class="hide_me">Save</a>
-                        <a href="javascript:;" name="hold_cancel_link"
+                        <a href="#" name="hold_cancel_link"
                             class="hide_me">Back</a>
                     </td>
                 </tr>
@@ -208,7 +198,7 @@
             type='text' id='myopac_holds_thaw_date_input' />
     </p>
     <p>
-        <button onclick='myopacApplyThawDate();'>&common.submit;</button>
+        <button>&common.submit;</button>
     </p>
 </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
index 353529a..9dd2c9e 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
@@ -13,8 +13,7 @@
         <tr>
             <td>
                 Share this list?
-                <a href="javascript:;"
-                    onclick="alert($('bb_publish_text').innerHTML);"><img
+                <a href="#"><img
                     alt="Sharing Help"
                     src="/opac/skin/kcls/graphics/question-mark.png" /></a>
             </td>
@@ -29,38 +28,33 @@
             </td>
         </tr>
     </table>
-    <a href="javascript:;"
-        onclick="if(addMyList()) {hideMe($('mylist_div'));unHideMe($('myopac_bookbag_div'));}"><img
+    <a href="#"><img
         alt="Submit" src="/opac/skin/kcls/graphics/btnSubmit.png" /></a>
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-    <a href="javascript:;"
-        onclick="hideMe($('mylist_div'));unHideMe($('myopac_bookbag_div'));"><img
+    <a href="#"><img
         alt="Cancel" src="/opac/skin/kcls/graphics/btnCancel.png" /></a>
 </div>
 <div id='myopac_bookbag_div' style="padding:5px;">
     <div class="header_middle">
         <span id="acct_holds_header" style="float:left;">My Lists</span>
         <span style="float:right;">
-            <a class="hide_me" href="javascript:;">Export List</a>
+            <a class="hide_me" href="#">Export List</a>
         </span>
     </div>
     <div style="float:right;width:85px;">
         <div style="position:absolute">
             <div style="position:relative;top:13px;">
-                <a href="javascript:;"
-                    style="position:relative;top:-3px;left:-5px;"
-                    onclick="alert('To take action on individual items, select item, choose action and Save.');"><img
+                <a href="#"
+                    style="position:relative;top:-3px;left:-5px;"><img
                     alt="Saving Help"
                     src="/opac/skin/kcls/graphics/question-mark.png" /></a>
-                <a id='acct_lists_save' href="javascript:;"
-                    onclick="listSaveAction()"><img alt="Save"
+                <a id='acct_lists_save' href="#"><img alt="Save"
                     src="/opac/skin/kcls/graphics/save-btn.png" /></a>
             </div>
         </div>
     </div>
     <div class="clear-both pad-top-ten">
-        <a href="javascript:;"
-            onclick="hideMe($('myopac_bookbag_div'));unHideMe($('mylist_div'));">+ Add new list</a>
+        <a href="#">+ Add new list</a>
     </div>
     <div id="temp_wrapper">
         <div id='acct_list_template2' class="hide_me">
@@ -71,8 +65,7 @@
                             Temporary List
                         </td>
                         <td>
-                            <a href="javascript:;"
-                                onclick="alert('Items you selected from the search results screen.')"><img
+                            <a href="#"><img
                                 alt="Anonymous List Help"
                                 src="/opac/skin/kcls/graphics/question-mark.png" /></a>
                         </td>
@@ -85,8 +78,7 @@
             <table id="acct_list_header_anon" cellpadding='0' cellspacing='0' border='0'>
                 <tr>
                     <td width="1%" style="padding-left:10px;">
-                        <input type="checkbox" id="check_all_list_anon"
-                            onclick="checkAll(this.parentNode.parentNode.parentNode.parentNode.parentNode, this, 'list_action_chbx');" />
+                        <input type="checkbox" id="check_all_list_anon" />
                     </td>
                     <td width="98%" style="padding-left:5px;">Title</td>
                     <td width="1%">
@@ -117,10 +109,10 @@
                             title="You are sharing this list"/></a>
                     </div>
                     <div style="float:left;padding:5px 0px 0px 10px;">
-                        <a href="javascript:;" name="share_list_link">Share</a>
+                        <a href="#" name="share_list_link">Share</a>
                     </div>
                     <div style="float:left;padding:5px 0px 0px 10px;">
-                        <a href="javascript:;" name="remove_list">Remove</a>
+                        <a href="#" name="remove_list">Remove</a>
                     </div>
                     <div class="clear-both pad-bottom-five"></div>
                 </div>
@@ -128,8 +120,7 @@
                     border='0'>
                     <tr>
                         <td width="1%" style="padding-left:10px;">
-                            <input type="checkbox" id="check_all_list"
-                            onclick="checkAll(this.parentNode.parentNode.parentNode.parentNode.parentNode, this, 'list_action_chbx');" />
+                            <input type="checkbox" id="check_all_list" />
                         </td>
                         <td width="98%" style="padding-left:5px;">Title</td>
                         <td width="1%">
@@ -168,7 +159,7 @@
         <tbody id='myopac_bookbag_tbody'>
             <tr id='myopac_bookbag_tr'>
                 <td>
-                    <a href='javascript:void(0);' class='classic_link'
+                    <a href='#' class='classic_link'
                         name='myopac_expand_bookbag'> </a>
                 </td>
                 <td>
@@ -198,7 +189,7 @@
                         class='classic_link hide_me'>&myopac.bookbag.share;</a>
                 </td>
                 <td>
-                    <a class='classic_link' href='javascript:void(0);'
+                    <a class='classic_link' href='#'
                         name='myopac_container_delete'>&myopac.delete;</a>
                 </td>
             </tr>
@@ -221,14 +212,13 @@
                 <td>
                     <span style='padding: 5px;'>&myopac.bookbag.share;</span>
                     <a class='classic_link'
-                        href='javascript:alert($("bb_publish_text").innerHTML);'><b>&common.help;</b></a>
+                        href='#'><b>&common.help;</b></a>
                     <span>&common.yes;</span>
                     <input type='radio' name='bb_public' id='bb_public_yes'/>
                     <span>&common.no;</span>
                     <input type='radio' name='bb_public' id='bb_public_no' checked='checked'/>
-                    <input style='padding-left: 10px;'
-                        onclick='myOPACCreateBookbag();' 
-                        type='submit' value='&common.submit;' />
+                    <input style='padding-left: 10px;' type='submit'
+                        value='&common.submit;' />
                 </td>
             </tr>
         </tbody>
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
index cc659e5..5f76beb 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
@@ -28,8 +28,8 @@
                 </div>
             </div>
             Fines: <span id="myopac_sum_fines_bal">$0.00</span><br />
-            <a class="hide_me" href="javascript:;" id="pay_fines_btn1"
-                onclick="showPaymentForm();"><img alt="Pay Fines"
+            <a class="hide_me" href="#" id="pay_fines_btn1"><img
+                alt="Pay Fines"
                 onmouseover="this.src='/opac/skin/kcls/graphics/pay-fines-btn-hover.png';"
                 onmouseout="this.src='/opac/skin/kcls/graphics/pay-fines-btn.png';"
                 src="/opac/skin/kcls/graphics/pay-fines-btn.png"
@@ -78,7 +78,7 @@
                                 </span>
                             </td>
                             <td align="right" class="view_link">
-                                <a href="javascript:alert('XXX TODO');">View All</a>
+                                <a href="#">View All</a>
                             </td>
                         </tr>
                     </table>
@@ -90,8 +90,7 @@
                             <td align="right" class="view_link">
                                 <a class="hide_me"
                                     id="show_fines_link"
-                                    href="javascript:;"
-                                    onclick="showFinesDiv(this);">Show Overdue Materials</a>
+                                    href="#">Show Overdue Materials</a>
                             </td>
                         </tr>
                     </table>
@@ -156,7 +155,6 @@
                                 <br />
                                 <input id="pay_fines_box1" checked="checked"
                                     type="checkbox"
-                                    onclick="checkAll($('myopac_circ_trans_tbody'), this, 'selector');"
                                     title="Click to (un)select all fines" />
                             </td>
                         </tr>
@@ -211,7 +209,6 @@
                                 <br />
                                 <input id="pay_fines_box2" checked="checked"
                                     type="checkbox"
-                                    onclick="checkAll($('myopac_trans_tbody'), this, 'selector');"
                                     title="Click to (un)select all fines" />
                             </td>
                         </tr>
@@ -242,8 +239,7 @@
                     </tbody>
                 </table>
             </div>
-            <a href="javascript:;"
-                onclick="showPaymentForm();"><img alt="Pay Fines"
+            <a href="#"><img alt="Pay Fines"
                 onmouseover="this.src='/opac/skin/kcls/graphics/pay-fines-btn-hover.png';"
                 src="/opac/skin/kcls/graphics/pay-fines-btn.png"
                 style="position:relative;top:5px;" /></a>
@@ -333,8 +329,7 @@
                     <td>
                         <div style="position:absolute;">
                             <div style="position:relative;left:80px;">
-                                <a href="javascript:;"
-                                    onclick="alert('Also known as a CVV2 code, it is the 3-digit number on the back of the card next to your signature.\nKCLS only accpets VISA and MasterCard.');"><img
+                                <a href="#"><img
                                     src="/opac/skin/kcls/graphics/question-mark.png" /></a>
                             </div>
                         </div>
@@ -390,7 +385,7 @@
                         <button jsId='oilsSelfckCCSubmit'>
                             Submit Payment
                         </button>
-                        <button onclick="hideMe($('pay_fines_now'));unHideMe($('acct_sum'));">
+                        <button>
                             Cancel
                         </button>
                     </td>
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
index 2be5383..ff1a3ad 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
@@ -11,15 +11,13 @@
 
                 <div class="align hide_me"
                      id="prefs_info_link">
-                    <a href="javascript:;"
-                         onclick="switchSubPage('prefs','info')"><img src=
+                    <a href="#"><img src=
                          "/opac/skin/kcls/graphics/sub_prefs_info_off.jpg" /></a>
                 </div>
 
                 <div class="align"
                      id="prefs_notify_link">
-                    <a href="javascript:;"
-                         onclick="switchSubPage('prefs','notify')"><img src=
+                    <a href="#"><img src=
                          "/opac/skin/kcls/graphics/sub_prefs_notify_off.jpg" /></a>
                 </div>
 
@@ -29,8 +27,7 @@
 
                 <div class="align"
                      id="prefs_search_link">
-                    <a href="javascript:;"
-                         onclick="switchSubPage('prefs','search')"><img src=
+                    <a href="#"><img src=
                          "/opac/skin/kcls/graphics/sub_prefs_search_off.jpg" /></a>
                 </div>
 
@@ -44,8 +41,7 @@
                     <div style="position:relative;top:75px;">
                         <a id='acct_prefs_save'
                              class='hide_me'
-                             href="javascript:;"
-                             onclick="myOPACSavePrefs()"><img alt="Save"
+                             href="#"><img alt="Save"
                              src="/opac/skin/kcls/graphics/save-btn.png" /></a>
                     </div>
                 </div>
@@ -60,8 +56,7 @@
             </span>
             <span class="float-right">
                 <a class="hide_me"
-                    href="javascript:;"
-                    onclick="fadeOut(this);">Export List</a>
+                    href="#">Export List</a>
             </span>
         </div>
 
@@ -79,9 +74,7 @@
                     <td>
                         <div style="position:absolute">
                             <div style="position:relative;top:0px;left:55px;">
-                                <a href="javascript:;"
-                                     onclick=
-                                     "alert('Number of search results to display per page. For slower connections, choose fewer hits per page');">
+                                <a href="#">
                                 <img alt="Search Hits Help"
                                      src=
                                      "/opac/skin/kcls/graphics/question-mark.png" /></a>
@@ -143,9 +136,7 @@
                     <td>&myopac.prefs.search.location;</td>
                     <td>
                         <div style='margin-bottom: 5px;'>
-                            <input type='checkbox'
-                                 id='myopac_pref_home_lib'
-                                 onclick='if(this.checked) $("prefs_def_location").disabled=true; else $("prefs_def_location").disabled=false;' />
+                            <input type='checkbox' id='myopac_pref_home_lib' />
                                  &myopac.prefs.search.home;
                         </div>
                         <select id='prefs_def_location'></select>
@@ -169,9 +160,7 @@
                 <tr class="hide_me">
                     <td><span>&myopac.prefs.holds.notify;</span> <a class=
                     'classic_link'
-                       href='javascript:void(0);'
-                       onclick=
-                       'alert($("myopac_pref_hold_notify_alert").innerHTML);'>&common.help;</a></td>
+                       href='#'>&common.help;</a></td>
 
                     <td style="padding-left:15px;"><select id=
                     'prefs_hold_notify'>
@@ -315,10 +304,8 @@
                         <td class='light_border'
                             id='myopac_summary_dayphone'></td>
 
-                        <td class='light_border'><a href='javascript:void(0);'
+                        <td class='light_border'><a href='#'
                            class="hide_me"
-                           onclick=
-                           'unHideMe($("myopac_update_phone1_row"));$("myopac_new_phone1").focus();'
                            id='myopac_summary_phone1_change'
                            style=
                            'text-decoration: underline;'>&myopac.summary.change;</a></td>
@@ -334,13 +321,13 @@
 
                             <input type='text' size='24' id='myopac_new_phone1' />
                             <span class='myopac_update_span'>
-                                <button onclick='myOPACUpdatePhone("1");'>
+                                <button>
                                     <span class='myopac_update_span'>
                                         &common.submit;</span>
                                 </button>
                             </span>
                             <span class='myopac_update_span'>
-                                <button onclick='hideMe($("myopac_update_phone1_row"));'>
+                                <button>
                                     <span class='myopac_update_span'>
                                         &common.cancel;</span>
                                 </button>
@@ -355,10 +342,8 @@
                         <td class='light_border'
                             id='myopac_summary_eveningphone'></td>
 
-                        <td class='light_border'><a href='javascript:void(0);'
+                        <td class='light_border'><a href='#'
                            class="hide_me"
-                           onclick=
-                           'unHideMe($("myopac_update_phone2_row"));$("myopac_new_phone2").focus();'
                            id='myopac_summary_phone2_change'
                            style=
                            'text-decoration: underline;'>&myopac.summary.change;</a></td>
@@ -370,11 +355,9 @@
                             colspan='3'><span class='myopac_update_span'>New
                             &myopac.summary.phone.evening;:</span>
                             <input type='text' size='24' id='myopac_new_phone2' />
-                            <span class='myopac_update_span'><button onclick=
-                                'myOPACUpdatePhone("2");'><span class=
+                            <span class='myopac_update_span'><button><span class=
                                 'myopac_update_span'>&common.submit;</span></button></span>
-                            <span class='myopac_update_span'><button onclick=
-                                'hideMe($("myopac_update_phone2_row"));'><span class=
+                            <span class='myopac_update_span'><button><span class=
                                 'myopac_update_span'>&common.cancel;</span></button></span>
                         </td>
                     </tr>
@@ -386,10 +369,8 @@
                         <td class='light_border'
                             id='myopac_summary_otherphone'></td>
 
-                        <td class='light_border'><a href='javascript:void(0);'
+                        <td class='light_border'><a href='#'
                            class="hide_me"
-                           onclick=
-                           'unHideMe($("myopac_update_phone3_row"));$("myopac_new_phone3").focus();'
                            id='myopac_summary_phone3_change'
                            style=
                            'text-decoration: underline;'>&myopac.summary.change;</a></td>
@@ -401,11 +382,9 @@
                             colspan='3'><span class='myopac_update_span'>Enter
                             New &myopac.summary.phone.other;:</span>
                             <input type='text' size='24' id='myopac_new_phone3' />
-                            <span class='myopac_update_span'><button onclick=
-                                'myOPACUpdatePhone("3");'><span class=
+                            <span class='myopac_update_span'><button><span class=
                                 'myopac_update_span'>&common.submit;</span></button></span>
-                            <span class='myopac_update_span'><button onclick=
-                                'hideMe($("myopac_update_phone3_row"));'><span class=
+                            <span class='myopac_update_span'><button><span class=
                                 'myopac_update_span'>&common.cancel;</span></button></span>
                         </td>
                     </tr>
@@ -415,9 +394,7 @@
                             <div style="position:absolute">
                                 <div style=
                                 "position:relative;left:70px;top:-3px;">
-                                    <a href="javascript:;"
-                                         onclick=
-                                         "alert('Create a Username as an option to your barcode to log into My Account.\nExamples: ilovebooks, johndoe1');">
+                                    <a href="#">
                                     <img alt="Username Help"
                                          src=
                                          "/opac/skin/kcls/graphics/question-mark.png" /></a>
@@ -428,9 +405,7 @@
                         <td class='light_border'
                             id='myopac_summary_username'></td>
 
-                        <td class='light_border'><a href='javascript:void(0);'
-                           onclick=
-                           'unHideMe($("myopac_update_username_row"));$("myopac_new_username").focus();'
+                        <td class='light_border'><a href='#'
                            class="hide_me"
                            id='myopac_summary_username_change'
                            style=
@@ -443,11 +418,9 @@
                             colspan='3'><span class=
                             'myopac_update_span'>&myopac.summary.username.enter;</span>
                             <input type='text' size='24' id='myopac_new_username' />
-                            <span class='myopac_update_span'><button onclick=
-                                'myOPACUpdateUsername();'><span class=
+                            <span class='myopac_update_span'><button><span class=
                                 'myopac_update_span'>&common.submit;</span></button></span>
-                            <span class='myopac_update_span'><button onclick=
-                            'hideMe($("myopac_update_username_row"));'><span class=
+                            <span class='myopac_update_span'><button><span class=
                                 'myopac_update_span'>&common.cancel;</span></button></span>
                         </td>
                     </tr>
@@ -457,10 +430,8 @@
                         <td class='light_border'
                             id='myopac_summary_password'>
                             &myopac.summary.password.text;</td>
-                        <td class='light_border'><a href='javascript:void(0);'
+                        <td class='light_border'><a href='#'
                            class="hide_me"
-                           onclick=
-                           'unHideMe($("myopac_update_password_row"));$("myopac_current_password").focus();'
                            id='myopac_summary_password_change'
                            style=
                            'text-decoration: underline;'>&myopac.summary.change;</a></td>
@@ -506,11 +477,9 @@
                                     </tr>
                                 </tbody>
                             </table><span class=
-                            'myopac_update_span'><button onclick=
-                            'myOPACUpdatePassword();'><span class=
+                            'myopac_update_span'><button><span class=
                             'myopac_update_span'>&common.submit;</span></button></span>
-                            <span class='myopac_update_span'><button onclick=
-                            'hideMe($("myopac_update_password_row"));'><span class='myopac_update_span'>
+                            <span class='myopac_update_span'><button><span class='myopac_update_span'>
                             &common.cancel;</span></button></span>
                         </td>
                     </tr>
@@ -522,10 +491,8 @@
                         <td class='light_border'
                             id='myopac_summary_email'></td>
 
-                        <td class='light_border'><a href='javascript:void(0);'
+                        <td class='light_border'><a href='#'
                            class="hide_me"
-                           onclick=
-                           'unHideMe($("myopac_update_email_row"));$("myopac_new_email").focus();'
                            id='myopac_summary_email_change'
                            style=
                            'text-decoration: underline;'>&myopac.summary.change;</a></td>
@@ -539,13 +506,13 @@
                             </span>
                             <input type='text' size='24' id='myopac_new_email' />
                             <span class='myopac_update_span'>
-                                <button onclick= 'myOPACUpdateEmail();'>
+                                <button>
                                     <span class= 'myopac_update_span'>
                                         &common.submit;</span>
                                 </button>
                             </span>
                             <span class='myopac_update_span'>
-                                <button onclick='hideMe($("myopac_update_email_row"));'>
+                                <button>
                                     <span class='myopac_update_span'>
                                         &common.cancel;</span>
                                 </button>
@@ -577,10 +544,8 @@
                         &myopac.summary.home;</td>
                         <td class='light_border'
                             id='myopac_summary_homelib'></td>
-                        <td><a href='javascript:void(0);'
+                        <td><a href='#'
                            class="hide_me"
-                           onclick=
-                           'unHideMe($("myopac_update_home_row"));$("myopac_new_home").focus();'
                            id='myopac_summary_home_change'
                            style=
                            'text-decoration: underline;'>&myopac.summary.change;</a></td>
@@ -594,13 +559,13 @@
                             <select id='myopac_new_home'>
                             </select>
                             <span class='myopac_update_span'>
-                                <button onclick= 'myOPACUpdateHomeOU();'>
+                                <button>
                                     <span class= 'myopac_update_span'>
                                         &common.submit;</span>
                                 </button>
                             </span>
                             <span class='myopac_update_span'>
-                                <button onclick= 'hideMe($("myopac_update_home_row"));'>
+                                <button>
                                     <span class= 'myopac_update_span'>
                                         &common.cancel;</span>
                                 </button>
@@ -631,8 +596,7 @@
                                     <td>&myopac.summary.addresses.pending;</td>
 
                                     <td>
-                                        <a href="javascript:;"
-                                            onclick="alert('Address changes will be authenticated by staff.');"><img
+                                        <a href="#"><img
                                             alt="Address Help"
                                             src="/opac/skin/kcls/graphics/question-mark.png" /></a>
                                     </td>
@@ -688,7 +652,7 @@
                                         colspan='2' class='hide_me'>
                                         <a class='classic_link'
                                             name='myopac_addr_edit_link'
-                                            href='javascript:void(0);'>Edit Address</a>
+                                            href='#'>Edit Address</a>
                                     </td>
                                 </tr>
                             </table>
@@ -751,11 +715,11 @@
                                     <td name='myopac_addr_edit_td' colspan='2'>
                                         <a class='classic_link'
                                             name='myopac_pending_addr_edit_link'
-                                            href='javascript:void(0);'>Save Changes</a>
+                                            href='#'>Save Changes</a>
                                         <a style='padding-left:10px;'
                                             class='classic_link'
                                             name='myopac_pending_addr_del_link'
-                                            href='javascript:void(0);'>Discard Pending Address</a>
+                                            href='#'>Discard Pending Address</a>
                                     </td>
                                 </tr>
                             </table>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/global_row.tt2
index 7c60f98..8bcb977 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/global_row.tt2
@@ -17,14 +17,8 @@
             <option value='exact'>&opac.advanced.refined.exact;</option>
         </select>
         <!-- search term -->
-        <input type='text' size='18' name='term'
-            style='margin-right: 3px;'
-            onkeydown="if (userPressedEnter(event)) alert('XXX Enter');" />
+        <input type='text' size='18' name='term' style='margin-right: 3px;' />
         <!-- Remove this row -->
-        <button onclick='
-            var row = this.parentNode.parentNode;
-            if (row.parentNode.getElementsByTagName("tr").length > 2)
-                row.parentNode.removeChild(row);'>X</button>
     </td>
 </tr>
 <!-- ****************** end: adv_global_row.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
index baf0f50..a86ef6a 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
@@ -18,8 +18,6 @@
                     <!-- add a new row -->
                     <tr id='adv_global_addrow'>
                         <td align='left' style="padding-top:7px;">
-                            <a href="javascript:;"
-                                onclick='advAddGblRow();'>Add Search Row</a>
                             <button>&advanced.search.submit;</button><!-- XXX TODO make a real form -->
                         </td>
                     </tr>
@@ -102,21 +100,11 @@
                             <span>&advanced.literary.form;</span>
                             <a id='adv_global_lit_form_link_adv'
                                 class='classic_link adv_adv_link'
-                                href='javascript:void(0);' onclick='
-                                hideMe($("adv_global_lit_form_basic"));
-                                unHideMe($("adv_global_lit_form"));
-                                hideMe(this);
-                                unHideMe($("adv_global_lit_form_link_basic"));
-                                '>&advanced.link;</a>
+                                href='#'>&advanced.link;</a>
 
                             <a id='adv_global_lit_form_link_basic'
                                 class='hide_me classic_link adv_adv_link'
-                                href='javascript:void(0);' onclick='
-                                unHideMe($("adv_global_lit_form_basic"));
-                                hideMe($("adv_global_lit_form"));
-                                unHideMe($("adv_global_lit_form_link_adv"));
-                                hideMe(this);
-                                '>&advanced.basic.link;</a>
+                                href='#'>&advanced.basic.link;</a>
                         </td>
                         <td align='left' class="hide_me">
                             <select multiple='multiple' size='3'
@@ -145,20 +133,11 @@
                             <span>&advanced.audience;</span>
                             <a id='adv_global_audience_link_adv'
                                 class='classic_link adv_adv_link'
-                                href='javascript:void(0);' onclick='
-                                hideMe($("adv_global_audience_basic"));
-                                unHideMe($("adv_global_audience"));
-                                hideMe(this);
-                                unHideMe($("adv_global_audience_link_basic"));
-                                '>&advanced.link;</a>
+                                href='#'>&advanced.link;</a>
 
                             <a id='adv_global_audience_link_basic'
                                 class='hide_me classic_link adv_adv_link'
-                                href='javascript:void(0);' onclick='
-                                unHideMe($("adv_global_audience_basic"));
-                                hideMe($("adv_global_audience"));
-                                unHideMe($("adv_global_audience_link_adv"));
-                                hideMe(this);'>&advanced.basic.link;</a>
+                                href='#'>&advanced.basic.link;</a>
                         </td>
                         <td align='left' class="hide_me">
                             <select multiple='multiple' size='3'
@@ -186,15 +165,6 @@
                             <span>&advanced.filter.pubyear;</span>
                         </td>
                         <td align='left'>
-                            <!-- XXX TODO the following select used to have this
-                                onchange handler:
-                                if($("adv_global_pub_date_type").selectedIndex == 3)
-                                    unHideMe($("adv_global_pub_date_2_span"));
-                                else
-                                    hideMe($("adv_global_pub_date_2_span"));
-
-                                So do we need equiv functionality or no?
-                                -->
                             <select id='adv_global_pub_date_type'>
                                     <option value='equals' selected='selected'>
                                         &advanced.filter.pubyear.equals;
@@ -343,11 +313,8 @@
             </tr>
             <tr name='crow' class='hide_me'>
                 <td colspan='4' align='center'>
-                <a href='javascript:void(0);' class='classic_link'
-                    onclick='
-                        var div = $("adv_marc_search_sidebar");
-                        if( div.getElementsByTagName("table").length > 1 )
-                            div.removeChild(this.parentNode.parentNode.parentNode.parentNode);'>&common.close;</a>
+                    <a href='javascript:void(0);'
+                        class='classic_link'>&common.close;</a>
                 </td>
             </tr>
         </tbody>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
index 7d51671..93e2b65 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
@@ -11,10 +11,6 @@
         <title>Catalog - King County Library - [% ctx.page_title %]</title>
         <link rel="unapi-server" type="application/xml" title="unAPI"
             href="/opac/extras/unapi" />
-        [%- UNLESS skip_js %]
-        <script type="text/javascript"
-            src="/opac/skin/kcls-wire/js/misc.js"></script>
-        [%- END -%]
         [% BLOCK html_head; END; # provide a default that can be overridden %]
         [% PROCESS html_head %]
     </head>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
index 7e70e6c..bfec1d2 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
@@ -58,20 +58,6 @@
     </div>
 <!-- ************************************* home page banner end *********************************************** -->
   </div>
-<script type="text/javascript">
-featuredcontentslider.init({
-id: "homebanner",
-contentsource: ["inline", ""],
-toc: "markup",
-nextprev: ["", ""],
-enablefade: [true, 0.04],
-onChange: function(previndex, curindex){},
-
-
-autorotate: [true, 3000] //pause time (in milliseconds)
-})
-</script>
-
         <div id="new_cat_link_holder">
             <div class="pos-rel">
                 <a href="http://www.kcls.org/newcatalog"></a>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2
index 5beabf5..82bb33d 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2
@@ -11,10 +11,8 @@
 	<input type="text" id="forget_pw_user" /><br /><br />
 	Email Address on account<br />
 	<input type="text" id="forget_pw_email" /><br />
-    <a href="javascript:;"
-        onclick="iForgotMyPassword($('forget_pw_user').value,$('forget_pw_email').value);">Submit</a> &nbsp;
-    <a href="javascript:;"
-        onclick="unHideMe($('login_box'));hideMe($('forget_pw'));">Cancel</a>
+    <a href="#">Submit</a> &nbsp;
+    <a href="#">Cancel</a>
 </div>
 <table id='change_pw_table' class='data_grid hide_me' style='margin-left: 20px;' width='95%'>
 	<thead>
@@ -62,7 +60,7 @@
 
 <div id="login_box">
     <div style="height:20px;"></div>
-    <form id='login_form' method='POST' action='javascript:loginDance();'>
+    <form id='login_form' method='POST' action='#'>
         <table cellpadding="0" cellspacing="0" border="0">
             <tr>
                 <td valign="top" width="676" class="login_boxes left_brain">
@@ -115,11 +113,11 @@
                                         for="remember_me">Remember Me?</label>
                                 </div>
                                 <div style="padding-top:14px;">
-                                    <a href="javascript:;" id="login_button"><img
+                                    <a href="#" id="login_button"><img
                                         alt="Log in" src="/opac/skin/kcls/graphics/login-btn2.png" /></a>
                                     <input class="hide_me"
                                         id="login_form_submit" type="submit" />
-                                    <a href="javascript:;" onclick="hideMe($('login_box'));unHideMe($('forget_pw'));"
+                                    <a href="#"
                                         style="position:relative;top:-13px;left:2px;font-size:10px;">Forgot your PIN?</a>
                                 </div>
 	                        </td>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/place_hold.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/place_hold.tt2
index 548f092..61ab602 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/place_hold.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/place_hold.tt2
@@ -12,7 +12,7 @@
                             <input type='submit' value='&common.submit;' id='xul_recipient_barcode_submit' />
                         </td>
                         <td>
-                            <input type='submit' value='&common.cancel;' onclick='showCanvas();' />
+                            <input type='submit' value='&common.cancel;' />
                         </td>
                         <td>
                             <input type='submit' value='&common.hold.place;' id='xul_recipient_me' />
@@ -45,16 +45,16 @@
         <p>If you use the Traveling Library Center (TLC) and ABC Express
             services, please select "Outreach" to have the item delivered
             during your scheduled visit.</p>
-        <a href="javascript:;" id="holds_submit"><img
+        <a href="#" id="holds_submit"><img
             alt="Submit" src="/opac/skin/kcls/graphics/btnSubmit.png" /></a>
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-        <a href="javascript:;" id="holds_cancel"><img
+        <a href="#" id="holds_cancel"><img
             alt="Cancel" src="/opac/skin/kcls/graphics/btnCancel.png" /></a>
         <br /><br />
         <p>* If you need your item today, and it is checked in at your
             library, please place your hold and then call your library to set it
             aside. Placing a hold without calling the library will increase your
-            wait time.<br /><a href="javascript:;">Library phone numbers.</a>
+            wait time.<br /><a href="#">Library phone numbers.</a>
         </p>
         <p>* For best possible service, we recommend keeping a printed copy of
         your most recent holds list.</p>
@@ -117,8 +117,7 @@
                     <td class='holds_cell'>&common.phone.enable;</td>
                     <td class='holds_cell'>
                         <input type='checkbox' id='holds_enable_phone'
-                            checked='checked'
-                            onchange='if(this.checked)$("holds_phone").disabled=false; else $("holds_phone").disabled=true;'/>
+                            checked='checked' />
                     </td>
                 </tr>
                 <tr>
@@ -167,11 +166,10 @@
                     <td class='holds_cell'>
                         &opac.holds.freeze;
                         <a class='classic_link'
-                            href='javascript:alert("&opac.holds.freeze.help;");'>&common.help;</a>
+                            href='#'>&common.help;</a>
                         </td>
                     <td class='holds_cell'>
-                        <input type='checkbox' id='holds_frozen_chkbox'
-                            onchange='if($("holds_frozen_chkbox").checked) unHideMe($("hold_frozen_thaw_row")); else hideMe($("hold_frozen_thaw_row"));' /> 
+                        <input type='checkbox' id='holds_frozen_chkbox' /> 
                     </td>
                 </tr>
                 <tr id='hold_frozen_thaw_row' class='hide_me'>
@@ -189,8 +187,8 @@
                 <tr id='holds_alt_formats_row_extras' class='hide_me'>
                     <td colspan='2' align='center'>
                         <div style='padding: 8px;'>
-                            <a class='classic_link' href='javascript:void(0);' style='padding: 5px;'
-                                onclick='unHideMe($("holds_alt_formats_row"));'>&common.hold.advanced;</a>
+                            <a class='classic_link' href='#'
+                                style='padding: 5px;'>&common.hold.advanced;</a>
                         </div>
                     </td>
                 </tr>
@@ -200,8 +198,8 @@
                     <td class='holds_cell'>
                         <div style='margin-bottom: 5px;'>
                             <span>&common.format.alternatives; </span>
-                            <span> <a class='classic_link' style='color:red;' href='javascript:void(0);' 
-                                onclick='alert($("holds_explain_adv").innerHTML)'>&common.help;</a></span>
+                            <span><a class='classic_link' style='color:red;'
+                                    href='#'>&common.help;</a></span>
                         </div>
                         <div>&common.control.click;</div>
                     </td>
@@ -237,16 +235,15 @@
     </div>
     <div id="anonListTable" class="hide_me" style="margin-top: 6px;">
     <select id="holdsCacheSel" class="hide_me"></select><br />
-    <a href="javascript:;" onclick="placeHoldOnCache();">Place hold on selected</a><br />
-    <a href="javascript:;" onclick="delSelCache();">Remove selected</a>
+    <a href="#">Place hold on selected</a><br />
+    <a href="#">Remove selected</a>
     
     <table id="temp_list_holds" cellpadding='0' cellspacing='0' border='0'
         style="margin-top:10px;">
         <tr>
             <td width="1%" style="padding-left:10px;">
                 <input type='checkbox' title='Select All'
-                    id='anon_selector'
-                    onclick="checkAll($('anonListParent'),this.id)" />
+                    id='anon_selector' />
             </td>
             <td width="1%">
             </td>
@@ -267,7 +264,7 @@
             </tr>
         </tbody>
     </table>
-    <a href="javascript:;" onclick="try { hideResultsPage(); } catch(e) {} hideMe($('anonListTable'));">Back to search results</a>
+    <a href="#">Back to search results</a>
     </div>
 
     <span class='hide_me' id='format_words'>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2
index f6ffc6f..d0f1dfd 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2
@@ -11,20 +11,20 @@
         <div id="rdetail_result_nav">
             <span class="hide_me">
                 <a class='np_nav_link classic_link' id='np_start'
-                    href='javascript:rdetailStart();'
+                    href='#'
                     title="&rdetail.page.results;">&rdetail.start;</a>
                 </span>
                 <a class='np_nav_link classic_link hide_me' id='np_prev'
-                    href='javascript:rdetailPrev();'
+                    href='#'
                     title='&rdetail.page.previous;'><span
                         class="nav_arrow_fix">&#9668;</span> Previous</a>
                 <span style="padding:0px 10px;"> </span>
                 <a class='np_nav_link classic_link hide_me' id='np_next'
-                    href='javascript:rdetailNext();'
+                    href='#'
                     title='&rdetail.page.next;'>Next <span
                         class="nav_arrow_fix">&#9658;</span></a>
                 <span class="hide_me"><a class='np_nav_link classic_link'
-                    id='np_end' href='javascript:rdetailEnd();'
+                    id='np_end' href='#'
                     title="&rdetail.page.last;">&rdetail.end;</a></span>
         </div>
         <div class="clear-both"></div>
@@ -70,8 +70,7 @@
                             <option disabled='disabled'>
                                 --------------
                             </option>
-                            <option value='new_bookbag'
-                                onclick='rdetailNewBookbag();'>
+                            <option value='new_bookbag'>
                                 &rdetail.bookbag.create;
                             </option>
                         </select>
@@ -90,10 +89,10 @@
     <br />
     <div style="width:100%;" class="hide_me">
         <div style="float:right;" class="hide_me" id="lib_info_more">
-            <button onclick="unHideMe($('lib_info_less'));unHideMe($('rdetails_status2'));hideMe($('lib_info_more'));">More...</button>
+            <button>More...</button>
         </div>
         <div style="float:right;" class="hide_me" id="lib_info_less">
-            <button onclick="hideMe($('lib_info_less'));hideMe($('rdetails_status2'));unHideMe($('lib_info_more'));">...Less</button>
+            <button>...Less</button>
         </div>
     </div>
     [% INCLUDE "default/kcls-wire/parts/record/extras.tt2" %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2
index fb39934..ec75d0a 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2
@@ -4,7 +4,7 @@
         <tr style='border: 3px solid #E0E0E0;' id='rdetail_volume_details_row' templateRow='1'>
             <td colspan='10'>
                 <div style='text-align: center; margin-top: 6px; margin-bottom: 6px'>
-                    <a name='print' href='javascript:void(0);' class='classic_link'>&rdetail.print;</a>
+                    <a name='print' href='#' class='classic_link'>&rdetail.print;</a>
                     <table class='data_grid data_grid_center' style='width: 100%'>
                         <thead>
                             <tr>
@@ -26,7 +26,7 @@
                                     <a class='hide_me classic_link copy_more_info'
                                         name='less_details_link'>&rdetail.cn.less;</a>
                                     <a class='hide_me classic_link copy_more_info'
-                                        name='copy_hold_link' href='javascript:void(0);'>&rdetail.cn.hold;</a>
+                                        name='copy_hold_link' href='#'>&rdetail.cn.hold;</a>
                                 </td>
                                 <td name='status'> </td>
                                 <td name='location'> </td>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2
index f7092a0..85cd9ea 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2
@@ -40,10 +40,10 @@
                                         <div style="position:absolute;">
                                             <div style="position:relative;top:5px; left: 25px;">
                                                 <a title="Add to my list" id="add_mylist"
-                                                    href="javascript:addMyList();">Add to my list</a>
+                                                    href="#">Add to my list</a>
                                             </div>
                                         </div>
-                                        <a href="javascript:addMyList();"><img
+                                        <a href="#"><img
                                             alt="add to my list"
                                             src="/opac/skin/kcls/graphics/clipboard.png" /></a>
                                     </div>
@@ -130,31 +130,26 @@
 </table>
 
 <div id="rdetail_locs_expand">
-    <a href="javascript:;" onclick="expandBoxes('locs',true);"><img
+    <a href="#"><img
         src="/opac/skin/kcls/graphics/plus_sign.png" /></a>
-    <a style="position:relative;top:-3px;" href="javascript:;"
-        onclick="expandBoxes('locs',true);">Show more locations</a>
+    <a style="position:relative;top:-3px;" href="#">Show more locations</a>
 </div>
 
 <div id="rdetail_locs_collapse" class="hide_me">
-    <a href="javascript:;" onclick="expandBoxes('locs',false);"><img
+    <a href="#"><img
         src="/opac/skin/kcls/graphics/plus_sign.png" /></a>
-    <a style="position:relative;top:-3px;" href="javascript:;"
-        onclick="expandBoxes('locs',false);">Collapse locations</a>
+    <a style="position:relative;top:-3px;" href="#">Collapse locations</a>
 </div>
 
 <div id="rdetail_extras_expand">
-    <a href="javascript:;" onclick="expandBoxes('tabs',true);"><img
+    <a href="#"><img
         src="/opac/skin/kcls/graphics/plus_sign.png" /></a>
-    <a style="position:relative;top:-3px;" href="javascript:;"
-        onclick="expandBoxes('tabs',true);">Expand all tabs</a>
+    <a style="position:relative;top:-3px;" href="#">Expand all tabs</a>
 </div>
 
 <div id="rdetail_extras_collapse" class="hide_me">
-    <a href="javascript:;" onclick="expandBoxes('tabs',false);"><img
-        src="/opac/skin/kcls/graphics/plus_sign.png" /></a>
-    <a style="position:relative;top:-3px;" href="javascript:;"
-        onclick="expandBoxes('tabs',false);">Collapse all tabs</a>
+    <a href="#"><img src="/opac/skin/kcls/graphics/plus_sign.png" /></a>
+    <a style="position:relative;top:-3px;" href="#">Collapse all tabs</a>
 </div>
 
 <div class="hide_me">
@@ -174,9 +169,9 @@
                             <td width="1" valign="top" align="right" style="white-space:nowrap;">
                                 <a href="place_hold" id=''><img alt="Place Hold"
                                     src="/opac/skin/kcls/graphics/place_hold.gif" /></a>
-                                <a href="javascript:;" id="rd_reviews_and_more" target="_blank"><img
+                                <a href="#" id="rd_reviews_and_more" target="_blank"><img
                                     alt="Reviews and More" src="/opac/skin/kcls/graphics/reviews.gif" /></a>
-                                <a href="javascript:addMyList();" id=""><img alt="Add to My List"
+                                <a href="#" id=""><img alt="Add to My List"
                                     src="/opac/skin/kcls/graphics/add_mylist.gif" /></a>
                             </td>
                         </tr>
@@ -196,21 +191,4 @@
     <abbr name="unapi" class="unapi-id"> <!-- unAPI URI goes here --> </abbr>
 </div> <!-- details_body -->
 
-<!-- XXX begin ChiliFresh: need to make this block conditional -->
-<script type="text/javascript">
-    var chilifresh = ''; /* account */
-    if (chilifresh == '(none)') { chilifresh = false; }
-</script>
-<input type="hidden" id="chilifresh_account" name="chilifresh_account"
-    value="" />
-<input type="hidden" id="chilifresh_profile" name="chilifresh_profile"
-    value="" />
-<input type="hidden" id="chilifresh_version" name="chilifresh_version" value="onsite_v1" />
-<input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
-
-<script type="text/javascript">
-//var sslSwitch = (("https:" == document.location.protocol) ? "https://secure." : "http://");
-//document.write(unescape("%3Cscript src='" + sslSwitch + "chilifresh.com/on-site/js/evergreen.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<!-- XXX end ChiliFresh -->
 <!-- ****************** end: rdetail_summary.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
index 97c88f6..70b30b6 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
@@ -25,10 +25,9 @@
                 <div class="pos-abs">
                     <div class="opac-auto-143">
                         <input type="button" id="search_submit" value="GO"
-                            class="hide_me" /><a href="javascript:;"
-                            id="search_submit_alt"
-                            onclick="$('search_submit').click()"><img
-                            alt="Search" src="/opac/skin/kcls/graphics/go-btn.png"
+                            class="hide_me" /><a href="#"
+                                id="search_submit_alt"><img
+                                alt="Search" src="/opac/skin/kcls/graphics/go-btn.png"
                             onmouseover="this.src='/opac/skin/kcls/graphics/go-btn-hover.png';"
                             onmouseout="this.src='/opac/skin/kcls/graphics/go-btn.png';" /></a>
                     </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
index 21d64e2..9685a7a 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
@@ -1,15 +1,5 @@
         <div class="big-block">
-            <div id="user-ql">
-                <script type="text/javascript">
-/* if(grabUser()) {
-    var str = '<div style="float:right;width:214px;">';
-    str += '<div style="position:absolute;"><div style="position:relative;top:-81px;">\n';
-    str += '<div id="quick-links">\n';
-    str += '</div></div></div></div>';
-    document.write(str);
-}*/
-                </script>
-            </div>
+            <div id="user-ql"></div>
             <div class="float-right">
                 <div class="pos-rel">
                     <img
diff --git a/Open-ILS/web/templates/default/kcls-wire/results.tt2 b/Open-ILS/web/templates/default/kcls-wire/results.tt2
index 38396ee..9707ec6 100644
--- a/Open-ILS/web/templates/default/kcls-wire/results.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/results.tt2
@@ -21,8 +21,7 @@
                         onmouseout="this.src='/opac/skin/kcls/graphics/adv_search.png';" /></a>
                 </div>
                 <div class="results_header_btns cached_list_div">
-                    <a href="javascript:;" class="hide_me" id="cacheListLink"
-                        onclick="showCachedList();"><img
+                    <a href="#" class="hide_me" id="cacheListLink"><img
                         alt="View My List"
                         src="/opac/skin/kcls/graphics/view_my_list.png"
                         onmouseover="this.src='/opac/skin/kcls/graphics/view_my_list_hover.png';"
@@ -35,14 +34,12 @@
         <!--#endif -->
                 <div class="results_header_div"></div>
                 <div class="results_header_lbl">View</div>
-                <select class="results_header_sel"
-                    onchange="showDetailedResults(Boolean(this.selectedIndex));">
+                <select class="results_header_sel">
                     <option>Simple</option>
                     <option>Detailed</option>
                 </select>
                 <div class="results_header_div"></div>
-                <input type="checkbox" id="limit_to_available"
-                    onclick='searchBarSubmit(true, this);' />
+                <input type="checkbox" id="limit_to_available" />
                 <label for="limit_to_available" class="results_header_lbl">
                     Limit to available items
                 </label>

commit e4bc4ea0003672b093fd6f6033cd16706daa8816
Author: senator <lebbeous at esilibrary.com>
Date:   Fri Feb 4 17:14:15 2011 -0500

    Never got the place_hold page in until just now
    
    parts/place_hold.tt2 needs css/js attention already seen by other
    templates in parts/

diff --git a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
index aa76a38..d3aa658 100644
--- a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
+++ b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
@@ -168,6 +168,7 @@ var sortHolds = _stub; /* XXX TODO There was a method for sorting loaded holds
 var showDetailedResults = _stub; /* XXX TODO for an old onchange handler that
                                 toggled between simple and detailed results
                                 in the rresults page.  */
+var showCanvas = _stub;
 var checkAll = _stub;
 var sortChecked = _stub;
 var sortCheckedHist = _stub;
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/place_hold.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/place_hold.tt2
new file mode 100644
index 0000000..548f092
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/place_hold.tt2
@@ -0,0 +1,290 @@
+<div>
+    <div id='xulholds_box' class='hide_me canvas' style='margin-top: 6px;'>
+        <center>
+            <table class='data_grid' style='margin-top: 20px;'>
+                <tbody>
+                    <tr>
+                        <td>&opac.holds.xulRecipient;:</td>
+                        <td>
+                            <input type='text' id='xul_recipient_barcode' />
+                        </td>
+                        <td>
+                            <input type='submit' value='&common.submit;' id='xul_recipient_barcode_submit' />
+                        </td>
+                        <td>
+                            <input type='submit' value='&common.cancel;' onclick='showCanvas();' />
+                        </td>
+                        <td>
+                            <input type='submit' value='&common.hold.place;' id='xul_recipient_me' />
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+        </center>
+    </div>
+    <div id='check_holds_box' class='hide_me canvas' 
+        style='margin-top: 6px; width: 100%; text-align: center'>
+        <br/><br/><br/>
+        <b>&common.hold.check;</b>
+    </div>
+    <div id='holds_box' class='canvas' style='margin-top: 6px;'>
+        <br/>
+        <h1>Place Hold</h1>
+        <p>
+        You would like to place a hold on
+        <strong>&quot;<span id="holds_title"></span>&quot;</strong>
+        to be picked up at
+        <strong>&quot;<span id="holds_pickup_lib"></span>&quot;</strong>.<br />
+        If this is correct, press <strong>SUBMIT</strong>.</p>
+        <p>
+            If you would like to change the library pick up location, select
+            from the &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            <select style="width:200px;" id="holds_org_selector"></select><br />
+            Location dropdown menu.
+        </p>
+        <p>If you use the Traveling Library Center (TLC) and ABC Express
+            services, please select "Outreach" to have the item delivered
+            during your scheduled visit.</p>
+        <a href="javascript:;" id="holds_submit"><img
+            alt="Submit" src="/opac/skin/kcls/graphics/btnSubmit.png" /></a>
+        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+        <a href="javascript:;" id="holds_cancel"><img
+            alt="Cancel" src="/opac/skin/kcls/graphics/btnCancel.png" /></a>
+        <br /><br />
+        <p>* If you need your item today, and it is checked in at your
+            library, please place your hold and then call your library to set it
+            aside. Placing a hold without calling the library will increase your
+            wait time.<br /><a href="javascript:;">Library phone numbers.</a>
+        </p>
+        <p>* For best possible service, we recommend keeping a printed copy of
+        your most recent holds list.</p>
+        <table width='90%' border="1" class="hide_me">
+            <tbody>
+                <tr>
+                    <td class='holds_cell color_1' 
+                        align='center' colspan='2'>&common.hold.create;</td>
+                </tr>
+                <tr>
+                    <td class='holds_cell'>&opac.holds.recipient;:</td>
+                    <td class='holds_cell' id='holds_recipient'> </td>
+                </tr>
+                <tr>
+                    <td class='holds_cell'>&common.title.label;</td>
+                    <!-- <td class='holds_cell' id='holds_title'> </td> -->
+                </tr>
+                <tr>
+                    <td class='holds_cell'>&common.author;</td>
+                    <td class='holds_cell' id='holds_author'> </td>
+                </tr>
+                <tr>
+                    <td class='holds_cell'>&common.format;</td>
+                    <td class='holds_cell' id='holds_format'> </td>
+                </tr>
+                <tr id='hold_physical_desc_row'>
+                    <td class='holds_cell'>&common.physical.label;</td>
+                    <td class='holds_cell' id='holds_physical_desc'> </td>
+                </tr>
+
+                <tr class='hide_me' id='holds_cn_row'>
+                    <td class='holds_cell'>&common.call.number.label;</td>
+                    <td class='holds_cell'><b id='holds_cn'/> </td>
+                </tr>
+
+                <tr class='hide_me' id='holds_copy_row'>
+                    <td class='holds_cell'>&common.copy.barcode.label;</td>
+                    <td class='holds_cell'><b id='holds_copy'/> </td>
+                </tr>
+
+                <tr class='hide_me' id='holds_type_row'>
+                    <td class='holds_cell'>&common.hold.type.label;</td>
+                    <td class='holds_cell hide_me' id='holds_is_cn'>
+                        <b>&common.hold.volume;</b>
+                    </td>
+                    <td class='holds_cell hide_me' id='holds_is_copy'>
+                        <b>&common.hold.copy;</b>
+                    </td>
+                </tr>
+                <tr>
+                    <td class='holds_cell'>&opac.holds.contactPhone;:</td>
+                    <td class='holds_cell'>
+                        <input id='holds_phone' size='13' maxlength='12'/>
+                        <span style='margin-left: 4px; font-size: 7pt;'>
+                            &common.phone.format;
+                        </span>
+                    </td>
+                </tr>
+                <tr>
+                    <td class='holds_cell'>&common.phone.enable;</td>
+                    <td class='holds_cell'>
+                        <input type='checkbox' id='holds_enable_phone'
+                            checked='checked'
+                            onchange='if(this.checked)$("holds_phone").disabled=false; else $("holds_phone").disabled=true;'/>
+                    </td>
+                </tr>
+                <tr>
+                    <td class='holds_cell'>&opac.holds.contactEmail;:</td>
+                    <td class='holds_cell' id='holds_email'> 
+                        <span class='hide_me' id='holds.no_email'>
+                           &common.email.none;<br/>
+                           &common.email.set;
+                        </span>
+                        <span class='hide_me' id='holds.no_email.xul'>
+                           &common.email.none; 
+                        </span>
+                    </td>
+                </tr>
+                <tr>
+                    <td class='holds_cell'>&common.email.enable;</td>
+                    <td class='holds_cell'>
+                        <input type='checkbox' id='holds_enable_email'
+                            checked='checked'/>
+                    </td>
+                </tr>
+                <!--
+                <tr id='holds_depth_selector_row' class='hide_me'>
+                    <td class='holds_cell'>Hold Range</td>
+                    <td class='holds_cell'>
+                        <select id='holds_depth_selector'></select>
+                    </td>
+                </tr>
+                -->
+                <tr>
+                    <td class='holds_cell'>&opac.holds.pickupLocation;</td>
+                    <td class='holds_cell'>
+                        <!-- <select id='holds_org_selector'> </select> -->
+                    </td>
+                </tr>
+
+                <tr>
+                    <td class='holds_cell'>&opac.holds.expire_time;</td>
+                    <td class='holds_cell'>
+                        <input size='10' maxlength='10'
+                         id='holds_expire_time' />
+                    </td>
+                </tr>
+
+                <tr>
+                    <td class='holds_cell'>
+                        &opac.holds.freeze;
+                        <a class='classic_link'
+                            href='javascript:alert("&opac.holds.freeze.help;");'>&common.help;</a>
+                        </td>
+                    <td class='holds_cell'>
+                        <input type='checkbox' id='holds_frozen_chkbox'
+                            onchange='if($("holds_frozen_chkbox").checked) unHideMe($("hold_frozen_thaw_row")); else hideMe($("hold_frozen_thaw_row"));' /> 
+                    </td>
+                </tr>
+                <tr id='hold_frozen_thaw_row' class='hide_me'>
+                    <td class='holds_cell'>
+                        <!-- XXX TODO there used to be script here dealing with
+                        frozen holds -->
+                        &opac.holds.freeze.thaw_date;
+                    </td>
+                    <td class='holds_cell'>
+                        <input size='10' maxlength='10'
+                            id='holds_frozen_thaw_input' />
+                    </td>
+                </tr>
+
+                <tr id='holds_alt_formats_row_extras' class='hide_me'>
+                    <td colspan='2' align='center'>
+                        <div style='padding: 8px;'>
+                            <a class='classic_link' href='javascript:void(0);' style='padding: 5px;'
+                                onclick='unHideMe($("holds_alt_formats_row"));'>&common.hold.advanced;</a>
+                        </div>
+                    </td>
+                </tr>
+
+                <tr id='holds_alt_formats_row' class='hide_me'>
+
+                    <td class='holds_cell'>
+                        <div style='margin-bottom: 5px;'>
+                            <span>&common.format.alternatives; </span>
+                            <span> <a class='classic_link' style='color:red;' href='javascript:void(0);' 
+                                onclick='alert($("holds_explain_adv").innerHTML)'>&common.help;</a></span>
+                        </div>
+                        <div>&common.control.click;</div>
+                    </td>
+
+                    <td class='holds_cell'>
+                        <select id='hold_alt_form_selector' multiple='multiple' style='width: 14em;'>
+                            <option value='at'    class='hide_me'>&opac.search.books;</option>
+                            <option value='at-d' class='hide_me'>&opac.search.largePrint;</option>
+                            <option value='i'        class='hide_me'>&opac.search.audioBooks;</option>
+                            <option value='g'        class='hide_me'>&opac.search.videoRecordings;</option>
+                            <option value='j'        class='hide_me'>&opac.search.music;</option>
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td class='holds_cell' align='center' colspan='2'>
+                        <!-- <button id='holds_submit'>&opac.holds.placeHold;</button> -->
+                        <button class='hide_me' id='holds_update'>&common.hold.update;</button>
+                        <span style='padding: 20px;'> </span>
+                        <!-- <button id='holds_cancel'>&common.cancel;</button> -->
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+        <div class='hide_me' id='holds_success'>&opac.holds.success;</div>
+        <div class='hide_me' id='holds_failure'>&opac.holds.failure;</div>
+        <span class='hide_me' id='holds_bad_phone'>
+            &common.phone.format.help;
+        </span>
+        <span class='hide_me' id='hold_not_allowed'>
+            &common.hold.failed;
+        </span>
+    </div>
+    <div id="anonListTable" class="hide_me" style="margin-top: 6px;">
+    <select id="holdsCacheSel" class="hide_me"></select><br />
+    <a href="javascript:;" onclick="placeHoldOnCache();">Place hold on selected</a><br />
+    <a href="javascript:;" onclick="delSelCache();">Remove selected</a>
+    
+    <table id="temp_list_holds" cellpadding='0' cellspacing='0' border='0'
+        style="margin-top:10px;">
+        <tr>
+            <td width="1%" style="padding-left:10px;">
+                <input type='checkbox' title='Select All'
+                    id='anon_selector'
+                    onclick="checkAll($('anonListParent'),this.id)" />
+            </td>
+            <td width="1%">
+            </td>
+            <td width="98%" style="padding-left:40px;">
+                <strong>Title</strong>
+            </td>
+        </tr>
+    </table>
+    <table width='100%' style="margin-left:7px;margin-bottom:10px;">
+        <thead>
+            <tr><td width='20'></td><td width='30'></td><td></td></tr>
+        </thead>
+        <tbody id="anonListParent">
+            <tr id="anonListTemp">
+              <td><input type='checkbox' name='anon_selector' /></td>
+              <td name="curr_row"></td>
+              <td name="title"></td>
+            </tr>
+        </tbody>
+    </table>
+    <a href="javascript:;" onclick="try { hideResultsPage(); } catch(e) {} hideMe($('anonListTable'));">Back to search results</a>
+    </div>
+
+    <span class='hide_me' id='format_words'>
+        <span name='at'>&opac.search.books;</span>
+        <span name='at-d'>&opac.search.largePrint;</span>
+        <span name='i'>&opac.search.audioBooks;</span>
+        <span name='g'>&opac.search.videoRecordings;</span>
+        <span name='j'>&opac.search.music;</span>
+        <span name='m'>&opac.search.electronic;</span>
+    </span>
+
+    <span class='hide_me' id='holds_explain_adv'>&holds.advanced_options;</span>
+    <span class='hide_me' id='holds_pick_good_org'>&common.hold.delivery;</span>
+    <span class='hide_me' id='hold_dup_exists'>&common.hold.exists;</span>
+    <span class='hide_me' id='hold_dup_exists_override'>&common.hold.exists.override;</span>
+    <span id='hold_failed_patron_barred' class='hide_me'>&common.hold.barred;</span>
+    <span id='invalid_hold' class='hide_me'>&common.hold.item.invalid;</span>
+    <span id='holds_invalid_recipient' class='hide_me'>&common.hold.patron.invalid;</span>
+
+</div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/place_hold.tt2 b/Open-ILS/web/templates/default/kcls-wire/place_hold.tt2
new file mode 100644
index 0000000..2bf000a
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/place_hold.tt2
@@ -0,0 +1,15 @@
+[%  WRAPPER "default/kcls-wire/parts/base.tt2";
+    INCLUDE "default/kcls-wire/parts/topnav.tt2";
+    ctx.page_title = "Place Hold" %]
+    <div id="search-wrapper">
+        [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
+        [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content">
+            <div class="common-full-pad"></div>	
+            [% INCLUDE "default/kcls-wire/parts/place_hold.tt2" %]
+            <div class="common-full-pad"></div>	
+        </div>
+    </div>
+[% END %]

commit 520bbb6cda9f0a2e4392ed7458139006ca277f33
Author: senator <lebbeous at esilibrary.com>
Date:   Fri Feb 4 11:33:21 2011 -0500

    kill a lot of inline styling, add some more js stubs, fix a bug in advanced.tt2

diff --git a/Open-ILS/web/opac/skin/kcls-wire/css/semiauto.css b/Open-ILS/web/opac/skin/kcls-wire/css/semiauto.css
index f8009cf..8e01ae1 100644
--- a/Open-ILS/web/opac/skin/kcls-wire/css/semiauto.css
+++ b/Open-ILS/web/opac/skin/kcls-wire/css/semiauto.css
@@ -27,7 +27,7 @@
 .red { color: red; }
 .bold-red { color: red; font-weight: bold }
 .pointer { cursor: pointer; }
-.no-display { display: none }
+#lib_selector_span { display: none }
 .float-left { float: left; }
 .opac-auto-039 { float: left; font-weight: bold; padding-top: 5px; }
 .opac-auto-040 { float: left; padding: 5px 0px 0px 10px; }
@@ -38,7 +38,7 @@
 .opac-auto-046 { float: right; width: 214px; }
 .opac-auto-047 { float: right; width: 353px; background: #ccc; padding: 10px; margin-top: 7px; }
 .opac-auto-048 { float: right; width: 65px; }
-.opac-auto-049 { float: right; width: 675px; height: 213px; color: green; overflow: hidden; }
+#they_said_dont_touch { float: right; width: 675px; height: 213px; color: green; overflow: hidden; }
 .opac-auto-050 { float: right; width: 85px; }
 .ten-px { font-size: 10px; }
 .eleven-px { font-size: 11px; }
@@ -54,7 +54,7 @@
 .normal-height { height: 15px; }
 .big-height { height: 20px; }
 .very-big-height { height: 30px; }
-.opac-auto-066 { height: 24px; background: #252525; }
+#gold-links-holder { height: 24px; background: #252525; }
 .opac-auto-067 { margin: 3px; width: 100%; }
 .big-block { margin: auto; width: 974px; height: 0px; }
 .opac-auto-069 { margin-bottom: 10px; }
@@ -62,7 +62,7 @@
 .opac-auto-071 { margin-bottom: 5px; }
 .opac-auto-072 { margin-left: 20px; }
 .opac-auto-073 { margin-left: 5px; margin-top: 5px; }
-.opac-auto-074 { margin-left: 6px; }
+#cn_browse_where { margin-left: 6px; }
 .opac-auto-075 { margin-right: 20px; }
 .opac-auto-076 { margin-right: 3px; }
 .opac-auto-077 { margin-right: 4px; position: relative; top: -10px; }
@@ -113,9 +113,10 @@
 .opac-auto-122 { padding-top: 7px; }
 .opac-auto-123 { padding-top: 8px; }
 .pos-abs { position: absolute; }
-.opac-auto-126 { position: absolute; z-index: 101; }
+#new_cat_link_holder { position: absolute; z-index: 101; }
+#new_cat_link_holder a { display: block; width: 675px; height: 213px; }
 .pos-rel { position: relative; }
-.opac-auto-128 { position: relative; left: -10px; }
+#search-box table { position: relative; left: -10px; }
 .opac-auto-129 { position: relative; left: -19px; }
 .opac-auto-130 { position: relative; left: 80px; }
 .opac-auto-131 { position: relative; top: 0px; left: 55px; }
@@ -125,7 +126,7 @@
 .opac-auto-135 { position: relative; top: -15px; left: -23px; }
 .opac-auto-136 { position: relative; top: 161px; left: 172px; }
 .opac-auto-137 { position: relative; top: 161px; left: -23px; }
-.opac-auto-138 { position: relative; top: -1px; left: 10px; }
+#home_adv_search_link { position: relative; top: -1px; left: 10px; }
 #util_back_btn { position: relative; top: 1px; left: 10px; }
 .opac-auto-140 { position: relative; top: -2px; }
 #util_help_btn { position: relative; top: 2px; left: 40px; }
@@ -135,7 +136,7 @@
 .opac-auto-145 { position: relative; top: -3px; left: 3px; }
 .opac-auto-146 { position: relative; top: -3px; left: -5px; }
 .opac-auto-147 { position: relative; top: -5px; }
-.opac-auto-148 { position: relative; top: 5px; }
+#learn_more { position: relative; top: 5px; }
 .opac-auto-149 { position: relative; top: 5px; left: 25px; }
 #util_print_btn { position: relative; top: 5px; left: 30px; }
 .opac-auto-151 { position: relative; top: 75px; }
@@ -162,7 +163,7 @@
 .opac-auto-174 { width: 111px; height: 25px; }
 .opac-auto-175 { width: 125px; height: 21px; }
 .opac-auto-176 { width: 129px; }
-.opac-auto-177 { width: 162px; }
+#search_box { width: 162px; }
 .opac-auto-178 { width: 174px; }
 .opac-auto-179 { width: 175px; margin-right: 11px; }
 .opac-auto-180 { width: 182px; color: black; padding: 5px 25px; }
@@ -177,7 +178,7 @@
 .opac-auto-189 { width: 742px; float: left; }
 .opac-auto-190 { width: 88px; }
 .opac-auto-191 { width: 90px; }
-.opac-auto-192 { width: 90%; text-align: center; margin: 10px; }
+#cn_browse_div > div { width: 90%; text-align: center; margin: 10px; }
 .opac-auto-193 { width: 91px; }
-.opac-auto-194 { width: 95%; text-align: center; padding: 15px; }
+#cn_browse { width: 95%; text-align: center; padding: 15px; }
 .opac-auto-195 { width: 99%; text-align: center }
diff --git a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
index 8ca55fd..aa76a38 100644
--- a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
+++ b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
@@ -137,6 +137,9 @@ function advAddGblRow() {
     $n(newrow, 'type').focus();
 }
 
+var rdetailShowExtra = _stub; /* XXX TODO reimplement without JS? */
+var cnBrowsePrev = _stub;
+var cnBrowseNext = _stub;
 var rdetailNewBookbag = _stub; /* XXX TODO reimplement without JS? */
 var addMyList = _stub; /* XXX TODO we probably still need this one */
 var listSaveAction = _stub; /* XXX TODO we probably still need this one */
diff --git a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2 b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
index 3cd4ced..654a84b 100644
--- a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
@@ -1,7 +1,6 @@
 [%  WRAPPER "default/kcls-wire/parts/base.tt2";
     INCLUDE "default/kcls-wire/parts/topnav.tt2";
     ctx.page_title = "Advanced Search" %]
-[% END -%]
     <div id="search-wrapper">
         [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
         <div id="adv_search_parent">
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/cn_browse.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/cn_browse.tt2
index b104391..ce65236 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/cn_browse.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/cn_browse.tt2
@@ -1,11 +1,12 @@
 <!-- ****************** cn_browse.xml ***************************** -->
-<div id='cn_browse' class='hide_me cn_browser' 
-    style='width: 95%; text-align: center; padding: 15px;'>
-    <div id='cn_browse_loading' class='cn_browse_loading hide_me'>&common.cn.loading;</div>
+<div id='cn_browse' class='cn_browser'>
+    <div id='cn_browse_loading' class='cn_browse_loading hide_me'>
+        &common.cn.loading;
+    </div>
     <div id='cn_browse_div'> 
-        <div style='width: 90%; text-align: center; margin: 10px;' class='color_4'>
+        <div class='color_4'>
             <span>&common.cn.browsing;</span>
-            <b style='margin-left: 6px;' id='cn_browse_where'> </b>
+            <b id='cn_browse_where'> </b>
         </div>
         <table class='data_grid bookshelf' width='100%'>
             <thead>
@@ -26,7 +27,7 @@
                     <td id='cn_browse_td' class='cn_browse_item' width='25%' valign='top'>
                         <a><img height='60' width='50' 
                             class='cn_browse_info' name='cn_browse_pic' border='0' /></a>
-                        <div style='font-weight: bold;' class='cn_browse_info' name='cn_browse_cn'></div>
+                        <div class='cn_browse_info bold' name='cn_browse_cn'></div>
                         <div class='cn_browse_info'>
                             <a name='cn_browse_title' class='classic_link'></a>
                         </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
index acb738e..7e70e6c 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
@@ -3,14 +3,12 @@
   <div id="hp-welcome">
     <h1>Welcome to the<br />New Library Catalog!</h1>
     Featuring enhanced holds, management<br />tools, improved self checkout, and more.<br /><br />
-    <a href="http://www.kcls.org/newcatalog" style="position:relative;top:5px;">Learn more &raquo;</a><br /><br />
-    
+    <a href="http://www.kcls.org/newcatalog" id="learn_more">Learn more &raquo;</a>
+    <br /><br />
     <div id="paginate-homebanner">
-      <!-- <a href="#" class="next">next</a>
-      <a href="#" class="prev">prev</a> -->
-      
       
 <!-- ************************************ home page rotator navigator start ************************************* -->
+    <!-- these are presumably temporary anyway, no need to use css -->
       <a class="toc" href="#1" rel="1" style="background:gray;"></a>
       <a class="toc" href="#2" rel="2" style="background:#ffc331;"></a>
       <a class="toc" href="#3" rel="3" style="background:pink;"></a>
@@ -20,19 +18,11 @@
       <a class="toc" href="#7" rel="7" style="background:white;"></a>
 <!-- **************************************** home page navigator end ******************************************* -->
 
-
-
-
 <!-- DON'T TOUCH THESE NEXT 4 LINES! -->
     </div>
   </div>
-  <div style="float:right;width:675px;height:213px;color:green;overflow:hidden;">
-  <div id="homebanner" class="sliderwrapper">
-  
-  
-  
-  
-  
+  <div id="they_said_dont_touch">
+    <div id="homebanner" class="sliderwrapper">
   
 <!-- ************************************ home page banner start ********************************************** -->
     <div class="contentdiv" style="background:white;">
@@ -67,14 +57,7 @@
       </td></tr></table>
     </div>
 <!-- ************************************* home page banner end *********************************************** -->
-
-
-
-
-
-
   </div>
-
 <script type="text/javascript">
 featuredcontentslider.init({
 id: "homebanner",
@@ -89,20 +72,23 @@ autorotate: [true, 3000] //pause time (in milliseconds)
 })
 </script>
 
-    <div style="position:absolute;z-index:101;"><div style="position:relative;"><a href="http://www.kcls.org/newcatalog" style="display:block;width:675px;height:213px;"></a></div></div>
-      <img alt="New catalog" src="/opac/skin/kcls/graphics/banner1.jpg" />
-    
-    
-    
-  </div>
+        <div id="new_cat_link_holder">
+            <div class="pos-rel">
+                <a href="http://www.kcls.org/newcatalog"></a>
+            </div>
+        </div>
+        <img alt="New catalog" src="/opac/skin/kcls/graphics/banner1.jpg" />
+    </div>
 </div>
 
 <div id="hp-buttons">
-  <div style="float:left;"><img src="/opac/skin/kcls/graphics/hp-links-left.jpg" /></div>
-  <div style="float:left;">
+    <div class="float-left">
+        <img src="/opac/skin/kcls/graphics/hp-links-left.jpg" />
+    </div>
+    <div class="float-left">
     <div id="home-buttons-inner">
       <table cellpadding="0" cellspacing="5" border="0" id="hp-ql-table">
-          <tr><td colspan="4"><span style="color: #333;font-weight: bold;font-size: 13px;">Browse for:</span></td></tr>
+          <tr><td colspan="4"><span class="opac-auto-029">Browse for:</span></td></tr>
         <tr><td><a href="http://www.kcls.org/booksandreading/">books</a></td><td><a href="http://www.kcls.org/movies/movies_browse.cfm">movies</a></td><td><a href="http://www.kcls.org/ecollection/">downloads</a></td><td><a href="http://www.kcls.org/websites/">websites</a></td></tr>
         <tr><td><a href="http://www.kcls.org/music/">music</a></td><td><a href="http://www.kcls.org/databases/subject_categories.cfm#17">magazines</a></td><td><a href="http://www.kcls.org/databases/">databases</a></td><td><a href="http://www.kcls.org/answers/">answers</a></td></tr>
       </table>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2
index 984c999..8e1df13 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2
@@ -2,7 +2,7 @@
     <span id='depth_selector_span'>
         <select id='depth_selector'><!-- XXX TODO --></select>
     </span>
-    <span style="display:none" id='lib_selector_span'>
+    <span id='lib_selector_span'>
         <a id='lib_selector_link' class='classic_link'
             href='javascript:void(0)'>&library.select.help;</a>
     </span>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
index 6dade98..97c88f6 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
@@ -1,11 +1,10 @@
 <div id="search-box">    
-    <table cellpadding="0" cellspacing="10" border="0"
-        style="position:relative;left:-10px;">
+    <table cellpadding="0" cellspacing="10" border="0">
         <tr>
             <td colspan="3">
                 <span class="search_catalog_lbl">Search the Catalog</span>
-                <a href="[% skin_root %]advanced" id="home_adv_search_link"
-                    style="position:relative;top:-1px;left:10px;"><span
+                <a href="[% skin_root %]advanced"
+                    id="home_adv_search_link"><span
                     class="adv_search_font">Advanced Search</span></a>
             </td>
         </tr>
@@ -15,7 +14,7 @@
             </td>
             <td>
                 <div id="search_box_wrapper">
-                    <input type="text" id="search_box" style="width:162px;"
+                    <input type="text" id="search_box"
                         value="Search Keyword"
                         onfocus="if (this.value=='Search Keyword'){this.value='';this.style.color='#000';}"
                         onblur="if (this.value==''){this.value='Search Keyword';this.style.color='#999';}" />
@@ -23,8 +22,8 @@
                 </div>
             </td>
             <td valign="top">
-                <div style="position:absolute;">
-                    <div style="position:relative;top:-3px;">
+                <div class="pos-abs">
+                    <div class="opac-auto-143">
                         <input type="button" id="search_submit" value="GO"
                             class="hide_me" /><a href="javascript:;"
                             id="search_submit_alt"
@@ -47,9 +46,9 @@
     </table>
     <div class="hide_me">
         <input type="checkbox" id="opac.result.limit2avail" />
-        <label style="position:relative;top:-3px;"
+        <label class="opac-auto-143"
             for="opac.result.limit2avail">
-            <span style="font-size:10px;">Limit to available items</span>
+            <span class="ten-px">Limit to available items</span>
         </label>
       </div>
       <div id="breadcrumb">
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/tips.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/tips.tt2
index 477429e..95a9b35 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/tips.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/tips.tt2
@@ -5,7 +5,7 @@
             <span>&common.tips.tip1;</span>
             <span>&common.tips.tip2;</span>
         </div>
-        <span style="font-weight: bold;">&tips.label;</span>
+        <strong>&tips.label;</strong>
     </div>
 </div>
 <!-- ****************** end: tips.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
index 215a38c..a088be3 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
@@ -1,9 +1,9 @@
 <!-- ****************** top_nav.xml ***************************** -->
 <div id="header">
-    <div style="float:left;"><a
+    <div class="float-left"><a
         href="http://www.kcls.org"><img alt="KCLS Logo"
         src="/opac/skin/kcls/graphics/KCLS_logo_horiz.gif" /></a></div>
-    <div style="float:right;">
+    <div class="float-right">
         <div id="your-acct-login"><a
             href="[% skin_root %]login" id="home_myopac_link"><img
             alt="Your Account Log in"
@@ -15,7 +15,7 @@
     </div>
     <div class="common-no-pad"></div>
 </div>
-<div style="height:24px;background:#252525;">
+<div id="gold-links-holder">
     <div id="gold-links">
         <div id="header-links">
             <a href="http://www.kcls.org/usingthelibrary/index.cfm">Using the Library</a>

commit 01be9897792e12161bd110c32bc24548f6706904
Author: senator <lebbeous at esilibrary.com>
Date:   Fri Feb 4 10:41:37 2011 -0500

    correct some style= that should be class=

diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
index b044715..353529a 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
@@ -58,7 +58,7 @@
             </div>
         </div>
     </div>
-    <div style="clear-both pad-top-ten">
+    <div class="clear-both pad-top-ten">
         <a href="javascript:;"
             onclick="hideMe($('myopac_bookbag_div'));unHideMe($('mylist_div'));">+ Add new list</a>
     </div>
@@ -79,7 +79,7 @@
                     </tr>
                 </table>
                 <div class="float-right"></div>
-                <div style="clear-both pad-bottom-five"></div>
+                <div class="clear-both pad-bottom-five"></div>
             </div>
     
             <table id="acct_list_header_anon" cellpadding='0' cellspacing='0' border='0'>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
index ce26a21..d47b55a 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
@@ -30,6 +30,6 @@
         <div id="main-content">
             <div class="common-full-pad"></div>
             [% content %]
-            <div style="clear-both"></div>
+            <div class="clear-both"></div>
         </div>
     </div>

commit 7c519328f3908758ba20bef6b797ce87e863b2dc
Author: senator <lebbeous at esilibrary.com>
Date:   Fri Feb 4 10:41:23 2011 -0500

    utils changes

diff --git a/Open-ILS/web/opac/skin/kcls-wire/css/semiauto.css b/Open-ILS/web/opac/skin/kcls-wire/css/semiauto.css
index a5fdc08..f8009cf 100644
--- a/Open-ILS/web/opac/skin/kcls-wire/css/semiauto.css
+++ b/Open-ILS/web/opac/skin/kcls-wire/css/semiauto.css
@@ -1,3 +1,4 @@
+/* once done renaming and everything, combine with style.css */
 .opac-auto-001 { background: #2bb0fd; }
 .opac-auto-002 { background: #54987f; }
 .opac-auto-003 { background: #decc92; }
@@ -30,7 +31,7 @@
 .float-left { float: left; }
 .opac-auto-039 { float: left; font-weight: bold; padding-top: 5px; }
 .opac-auto-040 { float: left; padding: 5px 0px 0px 10px; }
-.opac-auto-042 { float: left; width: 163px; height: 30px; background: url('/opac/skin/kcls/graphics/utils-corner-mid.png') repeat-x top; }
+.left-corner { float: left; width: 163px; height: 30px; background: url('/opac/skin/kcls/graphics/utils-corner-mid.png') repeat-x top; }
 .opac-auto-043 { float: left; width: 300px; margin-top: 20px; }
 .float-right { float: right; }
 .opac-auto-045 { float: right; margin-right: 17px; }
@@ -55,7 +56,7 @@
 .very-big-height { height: 30px; }
 .opac-auto-066 { height: 24px; background: #252525; }
 .opac-auto-067 { margin: 3px; width: 100%; }
-.opac-auto-068 { margin: auto; width: 974px; height: 0px; }
+.big-block { margin: auto; width: 974px; height: 0px; }
 .opac-auto-069 { margin-bottom: 10px; }
 .opac-auto-070 { margin-bottom: 20px; }
 .opac-auto-071 { margin-bottom: 5px; }
@@ -111,10 +112,9 @@
 .opac-auto-121 { padding-top: 6px; }
 .opac-auto-122 { padding-top: 7px; }
 .opac-auto-123 { padding-top: 8px; }
-.opac-auto-124 { position: absolute }
-.opac-auto-125 { position: absolute; }
+.pos-abs { position: absolute; }
 .opac-auto-126 { position: absolute; z-index: 101; }
-.opac-auto-127 { position: relative; }
+.pos-rel { position: relative; }
 .opac-auto-128 { position: relative; left: -10px; }
 .opac-auto-129 { position: relative; left: -19px; }
 .opac-auto-130 { position: relative; left: 80px; }
@@ -126,18 +126,18 @@
 .opac-auto-136 { position: relative; top: 161px; left: 172px; }
 .opac-auto-137 { position: relative; top: 161px; left: -23px; }
 .opac-auto-138 { position: relative; top: -1px; left: 10px; }
-.opac-auto-139 { position: relative; top: 1px; left: 10px; }
+#util_back_btn { position: relative; top: 1px; left: 10px; }
 .opac-auto-140 { position: relative; top: -2px; }
-.opac-auto-141 { position: relative; top: 2px; left: 40px; }
-.opac-auto-142 { position: relative; top: 2px; left: 50px; }
+#util_help_btn { position: relative; top: 2px; left: 40px; }
+#util_forw_btn { position: relative; top: 2px; left: 50px; }
 .opac-auto-143 { position: relative; top: -3px; }
-.opac-auto-144 { position: relative; top: 3px; left: 20px; }
+#util_home_btn { position: relative; top: 3px; left: 20px; }
 .opac-auto-145 { position: relative; top: -3px; left: 3px; }
 .opac-auto-146 { position: relative; top: -3px; left: -5px; }
 .opac-auto-147 { position: relative; top: -5px; }
 .opac-auto-148 { position: relative; top: 5px; }
 .opac-auto-149 { position: relative; top: 5px; left: 25px; }
-.opac-auto-150 { position: relative; top: 5px; left: 30px; }
+#util_print_btn { position: relative; top: 5px; left: 30px; }
 .opac-auto-151 { position: relative; top: 75px; }
 .opac-auto-152 { position: relative; top: -9px; }
 .opac-auto-153 { position: relative; z-index: 100; }
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
index cd2ea84..7d51671 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
@@ -2,8 +2,12 @@
 <html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.locale %]' xml:lang='[% ctx.locale %]'>
     <head>
         <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-        <link rel="stylesheet" type="text/css" href="/opac/skin/kcls-wire/css/style.css" />
-        <link rel="stylesheet" type="text/css" href="/opac/skin/kcls-wire/css/contentslider.css" />
+        <link rel="stylesheet" type="text/css"
+            href="/opac/skin/kcls-wire/css/semiauto.css" />
+        <link rel="stylesheet" type="text/css"
+            href="/opac/skin/kcls-wire/css/style.css" />
+        <link rel="stylesheet" type="text/css"
+            href="/opac/skin/kcls-wire/css/contentslider.css" />
         <title>Catalog - King County Library - [% ctx.page_title %]</title>
         <link rel="unapi-server" type="application/xml" title="unAPI"
             href="/opac/extras/unapi" />
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
index 85e1df8..21d64e2 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
@@ -1,4 +1,4 @@
-        <div style="margin:auto;width:974px;height:0px;">
+        <div class="big-block">
             <div id="user-ql">
                 <script type="text/javascript">
 /* if(grabUser()) {
@@ -10,23 +10,31 @@
 }*/
                 </script>
             </div>
-
-<!-- ****************** utils.xml ***************************** -->
-
-<div style="float:right;">
-<div style="position:relative;">
-<img src="/opac/skin/kcls/graphics/utils-corner-left.png" style="float:left;" />
-  <div style="float:left;width:163px;height:30px;background:url('/opac/skin/kcls/graphics/utils-corner-mid.png') repeat-x top;"> 
-  
-  	<a href="javascript:history.go(-1)" style="position:relative;top:1px;left:10px;"><img alt="Back" src="/opac/skin/kcls/graphics/tool_back.png" /></a>
-	<a href="[% skin_root %]home" style="position:relative;top:3px;left:20px;"><img src="/opac/skin/kcls/graphics/tool_home.png" alt="Homepage" /></a>
-	<a href="javascript:window.print();" style="position:relative;top:5px;left:30px;"><img src="/opac/skin/kcls/graphics/tool_print.png" alt="Print Page" /></a>
-	<a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm" style="position:relative;top:2px;left:40px;"><img alt="Help" src="/opac/skin/kcls/graphics/tool_help.png" /></a>
-   	<a href="javascript:history.go(+1)" style="position:relative;top:2px;left:50px;"><img src="/opac/skin/kcls/graphics/tool_forward.png" alt="Forward" /></a>
-	
-  </div>
-<img src="/opac/skin/kcls/graphics/utils-corner-right.png" style="float:left;" />
-</div>
-</div>
-
+            <div class="float-right">
+                <div class="pos-rel">
+                    <img
+                        src="/opac/skin/kcls/graphics/utils-corner-left.png"
+                        class="float-left" />
+                    <div class="left-corner"> 
+                        <a href="javascript:history.go(-1)"
+                            id="util_back_btn"><img alt="Back"
+                            src="/opac/skin/kcls/graphics/tool_back.png" /></a>
+                        <a href="[% skin_root %]home"
+                            id="util_home_btn"><img alt="Homepage"
+                            src="/opac/skin/kcls/graphics/tool_home.png" /></a>
+                        <a href="javascript:window.print();"
+                            id="util_print_btn"><img alt="Print Page"
+                            src="/opac/skin/kcls/graphics/tool_print.png" /></a>
+                        <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm"
+                            id="util_help_btn"><img alt="Help"
+                            src="/opac/skin/kcls/graphics/tool_help.png" /></a>
+                        <a href="javascript:history.go(+1)"
+                            id="util_forw_btn"><img alt="Forward"
+                            src="/opac/skin/kcls/graphics/tool_forward.png" /></a>
+                    </div>
+                    <img
+                        src="/opac/skin/kcls/graphics/utils-corner-right.png"
+                        class="float-left" />
+                </div>
+            </div>
         </div>

commit bd3893bb25f370f20b432a8c7c2518652c2c3a9c
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 3 20:24:28 2011 -0500

    started moving some inline styles into css classes
    
    Here's the deal so far: all the inline styles are covered by one class
    in semiauto.css, but those were created programatically and reflect no
    understanding of the relationship between the purpose of any given
    element that's styled and what its style is.  These auto-generated
    styles also are kind of redundant, since with many of them, instead of
    using the style with a long definition, you could use a combination of
    smaller styles.
    
    The existing markup uses many slightly different style attributes, so
    there's plenty of stuff like "width: 12", "width: 13", "width: 14", etc,
    so there's no way to map a lot of this to semantically meaningful names.
    some of these classes are just going to end up with names like
    "wide-fourteen" that are no better than inline styles.
    
    But others, as we find them manually, can be grouped and renamed into
    something meaningful, and sometimes style can be put into prexisting id
    and class definitions. Should be a couple more hours work.
    
    semiauto.css reflects progress with the generated classes.
    
    changes to style.css reflect early places where style could be moved
    into pre-existing classes.

diff --git a/Open-ILS/web/opac/skin/kcls-wire/css/semiauto.css b/Open-ILS/web/opac/skin/kcls-wire/css/semiauto.css
new file mode 100644
index 0000000..a5fdc08
--- /dev/null
+++ b/Open-ILS/web/opac/skin/kcls-wire/css/semiauto.css
@@ -0,0 +1,183 @@
+.opac-auto-001 { background: #2bb0fd; }
+.opac-auto-002 { background: #54987f; }
+.opac-auto-003 { background: #decc92; }
+.opac-auto-004 { background: #E0F0E0; }
+.opac-auto-005 { background: #ffc331; }
+.gray-back { background: gray; }
+.pink-back { background: pink; }
+.white-back { background: white; }
+.opac-auto-009 { border: 3px solid #E0E0E0; }
+.opac-auto-010 { border-bottom: 1px dotted #ccc; padding-top: 10px; }
+.opac-auto-011 { border-bottom: 1px dotted #ccc; padding-top: 6px; }
+.opac-auto-012 { border-bottom: none; }
+.opac-auto-013 { border-bottom: none; *height: 0px; }
+.opac-auto-014 { border-collapse: collapse; }
+.opac-auto-015 { border-left: 1px solid #e9ebf3; padding-right: 27px; }
+.opac-auto-016 { border: none; }
+.opac-auto-017 { border: none; width: 100%; }
+.opac-auto-018 { border-top: 1px dotted #ccc; padding-top: 17px; }
+.opac-auto-019 { border-top: none; }
+.clear-both { clear: both; }
+.common-no-pad { clear: both; height: 0px; margin: 0px; padding: 0px; }
+.common-full-pad { clear: both; height: 15px; }
+.opac-auto-029 { color: #333; font-weight: bold; font-size: 13px; }
+.opac-auto-030 { color: #545454; }
+.opac-auto-031 { color: #9999FF; padding-left: 10px; font-size: 7pt; font-weight: 300; }
+.red { color: red; }
+.bold-red { color: red; font-weight: bold }
+.pointer { cursor: pointer; }
+.no-display { display: none }
+.float-left { float: left; }
+.opac-auto-039 { float: left; font-weight: bold; padding-top: 5px; }
+.opac-auto-040 { float: left; padding: 5px 0px 0px 10px; }
+.opac-auto-042 { float: left; width: 163px; height: 30px; background: url('/opac/skin/kcls/graphics/utils-corner-mid.png') repeat-x top; }
+.opac-auto-043 { float: left; width: 300px; margin-top: 20px; }
+.float-right { float: right; }
+.opac-auto-045 { float: right; margin-right: 17px; }
+.opac-auto-046 { float: right; width: 214px; }
+.opac-auto-047 { float: right; width: 353px; background: #ccc; padding: 10px; margin-top: 7px; }
+.opac-auto-048 { float: right; width: 65px; }
+.opac-auto-049 { float: right; width: 675px; height: 213px; color: green; overflow: hidden; }
+.opac-auto-050 { float: right; width: 85px; }
+.ten-px { font-size: 10px; }
+.eleven-px { font-size: 11px; }
+.eight-pt { font-size: 8pt; }
+.opac-auto-054 { font-size: 8pt; padding-left: 20px; }
+.bold { font-weight: bold; }
+.opac-auto-057 { font-weight: bold; padding: 5px; margin: 5px; width: 100%; }
+.opac-auto-058 { font-weight: bold; padding-left: 10px; }
+.opac-auto-059 { font-weight: bold; padding-right: 10px; }
+.opac-auto-060 { font-weight: normal; }
+.opac-auto-061 { height: 0px; border-top: 1px solid #b7b7b7; border-bottom: 1px solid #d4d4d4; margin: 15px 0px; }
+.small-height { height: 10px; }
+.normal-height { height: 15px; }
+.big-height { height: 20px; }
+.very-big-height { height: 30px; }
+.opac-auto-066 { height: 24px; background: #252525; }
+.opac-auto-067 { margin: 3px; width: 100%; }
+.opac-auto-068 { margin: auto; width: 974px; height: 0px; }
+.opac-auto-069 { margin-bottom: 10px; }
+.opac-auto-070 { margin-bottom: 20px; }
+.opac-auto-071 { margin-bottom: 5px; }
+.opac-auto-072 { margin-left: 20px; }
+.opac-auto-073 { margin-left: 5px; margin-top: 5px; }
+.opac-auto-074 { margin-left: 6px; }
+.opac-auto-075 { margin-right: 20px; }
+.opac-auto-076 { margin-right: 3px; }
+.opac-auto-077 { margin-right: 4px; position: relative; top: -10px; }
+.opac-auto-078 { margin-right: 7px; }
+.opac-auto-079 { margin-top: 10px; }
+.opac-auto-080 { margin-top: 10px; margin-bottom: 10px; }
+.opac-auto-081 { margin-top: 13px; }
+.opac-auto-082 { margin-top: 29px; }
+.opac-auto-083 { margin-top: 2px; }
+.opac-auto-084 { margin-top: 5px; }
+.opac-auto-085 { margin-top: 6px; margin-left: 20px; width: 250px; padding: 5px; }
+.opac-auto-086 { margin-top: 8px; }
+.opac-auto-087 { max-width: 11em; }
+.opac-auto-088 { padding: 0px; }
+.opac-auto-089 { padding: 0px 10px; }
+.opac-auto-090 { padding: 10px; }
+.opac-auto-091 { padding: 10px 0px; }
+.opac-auto-092 { padding: 4px; text-align: center; }
+.pad-bottom-five { padding: 5px; }
+.opac-auto-094 { padding: 5px 7px 0px 0px; }
+.opac-auto-095 { padding: 5px 7px 0px 0px; white-space: nowrap; }
+.opac-auto-096 { padding: 6px }
+.opac-auto-097 { padding: 8px 0px 6px 0px; }
+.opac-auto-098 { padding-bottom: 10px; }
+.opac-auto-099 { padding-bottom: 12px; color: #666; }
+.opac-auto-100 { padding-bottom: 16px; }
+.opac-auto-101 { padding-bottom: 1px; }
+.opac-auto-102 { padding-bottom: 7px; }
+.opac-auto-103 { padding-left: 10px; }
+.opac-auto-104 { padding-left: 11px; padding-right: 11px; }
+.opac-auto-105 { padding-left: 11px; padding-right: 13px; }
+.opac-auto-106 { padding-left: 15px; }
+.opac-auto-107 { padding-left: 15px; padding-bottom: 10px; }
+.opac-auto-108 { padding-left: 5px; }
+.opac-auto-109 { padding-left: 5px; padding-bottom: 10px; }
+.opac-auto-110 { padding-left: 6px; }
+.opac-auto-111 { padding-left: 8px; }
+.opac-auto-112 { padding-left: 9px; }
+.opac-auto-113 { padding-right: 10px; }
+.opac-auto-114 { padding-right: 15px; padding-left: 15px; }
+.opac-auto-115 { padding-right: 20px; }
+.opac-auto-116 { padding-right: 5px; }
+.opac-auto-117 { padding-right: 7px; }
+.pad-top-ten { padding-top: 10px; }
+.opac-auto-119 { padding-top: 14px; }
+.opac-auto-120 { padding-top: 5px; }
+.opac-auto-121 { padding-top: 6px; }
+.opac-auto-122 { padding-top: 7px; }
+.opac-auto-123 { padding-top: 8px; }
+.opac-auto-124 { position: absolute }
+.opac-auto-125 { position: absolute; }
+.opac-auto-126 { position: absolute; z-index: 101; }
+.opac-auto-127 { position: relative; }
+.opac-auto-128 { position: relative; left: -10px; }
+.opac-auto-129 { position: relative; left: -19px; }
+.opac-auto-130 { position: relative; left: 80px; }
+.opac-auto-131 { position: relative; top: 0px; left: 55px; }
+.opac-auto-132 { position: relative; top: 13px; }
+.opac-auto-133 { position: relative; top: -13px; left: 2px; font-size: 10px; }
+.opac-auto-134 { position: relative; top: -15px; left: 172px; }
+.opac-auto-135 { position: relative; top: -15px; left: -23px; }
+.opac-auto-136 { position: relative; top: 161px; left: 172px; }
+.opac-auto-137 { position: relative; top: 161px; left: -23px; }
+.opac-auto-138 { position: relative; top: -1px; left: 10px; }
+.opac-auto-139 { position: relative; top: 1px; left: 10px; }
+.opac-auto-140 { position: relative; top: -2px; }
+.opac-auto-141 { position: relative; top: 2px; left: 40px; }
+.opac-auto-142 { position: relative; top: 2px; left: 50px; }
+.opac-auto-143 { position: relative; top: -3px; }
+.opac-auto-144 { position: relative; top: 3px; left: 20px; }
+.opac-auto-145 { position: relative; top: -3px; left: 3px; }
+.opac-auto-146 { position: relative; top: -3px; left: -5px; }
+.opac-auto-147 { position: relative; top: -5px; }
+.opac-auto-148 { position: relative; top: 5px; }
+.opac-auto-149 { position: relative; top: 5px; left: 25px; }
+.opac-auto-150 { position: relative; top: 5px; left: 30px; }
+.opac-auto-151 { position: relative; top: 75px; }
+.opac-auto-152 { position: relative; top: -9px; }
+.opac-auto-153 { position: relative; z-index: 100; }
+.text-center { text-align: center; }
+.opac-auto-156 { text-align: center; font-weight: bold; }
+.opac-auto-157 { text-align: center; margin-top: 20px; width: 400px; }
+.opac-auto-158 { text-align: center; margin-top: 6px; margin-bottom: 6px }
+.opac-auto-159 { text-align: center; padding: 20px; width: 100% }
+.opac-auto-160 { text-align: center; padding-bottom: 8px; }
+.opac-auto-161 { text-align: right; padding-right: 7px; }
+.opac-auto-162 { vertical-align: top; }
+.nowrap { white-space: nowrap; }
+.opac-auto-164 { white-space: nowrap; padding-left: 5px; }
+.full-width { width: 100%; }
+.opac-auto-167 { width: 100%; border: 1px solid black; padding: 6px; margin-top: 5px; }
+.opac-auto-168 { width: 100%; border: 2px solid #E0F0E0; margin-bottom: 20px; }
+.opac-auto-169 { width: 100%; height: 100%; }
+.opac-auto-170 { width: 100%; margin-top: 20px; border-top: 1px dotted #ccc; padding-top: 8px; }
+.opac-auto-171 { width: 100%; text-align: center; font-weight: 700; margin-top: 10px; }
+.opac-auto-172 { width: 100%; text-align: center; padding-bottom: 5px; }
+.opac-auto-173 { width: 10px; }
+.opac-auto-174 { width: 111px; height: 25px; }
+.opac-auto-175 { width: 125px; height: 21px; }
+.opac-auto-176 { width: 129px; }
+.opac-auto-177 { width: 162px; }
+.opac-auto-178 { width: 174px; }
+.opac-auto-179 { width: 175px; margin-right: 11px; }
+.opac-auto-180 { width: 182px; color: black; padding: 5px 25px; }
+.opac-auto-181 { width: 195px; }
+.opac-auto-182 { width: 230px; text-align: left; margin-top: 3px; }
+.opac-auto-183 { width: 250px; text-align: left; }
+.opac-auto-184 { width: 26px; height: 23px; margin-top: 6px; margin-bottom: 6px; }
+.opac-auto-185 { width: 324px; }
+.opac-auto-186 { width: 400px; margin-top: 20px; }
+.opac-auto-187 { width: 662px; }
+.opac-auto-188 { width: 700px; height: 30px; border: 1px solid red; }
+.opac-auto-189 { width: 742px; float: left; }
+.opac-auto-190 { width: 88px; }
+.opac-auto-191 { width: 90px; }
+.opac-auto-192 { width: 90%; text-align: center; margin: 10px; }
+.opac-auto-193 { width: 91px; }
+.opac-auto-194 { width: 95%; text-align: center; padding: 15px; }
+.opac-auto-195 { width: 99%; text-align: center }
diff --git a/Open-ILS/web/opac/skin/kcls-wire/css/style.css b/Open-ILS/web/opac/skin/kcls-wire/css/style.css
index 9c300f3..b673f75 100644
--- a/Open-ILS/web/opac/skin/kcls-wire/css/style.css
+++ b/Open-ILS/web/opac/skin/kcls-wire/css/style.css
@@ -587,6 +587,8 @@ div.select-wrapper:hover {
 	margin-right: 6px;
 }
 
+.cached_list_div { width: 111px; height: 25px; }
+
 .results_header_div {
 	float: left;
 	width: 0px;
@@ -607,6 +609,7 @@ div.select-wrapper:hover {
 }
 
 .results_header_sel {
+    width: 88px;
 	float:left;
 	position: relative;
 	top: 2px;
@@ -869,3 +872,16 @@ div.select-wrapper:hover {
 	font-weight: bold;
 	font-size: 10px;
 }
+
+.advanced_div { padding-top: 15px; }
+#adv_global_search select { width: 13em; }
+#adv_global_input_table select { width: 7em; }
+.adv_adv_link { font-size: 8pt; color: red; }
+#acct_prefs_header { float: left; }
+#limit_to_available {
+    float: left; position: relative; top: 2px;
+    left: -2px; margin-right: 4px;
+}
+#rdetail_copy_info_table { font-size: 8pt; }
+#rdetail_copy_info_table td { padding: 3px; }
+
diff --git a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2 b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
index 46d3a98..3cd4ced 100644
--- a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
@@ -1,13 +1,6 @@
 [%  WRAPPER "default/kcls-wire/parts/base.tt2";
     INCLUDE "default/kcls-wire/parts/topnav.tt2";
     ctx.page_title = "Advanced Search" %]
-[% BLOCK html_head -%]
-<style type='text/css'>
-    .advanced_div { padding-top: 15px; }
-    #adv_global_search select { width: 13em; }
-    #adv_global_input_table select { width: 7em; }
-    .adv_adv_link { font-size: 8pt; color: red; }
-</style>
 [% END -%]
     <div id="search-wrapper">
         [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
@@ -30,7 +23,7 @@
             <div class="advanced_div">
             [% INCLUDE "default/kcls-wire/parts/advanced/search.tt2" %]
             </div>
-            <div style="clear:both;height:15px;"></div>	
+            <div class="common-full-pad"></div>	
         </div>
     </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/home.tt2 b/Open-ILS/web/templates/default/kcls-wire/home.tt2
index 952422c..88c748f 100644
--- a/Open-ILS/web/templates/default/kcls-wire/home.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/home.tt2
@@ -10,9 +10,9 @@
     </div>
     <div id="content-wrapper">
         <div id="main-content">
-            <div style="height:15px;clear:both;"></div>
+            <div class="common-full-pad"></div>
             [% INCLUDE "default/kcls-wire/parts/homesearch.tt2" %]
-            <div style="clear:both;height:15px;"></div>	
+            <div class="common-full-pad"></div>	
         </div>
     </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/login.tt2 b/Open-ILS/web/templates/default/kcls-wire/login.tt2
index 0cf55a5..d45c4db 100644
--- a/Open-ILS/web/templates/default/kcls-wire/login.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/login.tt2
@@ -11,7 +11,7 @@
     <div id="content-wrapper">
         <div id="main-content">
             [% INCLUDE "default/kcls-wire/parts/login/form.tt2" %]
-            <div style="clear:both;height:30px;"></div>	
+            <div class="clear-both very-big-height"></div>	
         </div>
     </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2
index c793642..8d5546f 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2
@@ -19,7 +19,7 @@
         <div class="align selected hide_me" id="checked_hist_label">
             <img src="/opac/skin/kcls/graphics/sub_checked_hist_on.jpg" />
         </div>    
-        <div style="clear:both;"></div>
+        <div class="clear-both"></div>
     </div>
     
     <div class="header_middle">
@@ -30,7 +30,7 @@
             <a class="hide_me" href="javascript:;">Export List</a>
         </span>
     </div>
-    <div style="clear:both;"></div>
+    <div class="clear-both"></div>
     <div id='checked_main'>
         <table cellpadding='0' cellspacing='0' border='0'
             style="padding:8px 0px 6px 0px;">
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
index 3ad5082..b176867 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
@@ -19,7 +19,7 @@
         <div class="align selected hide_me" id="holds_hist_label">
             <img src="/opac/skin/kcls/graphics/sub_holds_hist_on.jpg" />
         </div>	
-        <div style="clear:both;"></div>
+        <div class="clear-both"></div>
     </div>
     <div class="header_middle">
         <span id="acct_holds_header" style="float:left;">
@@ -29,7 +29,7 @@
             <a class="hide_me" href="javascript:;">Export List</a>
         </span>
     </div>
-    <div style="clear:both;"></div>
+    <div class="clear-both"></div>
     <div id='holds_main'>
         <table cellpadding='0' cellspacing='0' border='0'
             style="padding:8px 0px 6px 0px;">
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
index b48e704..b044715 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
@@ -58,7 +58,7 @@
             </div>
         </div>
     </div>
-    <div style="clear:both;padding-top:10px;">
+    <div style="clear-both pad-top-ten">
         <a href="javascript:;"
             onclick="hideMe($('myopac_bookbag_div'));unHideMe($('mylist_div'));">+ Add new list</a>
     </div>
@@ -78,8 +78,8 @@
                         </td>
                     </tr>
                 </table>
-                <div style="float:right;"></div>
-                <div style="clear:both;padding-bottom:5px;"></div>
+                <div class="float-right"></div>
+                <div style="clear-both pad-bottom-five"></div>
             </div>
     
             <table id="acct_list_header_anon" cellpadding='0' cellspacing='0' border='0'>
@@ -122,7 +122,7 @@
                     <div style="float:left;padding:5px 0px 0px 10px;">
                         <a href="javascript:;" name="remove_list">Remove</a>
                     </div>
-                    <div style="clear:both;padding-bottom:5px;"></div>
+                    <div class="clear-both pad-bottom-five"></div>
                 </div>
                 <table id="acct_list_header" cellpadding='0' cellspacing='0'
                     border='0'>
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
index 9e1e95e..cc659e5 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
@@ -98,7 +98,7 @@
                 </div>
             </div>
         </div>
-        <div style="clear:both;"></div>
+        <div class="clear-both"></div>
         <div id='myopac_fines_div'>
             <table width='100%' class='data_grid data_grid_center'>
                 <thead class='color_3'>
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
index d884d70..2be5383 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
@@ -51,22 +51,23 @@
                 </div>
             </div>
 
-            <div style="clear:both;"></div>
+            <div class="clear-both"></div>
         </div>
 
         <div class="header_middle">
-            <span id="acct_prefs_header"
-                 style="float:left;">Account Information and Preferences</span>
-                 <span style="float:right;"><a class="hide_me"
-               href="javascript:;"
-               onclick="fadeOut(this);">Export List</a></span>
+            <span id="acct_prefs_header">
+                Account Information and Preferences
+            </span>
+            <span class="float-right">
+                <a class="hide_me"
+                    href="javascript:;"
+                    onclick="fadeOut(this);">Export List</a>
+            </span>
         </div>
 
-        <div style="clear:both;height:10px;"></div>
+        <div class="clear-both normal-height"></div>
 
-        <table width='100%'
-               class="hide_me"
-               id="acct_search_main">
+        <table class="hide_me full-width" id="acct_search_main">
             <tbody id='myopac_prefs_tbody'>
                 <tr id='myopac_prefs_loading'>
                     <td colspan='3'><b>&myopac.loading;</b></td>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
index 77a50ca..acb738e 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
@@ -108,8 +108,8 @@ autorotate: [true, 3000] //pause time (in milliseconds)
       </table>
     </div>
   </div>
-  <div style="float:left;"><img src="/opac/skin/kcls/graphics/hp-links-right.jpg" /></div>
-  <div style="float:right;"><a href="http://www.kcls.org/locations"><img alt="Locations" src="/opac/skin/kcls/graphics/locations.jpg" /></a></div>
-  <div style="clear:both;"></div>
+  <div class="float-left"><img src="/opac/skin/kcls/graphics/hp-links-right.jpg" /></div>
+  <div class="float-right"><a href="http://www.kcls.org/locations"><img alt="Locations" src="/opac/skin/kcls/graphics/locations.jpg" /></a></div>
+  <div class="clear-both"></div>
 </div>
 <!-- ****************** end: homesearch.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2
index 3d00bf1..5beabf5 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2
@@ -144,6 +144,6 @@
             </tr>
         </table>
     </form>
-    <div style="clear:both"></div>
+    <div class="clear-both"></div>
 </div>
 <!-- ****************** end: login.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
index fbae83e..ce26a21 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
@@ -28,8 +28,8 @@
             </div>
         </div>
         <div id="main-content">
-            <div style="height:15px;clear:both;"></div>
+            <div class="common-full-pad"></div>
             [% content %]
-            <div style="clear:both;"></div>
+            <div style="clear-both"></div>
         </div>
     </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2
index d016b3c..f6ffc6f 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2
@@ -27,7 +27,7 @@
                     id='np_end' href='javascript:rdetailEnd();'
                     title="&rdetail.page.last;">&rdetail.end;</a></span>
         </div>
-        <div style="clear:both;"></div>
+        <div class="clear-both"></div>
     </div>
 
     <table width='100%' id='np_table' border='0' class="hide_me">
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
index 9a4950a..6dade98 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
@@ -55,5 +55,5 @@
       <div id="breadcrumb">
           <a href="[% skin_root %]home">Catalog Home</a> &gt;
       </div>
-    <div style="clear:both"></div>
+    <div class="clear-both"></div>
 </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
index 16d8819..215a38c 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
@@ -13,7 +13,7 @@
 
 
     </div>
-    <div style="clear:both;height:0px;margin:0px;padding:0px;"></div>
+    <div class="common-no-pad"></div>
 </div>
 <div style="height:24px;background:#252525;">
     <div id="gold-links">
diff --git a/Open-ILS/web/templates/default/kcls-wire/record.tt2 b/Open-ILS/web/templates/default/kcls-wire/record.tt2
index eba9017..59d2ef8 100644
--- a/Open-ILS/web/templates/default/kcls-wire/record.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/record.tt2
@@ -1,12 +1,6 @@
 [%  WRAPPER "default/kcls-wire/parts/base.tt2";
     INCLUDE "default/kcls-wire/parts/topnav.tt2";
     ctx.page_title = "Record Detail" %]
-[% BLOCK html_head %]
-<style type="text/css">
-    #rdetail_copy_info_table { font-size: 8pt; }
-    #rdetail_copy_info_table td { padding: 3px; }
-</style>
-[% END %]
     <div id="search-wrapper">
         [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
         [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
@@ -14,7 +8,7 @@
     <div id="content-wrapper">
         <div id="main-content">
             [% INCLUDE "default/kcls-wire/parts/record/body.tt2" %]
-            <div style="clear:both;height:15px;"></div>	
+            <div class="common-full-pad"></div>	
         </div>
     </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/results.tt2 b/Open-ILS/web/templates/default/kcls-wire/results.tt2
index 2e2811b..38396ee 100644
--- a/Open-ILS/web/templates/default/kcls-wire/results.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/results.tt2
@@ -20,7 +20,7 @@
                         onmouseover="this.src='/opac/skin/kcls/graphics/adv_search_hover.png';"
                         onmouseout="this.src='/opac/skin/kcls/graphics/adv_search.png';" /></a>
                 </div>
-                <div class="results_header_btns" style="width:111px;height:25px;">
+                <div class="results_header_btns cached_list_div">
                     <a href="javascript:;" class="hide_me" id="cacheListLink"
                         onclick="showCachedList();"><img
                         alt="View My List"
@@ -35,19 +35,18 @@
         <!--#endif -->
                 <div class="results_header_div"></div>
                 <div class="results_header_lbl">View</div>
-                <select class="results_header_sel" style="width:88px;"
+                <select class="results_header_sel"
                     onchange="showDetailedResults(Boolean(this.selectedIndex));">
                     <option>Simple</option>
                     <option>Detailed</option>
                 </select>
                 <div class="results_header_div"></div>
-                <input type="checkbox" id="opac.result.limit2avai2"
-                onclick='searchBarSubmit(true, this);'
-                style="float:left;position:relative;top:2px;left:-2px;margin-right:4px;" />
-                <label for="opac.result.limit2avai2" class="results_header_lbl">
+                <input type="checkbox" id="limit_to_available"
+                    onclick='searchBarSubmit(true, this);' />
+                <label for="limit_to_available" class="results_header_lbl">
                     Limit to available items
                 </label>
-                <div style="clear:both;"></div>
+                <div class="clear-both"></div>
             </div>
         </div>
         <div id="main-content">
@@ -58,7 +57,7 @@
                     [% INCLUDE "default/kcls-wire/parts/result/lowhits.tt2" %]
                 </div>
             </div>
-            <div style="clear:both;height:15px;"></div>    
+            <div class="common-full-pad"></div>    
         </div>
     </div>
 [% END %]

commit 5be99cee1c099b5c6ee613d1b68426fd0db17e43
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 3 19:35:13 2011 -0500

    move temporary kcls format-icon table from mod_perl to template land

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index bda7662..4c27e6a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -16,44 +16,6 @@ use OpenILS::Utils::Fieldmapper;
 use DateTime::Format::ISO8601;
 my $U = 'OpenILS::Application::AppUtils';
 
-sub _icon_by_mattype {  # XXX This is KCLS specific stuff that needs to be
-                        # genericized later.
-    my $mattype = shift;
-
-    my %type_map = (
-        "a" => "media_book.jpg",
-        "b" => "media_magazines.jpg",
-        "c" => "media_printedmusic.jpg",
-        "d" => "media_microform.jpg",
-        "e" => "media_equipment.jpg",
-        "f" => "media_films.jpg",
-        "g" => "",
-        "h" => "media_dvd.jpg",
-        "i" => "media_bookoncassette.jpg",
-        "j" => "media_musiccd.jpg",
-        "k" => "media_musiccassette.jpg",
-        "l" => "media_musicrecord.jpg",
-        "m" => "media_software.jpg",
-        "n" => "media_bookoncd.jpg",
-        "o" => "media_kit.jpg",
-        "p" => "media_newspaper.jpg",
-        "q" => "media_largeprint.jpg",
-        "r" => "media_3dobject.jpg",
-        "s" => "media_slide.jpg",
-        "t" => "media_online.jpg",
-        "u" => "media_eaudio.jpg",
-        "v" => "media_ebooktext.jpg",
-        "w" => "media_eaudio.jpg",
-        "x" => "media_downloadmusic.jpg",
-        "y" => "media_downloadvideo.jpg",
-        "z" => "media_map.jpg",
-        "2" => "media_cassettewithbook.jpg",
-        "5" => "media_cdwithbook.jpg"
-    );
-
-    return $type_map{$mattype};
-}
-
 sub new {
     my($class, $apache, $ctx) = @_;
 
@@ -652,8 +614,6 @@ sub load_myopac_holds {
 
     $ctx->{holds} = $self->fetch_user_holds(undef, 0, 1, $limit, $offset);
 
-    $ctx->{"icon_by_mattype"} = \&_icon_by_mattype;
-
     return Apache2::Const::OK;
 }
 
diff --git a/Open-ILS/web/templates/default/opac/common.tt2 b/Open-ILS/web/templates/default/opac/common.tt2
index 76b4646..c4caa0e 100644
--- a/Open-ILS/web/templates/default/opac/common.tt2
+++ b/Open-ILS/web/templates/default/opac/common.tt2
@@ -23,5 +23,36 @@
 [% END %]
 
 [% PROCESS 'default/opac/marc_attrs.tt2' %]
-[% USE date %]
-[% USE money = format('$%.2f') %]
+[%  USE date;
+    USE money = format('$%.2f');
+    icon_by_mattype = {     # XXX KCLS-specific
+        "a" => "media_book.jpg",
+        "b" => "media_magazines.jpg",
+        "c" => "media_printedmusic.jpg",
+        "d" => "media_microform.jpg",
+        "e" => "media_equipment.jpg",
+        "f" => "media_films.jpg",
+        "g" => "",
+        "h" => "media_dvd.jpg",
+        "i" => "media_bookoncassette.jpg",
+        "j" => "media_musiccd.jpg",
+        "k" => "media_musiccassette.jpg",
+        "l" => "media_musicrecord.jpg",
+        "m" => "media_software.jpg",
+        "n" => "media_bookoncd.jpg",
+        "o" => "media_kit.jpg",
+        "p" => "media_newspaper.jpg",
+        "q" => "media_largeprint.jpg",
+        "r" => "media_3dobject.jpg",
+        "s" => "media_slide.jpg",
+        "t" => "media_online.jpg",
+        "u" => "media_eaudio.jpg",
+        "v" => "media_ebooktext.jpg",
+        "w" => "media_eaudio.jpg",
+        "x" => "media_downloadmusic.jpg",
+        "y" => "media_downloadvideo.jpg",
+        "z" => "media_map.jpg",
+        "2" => "media_cassettewithbook.jpg",
+        "5" => "media_cdwithbook.jpg"
+    };
+%]
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index d919849..ce09725 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -9,9 +9,9 @@
 </style>
 [% END %]
 
-[% PROCESS "default/opac/common.tt2" %]
-[% WRAPPER "default/opac/base.tt2" %]
-[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "holds" %]
+[%  PROCESS "default/opac/common.tt2";
+    WRAPPER "default/opac/base.tt2";
+    INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "holds" %]
 
 [% IF ctx.holds.size == 0 %]
 <b>No Items On Hold</b>
@@ -55,8 +55,9 @@
                 <td><a href='../results?query=au:[% attrs.author | url %]'>[% attrs.author %]</a></td>
                 <td>
                     [%
-                        format_desc = ctx.find_citm(attrs.mattype).value;
-                        icon_filename = ctx.icon_by_mattype(attrs.mattype);
+                        key = attrs.mattype;
+                        format_desc = ctx.find_citm(key).value;
+                        icon_filename = icon_by_mattype.$key;
                         IF icon_filename;
                     %]<!-- XXX in situations where we might show M-type holds, this won't be good enough -->
                     <img alt="[% format_desc %]" title="[% format_desc %]"

commit 01873f5a3cc67bf585e8d04724dd6001b9c6dc1a
Merge: 977c8d2 edb5bd0
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Feb 3 16:50:17 2011 -0500

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 977c8d2978e962ea1a010818d251ca37cb818d8d
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Feb 3 16:47:59 2011 -0500

    Integrate Locale::Maketext for string translations
    
    Added support for configuring supported locales and specifying message
    catalogs as gettext .po or .mo files.  All locales default to native
    template strings when no translation is provided.
    
    Updated oils_web config and added some inline template examples

diff --git a/Open-ILS/examples/oils_web.xml.example b/Open-ILS/examples/oils_web.xml.example
index e5f0efb..0728082 100644
--- a/Open-ILS/examples/oils_web.xml.example
+++ b/Open-ILS/examples/oils_web.xml.example
@@ -37,6 +37,16 @@
     <!-- Turn on template-toolkit debugging, which reports on undefined blocks, macros, etc. -->
     <debug_template>false</debug_template>
 
+    <!-- 
+        Supported locales.  Locales with no message catalog will use the native template strings.
+        All locales will fall back to native strings when a given string is not in the catalog
+    -->
+    <locales>
+        <en_US/>
+        <en_CA>/openils/var/data/locale/messages.en_CA.po</en_CA>
+        <fr_CA>/openils/var/data/locale/messages.fr_CA.po</fr_CA>
+    </locales>
+
     <!-- Where templates can be found.  Paths will be checked in the order entered here.
          It's possible to override individual or sets of templates by putting them into
          a path in front of the default template path -->
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
index e804562..8f19a07 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
@@ -16,6 +16,7 @@ use constant OILS_HTTP_COOKIE_LOCALE => 'oils:locale';
 my $web_config;
 my $web_config_file;
 my $web_config_edit_time;
+my %lh_cache; # locale handlers
 
 sub import {
     my $self = shift;
@@ -52,7 +53,7 @@ sub handler {
         DEBUG => $ctx->{debug_template}
     });
 
-    unless($tt->process($template, {ctx => $ctx})) {
+    unless($tt->process($template, {ctx => $ctx, l => set_text_handler($ctx, $r)})) {
         $r->log->warn('Template error: ' . $tt->error);
         return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
     }
@@ -60,6 +61,24 @@ sub handler {
     return Apache2::Const::OK;
 }
 
+sub set_text_handler {
+    my $ctx = shift;
+    my $r = shift;
+
+    my $locale = $ctx->{locale};
+    $locale =~ s/-/_/g;
+
+    $r->log->info("messages locale = $locale");
+
+    unless($lh_cache{$locale}) {
+        $r->log->info("Unsupported locale: $locale");
+        $lh_cache{$locale} = $lh_cache{'en_US'};
+    }
+
+    return sub { return $lh_cache{$locale}->maketext(@_); };
+}
+
+
 
 sub run_context_loader {
     my $r = shift;
@@ -117,11 +136,10 @@ sub load_context {
     $ctx->{base_url} = $cgi->url(-base => 1);
     $ctx->{skin} = $cgi->cookie(OILS_HTTP_COOKIE_SKIN) || 'default';
     $ctx->{theme} = $cgi->cookie(OILS_HTTP_COOKIE_THEME) || 'default';
+
     $ctx->{locale} = 
         $cgi->cookie(OILS_HTTP_COOKIE_LOCALE) || 
         parse_accept_lang($r->headers_in->get('Accept-Language')) || 'en-US';
-    $r->log->debug('skin = ' . $ctx->{skin} . ' : theme = ' . 
-        $ctx->{theme} . ' : locale = ' . $ctx->{locale});
 
     my $mprefix = $ctx->{media_prefix};
     if($mprefix and $mprefix !~ /^http/ and $mprefix !~ /^\//) {
@@ -129,7 +147,6 @@ sub load_context {
         $ctx->{media_prefix} = ($cgi->https) ? "https://$mprefix" : "http://$mprefix";
     }
 
-
     return $ctx;
 }
 
@@ -223,6 +240,38 @@ sub check_web_config {
     }
 }
 
+# Create an I18N sub-module for each supported locale
+# Each module creates its own MakeText lexicon by parsing .po/.mo files
+sub load_locale_handlers {
+    my $ctx = shift;
+    my $locales = $ctx->{locales};
+
+    for my $lang (keys %$locales) {
+        my $messages = $locales->{$lang};
+        $messages = '' if ref $messages; # empty {}
+
+        # TODO Can we do this without eval?
+        my $eval = <<EVAL;
+            package OpenILS::WWW::EGWeb::I18N::$lang;
+            use base 'OpenILS::WWW::EGWeb::I18N';
+            if(\$messages) {
+                use Locale::Maketext::Lexicon::Gettext;
+                if(open F, '$messages') {
+                    our %Lexicon = (%Lexicon, %{ Locale::Maketext::Lexicon::Gettext->parse(<F>) });
+                    close F;
+                } else {
+                    warn "unable to open messages file: $messages"; 
+                }
+            }
+EVAL
+        eval $eval;
+        warn "$@\n" if $@; # TODO better logging
+        $lh_cache{$lang} = "OpenILS::WWW::EGWeb::I18N::$lang"->new;
+    }
+}
+
+
+
 sub parse_config {
     my $cfg_file = shift;
     my $data = XML::Simple->new->XMLin($cfg_file);
@@ -236,6 +285,8 @@ sub parse_config {
     $ctx->{debug_template} = ( ($data->{debug_template}||'')  =~ /true/io) ? 1 : 0;
     $ctx->{default_template_extension} = $data->{default_template_extension} || 'tt2';
     $ctx->{web_dir} = $data->{web_dir};
+    $ctx->{locales} = $data->{locales};
+    load_locale_handlers($ctx);
 
     my $tpaths = $data->{template_paths}->{path};
     $tpaths = [$tpaths] unless ref $tpaths;
@@ -268,5 +319,9 @@ sub new {
     return bless(\%args, $class);
 }
 
+# base class for all supported locales
+package OpenILS::WWW::EGWeb::I18N;
+use base 'Locale::Maketext';
+our %Lexicon = (_AUTO => 1);
 
 1;
diff --git a/Open-ILS/web/templates/default/opac/home.tt2 b/Open-ILS/web/templates/default/opac/home.tt2
index 9faf5e6..03b2ad1 100644
--- a/Open-ILS/web/templates/default/opac/home.tt2
+++ b/Open-ILS/web/templates/default/opac/home.tt2
@@ -15,7 +15,7 @@
     <form action='./results' method='GET'>
         <input type='text' name='query' size='50' value='[% query %]'/>
         [% PROCESS build_org_selector name='loc' %]
-        <input type='submit'/>
+        <input type='submit' value='[% l('Go!') %]'/>
         <input type='hidden' name='page' value='0'/>
     </form>
 </div>
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 27f960d..9ecead4 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -72,7 +72,7 @@
         </td>
         <td id='right_block'>
             <div>
-                <span>Hits: [% ctx.hit_count %] / Page [% page + 1 %] of [% page_count %]</span>
+                <span>[% l('Hits: [_1] / Page [_2] of [_3]', ctx.hit_count, page + 1, page_count) %]</span>
                 [% 
                     q = query | url;
                     np_link = '?query=' _ q;

commit edb5bd0add110008226699acba01653a2c83b4b7
Merge: b3d5433 127a86a
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 3 16:00:49 2011 -0500

    Merge branch 'master' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit b3d54338e9dfe25ded139d60d2943b188f14d060
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 3 15:40:34 2011 -0500

    a thought about the add/remove css funcs

diff --git a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
index 31165ed..8ca55fd 100644
--- a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
+++ b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
@@ -28,6 +28,10 @@ function swapCSSClass(obj, old, newc) {
 }
 
 function addCSSClass(e,c) {
+    /* XXX I've seen much simpler implementation of this idea that just
+     * do a regexp replace on e.className.  Any reason why we're making
+     * it so hard here? I could see the justification if there's a certain
+     * browser that doesn't cooperate. */
 	if(!e || !c) return;
 
 	var css_class_string = e.className;

commit 57681c53f503616a9f24343fb26de681daa86d25
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 3 15:34:19 2011 -0500

    JS stubbed out, mostly. See longer commit msg.
    
    Here's the deal with JS so far.
    
    A few instances of onfocus, onblur, onmouseout, and onmouseover have been
    left alone, as they're doing simple cosmetic things.
    
    A lot of instances of onclick remain, and a couple onchange, but these
    now either a) just do cosmetic things (hide/unhide) or b) call stubbed
    out functions prepared in misc.js
    
    That doesn't mean we won't still totally rip out lots of this JS, but
    it leaves us a hint as to what is supposed to happen where.  I can
    easily see us losing track of that later.  So anyway, many of the
    stubbed functions will probably be replaced with purely server side
    functionality later, but until then, they can serve as a kind of
    documentation.

diff --git a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
index 2d809bf..31165ed 100644
--- a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
+++ b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
@@ -1,5 +1,7 @@
 /* Some really basic utils copied mostly from old opac js:
  * opac_utils.js, utils.js, misc.js (kcls). */
+function _stub() { alert("XXX disconnected"); } /* for in progress work */
+
 function $(id) { return document.getElementById(id); }
 function $n(root, nodeName, attr) {
     return findNodeByName(root, nodeName, attr);
@@ -95,24 +97,6 @@ function swapTabs(el) {
     }
 }
 
-function sortHolds() {
-    alert("FIXME disconnected");
-    /* XXX TODO There was a method for sorting loaded holds in the DOM
-     * without reloading the page, but it was reliant on fieldmapper
-     * and some stock dojo libraries.  Could be reimplemented without
-     * deps if deemed worth it.
-     */
-}
-
-function showDetailedResults(/* Boolean */ detailed) {
-    alert("FIXME disconnected");
-    /* XXX TODO this stands in for an old onchange handler that toggled
-     * between simple and detailed results in the rresults page.
-     * Don't know if we want to keep this around or not (I'm guessing not,
-     * and that we'll do this with two different server-side pages now,
-     * but leaving this stub here for now).
-     */
-}
 
 /* Returns the character code pressed that caused the event. */
 function grabCharCode(evt) {
@@ -145,9 +129,41 @@ function advAddGblRow() {
     tbody.insertBefore(newrow, $("adv_global_addrow"));
     var input = $n(newrow, "term");
     input.value = "";
-    setEnterFunc(input, function() {
-        alert("XXX enter");
-        /* XXX TODO make a real form and get rid of this? */
-    });
+    setEnterFunc(input, _stub); /* XXX TODO make a real form and get rid of this? */
     $n(newrow, 'type').focus();
 }
+
+var rdetailNewBookbag = _stub; /* XXX TODO reimplement without JS? */
+var addMyList = _stub; /* XXX TODO we probably still need this one */
+var listSaveAction = _stub; /* XXX TODO we probably still need this one */
+var expandBoxes = _stub; /* XXX TODO possibly reimplement or replace */
+var iForgotMyPassword = _stub; /* XXX TODO possibly reimplement or replace */
+var switchSubPage = _stub;
+var myOPACRenewSelected = _stub;
+var myOPACCreateBookbag = _stub;
+var myOPACSavePrefs = _stub;
+var myOPACUpdatePhone = _stub;  /* XXX TODOD myOPACUpdate*() and the buttons where
+                                   the handlers are used should probably go
+                                   away completely */
+var myOPACUpdateUsername = _stub;
+var myOPACUpdatePassword = _stub;
+var myOPACUpdateEmail = _stub;
+var myOPACUpdateHomeOU = _stub;
+var myopacDoHoldAction = _stub;
+var myopacApplyThawDate = _stub;
+var showCachedList = _stub;
+var searchBarSubmit = _stub;
+var sortHolds = _stub; /* XXX TODO There was a method for sorting loaded holds
+                          in the DOM without reloading the page, but it was
+                          reliant on fieldmapper and some stock dojo
+                          libraries.  Could be reimplemented without deps
+                          if deemed worthwhile. */
+var showDetailedResults = _stub; /* XXX TODO for an old onchange handler that
+                                toggled between simple and detailed results
+                                in the rresults page.  */
+var checkAll = _stub;
+var sortChecked = _stub;
+var sortCheckedHist = _stub;
+var showPaymentForm = _stub;
+var showFinesDiv = _stub;
+var fadeOut = _stub;    /* XXX TODO what the heck? not seen anywhere */
diff --git a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2 b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
index 5c9eca7..46d3a98 100644
--- a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
@@ -2,7 +2,6 @@
     INCLUDE "default/kcls-wire/parts/topnav.tt2";
     ctx.page_title = "Advanced Search" %]
 [% BLOCK html_head -%]
-<script type="text/javascript" src="/opac/skin/kcls-wire/js/misc.js"></script>
 <style type='text/css'>
     .advanced_div { padding-top: 15px; }
     #adv_global_search select { width: 13em; }
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
index a4a23b6..cd2ea84 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
@@ -7,6 +7,10 @@
         <title>Catalog - King County Library - [% ctx.page_title %]</title>
         <link rel="unapi-server" type="application/xml" title="unAPI"
             href="/opac/extras/unapi" />
+        [%- UNLESS skip_js %]
+        <script type="text/javascript"
+            src="/opac/skin/kcls-wire/js/misc.js"></script>
+        [%- END -%]
         [% BLOCK html_head; END; # provide a default that can be overridden %]
         [% PROCESS html_head %]
     </head>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2
index 905e91d..d016b3c 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2
@@ -81,7 +81,7 @@
         </tbody>
     </table>
 
-    <div style='font-weight: bold; padding: 5px; margin: 5px; width: 100%;' 
+    <div style='font-weight: bold; padding: 5px; margin: 5px; width: 100%;'
         class='hide_me color_4' id='rdetail_deleted_exp'>
         &rdetail.record.deleted;
     </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2
index b0c26ef..fb39934 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2
@@ -45,7 +45,7 @@
                                     <table width='100%' class='data_grid'>
                                         <tbody name='extras_tbody'>
                                             <tr name='extras_row' class='hide_me'>
-                                                <td name='type' width='20%'> 
+                                                <td name='type' width='20%'>
                                                     <span name='note' class='hide_me'>
                                                         <b>&rdetail.cn.note;</b>
                                                     </span>
@@ -77,7 +77,7 @@
         <div style='width:100%; border: 2px solid #E0F0E0; margin-bottom: 20px;'>
             <input type='submit' value='&rdetail.cn.print;' onclick='window.print();' />
         </div>
-        <div name='body'> 
+        <div name='body'>
             <table>
                 <tbody name='tbody'>
                     <tr><td>&common.library;</td><td colspan='2' name='lib'></td></tr>
diff --git a/Open-ILS/web/templates/default/kcls-wire/record.tt2 b/Open-ILS/web/templates/default/kcls-wire/record.tt2
index db3196c..eba9017 100644
--- a/Open-ILS/web/templates/default/kcls-wire/record.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/record.tt2
@@ -1,12 +1,12 @@
 [%  WRAPPER "default/kcls-wire/parts/base.tt2";
     INCLUDE "default/kcls-wire/parts/topnav.tt2";
     ctx.page_title = "Record Detail" %]
-[% BLOCK html_head -%]
+[% BLOCK html_head %]
 <style type="text/css">
     #rdetail_copy_info_table { font-size: 8pt; }
     #rdetail_copy_info_table td { padding: 3px; }
 </style>
-[%- END %]
+[% END %]
     <div id="search-wrapper">
         [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
         [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]

commit ff20d1b1ac53fc7fecc743750adb04d7c9140567
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 3 15:03:54 2011 -0500

    while the enter-key capturing is around, do it right at least

diff --git a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
index 9e24b46..2d809bf 100644
--- a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
+++ b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
@@ -120,7 +120,7 @@ function grabCharCode(evt) {
     evt = evt || window.event || event || null;
     if (evt) {
     // OLD CODE: return (evt.charCode ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode));
-        return event.which || event.charCode || event.keyCode;
+        return evt.which || evt.charCode || evt.keyCode;
     } else {
         return -1;
     }
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/global_row.tt2
index 09e213b..7c60f98 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/global_row.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/global_row.tt2
@@ -1,35 +1,30 @@
 <!-- ****************** adv_global_row.xml ***************************** -->
 <tr id='adv_global_trow' type='input'>
-	<td align='left' width='100%' nowrap='nowrap'>
-
-		<!-- select the search class -->
-		<select name='type' style='margin-right: 7px;'>
-			<option value='keyword' selected='selected'>&common.keyword;</option>
-			<option value='title'>&common.title;</option>
-			<option value='author'>&common.author;</option>
-			<option value='subject'>&common.subject;</option>
-			<option value='series'>&common.series;</option>
-			<option value='bibcn'>&common.bibcn;</option>
-			
-			</select>
-	
-		<!-- select how to treat the text -->
-		<select name='contains' style='margin-right: 7px;'>
-			<option value='contains'>&opac.advanced.refined.contains;</option>
-			<option value='nocontains'>&opac.advanced.refined.nocontains;</option>
-			<option value='exact'>&opac.advanced.refined.exact;</option>
-		</select>
-			
-		<!-- search term -->
-		<input type='text' size='18' name='term' style='margin-right: 3px;' />
-	
-		<!-- Remove this row -->
+    <td align='left' width='100%' nowrap='nowrap'>
+        <!-- select the search class -->
+        <select name='type' style='margin-right: 7px;'>
+            <option value='keyword' selected='selected'>&common.keyword;</option>
+            <option value='title'>&common.title;</option>
+            <option value='author'>&common.author;</option>
+            <option value='subject'>&common.subject;</option>
+            <option value='series'>&common.series;</option>
+            <option value='bibcn'>&common.bibcn;</option>
+            </select>
+        <!-- select how to treat the text -->
+        <select name='contains' style='margin-right: 7px;'>
+            <option value='contains'>&opac.advanced.refined.contains;</option>
+            <option value='nocontains'>&opac.advanced.refined.nocontains;</option>
+            <option value='exact'>&opac.advanced.refined.exact;</option>
+        </select>
+        <!-- search term -->
+        <input type='text' size='18' name='term'
+            style='margin-right: 3px;'
+            onkeydown="if (userPressedEnter(event)) alert('XXX Enter');" />
+        <!-- Remove this row -->
         <button onclick='
             var row = this.parentNode.parentNode;
-            var tbody = row.parentNode;
-            if( tbody.getElementsByTagName("tr").length > 2 )
+            if (row.parentNode.getElementsByTagName("tr").length > 2)
                 row.parentNode.removeChild(row);'>X</button>
-
-	</td>
+    </td>
 </tr>
 <!-- ****************** end: adv_global_row.xml ***************************** -->

commit 5e5410e9ad0d1bc513c94351c3c804be9e21cb4b
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 3 14:54:14 2011 -0500

    deal with some onclick handlers, also with broken relative links from
    myopac/* templates

diff --git a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
index 3e53964..9e24b46 100644
--- a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
+++ b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
@@ -1,6 +1,24 @@
 /* Some really basic utils copied mostly from old opac js:
  * opac_utils.js, utils.js, misc.js (kcls). */
 function $(id) { return document.getElementById(id); }
+function $n(root, nodeName, attr) {
+    return findNodeByName(root, nodeName, attr);
+}
+
+function findNodeByName(root, nodeName, /* defaults to "name" */attr) {
+    if (!root || !nodeName) return null;
+    if (root.nodeType != 1) return null;
+    if (!attr) attr = "name";
+    if (root.getAttribute(attr) == nodeName || root[attr] == nodeName)
+        return root;
+
+    for (var i = 0; i != root.childNodes.length; i++) {
+        var n = findNodeByName(root.childNodes[i], nodeName);
+        if (n) return n;
+    }
+
+    return null;
+}
 
 function swapCSSClass(obj, old, newc) {
 	removeCSSClass(obj, old);
@@ -95,3 +113,41 @@ function showDetailedResults(/* Boolean */ detailed) {
      * but leaving this stub here for now).
      */
 }
+
+/* Returns the character code pressed that caused the event. */
+function grabCharCode(evt) {
+    // OLD CODE: evt = (evt) ? evt : ((window.event) ? event : null);
+    evt = evt || window.event || event || null;
+    if (evt) {
+    // OLD CODE: return (evt.charCode ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode));
+        return event.which || event.charCode || event.keyCode;
+    } else {
+        return -1;
+    }
+}
+
+/* returns true if the user pressed enter */
+function userPressedEnter(evt) {
+    var code = grabCharCode(evt);
+    return (code == 13 || code == 3);
+}
+
+function setEnterFunc(node, func) {
+    if (!(node && func)) return;
+    node.onkeydown = function(evt) {
+        if (userPressedEnter(evt)) func();
+    };
+}
+
+function advAddGblRow() {
+    var tbody = $("adv_global_tbody");
+    var newrow = $("adv_global_trow").cloneNode(true);
+    tbody.insertBefore(newrow, $("adv_global_addrow"));
+    var input = $n(newrow, "term");
+    input.value = "";
+    setEnterFunc(input, function() {
+        alert("XXX enter");
+        /* XXX TODO make a real form and get rid of this? */
+    });
+    $n(newrow, 'type').focus();
+}
diff --git a/Open-ILS/web/templates/default/kcls-wire/home.tt2 b/Open-ILS/web/templates/default/kcls-wire/home.tt2
index d828e91..952422c 100644
--- a/Open-ILS/web/templates/default/kcls-wire/home.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/home.tt2
@@ -4,7 +4,6 @@
 [% BLOCK html_head -%]
 <script type="text/javascript" src="/opac/skin/kcls/js/contentslider.js"></script>
 [%- END %]
-
     <div id="search-wrapper">
         [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
         [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
index 3808123..baf0f50 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
@@ -20,8 +20,7 @@
                         <td align='left' style="padding-top:7px;">
                             <a href="javascript:;"
                                 onclick='advAddGblRow();'>Add Search Row</a>
-                            <button onclick='advSubmitGlobal();'
-                                class="hide_me">&advanced.search.submit;</button>
+                            <button>&advanced.search.submit;</button><!-- XXX TODO make a real form -->
                         </td>
                     </tr>
                 </tbody>
@@ -286,9 +285,11 @@
 
     <tr class='border_4_2'>
         <td align="left" colspan='2'>
-        <img src="/opac/skin/kcls/graphics/search_btn.gif" alt="Search" onclick='advSubmitGlobal();' style="cursor:pointer;" />
+            <!-- XXX TODO make a real form, and make this a real submitter -->
+        <img src="/opac/skin/kcls/graphics/search_btn.gif" alt="Search"  style="cursor:pointer;" />
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-        <a href="javascript:;" onclick='clearSearchBoxes();' style="position: relative; top: -9px;">Reset Form</a>
+        <!-- XXX TODO make a real form, and make this a real resetter -->
+        <a href="javascript:;" style="position: relative; top: -9px;">Reset Form</a>
         </td>
     </tr>
 </table>
@@ -315,8 +316,10 @@
         </div>
 
         <div style='margin-top: 8px;' class='adv_quick_search_submit'>
-        <img src="/opac/skin/kcls/graphics/search_btn.gif" alt="Search" id="adv_quick_submit" onclick='advGenericSearch();' style="cursor:pointer;" />
-            <!-- <a id='adv_quick_submit' href='javascript:advGenericSearch();' class='classic_link'>&common.submit;</a> -->
+            <!-- XXX TODO make a real form, and make a real submitter (quick
+            submit, FKA advGenericSearch() -->
+            <img src="/opac/skin/kcls/graphics/search_btn.gif"
+                alt="Search" id="adv_quick_submit" style="cursor:pointer;" />
         </div>
     </div>
 </div>
@@ -353,10 +356,10 @@
         <a style='margin-right: 4px; position:relative;top:-10px;'
             class='classic_link'
             href='javascript:advAddMARC();'>&search.marc.add.row;</a>
-        <!-- <a style='margin-left: 4px;' class='classic_link' href='javascript:advMARCRun();'>&common.submit;</a> -->
-        <img alt="Search"
-            src="/opac/skin/kcls/graphics/search_btn.gif"
-            onclick='advMARCRun();' style="cursor:pointer;" />
+        <!-- XXX TODO make a real form, and make a real submitter (FKA
+        advMARCRun()) -->
+        <img alt="Search" src="/opac/skin/kcls/graphics/search_btn.gif"
+            style="cursor:pointer;" />
     </div>
 </div>
 <!-- ****************** end: advanced_global.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
index fdc29ce..fbae83e 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
@@ -1,10 +1,12 @@
 [% myopac_pages = [
-    {url => "main", name => "Account Summary"},
-    {url => "circs", name => "Items Checked Out"},
-    {url => "holds", name => "Holds"},
-    {url => "prefs", name => "Account Preferences"},
-    {url => "lists", name => "My Lists"}
-] %]
+        {url => "main", name => "Account Summary"},
+        {url => "circs", name => "Items Checked Out"},
+        {url => "holds", name => "Holds"},
+        {url => "prefs", name => "Account Preferences"},
+        {url => "lists", name => "My Lists"}
+    ];
+    skin_root = "../"
+%]
     [% INCLUDE "default/kcls-wire/parts/topnav.tt2" %]
     <div id="search-wrapper">
         [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
index a5d9ef9..9a4950a 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
@@ -4,7 +4,7 @@
         <tr>
             <td colspan="3">
                 <span class="search_catalog_lbl">Search the Catalog</span>
-                <a href="advanced" id="home_adv_search_link"
+                <a href="[% skin_root %]advanced" id="home_adv_search_link"
                     style="position:relative;top:-1px;left:10px;"><span
                     class="adv_search_font">Advanced Search</span></a>
             </td>
@@ -52,6 +52,8 @@
             <span style="font-size:10px;">Limit to available items</span>
         </label>
       </div>
-    <div id="breadcrumb"><a href="./">Catalog Home</a> &gt;</div>
+      <div id="breadcrumb">
+          <a href="[% skin_root %]home">Catalog Home</a> &gt;
+      </div>
     <div style="clear:both"></div>
 </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
index ea36ba7..16d8819 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
@@ -5,7 +5,7 @@
         src="/opac/skin/kcls/graphics/KCLS_logo_horiz.gif" /></a></div>
     <div style="float:right;">
         <div id="your-acct-login"><a
-            href="login" id="home_myopac_link"><img
+            href="[% skin_root %]login" id="home_myopac_link"><img
             alt="Your Account Log in"
             src="/opac/skin/kcls/graphics/login-btn.png"
             onmouseover="this.src='/opac/skin/kcls/graphics/login-btn-hover.png';"
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
index 13f8028..85e1df8 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
@@ -19,7 +19,7 @@
   <div style="float:left;width:163px;height:30px;background:url('/opac/skin/kcls/graphics/utils-corner-mid.png') repeat-x top;"> 
   
   	<a href="javascript:history.go(-1)" style="position:relative;top:1px;left:10px;"><img alt="Back" src="/opac/skin/kcls/graphics/tool_back.png" /></a>
-	<a href="./" style="position:relative;top:3px;left:20px;"><img src="/opac/skin/kcls/graphics/tool_home.png" alt="Homepage" /></a>
+	<a href="[% skin_root %]home" style="position:relative;top:3px;left:20px;"><img src="/opac/skin/kcls/graphics/tool_home.png" alt="Homepage" /></a>
 	<a href="javascript:window.print();" style="position:relative;top:5px;left:30px;"><img src="/opac/skin/kcls/graphics/tool_print.png" alt="Print Page" /></a>
 	<a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm" style="position:relative;top:2px;left:40px;"><img alt="Help" src="/opac/skin/kcls/graphics/tool_help.png" /></a>
    	<a href="javascript:history.go(+1)" style="position:relative;top:2px;left:50px;"><img src="/opac/skin/kcls/graphics/tool_forward.png" alt="Forward" /></a>

commit e89b1af56ad83ecd3a032cbf6ec249cdb89abdf5
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 3 13:37:22 2011 -0500

    addressed existing onchange handlers

diff --git a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
index 0f3bf81..3e53964 100644
--- a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
+++ b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
@@ -76,3 +76,22 @@ function swapTabs(el) {
         }
     }
 }
+
+function sortHolds() {
+    alert("FIXME disconnected");
+    /* XXX TODO There was a method for sorting loaded holds in the DOM
+     * without reloading the page, but it was reliant on fieldmapper
+     * and some stock dojo libraries.  Could be reimplemented without
+     * deps if deemed worth it.
+     */
+}
+
+function showDetailedResults(/* Boolean */ detailed) {
+    alert("FIXME disconnected");
+    /* XXX TODO this stands in for an old onchange handler that toggled
+     * between simple and detailed results in the rresults page.
+     * Don't know if we want to keep this around or not (I'm guessing not,
+     * and that we'll do this with two different server-side pages now,
+     * but leaving this stub here for now).
+     */
+}
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
index 2083e8e..3808123 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
@@ -187,11 +187,16 @@
                             <span>&advanced.filter.pubyear;</span>
                         </td>
                         <td align='left'>
-                            <select id='adv_global_pub_date_type' onchange='
+                            <!-- XXX TODO the following select used to have this
+                                onchange handler:
                                 if($("adv_global_pub_date_type").selectedIndex == 3)
                                     unHideMe($("adv_global_pub_date_2_span"));
                                 else
-                                    hideMe($("adv_global_pub_date_2_span"));'>
+                                    hideMe($("adv_global_pub_date_2_span"));
+
+                                So do we need equiv functionality or no?
+                                -->
+                            <select id='adv_global_pub_date_type'>
                                     <option value='equals' selected='selected'>
                                         &advanced.filter.pubyear.equals;
                                     </option>
diff --git a/Open-ILS/web/templates/default/kcls-wire/results.tt2 b/Open-ILS/web/templates/default/kcls-wire/results.tt2
index 8d8c286..2e2811b 100644
--- a/Open-ILS/web/templates/default/kcls-wire/results.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/results.tt2
@@ -36,7 +36,7 @@
                 <div class="results_header_div"></div>
                 <div class="results_header_lbl">View</div>
                 <select class="results_header_sel" style="width:88px;"
-                    onchange="this.selectedIndex?showDetailedInfo(true):showDetailedInfo(false);">
+                    onchange="showDetailedResults(Boolean(this.selectedIndex));">
                     <option>Simple</option>
                     <option>Detailed</option>
                 </select>

commit c2f7bbe2286292f9c021022febcf5572021dae62
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 3 13:15:39 2011 -0500

    get rid of some onkeydown events handlers, as well as onload and onerror events
    that aren't for real DOM events, but for dojo-related stuff

diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
index ac08742..d884d70 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
@@ -326,19 +326,25 @@
                     <tr id='myopac_update_phone1_row'
                         class='hide_me'>
                         <td class='myopac_update_cell'
-                            colspan='3'><span class='myopac_update_span'>Enter
-                            New &myopac.summary.phone.day;:</span>
-                            <input type='text'
-                               size='24'
-                               id='myopac_new_phone1'
-                               onkeydown=
-                               'if(userPressedEnter(event)) myOPACUpdatePhone("1");' />
-                         <span class='myopac_update_span'><button onclick=
-                        'myOPACUpdatePhone("1");'><span class=
-                        'myopac_update_span'>&common.submit;</span></button></span>
-                        <span class='myopac_update_span'><button onclick=
-                        'hideMe($("myopac_update_phone1_row"));'><span class=
-                        'myopac_update_span'>&common.cancel;</span></button></span></td>
+                            colspan='3'>
+                            <span class='myopac_update_span'>
+                                Enter New &myopac.summary.phone.day;:
+                            </span>
+
+                            <input type='text' size='24' id='myopac_new_phone1' />
+                            <span class='myopac_update_span'>
+                                <button onclick='myOPACUpdatePhone("1");'>
+                                    <span class='myopac_update_span'>
+                                        &common.submit;</span>
+                                </button>
+                            </span>
+                            <span class='myopac_update_span'>
+                                <button onclick='hideMe($("myopac_update_phone1_row"));'>
+                                    <span class='myopac_update_span'>
+                                        &common.cancel;</span>
+                                </button>
+                            </span>
+                        </td>
                     </tr>
 
                     <tr>
@@ -362,17 +368,14 @@
                         <td class='myopac_update_cell'
                             colspan='3'><span class='myopac_update_span'>New
                             &myopac.summary.phone.evening;:</span>
-                            <input type='text'
-                               size='24'
-                               id='myopac_new_phone2'
-                               onkeydown=
-                               'if(userPressedEnter(event)) myOPACUpdatePhone("2");' />
-                         <span class='myopac_update_span'><button onclick=
-                        'myOPACUpdatePhone("2");'><span class=
-                        'myopac_update_span'>&common.submit;</span></button></span>
-                        <span class='myopac_update_span'><button onclick=
-                        'hideMe($("myopac_update_phone2_row"));'><span class=
-                        'myopac_update_span'>&common.cancel;</span></button></span></td>
+                            <input type='text' size='24' id='myopac_new_phone2' />
+                            <span class='myopac_update_span'><button onclick=
+                                'myOPACUpdatePhone("2");'><span class=
+                                'myopac_update_span'>&common.submit;</span></button></span>
+                            <span class='myopac_update_span'><button onclick=
+                                'hideMe($("myopac_update_phone2_row"));'><span class=
+                                'myopac_update_span'>&common.cancel;</span></button></span>
+                        </td>
                     </tr>
 
                     <tr>
@@ -396,17 +399,14 @@
                         <td class='myopac_update_cell'
                             colspan='3'><span class='myopac_update_span'>Enter
                             New &myopac.summary.phone.other;:</span>
-                            <input type='text'
-                               size='24'
-                               id='myopac_new_phone3'
-                               onkeydown=
-                               'if(userPressedEnter(event)) myOPACUpdatePhone("3");' />
-                         <span class='myopac_update_span'><button onclick=
-                        'myOPACUpdatePhone("3");'><span class=
-                        'myopac_update_span'>&common.submit;</span></button></span>
-                        <span class='myopac_update_span'><button onclick=
-                        'hideMe($("myopac_update_phone3_row"));'><span class=
-                        'myopac_update_span'>&common.cancel;</span></button></span></td>
+                            <input type='text' size='24' id='myopac_new_phone3' />
+                            <span class='myopac_update_span'><button onclick=
+                                'myOPACUpdatePhone("3");'><span class=
+                                'myopac_update_span'>&common.submit;</span></button></span>
+                            <span class='myopac_update_span'><button onclick=
+                                'hideMe($("myopac_update_phone3_row"));'><span class=
+                                'myopac_update_span'>&common.cancel;</span></button></span>
+                        </td>
                     </tr>
 
                     <tr>
@@ -441,17 +441,14 @@
                         <td class='myopac_update_cell'
                             colspan='3'><span class=
                             'myopac_update_span'>&myopac.summary.username.enter;</span>
-                            <input type='text'
-                               size='24'
-                               id='myopac_new_username'
-                               onkeydown=
-                               'if(userPressedEnter(event)) myOPACUpdateUsername();' />
-                         <span class='myopac_update_span'><button onclick=
-                        'myOPACUpdateUsername();'><span class=
-                        'myopac_update_span'>&common.submit;</span></button></span>
-                        <span class='myopac_update_span'><button onclick=
-                        'hideMe($("myopac_update_username_row"));'><span class=
-                        'myopac_update_span'>&common.cancel;</span></button></span></td>
+                            <input type='text' size='24' id='myopac_new_username' />
+                            <span class='myopac_update_span'><button onclick=
+                                'myOPACUpdateUsername();'><span class=
+                                'myopac_update_span'>&common.submit;</span></button></span>
+                            <span class='myopac_update_span'><button onclick=
+                            'hideMe($("myopac_update_username_row"));'><span class=
+                                'myopac_update_span'>&common.cancel;</span></button></span>
+                        </td>
                     </tr>
                     <tr>
                         <td class='color_4 light_border'>
@@ -483,8 +480,7 @@
                                         <td>
                                             <input type='password'
                                                size='24'
-                                               id='myopac_current_password'
-                                               onkeydown='if(userPressedEnter(event)) myOPACUpdatePassword();' />
+                                               id='myopac_current_password' />
                                            </td>
                                     </tr>
                                     <tr>
@@ -493,20 +489,19 @@
 
                                         <td><input type='password'
                                                size='24'
-                                               id='myopac_new_password'
-                                               onkeydown=
-                                               'if(userPressedEnter(event)) myOPACUpdatePassword();' /></td>
+                                               id='myopac_new_password' />
+                                           </td>
                                     </tr>
 
                                     <tr>
                                         <td><span class=
                                         'myopac_update_span'>&myopac.summary.password.reenter;</span></td>
 
-                                        <td><input type='password'
-                                               size='24'
-                                               id='myopac_new_password2'
-                                               onkeydown=
-                                               'if(userPressedEnter(event)) myOPACUpdatePassword();' /></td>
+                                        <td>
+                                            <input type='password'
+                                                size='24'
+                                                id='myopac_new_password2' />
+                                        </td>
                                     </tr>
                                 </tbody>
                             </table><span class=
@@ -537,22 +532,25 @@
 
                     <tr id='myopac_update_email_row'
                         class='hide_me'>
-                        <td class='myopac_update_cell'
-                            colspan='3'><span class=
-                            'myopac_update_span'>&myopac.summary.email.new;</span>
-                            <input type='text'
-                               size='24'
-                               id='myopac_new_email'
-                               onkeydown=
-                               'if(userPressedEnter(event)) myOPACUpdateEmail();' />
-                               <span class='myopac_update_span'><button onclick=
-                               'myOPACUpdateEmail();'><span class=
-                               'myopac_update_span'>&common.submit;</span></button></span>
-                               <span class='myopac_update_span'><button onclick=
-                               'hideMe($("myopac_update_email_row"));'><span class=
-                               'myopac_update_span'>&common.cancel;</span></button></span></td>
+                        <td class='myopac_update_cell' colspan='3'>
+                            <span class= 'myopac_update_span'>
+                                &myopac.summary.email.new;
+                            </span>
+                            <input type='text' size='24' id='myopac_new_email' />
+                            <span class='myopac_update_span'>
+                                <button onclick= 'myOPACUpdateEmail();'>
+                                    <span class= 'myopac_update_span'>
+                                        &common.submit;</span>
+                                </button>
+                            </span>
+                            <span class='myopac_update_span'>
+                                <button onclick='hideMe($("myopac_update_email_row"));'>
+                                    <span class='myopac_update_span'>
+                                        &common.cancel;</span>
+                                </button>
+                            </span>
+                        </td>
                     </tr>
-
                     <tr class="hide_me">
                         <td class='color_4 light_border'>
                         &myopac.summary.id.primary;</td>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2
index fe8fa81..f7092a0 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2
@@ -8,8 +8,7 @@
             <td width="90" valign="top" id="rdetail_image_cell">
                 <a id='rdetail_img_link' href='${ident.large}'><img
                     alt="Image of item" style='border: none;' id='rdetail_image'
-                    src='${ident.small}' onload='unHideMe($("rdetail_img_link"))'
-                    onerror='hideMe($("rdetail.jacket_attrib_div"));hideMe($("rdetail_img_link"));'/></a>
+                    src='${ident.small}' /></a>
                 <br />
                 <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
                     <div>&opac.image_provided;</div>

commit b12d2456b2346678d2aa8fd38c6511e90ba9eade
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 3 12:56:10 2011 -0500

    Keep the swapTabs() function around only for the advanced search page
    
    Other use cases will be replaced with links to actual pages, or
    otherwise dealt with.

diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
index a4158ba..9e1e95e 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
@@ -48,9 +48,7 @@
                                 </span>
                             </td>
                             <td align="right" class="view_link">
-                                <a href="javascript:;"
-                                    onclick="swapTabs($('acct_checked_out'));myOPACChangePage('checked');"
-                                    rel="myopac_checked_div">View All</a>
+                                <a href="circs">View All</a>
                             </td>
                         </tr>
                     </table>
@@ -65,9 +63,7 @@
                                 </span>
                             </td>
                             <td align="right" class="view_link">
-                                <a href="javascript:;"
-                                    onclick="swapTabs($('acct_holds'));myOPACChangePage('holds');"
-                                    rel="myopac_holds_div">View All</a>
+                                <a href="holds">View All</a>
                             </td>
                         </tr>
                     </table>
@@ -82,9 +78,7 @@
                                 </span>
                             </td>
                             <td align="right" class="view_link">
-                                <a href="javascript:;"
-                                    onclick="swapTabs($('acct_holds'));myOPACChangePage('holds');"
-                                    rel="myopac_holds_div">View All</a>
+                                <a href="javascript:alert('XXX TODO');">View All</a>
                             </td>
                         </tr>
                     </table>

commit 0e2bd3ee4d17b3d448d00aab65b292296185483e
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 3 12:53:22 2011 -0500

    remove __setsortsel() - I think this can be handled in templates later

diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
index 0f81ee1..2083e8e 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
@@ -247,19 +247,8 @@
             
                             <tbody>
                                 <tr>
-
-                           <script language='javascript' type='text/javascript'>
-                              function __setsortsel() {
-                                 var sel = $('adv_global_sort_by')
-                                           if(sel.selectedIndex == 0) {
-                                               $("adv_global_sort_dir").disabled = true;
-                                               $("adv_global_sort_dir").selectedIndex = 0;
-                                           } else $("adv_global_sort_dir").disabled = false;
-                              }
-                           </script>
-
                                     <td align=''>
-                                        <select id='adv_global_sort_by' onchange='__setsortsel();'>
+                                        <select id='adv_global_sort_by'>
                                             <option value='rel'>&advanced.relevance;</option>
                                             <option value='title'>&common.title;</option>
                                             <option value='author'>&common.author;</option>
@@ -274,9 +263,6 @@
                                             <option value='desc'>&advanced.sort.desc;</option>
                                         </select>
                                     </td>
-
-                           <!-- force the enable/disable sort dir code to run -->
-                           <script language='javascript' type='text/javascript'>__setsortsel();</script>
                                 </tr>
                                 <tr>
                                     <td align='center' class="hide_me">

commit f32a110922f639e4304d9cdb63bf26e50eb0af97
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 3 12:37:11 2011 -0500

    well, almost all references to dojo were already gone
    
    For now i'm leaving alone a lot of instances of jsId attributes; they
    might serve to remind us later of what some elements are for.

diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
index 72239a1..3ad5082 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
@@ -204,7 +204,7 @@
         &myopac.holds.freeze.select_thaw;
     </div>
     <p>
-        <input dojoType="dijit.form.DateTextBox" size='10' maxlength='10'
+        <input size='10' maxlength='10'
             type='text' id='myopac_holds_thaw_date_input' />
     </p>
     <p>
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
index c1adcb8..a4158ba 100644
--- a/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
@@ -323,7 +323,7 @@
                 <tr>
                     <td>Type of Card</td>
                     <td>
-                        <select dojoType='dijit.form.FilteringSelect' jsId='oilsSelfckCCType' required='true'>
+                        <select jsId='oilsSelfckCCType' required='true'>
                             <option value='VISA'>VISA</option>
                             <option value='MasterCard'>MasterCard</option>
                             <option value='American Express'>American Express</option>

commit 0497eb87cd428cda3b763e110f28196824f581ec
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Feb 3 11:54:23 2011 -0500

    all five main parts of their myopac page
    
    now it's on to the serious js scrubbing (dojo parts are already gone). this is
    going to take more than simply removing js in many cases, though, since
    so much layout is accomplished by means of JS in the kcls skin,
    especially in regards to subinterfaces and nested tabbiness

diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
new file mode 100644
index 0000000..72239a1
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/holds.tt2
@@ -0,0 +1,214 @@
+[%  WRAPPER "default/kcls-wire/parts/base.tt2" +
+        "default/kcls-wire/parts/myopac/base.tt2";
+    myopac_page = "holds"  %]
+<div id='myopac_holds_div'>
+    <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;">
+        <div class="align selected" id="holds_label">
+            <img src="/opac/skin/kcls/graphics/sub_holds_on.jpg" />
+        </div>
+        <div class="align hide_me" id="holds_hist_link">
+            <a href="javascript:;"
+                onclick="switchSubPage('holds','hist');"><img
+                src="/opac/skin/kcls/graphics/sub_holds_hist_off.jpg" /></a>
+        </div>
+        <div class="align hide_me" id="holds_link">
+            <a href="javascript:;"
+                onclick="switchSubPage('holds','main');"><img
+                src="/opac/skin/kcls/graphics/sub_holds_off.jpg" /></a>
+        </div>
+        <div class="align selected hide_me" id="holds_hist_label">
+            <img src="/opac/skin/kcls/graphics/sub_holds_hist_on.jpg" />
+        </div>	
+        <div style="clear:both;"></div>
+    </div>
+    <div class="header_middle">
+        <span id="acct_holds_header" style="float:left;">
+            Current Items on Hold
+        </span>
+        <span style="float:right;">
+            <a class="hide_me" href="javascript:;">Export List</a>
+        </span>
+    </div>
+    <div style="clear:both;"></div>
+    <div id='holds_main'>
+        <table cellpadding='0' cellspacing='0' border='0'
+            style="padding:8px 0px 6px 0px;">
+            <tr>
+                <td width="1">
+                    <select id="acct_holds_actions">
+                        <option id='myopac_holds_actions_none' value=''>
+                        -- &myopac.holds.actions; --
+                        </option>
+                        <option value='freeze'>
+                            &myopac.holds.freeze_selected;
+                        </option>
+                        <option value='thaw'>
+                            &myopac.holds.thaw_selected;
+                        </option>
+                        <option value='thaw_date'>
+                            &myopac.holds.thaw_date_selected;
+                        </option>
+                        <option value='cancel'>
+                            &myopac.holds.cancel_selected;
+                        </option>
+                    </select>
+                </td>
+                <td width="1" style="padding-left:9px;">
+                    <a href="javascript:;" onclick="myopacDoHoldAction();"><img
+                        alt="Save"
+                        src="/opac/skin/kcls/graphics/save-btn.png" /></a>
+                </td>
+                <td width="1" style="padding-left:5px;">
+                    <a href="javascript:;"
+                        onclick="alert('Suspend your hold for pick up at a later date. Edit individual items with the Edit link or check the Title box to select all, select action and Save.');"><img
+                        alt="Holds Help"
+                        src="/opac/skin/kcls/graphics/question-mark.png" /></a>
+                </td>
+                <td align="right">
+                    <select class="hide_me" id="holds_sort"
+                        onchange="sortHolds(this.options[this.selectedIndex].value);">
+                        <option value="">-- Sort By --</option>
+                        <option value="title">Title</option>
+                        <option value="pickup">PickUp Location</option>
+                        <option value="status">Status</option>
+                    </select>
+                </td>
+            </tr>
+        </table>
+        <table id="acct_holds_main_header" cellpadding='0' cellspacing='0'
+            border='0' width="100%">
+            <tr>
+                <td width="36" align="center">
+                    <input type="checkbox" id="check_all_holds"
+                        onclick="checkAll($('holds_temp_parent'), this.id);" />
+                </td>
+                <td width="138">
+                    <span title="Click to sort"
+                        onclick="sortHolds('title');" style="cursor:pointer;">
+                        Title
+                    </span>
+                </td>
+                <td width="123">
+                    <span title="Click to sort"
+                        onclick="sortHolds('author');"
+                        style="cursor:pointer;">Author</span>
+                </td>
+                <td width="64">
+                    <span title="Click to sort"
+                        onclick="sortHolds('format');"
+                        style="cursor:pointer;">Format</span>
+                </td>
+                <td width="136">
+                    <span title="Click to sort"
+                        onclick="sortHolds('pickup');"
+                        style="cursor:pointer;">Pickup Location</span>
+                </td>
+                <td width="104">Activate</td>
+                <td width="106">Cancel if not<br />filled by</td>
+                <td width="95">Active</td>
+                <td width="172">
+                    <span title="Click to sort"
+                        onclick="sortHolds('status');"
+                        style="cursor:pointer;">Status</span>
+                </td>
+            </tr>
+        </table>
+        <div class="hide_me">
+            <select id="hold_pickup_lib_temp" name="hold_pickup_lib_sel"
+                class="hide_me" style="width:125px;height:21px;"></select>
+        </div>
+
+        <table cellpadding='0' cellspacing='0' border='0' width="100%">
+            <tbody id="holds_temp_parent">
+                <tr id="acct_holds_temp" name="acct_holds_temp"
+                    class="acct_holds_temp">
+                    <td width="36" align="center" style="text-align:center;">
+                        <input type="checkbox" name="check_all_holds" />
+                    </td>
+                    <td width="138">
+                        <div style="margin-top:10px;margin-bottom:10px;">
+                            <a href="javascript:;" name="myopac_holds_title_link"></a>
+                        </div>
+                    </td>
+                    <td width="123">
+                        <div style="margin-top:10px;margin-bottom:10px;"
+                            name="myopac_holds_author"></div>
+                    </td>
+                    <td width="64">
+                        <div style="width:26px;height:23px;margin-top:6px;margin-bottom:6px;"
+                            name="myopac_holds_formats">
+                        </div>
+                    </td>
+                    <td width="136">
+                        <span name="hold_pickup_lib_span"></span>
+                        <span name="hold_pickup_lib"></span>
+                    </td>
+                    <td width="104">
+                        <input
+                            title="Enter a date (e.g. 10/21/2010)"
+                            class="hide_me" style="width:91px;"
+                            name="activate_box" type="text" />
+                            <span name="activate_date"></span>
+                    </td>
+                    <td width="106">
+                        <input title="Enter a date (e.g. 10/21/2010)"
+                            class="hide_me" style="width:91px;"
+                            name="hold_expires_box" type="text" />
+                            <span name="hold_expires"></span>
+                    </td>
+                    <td width="95">
+                        <select name="hold_active_sel"
+                            style="width:90px;" class="hide_me">
+                            <option value="f">Active</option>
+                            <option value="t">Suspended</option>
+                        </select>
+                        <span name="hold_active"></span>
+                    </td>
+                    <td width="110">
+                        <div name="acct_holds_status"
+                            style="margin-top:10px;margin-bottom:10px;">
+                            <span class="hide_me"
+                                name="hold_ready_expire"></span>
+                        </div>
+                    </td>
+                    <td width="62" align="right"
+                        style="text-align:right;padding-right:7px;">
+                        <a name="hold_edit_link" href="javascript:;">Edit</a>
+                        <a href="javascript:;" name="hold_save_link"
+                            class="hide_me">Save</a>
+                        <a href="javascript:;" name="hold_cancel_link"
+                            class="hide_me">Back</a>
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+    <div id='holds_hist_table' class="hide_me">testing...</div>
+
+    <span id='myopac.holds.cancel.confirm' class='hide_me'>&myopac.holds.cancel.confirm;</span>
+    <span id='myopac.holds.freeze.confirm' class='hide_me'>&myopac.holds.freeze.confirm;</span>
+    <span id='myopac.holds.thaw.confirm' class='hide_me'>&myopac.holds.thaw.confirm;</span>
+    <span id='myopac.holds.thaw_date.confirm' class='hide_me'>&myopac.holds.thaw_date.confirm;</span>
+    <span id='myopac.holds.freeze.select_thaw' class='hide_me'>&myopac.holds.freeze.select_thaw;</span>
+
+    <table width='100%' id='myopac_holds_processing' class='hide_me'>
+        <tr><td>&myopac.holds.processing;</td></tr>
+    </table>
+   
+    <span class='hide_me' id='myopac_holds_cancel_verify'>
+    	&myopac.holds.verify;
+    </span>
+</div>
+<div id='myopac_holds_thaw_date_form' class='hide_me'>
+    <div id='myopac_holds_freeze_select_thaw'>
+        &myopac.holds.freeze.select_thaw;
+    </div>
+    <p>
+        <input dojoType="dijit.form.DateTextBox" size='10' maxlength='10'
+            type='text' id='myopac_holds_thaw_date_input' />
+    </p>
+    <p>
+        <button onclick='myopacApplyThawDate();'>&common.submit;</button>
+    </p>
+</div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
new file mode 100644
index 0000000..b48e704
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/lists.tt2
@@ -0,0 +1,290 @@
+[%  WRAPPER "default/kcls-wire/parts/base.tt2" +
+        "default/kcls-wire/parts/myopac/base.tt2";
+    myopac_page = "lists"  %]
+<div
+    style="margin-top: 6px;margin-left:20px;width:250px;padding:5px;"
+    id="mylist_div">
+    <div style="padding-bottom: 7px;">
+        <h2 style="font-weight:normal;">Create new list</h2>
+        Enter the name of the new list:<br />
+        <input type="text" id="mylist_new" />
+    </div>
+    <table cellpadding="0" cellspacing="10" border="0">
+        <tr>
+            <td>
+                Share this list?
+                <a href="javascript:;"
+                    onclick="alert($('bb_publish_text').innerHTML);"><img
+                    alt="Sharing Help"
+                    src="/opac/skin/kcls/graphics/question-mark.png" /></a>
+            </td>
+            <td>
+                <input type="radio" value="0" name="shareList"
+                    id="shareListNo" checked="checked" />
+                <label for="shareListNo">No</label>
+                <br />
+                <input type="radio" value="1" name="shareList"
+                    id="shareListYes" />
+                    <label for="shareListYes">Yes</label>
+            </td>
+        </tr>
+    </table>
+    <a href="javascript:;"
+        onclick="if(addMyList()) {hideMe($('mylist_div'));unHideMe($('myopac_bookbag_div'));}"><img
+        alt="Submit" src="/opac/skin/kcls/graphics/btnSubmit.png" /></a>
+    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+    <a href="javascript:;"
+        onclick="hideMe($('mylist_div'));unHideMe($('myopac_bookbag_div'));"><img
+        alt="Cancel" src="/opac/skin/kcls/graphics/btnCancel.png" /></a>
+</div>
+<div id='myopac_bookbag_div' style="padding:5px;">
+    <div class="header_middle">
+        <span id="acct_holds_header" style="float:left;">My Lists</span>
+        <span style="float:right;">
+            <a class="hide_me" href="javascript:;">Export List</a>
+        </span>
+    </div>
+    <div style="float:right;width:85px;">
+        <div style="position:absolute">
+            <div style="position:relative;top:13px;">
+                <a href="javascript:;"
+                    style="position:relative;top:-3px;left:-5px;"
+                    onclick="alert('To take action on individual items, select item, choose action and Save.');"><img
+                    alt="Saving Help"
+                    src="/opac/skin/kcls/graphics/question-mark.png" /></a>
+                <a id='acct_lists_save' href="javascript:;"
+                    onclick="listSaveAction()"><img alt="Save"
+                    src="/opac/skin/kcls/graphics/save-btn.png" /></a>
+            </div>
+        </div>
+    </div>
+    <div style="clear:both;padding-top:10px;">
+        <a href="javascript:;"
+            onclick="hideMe($('myopac_bookbag_div'));unHideMe($('mylist_div'));">+ Add new list</a>
+    </div>
+    <div id="temp_wrapper">
+        <div id='acct_list_template2' class="hide_me">
+            <div style="width:100%">
+                <table cellpadding="0" cellspacing="0" border="0">
+                    <tr>
+                        <td style="font-weight:bold;padding-right:10px;" id='anon_list_name'>
+                            Temporary List
+                        </td>
+                        <td>
+                            <a href="javascript:;"
+                                onclick="alert('Items you selected from the search results screen.')"><img
+                                alt="Anonymous List Help"
+                                src="/opac/skin/kcls/graphics/question-mark.png" /></a>
+                        </td>
+                    </tr>
+                </table>
+                <div style="float:right;"></div>
+                <div style="clear:both;padding-bottom:5px;"></div>
+            </div>
+    
+            <table id="acct_list_header_anon" cellpadding='0' cellspacing='0' border='0'>
+                <tr>
+                    <td width="1%" style="padding-left:10px;">
+                        <input type="checkbox" id="check_all_list_anon"
+                            onclick="checkAll(this.parentNode.parentNode.parentNode.parentNode.parentNode, this, 'list_action_chbx');" />
+                    </td>
+                    <td width="98%" style="padding-left:5px;">Title</td>
+                    <td width="1%">
+                        <select style='width:175px;margin-right:11px;'
+                            name="list_actions" id="sel_all_list_anon">
+                            <option value="0">-- Actions for this list --</option>
+                            <option value="hold">Place Hold</option>
+                            <option value="remove">Remove Items</option>
+                        </select>
+                    </td>
+                </tr>
+            </table>
+            <table cellpadding='0' cellspacing='5' border='0'
+                width='91%' style='margin-left:5px;margin-top:5px;'>
+                <tbody id='anon_list_tbody'></tbody>
+            </table>
+            <br /><br />
+        </div>
+        <div id='acct_lists_prime'>
+            <div id='acct_list_template'>
+                <div style="width:100%">
+                    <div style="float:left;font-weight:bold;padding-top:5px;"
+                        name='list_name'></div>
+                    <div style="float:left;padding:5px 0px 0px 10px;">
+                        <a target='_blank' name='share_list_rss'
+                            class='hide_me'><img alt="RSS Feed" border="0"
+                            src="/opac/images/small-rss.png"
+                            title="You are sharing this list"/></a>
+                    </div>
+                    <div style="float:left;padding:5px 0px 0px 10px;">
+                        <a href="javascript:;" name="share_list_link">Share</a>
+                    </div>
+                    <div style="float:left;padding:5px 0px 0px 10px;">
+                        <a href="javascript:;" name="remove_list">Remove</a>
+                    </div>
+                    <div style="clear:both;padding-bottom:5px;"></div>
+                </div>
+                <table id="acct_list_header" cellpadding='0' cellspacing='0'
+                    border='0'>
+                    <tr>
+                        <td width="1%" style="padding-left:10px;">
+                            <input type="checkbox" id="check_all_list"
+                            onclick="checkAll(this.parentNode.parentNode.parentNode.parentNode.parentNode, this, 'list_action_chbx');" />
+                        </td>
+                        <td width="98%" style="padding-left:5px;">Title</td>
+                        <td width="1%">
+                            <select style='width:175px;margin-right:11px;' name="list_actions">
+                                <option value="0">-- Actions for this list --</option>
+                                <option value="hold">Place Hold</option>
+                                <option value="remove">Remove Items</option>
+                            </select>
+                        </td>
+                    </tr>
+                </table>
+                <table cellpadding='0' cellspacing='5' border='0'
+                    width='91%' style='margin-left:5px;margin-top:5px;'>
+                    <tbody name='list_tbody'></tbody>
+                </table>
+                <br /><br />
+            </div>
+        </div>
+    </div>
+    <div id='myopac_delete_bookbag_warn' class='hide_me'>
+        &myopac.delete.bookbag;
+    </div>
+    <div style='text-align: center; font-weight: bold;' 
+        class='hide_me' id='myopac_bookbags_none'>&myopac.no.bookbags;</div>
+    <table width='100%' class='data_grid data_grid_center hide_me'
+        id='myopac_bookbag_table'>
+        <thead>
+            <tr>
+                <td>&common.name;</td>
+                <td>&myopac.bookbag.items;</td>
+                <td>&myopac.bookbag.shared;</td>
+                <td>&myopac.bookbag.toggle;</td>
+                <td>&myopac.bookbag.delete;</td>
+            </tr>
+        </thead>
+        <tbody id='myopac_bookbag_tbody'>
+            <tr id='myopac_bookbag_tr'>
+                <td>
+                    <a href='javascript:void(0);' class='classic_link'
+                        name='myopac_expand_bookbag'> </a>
+                </td>
+                <td>
+                    <span name='myopac_bookbag_item_count'> </span>
+                    <span> &myopac.items;</span>
+                </td>
+                <td>
+                    <span name='myopac_bb_published_no' class='hide_me'>
+                        &common.no;
+                    </span>
+                    <span name='myopac_bb_published_yes' class='hide_me'>
+                        &common.yes;
+                    </span>
+                    <a name='myopac_bb_published_view'
+                        class='classic_link hide_me'>&myopac.view;</a>
+                    <a name='myopac_bb_published_atom'
+                        class='unadorned_link hide_me'>
+                        <img alt="RSS Feed" border="0"
+                        src="/opac/images/small-rss.png"
+                        title="&myopac.atom.feed;" />
+                    </a>
+                </td>
+                <td>
+                    <a name='myopac_bb_make_unpublished'
+                        class='classic_link hide_me'>&myopac.bookbag.hide;</a>
+                    <a name='myopac_bb_make_published'
+                        class='classic_link hide_me'>&myopac.bookbag.share;</a>
+                </td>
+                <td>
+                    <a class='classic_link' href='javascript:void(0);'
+                        name='myopac_container_delete'>&myopac.delete;</a>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+    <table width='100%' class='data_grid data_grid_center hide_me' style='margin-top: 10px;'>
+        <thead>
+            <tr><td>&myopac.bookbag.create;</td></tr>
+        </thead>
+        <tbody>
+            <tr>
+                <td> 
+                    <span style='padding-right: 5px;'>
+                        &myopac.bookbag.naming;
+                    </span>
+                    <input id='myopac_bookbag_new_name' type='text' /> 
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    <span style='padding: 5px;'>&myopac.bookbag.share;</span>
+                    <a class='classic_link'
+                        href='javascript:alert($("bb_publish_text").innerHTML);'><b>&common.help;</b></a>
+                    <span>&common.yes;</span>
+                    <input type='radio' name='bb_public' id='bb_public_yes'/>
+                    <span>&common.no;</span>
+                    <input type='radio' name='bb_public' id='bb_public_no' checked='checked'/>
+                    <input style='padding-left: 10px;'
+                        onclick='myOPACCreateBookbag();' 
+                        type='submit' value='&common.submit;' />
+                </td>
+            </tr>
+        </tbody>
+    </table>
+    <div style='width: 99%; text-align: center'>
+        <b id='myopac_bookbag_items_name'> </b>
+    </div>
+    <div class='hide_me'
+        style='width:100%; text-align:center; font-weight:700; margin-top:10px;'
+        id='myopac_bookbag_no_items'>
+        &myopac.bookbag.no.items;
+    </div>
+    <table width='100%' class='hide_me data_grid data_grid_center'
+        id='myopac_bookbag_items_table'>
+        <thead> 
+            <tr>
+                <td>&common.title;</td>
+                <td>&common.authors;</td>
+                <td>&myopac.bookbag.remove;</td>
+            </tr> 
+        </thead>
+        <tbody id='myopac_bookbag_items_tbody'>
+            <tr id='myopac_bookbag_items_row'>
+                <td>
+                    <a name='myopac_bookbag_items_title'
+                        class='classic_link'> </a>
+                </td>
+                <td name='myopac_bookbag_items_author'></td>
+                <td>
+                    <a name='myopac_bookbag_items_remove'
+                        class='classic_link'>&myopac.remove.link;</a>
+                </td>    
+            </tr>
+        </tbody>
+    </table>
+    <span id='bb_publish_text' class='hide_me'>&myopac.publish.text;</span>
+    <span id='myopac_remove_bb_item_confirm' class='hide_me'>
+        &myopac.item.confirm;
+    </span>
+    <span id='myopac_make_published_confirm' class='hide_me'>
+        &myopac.publish.confirm;
+    </span>
+    <span id='myopac_make_unpublished_confirm' class='hide_me'>
+        &myopac.unpublish.confirm;
+    </span>
+    <span id='myopac_bb_update_success' class='hide_me'>
+        &myopac.update.success;
+    </span>
+    <span id='bb_create_warning' class='hide_me'>
+        &myopac.create.warning;
+    </span>
+    <span id='myopac_bb_what_are' class='hide_me'>
+        &myopac.describe.bookbags;
+    </span>
+    <span class='hide_me' id='bb_update_success'>
+        &myopac.updated.success;
+    </span>
+</div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
new file mode 100644
index 0000000..ac08742
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/prefs.tt2
@@ -0,0 +1,814 @@
+[%  WRAPPER "default/kcls-wire/parts/base.tt2" +
+        "default/kcls-wire/parts/myopac/base.tt2";
+    myopac_page = "prefs"  %]
+    <div id='myopac_prefs_div'>
+        <div id="acct_prefs_tabs"
+             style="padding-bottom: 12px;color:#666;">
+            <div style="float:left;">
+                <div class="align selected"
+                     id="prefs_info_lbl"><img src=
+                     "/opac/skin/kcls/graphics/sub_prefs_info_on.jpg" /></div>
+
+                <div class="align hide_me"
+                     id="prefs_info_link">
+                    <a href="javascript:;"
+                         onclick="switchSubPage('prefs','info')"><img src=
+                         "/opac/skin/kcls/graphics/sub_prefs_info_off.jpg" /></a>
+                </div>
+
+                <div class="align"
+                     id="prefs_notify_link">
+                    <a href="javascript:;"
+                         onclick="switchSubPage('prefs','notify')"><img src=
+                         "/opac/skin/kcls/graphics/sub_prefs_notify_off.jpg" /></a>
+                </div>
+
+                <div class="align selected hide_me"
+                     id="prefs_notify_lbl"><img src=
+                     "/opac/skin/kcls/graphics/sub_prefs_notify_on.jpg" /></div>
+
+                <div class="align"
+                     id="prefs_search_link">
+                    <a href="javascript:;"
+                         onclick="switchSubPage('prefs','search')"><img src=
+                         "/opac/skin/kcls/graphics/sub_prefs_search_off.jpg" /></a>
+                </div>
+
+                <div class="align selected hide_me"
+                     id="prefs_search_lbl"><img src=
+                     "/opac/skin/kcls/graphics/sub_prefs_search_on.jpg" /></div>
+            </div>
+
+            <div style="float:right;width:65px;">
+                <div style="position:absolute">
+                    <div style="position:relative;top:75px;">
+                        <a id='acct_prefs_save'
+                             class='hide_me'
+                             href="javascript:;"
+                             onclick="myOPACSavePrefs()"><img alt="Save"
+                             src="/opac/skin/kcls/graphics/save-btn.png" /></a>
+                    </div>
+                </div>
+            </div>
+
+            <div style="clear:both;"></div>
+        </div>
+
+        <div class="header_middle">
+            <span id="acct_prefs_header"
+                 style="float:left;">Account Information and Preferences</span>
+                 <span style="float:right;"><a class="hide_me"
+               href="javascript:;"
+               onclick="fadeOut(this);">Export List</a></span>
+        </div>
+
+        <div style="clear:both;height:10px;"></div>
+
+        <table width='100%'
+               class="hide_me"
+               id="acct_search_main">
+            <tbody id='myopac_prefs_tbody'>
+                <tr id='myopac_prefs_loading'>
+                    <td colspan='3'><b>&myopac.loading;</b></td>
+                </tr>
+
+                <tr id='myopac_prefs_row'>
+                    <td width='20%'>&myopac.prefs.hits;</td>
+
+                    <td>
+                        <div style="position:absolute">
+                            <div style="position:relative;top:0px;left:55px;">
+                                <a href="javascript:;"
+                                     onclick=
+                                     "alert('Number of search results to display per page. For slower connections, choose fewer hits per page');">
+                                <img alt="Search Hits Help"
+                                     src=
+                                     "/opac/skin/kcls/graphics/question-mark.png" /></a>
+                            </div>
+                        </div><select id='prefs_hits_per'
+                            style="position:relative;z-index:100;">
+                            <option value='5'>
+                                5
+                            </option>
+
+                            <option value='8'>
+                                8
+                            </option>
+
+                            <option value='10'>
+                                10
+                            </option>
+
+                            <option value='15'>
+                                15
+                            </option>
+
+                            <option value='20'>
+                                20
+                            </option>
+
+                            <option value='25'>
+                                25
+                            </option>
+
+                            <option value='50'>
+                                50
+                            </option>
+                        </select>
+                    </td>
+                </tr>
+
+                <tr>
+                    <td colspan="2"><label for="circHistStart">Keep history of
+                    checked out items?</label> <input type="checkbox"
+                           id="circHistStart" /></td>
+                </tr><!-- FONT size preference -->
+
+                <tr class="hide_me">
+                    <td>&myopac.prefs.font;</td>
+
+                    <td><select id='prefs_def_font'>
+                        <option value='regular'>
+                            &myopac.prefs.font.regular;
+                        </option>
+
+                        <option value='large'>
+                            &myopac.prefs.font.large;
+                        </option>
+                    </select></td>
+                </tr>
+
+                <tr class="hide_me">
+                    <td>&myopac.prefs.search.location;</td>
+                    <td>
+                        <div style='margin-bottom: 5px;'>
+                            <input type='checkbox'
+                                 id='myopac_pref_home_lib'
+                                 onclick='if(this.checked) $("prefs_def_location").disabled=true; else $("prefs_def_location").disabled=false;' />
+                                 &myopac.prefs.search.home;
+                        </div>
+                        <select id='prefs_def_location'></select>
+                    </td>
+                </tr>
+
+                <tr class="hide_me">
+                    <td>&myopac.prefs.search.range;</td>
+
+                    <td><select id='prefs_def_range'>
+                        </select></td>
+                </tr>
+            </tbody>
+        </table><a href=
+        "http://www.kcls.org/usingthelibrary/catalog_help/library_elf.cfm"><u>Try
+        Library Elf-to manage library materials!</u></a>
+
+        <table class="hide_me"
+               id="acct_notify_main">
+            <tbody>
+                <tr class="hide_me">
+                    <td><span>&myopac.prefs.holds.notify;</span> <a class=
+                    'classic_link'
+                       href='javascript:void(0);'
+                       onclick=
+                       'alert($("myopac_pref_hold_notify_alert").innerHTML);'>&common.help;</a></td>
+
+                    <td style="padding-left:15px;"><select id=
+                    'prefs_hold_notify'>
+                        <option value='phone:email'
+                                selected='selected'>
+                            &myopac.prefs.holds.both;
+                        </option>
+
+                        <option value='phone'>
+                            &myopac.prefs.holds.phone;
+                        </option>
+
+                        <option value='email'>
+                            &myopac.prefs.holds.email;
+                        </option>
+                    </select></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Pick Up Notice for
+                    Holds</strong><br />
+                    <input type="checkbox"
+                           id="opac.hold_notify.email"
+                           name="opac.hold_notify.email" /> <label for=
+                           "opac.hold_notify.email">Email</label><br />
+                    <input type="checkbox"
+                           id="opac.hold_notify.phone"
+                           name="opac.hold_notify.phone" /> <label for=
+                           "opac.hold_notify.phone">Phone</label>
+                           <b>(Temporarily phone notification will generate a
+                           mailed paper notice.)</b></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Expire Notice for
+                    Holds</strong><br />
+                    <input type="checkbox"
+                           id="notification.hold.expire.email"
+                           name="notification.hold.expire.email" /> <label for=
+                           "notification.hold.expire.email">Email</label></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Cancel Notice for
+                    Holds</strong><br />
+                    <input type="checkbox"
+                           id="notification.hold.cancel.email"
+                           name="notification.hold.cancel.email" /> <label for=
+                           "notification.hold.cancel.email">Email</label></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Overdue First
+                    Notice</strong><br />
+                    <input type="checkbox"
+                           id="notification.overdue.first.email"
+                           name="notification.overdue.first.email" />
+                           <label for=
+                           "notification.overdue.first.email">Email</label><br />
+                    <input type="checkbox"
+                           id="notification.overdue.first.phone"
+                           name="notification.overdue.first.phone" />
+                           <label for=
+                           "notification.overdue.first.phone">Phone</label>
+                           <b>(Temporarily phone notification will generate a
+                           mailed paper notice.)</b></td>
+                </tr>
+
+                <tr>
+                    <td style="padding-top:10px;"><strong>Courtesy
+                    Notice</strong><br />
+                    <input type="checkbox"
+                           id="notification.predue.email"
+                           name="notification.predue.email" /> <label for=
+                           "notification.predue.email">Email</label><br /></td>
+                </tr>
+            </tbody>
+        </table>
+
+        <div id="acct_info_main">
+            <div id='myopac.expired.alert'
+                 class='hide_me'
+                 style='margin-bottom: 20px;'>
+                <table class='data_grid'
+                       width='100%'>
+                    <tbody>
+                        <tr>
+                            <td width='100%'
+                                style='color:red;'>
+                                &myopac.summary.expired;</td>
+                        </tr>
+                    </tbody>
+                </table>
+            </div>
+
+            <div id='myopac.notes.div'
+                 class='hide_me'>
+                <table class='data_grid'
+                       width='100%'>
+                    <thead>
+                        <tr>
+                            <td colspan='2'>
+                            <b>&myopac.summary.notes;</b></td>
+                        </tr>
+                    </thead>
+
+                    <tbody id='myopac.notes.tbody'>
+                        <tr id='myopac.notes.tr'>
+                            <td><b name='title'></b> : <span name=
+                            'value'></span></td>
+                        </tr>
+                    </tbody>
+                </table><br />
+            </div>
+
+            <table width='70%'
+                   class='light_border data_grid'>
+                <tbody id='myopac_summary_tbody'>
+                    <tr>
+                        <td width='30%'
+                            class='color_4 light_border'>&common.name;</td>
+
+                        <td class='light_border'><span id=
+                        'myopac_summary_prefix'
+                              style='padding-right: 5px;'></span> <span id=
+                              'myopac_summary_first'
+                              style='padding-right: 5px;'></span> <span id=
+                              'myopac_summary_middle'
+                              style='padding-right: 5px;'></span> <span id=
+                              'myopac_summary_last'
+                              style='padding-right: 5px;'></span> <span id=
+                              'myopac_summary_suffix'></span></td>
+
+                        <td></td>
+                    </tr>
+
+                    <tr>
+                        <td class='color_4 light_border'>
+                        &myopac.summary.phone.day;</td>
+
+                        <td class='light_border'
+                            id='myopac_summary_dayphone'></td>
+
+                        <td class='light_border'><a href='javascript:void(0);'
+                           class="hide_me"
+                           onclick=
+                           'unHideMe($("myopac_update_phone1_row"));$("myopac_new_phone1").focus();'
+                           id='myopac_summary_phone1_change'
+                           style=
+                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                    </tr>
+
+                    <tr id='myopac_update_phone1_row'
+                        class='hide_me'>
+                        <td class='myopac_update_cell'
+                            colspan='3'><span class='myopac_update_span'>Enter
+                            New &myopac.summary.phone.day;:</span>
+                            <input type='text'
+                               size='24'
+                               id='myopac_new_phone1'
+                               onkeydown=
+                               'if(userPressedEnter(event)) myOPACUpdatePhone("1");' />
+                         <span class='myopac_update_span'><button onclick=
+                        'myOPACUpdatePhone("1");'><span class=
+                        'myopac_update_span'>&common.submit;</span></button></span>
+                        <span class='myopac_update_span'><button onclick=
+                        'hideMe($("myopac_update_phone1_row"));'><span class=
+                        'myopac_update_span'>&common.cancel;</span></button></span></td>
+                    </tr>
+
+                    <tr>
+                        <td class='color_4 light_border'>
+                        &myopac.summary.phone.evening;</td>
+
+                        <td class='light_border'
+                            id='myopac_summary_eveningphone'></td>
+
+                        <td class='light_border'><a href='javascript:void(0);'
+                           class="hide_me"
+                           onclick=
+                           'unHideMe($("myopac_update_phone2_row"));$("myopac_new_phone2").focus();'
+                           id='myopac_summary_phone2_change'
+                           style=
+                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                    </tr>
+
+                    <tr id='myopac_update_phone2_row'
+                        class='hide_me'>
+                        <td class='myopac_update_cell'
+                            colspan='3'><span class='myopac_update_span'>New
+                            &myopac.summary.phone.evening;:</span>
+                            <input type='text'
+                               size='24'
+                               id='myopac_new_phone2'
+                               onkeydown=
+                               'if(userPressedEnter(event)) myOPACUpdatePhone("2");' />
+                         <span class='myopac_update_span'><button onclick=
+                        'myOPACUpdatePhone("2");'><span class=
+                        'myopac_update_span'>&common.submit;</span></button></span>
+                        <span class='myopac_update_span'><button onclick=
+                        'hideMe($("myopac_update_phone2_row"));'><span class=
+                        'myopac_update_span'>&common.cancel;</span></button></span></td>
+                    </tr>
+
+                    <tr>
+                        <td class='color_4 light_border'>
+                        &myopac.summary.phone.other;</td>
+
+                        <td class='light_border'
+                            id='myopac_summary_otherphone'></td>
+
+                        <td class='light_border'><a href='javascript:void(0);'
+                           class="hide_me"
+                           onclick=
+                           'unHideMe($("myopac_update_phone3_row"));$("myopac_new_phone3").focus();'
+                           id='myopac_summary_phone3_change'
+                           style=
+                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                    </tr>
+
+                    <tr id='myopac_update_phone3_row'
+                        class='hide_me'>
+                        <td class='myopac_update_cell'
+                            colspan='3'><span class='myopac_update_span'>Enter
+                            New &myopac.summary.phone.other;:</span>
+                            <input type='text'
+                               size='24'
+                               id='myopac_new_phone3'
+                               onkeydown=
+                               'if(userPressedEnter(event)) myOPACUpdatePhone("3");' />
+                         <span class='myopac_update_span'><button onclick=
+                        'myOPACUpdatePhone("3");'><span class=
+                        'myopac_update_span'>&common.submit;</span></button></span>
+                        <span class='myopac_update_span'><button onclick=
+                        'hideMe($("myopac_update_phone3_row"));'><span class=
+                        'myopac_update_span'>&common.cancel;</span></button></span></td>
+                    </tr>
+
+                    <tr>
+                        <td class='color_4 light_border'>
+                            <div style="position:absolute">
+                                <div style=
+                                "position:relative;left:70px;top:-3px;">
+                                    <a href="javascript:;"
+                                         onclick=
+                                         "alert('Create a Username as an option to your barcode to log into My Account.\nExamples: ilovebooks, johndoe1');">
+                                    <img alt="Username Help"
+                                         src=
+                                         "/opac/skin/kcls/graphics/question-mark.png" /></a>
+                                </div>
+                            </div>&common.username;
+                        </td>
+
+                        <td class='light_border'
+                            id='myopac_summary_username'></td>
+
+                        <td class='light_border'><a href='javascript:void(0);'
+                           onclick=
+                           'unHideMe($("myopac_update_username_row"));$("myopac_new_username").focus();'
+                           class="hide_me"
+                           id='myopac_summary_username_change'
+                           style=
+                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                    </tr>
+
+                    <tr id='myopac_update_username_row'
+                        class='hide_me'>
+                        <td class='myopac_update_cell'
+                            colspan='3'><span class=
+                            'myopac_update_span'>&myopac.summary.username.enter;</span>
+                            <input type='text'
+                               size='24'
+                               id='myopac_new_username'
+                               onkeydown=
+                               'if(userPressedEnter(event)) myOPACUpdateUsername();' />
+                         <span class='myopac_update_span'><button onclick=
+                        'myOPACUpdateUsername();'><span class=
+                        'myopac_update_span'>&common.submit;</span></button></span>
+                        <span class='myopac_update_span'><button onclick=
+                        'hideMe($("myopac_update_username_row"));'><span class=
+                        'myopac_update_span'>&common.cancel;</span></button></span></td>
+                    </tr>
+                    <tr>
+                        <td class='color_4 light_border'>
+                        &common.password;</td>
+                        <td class='light_border'
+                            id='myopac_summary_password'>
+                            &myopac.summary.password.text;</td>
+                        <td class='light_border'><a href='javascript:void(0);'
+                           class="hide_me"
+                           onclick=
+                           'unHideMe($("myopac_update_password_row"));$("myopac_current_password").focus();'
+                           id='myopac_summary_password_change'
+                           style=
+                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                    </tr>
+                    <tr id='myopac_update_password_row'
+                        class='hide_me'>
+                        <td class='myopac_update_cell'
+                            colspan='3'>
+                            <table>
+                                <tbody>
+                                    <tr>
+                                        <td>
+                                            <span class= 'myopac_update_span'>
+                                                &myopac.summary.password.current;
+                                            </span>
+                                        </td>
+
+                                        <td>
+                                            <input type='password'
+                                               size='24'
+                                               id='myopac_current_password'
+                                               onkeydown='if(userPressedEnter(event)) myOPACUpdatePassword();' />
+                                           </td>
+                                    </tr>
+                                    <tr>
+                                        <td><span class=
+                                        'myopac_update_span'>&myopac.summary.password.new;</span></td>
+
+                                        <td><input type='password'
+                                               size='24'
+                                               id='myopac_new_password'
+                                               onkeydown=
+                                               'if(userPressedEnter(event)) myOPACUpdatePassword();' /></td>
+                                    </tr>
+
+                                    <tr>
+                                        <td><span class=
+                                        'myopac_update_span'>&myopac.summary.password.reenter;</span></td>
+
+                                        <td><input type='password'
+                                               size='24'
+                                               id='myopac_new_password2'
+                                               onkeydown=
+                                               'if(userPressedEnter(event)) myOPACUpdatePassword();' /></td>
+                                    </tr>
+                                </tbody>
+                            </table><span class=
+                            'myopac_update_span'><button onclick=
+                            'myOPACUpdatePassword();'><span class=
+                            'myopac_update_span'>&common.submit;</span></button></span>
+                            <span class='myopac_update_span'><button onclick=
+                            'hideMe($("myopac_update_password_row"));'><span class='myopac_update_span'>
+                            &common.cancel;</span></button></span>
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td class='color_4 light_border'>
+                        &myopac.summary.email;</td>
+
+                        <td class='light_border'
+                            id='myopac_summary_email'></td>
+
+                        <td class='light_border'><a href='javascript:void(0);'
+                           class="hide_me"
+                           onclick=
+                           'unHideMe($("myopac_update_email_row"));$("myopac_new_email").focus();'
+                           id='myopac_summary_email_change'
+                           style=
+                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                    </tr>
+
+                    <tr id='myopac_update_email_row'
+                        class='hide_me'>
+                        <td class='myopac_update_cell'
+                            colspan='3'><span class=
+                            'myopac_update_span'>&myopac.summary.email.new;</span>
+                            <input type='text'
+                               size='24'
+                               id='myopac_new_email'
+                               onkeydown=
+                               'if(userPressedEnter(event)) myOPACUpdateEmail();' />
+                               <span class='myopac_update_span'><button onclick=
+                               'myOPACUpdateEmail();'><span class=
+                               'myopac_update_span'>&common.submit;</span></button></span>
+                               <span class='myopac_update_span'><button onclick=
+                               'hideMe($("myopac_update_email_row"));'><span class=
+                               'myopac_update_span'>&common.cancel;</span></button></span></td>
+                    </tr>
+
+                    <tr class="hide_me">
+                        <td class='color_4 light_border'>
+                        &myopac.summary.id.primary;</td>
+
+                        <td class='light_border'
+                            id='myopac_summary_ident1'></td>
+
+                        <td></td>
+                    </tr>
+
+                    <tr>
+                        <td class='color_4 light_border'>
+                        &myopac.summary.barcode;</td>
+
+                        <td class='light_border'
+                            id='myopac_summary_barcode'></td>
+
+                        <td></td>
+                    </tr>
+
+                    <tr>
+                        <td class='color_4 light_border'>
+                        &myopac.summary.home;</td>
+                        <td class='light_border'
+                            id='myopac_summary_homelib'></td>
+                        <td><a href='javascript:void(0);'
+                           class="hide_me"
+                           onclick=
+                           'unHideMe($("myopac_update_home_row"));$("myopac_new_home").focus();'
+                           id='myopac_summary_home_change'
+                           style=
+                           'text-decoration: underline;'>&myopac.summary.change;</a></td>
+                    </tr>
+                    <tr id='myopac_update_home_row'
+                        class='hide_me'>
+                        <td class='myopac_update_cell'
+                            colspan='3'>
+                            <span class='myopac_update_span'>
+                                New home library:</span>
+                            <select id='myopac_new_home'>
+                            </select>
+                            <span class='myopac_update_span'>
+                                <button onclick= 'myOPACUpdateHomeOU();'>
+                                    <span class= 'myopac_update_span'>
+                                        &common.submit;</span>
+                                </button>
+                            </span>
+                            <span class='myopac_update_span'>
+                                <button onclick= 'hideMe($("myopac_update_home_row"));'>
+                                    <span class= 'myopac_update_span'>
+                                        &common.cancel;</span>
+                                </button>
+                            </span>
+                        </td>
+                    </tr>
+                    <tr class="hide_me">
+                        <td class='color_4 light_border'>
+                            &myopac.summary.genesis;
+                        </td>
+                        <td class='light_border'
+                            id='myopac_summary_create_date'></td>
+                        <td></td>
+                    </tr>
+                </tbody>
+            </table><br />
+            <hr style="border-bottom:none;*height:0px;" color="#DCDBDB" />
+            <br />
+
+            <table width='100%' class='light_border data_grid'>
+                <thead>
+                    <tr>
+                        <td>&myopac.summary.addresses;</td>
+
+                        <td id='myopac_pending_addr_td' class='hide_me'>
+                            <table cellpadding="0" cellspacing="0" border="0">
+                                <tr>
+                                    <td>&myopac.summary.addresses.pending;</td>
+
+                                    <td>
+                                        <a href="javascript:;"
+                                            onclick="alert('Address changes will be authenticated by staff.');"><img
+                                            alt="Address Help"
+                                            src="/opac/skin/kcls/graphics/question-mark.png" /></a>
+                                    </td>
+                                </tr>
+                            </table>
+                        </td>
+                    </tr>
+                </thead>
+                <tbody id='myopac_addr_tbody'>
+                    <tr id='myopac_addr_row' class='light_border'>
+                        <td>
+                            <table>
+                                <tr>
+                                    <td>&myopac.summary.address.type;</td>
+                                    <td name='myopac_addr_type'></td>
+                                </tr>
+
+                                <tr>
+                                    <td>&myopac.summary.address.street;</td>
+                                    <td name='myopac_addr_street'></td>
+                                </tr>
+                                <tr>
+                                    <td>&myopac.summary.address.street;</td>
+                                    <td name='myopac_addr_street2'></td>
+                                </tr>
+
+                                <tr>
+                                    <td>&myopac.summary.address.city;</td>
+                                    <td name='myopac_addr_city'></td>
+                                </tr>
+
+                                <tr>
+                                    <td>&myopac.summary.address.county;</td>
+                                    <td name='myopac_addr_county'></td>
+                                </tr>
+
+                                <tr>
+                                    <td>&myopac.summary.address.state;</td>
+                                    <td name='myopac_addr_state'></td>
+                                </tr>
+
+                                <tr>
+                                    <td>&myopac.summary.address.country;</td>
+                                    <td name='myopac_addr_country'></td>
+                                </tr>
+
+                                <tr>
+                                    <td>&myopac.summary.address.zip;</td>
+                                    <td name='myopac_addr_zip'></td>
+                                </tr>
+                                <tr>
+                                    <td name='myopac_addr_edit_td'
+                                        colspan='2' class='hide_me'>
+                                        <a class='classic_link'
+                                            name='myopac_addr_edit_link'
+                                            href='javascript:void(0);'>Edit Address</a>
+                                    </td>
+                                </tr>
+                            </table>
+                        </td>
+                        <td class='hide_me'
+                            name='myopac_pending_addr_td'>
+                            <table>
+                                <tr>
+                                    <td>&myopac.summary.address.type;</td>
+
+                                    <td><input name=
+                                    'myopac_pending_addr_type' /></td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                    &myopac.summary.address.street;</td>
+
+                                    <td><input name=
+                                    'myopac_pending_addr_street' /></td>
+                                </tr>
+                                <tr>
+                                    <td>&myopac.summary.address.street;</td>
+                                    <td>
+                                        <input name='myopac_pending_addr_street2' />
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>&myopac.summary.address.city;</td>
+                                    <td>
+                                        <input name='myopac_pending_addr_city' />
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>&myopac.summary.address.county;</td>
+
+                                    <td>
+                                        <input name='myopac_pending_addr_county' />
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>&myopac.summary.address.state;</td>
+                                    <td>
+                                        <input name='myopac_pending_addr_state' />
+                                    </td>
+                                </tr>
+
+                                <tr>
+                                    <td>&myopac.summary.address.country;</td>
+
+                                    <td>
+                                        <input name='myopac_pending_addr_country' />
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>&myopac.summary.address.zip;</td>
+                                    <td><input name=
+                                    'myopac_pending_addr_zip' /></td>
+                                </tr>
+                                <tr>
+                                    <td name='myopac_addr_edit_td' colspan='2'>
+                                        <a class='classic_link'
+                                            name='myopac_pending_addr_edit_link'
+                                            href='javascript:void(0);'>Save Changes</a>
+                                        <a style='padding-left:10px;'
+                                            class='classic_link'
+                                            name='myopac_pending_addr_del_link'
+                                            href='javascript:void(0);'>Discard Pending Address</a>
+                                    </td>
+                                </tr>
+                            </table>
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+        </div>
+        <div class='hide_me' id='myopac_username_error'>
+            &myopac.summary.username.error;
+        </div>
+        <div class='hide_me' id='myopac_username_dup'>
+            &myopac.summary.username.dup;
+        </div>
+        <div class='hide_me' id='myopac_username_success'>
+            &myopac.summary.username.success;
+        </div>
+        <div class='hide_me' id='myopac_username_failure'>
+            &myopac.summary.username.failure;
+        </div>
+        <div class='hide_me' id='myopac_email_error'>
+            &myopac.summary.email.error;
+        </div>
+        <div class='hide_me' id='myopac_email_success'>
+            &myopac.summary.email.success;
+        </div>
+        <div class='hide_me' id='myopac_email_failure'>
+            &myopac.summary.email.failed;
+        </div>
+        <div class='hide_me' id='myopac_password_error'>
+            &myopac.summary.password.error;
+        </div>
+        <div class='hide_me' id='myopac_password_success'>
+            &myopac.summary.password.success;
+        </div>
+        <div class='hide_me' id='myopac_password_failure'>
+            &myopac.summary.password.failure;
+        </div>
+        <span class='hide_me' id= 'myopac_invalid_username'>
+            &myopac.summary.username.invalid;
+        </span>
+        <span class='hide_me' id='myopac_addr_changes_saved'>
+            Address Saved
+        </span>
+        <div class='hide_me' id='prefs_update_success'>
+            &myopac.prefs.save.success;
+        </div>
+        <div class='hide_me' id='prefs_update_failure'>
+            &myopac.prefs.save.failed;
+        </div>
+        <span class='hide_me' id='myopac_pref_hold_notify_alert'>
+            &myopac.prefs.help;
+        </span>
+    </div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
index 8219768..fdc29ce 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
@@ -16,7 +16,7 @@
                 [%- FOREACH page IN myopac_pages;
                     IF page.url == myopac_page;
                         cls_which = "on";
-                        ctx.page_title = page.name;
+                        ctx.page_title = "Your Account - " _ page.name;
                     ELSE;
                         cls_which = "off";
                     END -%]

commit 2a86b6166a88bb7ad9cfda535b400d8543d5348d
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Feb 2 18:04:57 2011 -0500

    myopac circs page

diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2
new file mode 100644
index 0000000..c793642
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/circs.tt2
@@ -0,0 +1,200 @@
+[%  WRAPPER "default/kcls-wire/parts/base.tt2" +
+        "default/kcls-wire/parts/myopac/base.tt2";
+    myopac_page = "circs"  %]
+<div id='myopac_checked_div' style="padding:0px;">
+    <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;">
+        <div class="align selected" id="checked_label">
+            <img src="/opac/skin/kcls/graphics/sub_checked_out_on.jpg" />
+        </div>
+        <div class="align" id="checked_hist_link">
+            <a class="" href="javascript:;"
+                onclick="switchSubPage('checked','hist')"><img
+                src="/opac/skin/kcls/graphics/sub_checked_hist_off.jpg" /></a>
+        </div>
+        <div class="align hide_me" id="checked_link">
+            <a href="javascript:;" onclick="switchSubPage('checked','main')">
+                <img src="/opac/skin/kcls/graphics/sub_checked_out_off.jpg" />
+            </a>
+        </div>
+        <div class="align selected hide_me" id="checked_hist_label">
+            <img src="/opac/skin/kcls/graphics/sub_checked_hist_on.jpg" />
+        </div>    
+        <div style="clear:both;"></div>
+    </div>
+    
+    <div class="header_middle">
+        <span id="acct_checked_header" style="float:left;">
+            Current Items Checked Out
+        </span>
+        <span style="float:right;">
+            <a class="hide_me" href="javascript:;">Export List</a>
+        </span>
+    </div>
+    <div style="clear:both;"></div>
+    <div id='checked_main'>
+        <table cellpadding='0' cellspacing='0' border='0'
+            style="padding:8px 0px 6px 0px;">
+            <tr>
+                <td>
+                    <a href="javascript:;"
+                        onclick="myOPACRenewSelected();">Renew
+                        Selected Titles</a>
+                </td>
+                <td style="padding-left:9px;">
+                    <a class="hide_me" href="javascript:;"><img
+                        alt="Save"
+                        src="/opac/skin/kcls/graphics/save-btn.png" /></a>
+                </td>
+                <td style="padding-left:5px;">
+                    <a href="javascript:;"
+                        onclick="alert('To Renew an individual title, select box and click Renew Selected Titles');"><img
+                        alt="Renewing Help"
+                        src="/opac/skin/kcls/graphics/question-mark.png" /></a>
+                </td>
+            </tr>
+        </table>
+        <table id="acct_checked_main_header" cellpadding='0' cellspacing='0'
+            border='0'>
+            <tr>
+                <td width="1%" style="padding-left:10px;">
+                    <input type="checkbox" id="check_all_checked"
+                    onclick="checkAll($('checked_temp_parent'), this.id);" />
+                </td>
+                <td width="40%" style="padding-left:5px;">
+                    <span title="Click to sort"
+                        onclick="sortChecked('title');" style="cursor:pointer;">
+                        Title
+                    </span> /
+                    <span title="Click to sort"
+                        onclick="sortChecked('author');" style="cursor:pointer;">
+                        Author
+                    </span>
+                </td>
+                <td width="8%" style="padding-right:5px;" align="center">
+                    <span title="Click to sort"
+                        onclick="sortChecked('renews');"
+                        style="cursor:pointer;">
+                        Renews<br />Left
+                    </span>
+                </td>
+                <td width="13%" style="padding-left:5px;">
+                    <span title="Click to sort"
+                        onclick="sortChecked('due');"
+                        style="cursor:pointer;">Due Date
+                    </span>
+                </td>
+                <td width="16%">
+                    <span title="Click to sort"
+                        onclick="sortChecked('barcode');"
+                        style="cursor:pointer;">barcode</span>
+                </td>
+                <td width="22%">
+                    <span title="Click to sort" onclick="sortChecked('cn');"
+                        style="cursor:pointer;">call number</span>
+                </td>
+            </tr>
+        </table>
+   
+        <div id="checked_temp_parent">
+            <div id="acct_checked_temp">
+                <table cellpadding='0' cellspacing='0' border='0'
+                    style="margin-top:5px;">
+                    <tr>
+                        <td width="1%" style="padding-left:10px;" valign="top">
+                            <input type="checkbox" name="check_all_checked" />
+                        </td>
+                        <td width="40%"
+                            style="padding-left:5px;padding-bottom:10px;"
+                            name="author">
+                            <a href="javascript:;" name="title"></a>
+                        </td>
+                        <td width="8%" name="renewals" align="center"></td>
+                        <td width="13%" style="padding-left:5px;"
+                            name="due_date"></td>
+                        <td width="16%" name="barcode"></td>
+                        <td width="22%" name="call_number"></td>
+                    </tr>
+                </table>
+            </div>
+        </div>
+    </div>
+    <div id='checked_hist' class="hide_me" style="padding-top:8px;">
+        <table id="acct_checked_hist_header" cellpadding='0' cellspacing='0'
+            border='0' width='100%'>
+            <tr>
+                <td width="45%" style="padding-left:15px;">
+                    <span title="Click to sort"
+                        onclick="sortCheckedHist('title');"
+                        style="cursor:pointer;">Title</span> /
+                    <span title="Click to sort"
+                        onclick="sortCheckedHist('author');"
+                        style="cursor:pointer;">Author</span>
+                </td>
+                <td width="22%"
+                    style="white-space:nowrap;padding-left:5px;">
+                    <span title="Click to sort"
+                        onclick="sortCheckedHist('cn');"
+                        style="cursor:pointer;">Call Number</span>
+                </td>
+                <td width="11%">
+                    <span title="Click to sort"
+                        onclick="sortCheckedHist('checkout');"
+                        style="cursor:pointer;">Checkout</span>
+                </td>
+                <td width="11%">
+                    <span title="Click to sort"
+                        onclick="sortCheckedHist('due');"
+                        style="cursor:pointer;">Due Date</span>
+                </td>
+                <td width="11%">
+                    <span title="Click to sort"
+                        onclick="sortCheckedHist('returned');"
+                        style="cursor:pointer;">Returned</span>
+                </td>
+            </tr>
+        </table>
+        <table cellpadding='0' cellspacing='0' border='0'
+            style="margin-top:5px;" width="100%">
+            <tbody id="acct_checked_hist_parent">
+                <tr id="acct_checked_hist_temp">
+                    <td width="45%"
+                        style="padding-left:15px;padding-bottom:10px;">
+                        <a href="javascript:;" name="title"></a> /
+                        <span name="author"></span>
+                    </td>
+                    <td width="22%" style="padding-left:5px;"
+                        name="call_number"></td>
+                    <td width="11%" name="checkout"></td>
+                    <td width="11%" name="due_date"></td>
+                    <td width="11%" name="returned"
+                        nowrap="nowrap" style="white-space:nowrap;"></td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+    <div id='non_cat_circs_div' class='hide_me'>
+        <br/>
+        <div style='text-align: center'><b>&myopac.common.other.circ;</b></div>
+        <table class='data_grid' width='100%'>
+            <thead>
+                <tr>
+                    <td>&myopac.checked.circ.lib;</td>
+                    <td>&myopac.checked.item.type;</td>
+                    <td>&myopac.checked.circ.time;</td>
+                </tr>
+            </thead>
+            <tbody id='non_cat_circs_tbody'>
+                <tr id='non_cat_circs_row'>
+                    <td name='circ_lib'/>
+                    <td name='item_type'/>
+                    <td name='circ_time'/>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+    <div id='myopac_renew_success' class='hide_me'>&myopac.checked.renew.success;</div>
+    <span class='hide_me' id='myopac_renew_confirm'>&myopac.checked.renew.confirm;</span>
+    <span class='hide_me' id='myopac_renew_fail'>&myopac.checked.renew.fail;</span>
+   <span class='hide_me' id='myopac_renew_fail2'>&myopac.checked.renew.fail2;</span>
+</div>
+[% END %]

commit 1ccded9dd7cd2c9d871e843441572700dc33128a
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Feb 2 17:17:32 2011 -0500

    a start to myopac

diff --git a/Open-ILS/web/opac/skin/kcls-wire/css/style.css b/Open-ILS/web/opac/skin/kcls-wire/css/style.css
index 7dbc65f..9c300f3 100644
--- a/Open-ILS/web/opac/skin/kcls-wire/css/style.css
+++ b/Open-ILS/web/opac/skin/kcls-wire/css/style.css
@@ -271,34 +271,45 @@ div.select-wrapper:hover {
 	margin-right:7px;
 }
 
-#acct_summary {
-	width:156px;
-	background:url('/opac/skin/kcls/graphics/acct_summary_on.gif') no-repeat bottom;
+.acct-tab {
+    background-repeat: no-repeat;
+    background-position: bottom;
+    width:156px;
 }
 
-#acct_checked_out {
-	width:156px;
-	background:url('/opac/skin/kcls/graphics/acct_checked_out_off.gif') no-repeat bottom;
+.acct-main-off {
+	background-image:url('/opac/skin/kcls/graphics/acct_summary_off.gif');
+}
+.acct-main-on {
+	background-image:url('/opac/skin/kcls/graphics/acct_summary_on.gif');
 }
 
-#acct_holds {
-	width:156px;
-	background:url('/opac/skin/kcls/graphics/acct_holds_off.gif') no-repeat bottom;
+.acct-circs-off {
+	background-image:url('/opac/skin/kcls/graphics/acct_checked_out_off.gif');
+}
+.acct-circs-on {
+	background-image:url('/opac/skin/kcls/graphics/acct_checked_out_on.gif');
 }
 
-#acct_prefs {
-	width:156px;
-	background:url('/opac/skin/kcls/graphics/acct_prefs_off.gif') no-repeat bottom;
+.acct-holds-off {
+	background-image:url('/opac/skin/kcls/graphics/acct_holds_off.gif');
+}
+.acct-holds-on {
+	background-image:url('/opac/skin/kcls/graphics/acct_holds_on.gif');
 }
 
-#acct_favs {
-	width:156px;
-	background:url('/opac/skin/kcls/graphics/acct_favs_off.gif') no-repeat bottom;
+.acct-prefs-off {
+	background-image:url('/opac/skin/kcls/graphics/acct_prefs_off.gif');
+}
+.acct-prefs-on {
+	background-image:url('/opac/skin/kcls/graphics/acct_prefs_on.gif');
 }
 
-#acct_lists {
-	width:156px;
-	background:url('/opac/skin/kcls/graphics/acct_lists_off.gif') no-repeat bottom;
+.acct-lists-off {
+	background-image:url('/opac/skin/kcls/graphics/acct_lists_off.gif');
+}
+.acct-lists-on {
+	background-image:url('/opac/skin/kcls/graphics/acct_lists_on.gif');
 }
 
 #rdetail_header {
diff --git a/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2 b/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
new file mode 100644
index 0000000..c1adcb8
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/myopac/main.tt2
@@ -0,0 +1,432 @@
+[%  WRAPPER "default/kcls-wire/parts/base.tt2" +
+        "default/kcls-wire/parts/myopac/base.tt2";
+    myopac_page = "main"  %]
+<div id='myopac_summary_div' style="padding:0px;">
+    <div id="acct_sum">
+        <div style="width:742px;float:left;">
+            <div class="header_middle">Account Summary</div>
+        </div>
+        <div id="myopac_sum_fines">
+            <div style="position:absolute;">
+                <div style="position:relative;top:-15px;left:-23px;">
+                    <img src="/opac/skin/kcls/graphics/acct_sum_fines_tl.png" />
+                </div>
+            </div>
+            <div style="position:absolute;">
+                <div style="position:relative;top:-15px;left:172px;">
+                    <img src="/opac/skin/kcls/graphics/acct_sum_fines_tr.png" />
+                </div>
+            </div>
+            <div style="position:absolute;">
+                <div style="position:relative;top:161px;left:-23px;">
+                    <img src="/opac/skin/kcls/graphics/acct_sum_fines_bl.png" />
+                </div>
+            </div>
+            <div style="position:absolute;">
+                <div style="position:relative;top:161px;left:172px;">
+                    <img src="/opac/skin/kcls/graphics/acct_sum_fines_br.png" />
+                </div>
+            </div>
+            Fines: <span id="myopac_sum_fines_bal">$0.00</span><br />
+            <a class="hide_me" href="javascript:;" id="pay_fines_btn1"
+                onclick="showPaymentForm();"><img alt="Pay Fines"
+                onmouseover="this.src='/opac/skin/kcls/graphics/pay-fines-btn-hover.png';"
+                onmouseout="this.src='/opac/skin/kcls/graphics/pay-fines-btn.png';"
+                src="/opac/skin/kcls/graphics/pay-fines-btn.png"
+                style="position:relative;top:5px;" /></a>
+        </div>
+        <div style="width:662px;">
+            <div style="float:left;">
+                <div style="padding:10px 0px;" id="myopac_sum_name"></div>
+                <div class="acct_sum_row">
+                    <table width="100%" cellspacing="0" cellpadding="0">
+                        <tr>
+                            <td>
+                                Items Currently Checked out
+                                <span id="myopac_sum_checked" class="view_link">
+                                    (0)
+                                </span>
+                            </td>
+                            <td align="right" class="view_link">
+                                <a href="javascript:;"
+                                    onclick="swapTabs($('acct_checked_out'));myOPACChangePage('checked');"
+                                    rel="myopac_checked_div">View All</a>
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+                <div class="acct_sum_row">
+                    <table width="100%" cellspacing="0" cellpadding="0">
+                        <tr>
+                            <td>
+                                Items Currently on Hold
+                                <span id="myopac_sum_holds" class="view_link">
+                                    (0)
+                                </span>
+                            </td>
+                            <td align="right" class="view_link">
+                                <a href="javascript:;"
+                                    onclick="swapTabs($('acct_holds'));myOPACChangePage('holds');"
+                                    rel="myopac_holds_div">View All</a>
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+                <div class="acct_sum_row">
+                    <table width="100%" cellspacing="0" cellpadding="0">
+                        <tr>
+                            <td>
+                                Items ready for pickup
+                                <span id="myopac_sum_pickup" class="view_link">
+                                    (0)
+                                </span>
+                            </td>
+                            <td align="right" class="view_link">
+                                <a href="javascript:;"
+                                    onclick="swapTabs($('acct_holds'));myOPACChangePage('holds');"
+                                    rel="myopac_holds_div">View All</a>
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+                <div class="acct_sum_row" id="myopac_sum_fines_slim">
+                    <table width="100%" cellspacing="0" cellpadding="0">
+                        <tr>
+                            <td>Fees &amp; Fines</td>
+                            <td align="right" class="view_link">
+                                <a class="hide_me"
+                                    id="show_fines_link"
+                                    href="javascript:;"
+                                    onclick="showFinesDiv(this);">Show Overdue Materials</a>
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+            </div>
+        </div>
+        <div style="clear:both;"></div>
+        <div id='myopac_fines_div'>
+            <table width='100%' class='data_grid data_grid_center'>
+                <thead class='color_3'>
+                    <tr>
+                        <td colspan='3' style='padding: 6px'>
+                            <b>&myopac.fines.title;</b>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td width='33%'>&myopac.fines.owed;</td>
+                        <td width='33%'>&myopac.fines.paid;</td>
+                        <td width='33%'>&myopac.fines.balance;</td>
+                    </tr>
+                </thead>
+                <tbody id='myopac_fines_summary_tbody'>
+                    <tr id='myopac_fines_summary_loading'>
+                        <td>&myopac.fines.status;</td>
+                    </tr>
+                    <tr id='myopac_fines_summary_row' class='hide_me'>
+                        <td id='myopac_fines_summary_total' >&common.currency;</td>
+                        <td id='myopac_fines_summary_paid' >&common.currency;</td>
+                        <td id='myopac_fines_summary_balance' style='color:red;font-weight: bold;'>&common.currency;</td>
+                    </tr>
+                </tbody>
+            </table>
+        <!--
+        <div id='accrue_explanation' class='hide_me'>
+            <span>Transactions whose balances are marked with a</span>
+            <span style='color:red; font-weight: bold'>*</span>
+            <span>will continue to accrue fines until the checked out item is returned.</span>
+        </div>
+        -->
+        <!-- Table for circulation transactions only -->
+            <div id='myopac_circ_trans_div' class='hide_me'>
+                <br/><hr/><br/>
+                <table width='100%' class='data_grid data_grid_center'
+                    id='myopac_circ_trans_table'>
+                    <thead>
+                    <!--<tr><td colspan='10' style='padding: 6px'><b>&myopac.fines.overdue;</b></td></tr>-->
+                        <tr>
+                            <td colspan='10' style='padding: 6px'>
+                                <b>Fines</b>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>&common.title;</td>
+                            <td>&common.author;</td>
+                            <td>&myopac.fines.checkout;</td>
+                            <td>&myopac.fines.due;</td>
+                            <td>&myopac.fines.returned;</td>
+                            <td>&myopac.fines.balance;</td>
+                            <td align="center" nowrap="nowrap"
+                                style="white-space:nowrap;">
+                                <label for="pay_fines_box1">Pay Fines</label>
+                                <br />
+                                <input id="pay_fines_box1" checked="checked"
+                                    type="checkbox"
+                                    onclick="checkAll($('myopac_circ_trans_tbody'), this, 'selector');"
+                                    title="Click to (un)select all fines" />
+                            </td>
+                        </tr>
+                    </thead>
+                    <tbody id='myopac_circ_trans_tbody'>
+                        <tr id='myopac_circ_trans_row'>
+                            <td>
+                                <a class='classic_link' name='myopac_circ_trans_title'> </a>
+                            </td>
+                            <td name='myopac_circ_trans_author'> </td>
+                            <td name='myopac_circ_trans_start'> </td>
+                            <td name='myopac_circ_trans_due'> </td>
+                            <td name='myopac_circ_trans_finished'>
+                                <span style='color:red;'>&myopac.fines.accruing;</span>
+                            </td>
+                            <td>
+                                <span style='color: red; font-weight: bold;'
+                                    name='myopac_circ_trans_balance'>&common.currency;</span>
+                            </td>
+                            <td align="center">
+                                <input type="checkbox" checked="checked"
+                                    name="selector" title="pay this fine" />
+                            </td>
+                        </tr>
+                    </tbody>
+                </table>
+            </div>
+
+            <!-- Table for all non-circulation transactions -->
+            <div id='myopac_trans_div' class='hide_me'>
+                <br/>
+                <hr style="border-bottom:none;*height:0px;" color="#dcdbdb" />
+                <br/>
+                <table width='100%' class='data_grid data_grid_center'
+                    id='myopac_trans_table'>
+                    <thead>
+                        <tr>
+                            <td colspan='8' style='padding: 6px'>
+                                <b>&myopac.fines.other;</b>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td width='16%'>&myopac.fines.time.start;</td>
+                            <td width='16%'>&myopac.fines.time.paid;</td>
+                            <td width='16%'>&myopac.fines.owed.initial;</td>
+                            <td width='16%'>&myopac.fines.paid.amount;</td>
+                            <td width='16%'>&myopac.fines.balance;</td>
+                            <td width='16%'>&myopac.fines.type;</td>
+                            <td width='4%' align="center" nowrap="nowrap"
+                                style="white-space:nowrap;">
+                                <label for="pay_fines_box2">Pay Fines</label>
+                                <br />
+                                <input id="pay_fines_box2" checked="checked"
+                                    type="checkbox"
+                                    onclick="checkAll($('myopac_trans_tbody'), this, 'selector');"
+                                    title="Click to (un)select all fines" />
+                            </td>
+                        </tr>
+                    </thead>
+                    <tbody id='myopac_trans_tbody'>
+                        <tr id='myopac_trans_row'>
+                            <td name='myopac_trans_start'> </td>
+                            <td name='myopac_trans_last_payment'> </td>
+                            <td name='myopac_trans_init_amount'>
+                                &common.currency;
+                            </td>
+                            <td name='myopac_trans_total_paid'>
+                                &common.currency;
+                            </td>
+                            <td style='color:red; font-weight: bold;'>
+                                <span name='myopac_trans_balance_recur'
+                                    class='hide_me'> * </span>
+                                <span name='myopac_trans_balance'>
+                                    &common.currency;
+                                </span>
+                            </td>
+                            <td name='myopac_trans_bill_type'></td>
+                            <td align="center">
+                                <input type="checkbox" name='selector'
+                                    title='pay this fine' checked="checked" />
+                            </td>
+                        </tr>
+                    </tbody>
+                </table>
+            </div>
+            <a href="javascript:;"
+                onclick="showPaymentForm();"><img alt="Pay Fines"
+                onmouseover="this.src='/opac/skin/kcls/graphics/pay-fines-btn-hover.png';"
+                src="/opac/skin/kcls/graphics/pay-fines-btn.png"
+                style="position:relative;top:5px;" /></a>
+            <br/>
+        </div>
+    </div>
+    <div id="pay_fines_now" class="hide_me">
+        <table id='oils-selfck-cc-payment-table'>
+            <tbody>
+                <tr>
+                    <td><div style="width:129px;"></div></td>
+                    <td><div style="width:195px;"></div></td>
+                    <td><div style="width:324px;"></div></td>
+                </tr>
+                <tr>
+                    <td colspan='2'><strong>Billing Information</strong></td>
+                    <td rowspan='13' valign='top'>
+                        Selected fines you are paying for:
+                        <table cellpadding="0" cellspacing="5" border="0">
+                            <thead>
+                                <tr>
+                                    <td>
+                                        <strong>Name</strong>
+                                    </td>
+                                    <td>
+                                        <strong>Amount</strong>
+                                    </td>
+                                </tr>
+                            </thead>
+                            <tbody id="selectedFines">
+                            </tbody>
+                        </table>
+                        <br />
+                        <div id='oils-selfck-cc-payment-summary'>
+                            Total amount to pay:
+                            <strong>$<span></span></strong>
+                        </div>
+                        <br />
+                        Click <strong>Cancel</strong> to go back and (un)select
+                        other fines.
+                    </td>
+                </tr>
+                <tr>
+                    <td>First Name</td>
+                    <td><input jsId='oilsSelfckCCFName' /></td>
+                </tr>
+                <tr>
+                    <td>Last Name</td>
+                    <td><input jsId='oilsSelfckCCLName' /></td>
+                </tr>
+                <tr>
+                    <td>Street Address</td>
+                    <td><input jsId='oilsSelfckCCStreet' /></td>
+                </tr>
+                <tr>
+                    <td>City</td>
+                    <td><input jsId='oilsSelfckCCCity' /></td>
+                </tr>
+                <tr>
+                    <td>State or Province</td>
+                    <td><input jsId='oilsSelfckCCState' /></td>
+                </tr>
+                <tr>
+                    <td>ZIP or Postal Code</td>
+                    <td><input jsId='oilsSelfckCCZip' /></td>
+                </tr>
+                <tr>
+                  <td colspan='2'><strong>Credit Card Information</strong></td>
+                </tr>
+                <!-- Technically not needed since card type is derived from the CC number
+                <tr>
+                    <td>Type of Card</td>
+                    <td>
+                        <select dojoType='dijit.form.FilteringSelect' jsId='oilsSelfckCCType' required='true'>
+                            <option value='VISA'>VISA</option>
+                            <option value='MasterCard'>MasterCard</option>
+                            <option value='American Express'>American Express</option>
+                        </select>
+                    </td>
+                </tr>
+                -->
+                <tr>
+                    <td>Credit Card #</td>
+                    <td><input jsId='oilsSelfckCCNumber' /></td>
+                </tr>
+                <tr>
+                    <td>
+                        <div style="position:absolute;">
+                            <div style="position:relative;left:80px;">
+                                <a href="javascript:;"
+                                    onclick="alert('Also known as a CVV2 code, it is the 3-digit number on the back of the card next to your signature.\nKCLS only accpets VISA and MasterCard.');"><img
+                                    src="/opac/skin/kcls/graphics/question-mark.png" /></a>
+                            </div>
+                        </div>
+                        Security Code
+                    </td>
+                    <td>
+                        <input jsId='oilsSelfckCCCVV' />
+                    </td>
+                </tr>
+                <tr>
+                    <td>Exipration Month</td>
+                    <td>
+                        <select jsId='oilsSelfckCCMonth'>
+                            <option value='01' selected='selected'>January</option>
+                            <option value='02'>February</option>
+                            <option value='03'>March</option>
+                            <option value='04'>April</option>
+                            <option value='05'>May</option>
+                            <option value='06'>June</option>
+                            <option value='07'>July</option>
+                            <option value='08'>August</option>
+                            <option value='09'>September</option>
+                            <option value='10'>October</option>
+                            <option value='11'>November</option>
+                            <option value='12'>December</option>
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td>Expiration Year</td>
+                    <td>
+                      <select jsId='oilsSelfckCCYear'>
+                        <option value='2011'>2011</option>
+                        <option value='2012'>2012</option>
+                        <option value='2013'>2013</option>
+                        <option value='2014'>2014</option>
+                        <option value='2015'>2015</option>
+                        <option value='2016'>2016</option>
+                        <option value='2017'>2017</option>
+                        <option value='2018'>2018</option>
+                        <option value='2019'>2019</option>
+                      </select>
+                    </td>
+                </tr>
+                <tr class="hide_me">
+                    <td>Edit Billing Address</td>
+                    <td>
+                        <input jsId='oilsSelfckEditDetails'/>
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan='2' align="center">
+                        <button jsId='oilsSelfckCCSubmit'>
+                            Submit Payment
+                        </button>
+                        <button onclick="hideMe($('pay_fines_now'));unHideMe($('acct_sum'));">
+                            Cancel
+                        </button>
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan="3">
+                        <br />
+                        Important! You must have a printed receipt to be
+                        eligible for a refund on lost items (regulations allow
+                        for no exceptions).
+                        <br />
+                        <strong>
+                            To ensure your necessary receipt information is
+                            not lost, enter your email address above and a
+                            receipt will be emailed to you. Otherwise, make
+                            certain you have a printed receipt in hand before
+                            closing the payment receipt screen.
+                        </strong>
+                        <br />
+                        Refunds are not available for parts and pieces, overdue
+                        fines, or items that do not display a specific title in
+                        My Account. For a full list of refundable and
+                        non-refundable items, visit
+                        <a href="http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm">http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm</a><br /><br />
+                        This site uses VeriSign SSL encryption to ensure your
+                        privacy.
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+</div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
new file mode 100644
index 0000000..8219768
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/myopac/base.tt2
@@ -0,0 +1,33 @@
+[% myopac_pages = [
+    {url => "main", name => "Account Summary"},
+    {url => "circs", name => "Items Checked Out"},
+    {url => "holds", name => "Holds"},
+    {url => "prefs", name => "Account Preferences"},
+    {url => "lists", name => "My Lists"}
+] %]
+    [% INCLUDE "default/kcls-wire/parts/topnav.tt2" %]
+    <div id="search-wrapper">
+        [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
+        [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="myopac_tabs">
+            <div id="acct_tabs">
+                [%- FOREACH page IN myopac_pages;
+                    IF page.url == myopac_page;
+                        cls_which = "on";
+                        ctx.page_title = page.name;
+                    ELSE;
+                        cls_which = "off";
+                    END -%]
+                <a href="[% page.url %]"
+                    class="acct-[% page.url; '-'; cls_which %] acct-tab"></a>
+                [% END %]
+            </div>
+        </div>
+        <div id="main-content">
+            <div style="height:15px;clear:both;"></div>
+            [% content %]
+            <div style="clear:both;"></div>
+        </div>
+    </div>

commit a2669c96eb28230bf2ff6b3238a8c920e167efb0
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 1 15:46:46 2011 -0500

    more whitespace fixing; may seem trivial, but will save a lot of time
    later in trying to understand what's what

diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
index ceca37e..a5d9ef9 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
@@ -1,20 +1,39 @@
 <div id="search-box">    
-    <table cellpadding="0" cellspacing="10" border="0" style="position:relative;left:-10px;">
+    <table cellpadding="0" cellspacing="10" border="0"
+        style="position:relative;left:-10px;">
         <tr>
             <td colspan="3">
-                <span class="search_catalog_lbl">Search the Catalog</span> <a href="advanced" id="home_adv_search_link" style="position:relative;top:-1px;left:10px;"><span class="adv_search_font">Advanced Search</span></a>
+                <span class="search_catalog_lbl">Search the Catalog</span>
+                <a href="advanced" id="home_adv_search_link"
+                    style="position:relative;top:-1px;left:10px;"><span
+                    class="adv_search_font">Advanced Search</span></a>
             </td>
         </tr>
         <tr>
-            <td>[% INCLUDE "default/kcls-wire/parts/stypes_selector.tt2" %]</td>
+            <td>
+                [% INCLUDE "default/kcls-wire/parts/stypes_selector.tt2" %]
+            </td>
             <td>
                 <div id="search_box_wrapper">
-                    <input type="text" id="search_box" style="width:162px;" value="Search Keyword" onfocus="if (this.value=='Search Keyword'){this.value='';this.style.color='#000';}" onblur="if (this.value==''){this.value='Search Keyword';this.style.color='#999';}" />
+                    <input type="text" id="search_box" style="width:162px;"
+                        value="Search Keyword"
+                        onfocus="if (this.value=='Search Keyword'){this.value='';this.style.color='#000';}"
+                        onblur="if (this.value==''){this.value='Search Keyword';this.style.color='#999';}" />
                     <input id='facet_box' type='hidden' />
                 </div>
             </td>
             <td valign="top">
-                <div style="position:absolute;"><div style="position:relative;top:-3px;"><input type="button" id="search_submit" value="GO" class="hide_me" /><a href="javascript:;" id="search_submit_alt" onclick="$('search_submit').click()"><img alt="Search" src="/opac/skin/kcls/graphics/go-btn.png" onmouseover="this.src='/opac/skin/kcls/graphics/go-btn-hover.png';" onmouseout="this.src='/opac/skin/kcls/graphics/go-btn.png';" /></a></div></div>
+                <div style="position:absolute;">
+                    <div style="position:relative;top:-3px;">
+                        <input type="button" id="search_submit" value="GO"
+                            class="hide_me" /><a href="javascript:;"
+                            id="search_submit_alt"
+                            onclick="$('search_submit').click()"><img
+                            alt="Search" src="/opac/skin/kcls/graphics/go-btn.png"
+                            onmouseover="this.src='/opac/skin/kcls/graphics/go-btn-hover.png';"
+                            onmouseout="this.src='/opac/skin/kcls/graphics/go-btn.png';" /></a>
+                    </div>
+                </div>
             </td>
         </tr>
         <tr>
@@ -26,14 +45,13 @@
             </td>
         </tr>
     </table>
- 
     <div class="hide_me">
         <input type="checkbox" id="opac.result.limit2avail" />
-        <label style="position:relative;top:-3px;" for="opac.result.limit2avail">
+        <label style="position:relative;top:-3px;"
+            for="opac.result.limit2avail">
             <span style="font-size:10px;">Limit to available items</span>
         </label>
       </div>
-      
     <div id="breadcrumb"><a href="./">Catalog Home</a> &gt;</div>
     <div style="clear:both"></div>
 </div>

commit 89d7d65d311e026b0db46d0fc7526cef5e2afb21
Merge: fc9a040 926edd6
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 1 15:40:15 2011 -0500

    Merge branch 'master' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit fc9a040ce994f41d4383667018d923e8bc8b27db
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 1 15:38:14 2011 -0500

    more whitespace fixing, reorg, etc. note to self: JS in advanced page

diff --git a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2 b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
index 1d6172d..5c9eca7 100644
--- a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
@@ -29,7 +29,7 @@
     <div id="content-wrapper">
         <div id="main-content">
             <div class="advanced_div">
-            [% INCLUDE "default/kcls-wire/parts/advanced_search.tt2" %]
+            [% INCLUDE "default/kcls-wire/parts/advanced/search.tt2" %]
             </div>
             <div style="clear:both;height:15px;"></div>	
         </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/adv_global_row.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/global_row.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/adv_global_row.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/advanced/global_row.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
new file mode 100644
index 0000000..0f81ee1
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/advanced/search.tt2
@@ -0,0 +1,371 @@
+<!-- ****************** advanced_global.xml ***************************** -->
+<table id='adv_global_search' class='data_grid data_grid_center' width='100%'>
+    <tr style='border-bottom: none;'>
+        <!-- Contains the user-addable(?) rows to define search class, containment and text -->
+        <td valign='top' width='65%' style='border-bottom: none;'>
+            <table width='100%' id='adv_global_input_table'>
+                <thead>
+                    <tr>
+                        <td>
+                            <div style="width:100%;" class="header_middle">
+                                &advanced.search.title;
+                            </div>
+                        </td>
+                    </tr>
+                </thead>
+                <tbody id='adv_global_tbody'>
+                    [% INCLUDE "default/kcls-wire/parts/advanced/global_row.tt2" %]
+                    <!-- add a new row -->
+                    <tr id='adv_global_addrow'>
+                        <td align='left' style="padding-top:7px;">
+                            <a href="javascript:;"
+                                onclick='advAddGblRow();'>Add Search Row</a>
+                            <button onclick='advSubmitGlobal();'
+                                class="hide_me">&advanced.search.submit;</button>
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+        </td>
+    </tr>
+    <tr>
+        <td align='center'>
+            &advanced.search.library;<br /><br />
+            [% INCLUDE "default/kcls-wire/parts/libselect.tt2" %]
+            <br /><br />
+            <span>&result.limit2avail;</span>
+            <input type='checkbox' id='opac.result.limit2avail'/>
+        </td>
+    </tr>
+    <tr>
+        <td colspan="2">
+            <table width='100%'>
+                <thead>
+                    <tr>
+                        <td colspan='2' align='center'>
+                            &advanced.search.filters;
+                        </td>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr>
+                        <td align='right' class="hide_me">
+                            <span>&advanced.item.form;</span>
+                        </td>
+                        <td align='left' class="hide_me">
+                            <select multiple='multiple' size='3'
+                                id='adv_global_item_form'>
+                            </select>    
+                        </td>
+                        <td align='right'>
+                            <span>&advanced.item.type;</span><br />
+                        </td>
+                        <td align='left'>
+                            <select multiple='multiple' size='3'
+                                id='adv_global_item_type' class='hide_me'>
+                            </select>    
+                            <select multiple='multiple' size='3'
+                                id='adv_global_item_type_basic'>
+                                <option value=''>&opac.search.allFormats;</option>
+                                <option value='a'>Book</option>
+                                <option value='i'>Book on cassette</option>
+                                <option value='n'>Book on CD</option>
+                                <option value='x'>Download music</option>
+                                <option value='y'>Download video</option>
+                                <option value='h'>DVD</option>
+                                <option value='w'>eBook - Audio</option>
+                                <option value='v'>eBook - Text</option>
+                                <option value='e'>Equipment</option>
+                                <option value='f'>Films</option>
+                                <option value='o'>Kit</option>
+                                <option value='q'>Large print</option>
+                                <option value='b'>Magazine</option>
+                                <option value='d'>Microform</option>
+                                <option value='k'>Music cassette</option>
+                                <option value='j'>Music CD</option>
+                                <option value='l'>Music LP</option>
+                                <option value='p'>Newspaper</option>
+                                <option value='t'>Online</option>
+                                <option value='u'>Player</option>
+                                <option value='c'>Printed music</option>
+                                <option value='2'>Read along with cassette</option>
+                                <option value='5'>Read along with CD</option>    
+                                <option value='c'>Scores</option>    
+                                <option value='m'>Software</option>
+                                <option value='g'>Video</option>
+                                <option value='r'>3-D Object</option>
+                                <option value='z'>Map</option>
+                                <option value='s'>Slide set</option>
+
+                            </select>    
+                        </td>
+                        <td align='right' class="hide_me">
+                            <span>&advanced.literary.form;</span>
+                            <a id='adv_global_lit_form_link_adv'
+                                class='classic_link adv_adv_link'
+                                href='javascript:void(0);' onclick='
+                                hideMe($("adv_global_lit_form_basic"));
+                                unHideMe($("adv_global_lit_form"));
+                                hideMe(this);
+                                unHideMe($("adv_global_lit_form_link_basic"));
+                                '>&advanced.link;</a>
+
+                            <a id='adv_global_lit_form_link_basic'
+                                class='hide_me classic_link adv_adv_link'
+                                href='javascript:void(0);' onclick='
+                                unHideMe($("adv_global_lit_form_basic"));
+                                hideMe($("adv_global_lit_form"));
+                                unHideMe($("adv_global_lit_form_link_adv"));
+                                hideMe(this);
+                                '>&advanced.basic.link;</a>
+                        </td>
+                        <td align='left' class="hide_me">
+                            <select multiple='multiple' size='3'
+                                id='adv_global_lit_form' class='hide_me'>
+                            </select>    
+                            <select multiple='multiple' size='3'
+                                id='adv_global_lit_form_basic'>
+                                <option value='0 '>
+                                    &advanced.non.fiction;
+                                </option>
+                                <option value='1'>
+                                    &advanced.fiction;
+                                </option>
+                            </select>    
+                        </td>
+                        <td align='right'>
+                            <span>&advanced.language;</span>
+                        </td>
+                        <td align='left'>
+                            <select multiple='multiple' size='3' id='adv_global_lang'>
+                                [% INCLUDE "default/kcls-wire/parts/item_lang_options.tt2" %]
+                            </select>
+                        </td>
+
+                        <td align='right' class="hide_me">
+                            <span>&advanced.audience;</span>
+                            <a id='adv_global_audience_link_adv'
+                                class='classic_link adv_adv_link'
+                                href='javascript:void(0);' onclick='
+                                hideMe($("adv_global_audience_basic"));
+                                unHideMe($("adv_global_audience"));
+                                hideMe(this);
+                                unHideMe($("adv_global_audience_link_basic"));
+                                '>&advanced.link;</a>
+
+                            <a id='adv_global_audience_link_basic'
+                                class='hide_me classic_link adv_adv_link'
+                                href='javascript:void(0);' onclick='
+                                unHideMe($("adv_global_audience_basic"));
+                                hideMe($("adv_global_audience"));
+                                unHideMe($("adv_global_audience_link_adv"));
+                                hideMe(this);'>&advanced.basic.link;</a>
+                        </td>
+                        <td align='left' class="hide_me">
+                            <select multiple='multiple' size='3'
+                                id='adv_global_audience' class='hide_me'>
+                            </select>
+                            <select multiple='multiple' size='3'
+                                id='adv_global_audience_basic'>
+                                <option value='e '>&advanced.adult;</option>
+                                <option value='abcdj'>&advanced.juvenile;</option>
+                                <option value='fg '>&advanced.general;</option>
+                            </select>
+                        </td>
+
+                        <td align='right' class="hide_me">
+                            <span>&advanced.biblevel;</span>
+                        </td>
+                        <td align='left' class="hide_me">
+                            <select multiple='multiple' size='3'
+                                id='adv_global_bib_level'>
+                            </select>    
+                        </td>
+                    </tr>
+                    <tr>
+                        <td align='right'>
+                            <span>&advanced.filter.pubyear;</span>
+                        </td>
+                        <td align='left'>
+                            <select id='adv_global_pub_date_type' onchange='
+                                if($("adv_global_pub_date_type").selectedIndex == 3)
+                                    unHideMe($("adv_global_pub_date_2_span"));
+                                else
+                                    hideMe($("adv_global_pub_date_2_span"));'>
+                                    <option value='equals' selected='selected'>
+                                        &advanced.filter.pubyear.equals;
+                                    </option>
+                                    <option value='before'>
+                                        &advanced.filter.pubyear.before;
+                                    </option>
+                                    <option value='after'>
+                                        &advanced.filter.pubyear.after;
+                                    </option>
+                                    <option value='between'>
+                                        &advanced.filter.pubyear.between;
+                                    </option>
+                            </select>    
+                            <div style='margin-top:5px;'>
+                                <input id='adv_global_pub_date_1' type='text'
+                                    size='4' maxlength='4'/>
+                                <span id='adv_global_pub_date_2_span'
+                                    class='hide_me'>
+                                    &common.and; <input
+                                        id='adv_global_pub_date_2' type='text'
+                                        size='4' maxlength='4'/>
+                                </span>
+                            </div>
+                        </td>
+                    </tr>
+                    <!-- copy location selector -->
+                    <tr id='adv_copy_location_filter_row' class='hide_me'>
+                        <td align='right'>&opac.advanced.copy_loc_filter;</td>
+                        <td align='left' id='adv_copy_location_filter_td'>
+                            <select size='3'
+                                id='adv_copy_location_filter_select'
+                                multiple='multiple'>
+                            </select>
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+        </td>
+    </tr>
+    <tr style='border-top: none;'>
+        <td align='center' valign='top' style='border-top: none;' colspan='2'>
+            <table style='border: none; width: 100%;'>
+                <tr>
+                    <td align='center' width='100%'>
+                        <table class='' width='100%'>
+            
+                            <thead>
+                                <tr>
+                                    <td align='center' width='50%'>&advanced.sort.criteria;</td>
+                                    <td align='center'></td>
+                                </tr>
+                            </thead>
+            
+                            <tbody>
+                                <tr>
+
+                           <script language='javascript' type='text/javascript'>
+                              function __setsortsel() {
+                                 var sel = $('adv_global_sort_by')
+                                           if(sel.selectedIndex == 0) {
+                                               $("adv_global_sort_dir").disabled = true;
+                                               $("adv_global_sort_dir").selectedIndex = 0;
+                                           } else $("adv_global_sort_dir").disabled = false;
+                              }
+                           </script>
+
+                                    <td align=''>
+                                        <select id='adv_global_sort_by' onchange='__setsortsel();'>
+                                            <option value='rel'>&advanced.relevance;</option>
+                                            <option value='title'>&common.title;</option>
+                                            <option value='author'>&common.author;</option>
+                                            <option value='pubdate'>&advanced.pubdate;</option>
+                                        </select>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <select id='adv_global_sort_dir' disabled='disabled'>
+                                            <option value='asc'>&advanced.sort.asc;</option>
+                                            <option value='desc'>&advanced.sort.desc;</option>
+                                        </select>
+                                    </td>
+
+                           <!-- force the enable/disable sort dir code to run -->
+                           <script language='javascript' type='text/javascript'>__setsortsel();</script>
+                                </tr>
+                                <tr>
+                                    <td align='center' class="hide_me">
+                                        <span>&advanced.frbrize;</span>
+                                        <input id='adv_group_titles' type='checkbox' />
+                                    </td>
+                                    <td align='center'></td>
+                                </tr>
+                            </tbody>
+                        </table>
+                    </td>
+                </tr>
+            </table>
+        </td>
+    </tr>
+
+    <tr class='border_4_2'>
+        <td align="left" colspan='2'>
+        <img src="/opac/skin/kcls/graphics/search_btn.gif" alt="Search" onclick='advSubmitGlobal();' style="cursor:pointer;" />
+        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+        <a href="javascript:;" onclick='clearSearchBoxes();' style="position: relative; top: -9px;">Reset Form</a>
+        </td>
+    </tr>
+</table>
+
+
+<div id='adv_quick_search_sidebar' class='sidebar_chunk hide_me' style='text-align:center; margin-top: 20px; width:400px;'> 
+    <div id='adv_quick_search'>
+        <div class='adv_quick_search color_4'><b>&sidebar.quick.search;</b></div>
+        <div style='margin-top: 8px;'>
+            <table><tbody><tr>
+                <td>
+                    <select id='adv_quick_type'>
+                        <option value='isbn'>&opac.advanced.quick.isbn;</option>
+                        <option value='issn'>&opac.advanced.quick.issn;</option>
+                        <option value='cn'>&opac.advanced.quick.cn;</option>
+                        <option value='lccn'>&opac.advanced.quick.lccn;</option>
+                        <option value='tcn'>&opac.advanced.quick.tcn;</option>
+                        <option value='barcode'>&opac.advanced.quick.barcode;</option>
+                    </select>
+                </td><td>
+                    <input type='text' id='adv_quick_text' size='16' />
+                </td>
+            </tr></tbody></table>
+        </div>
+
+        <div style='margin-top: 8px;' class='adv_quick_search_submit'>
+        <img src="/opac/skin/kcls/graphics/search_btn.gif" alt="Search" id="adv_quick_submit" onclick='advGenericSearch();' style="cursor:pointer;" />
+            <!-- <a id='adv_quick_submit' href='javascript:advGenericSearch();' class='classic_link'>&common.submit;</a> -->
+        </div>
+    </div>
+</div>
+
+
+<div id='adv_marc_search_sidebar' class='sidebar_chunk hide_me'
+    style='width:400px; margin-top: 20px;'> 
+    <div class='adv_quick_search color_4'><b>&search.marc;</b></div>
+    <table style='margin: 3px; width: 100%;' id='adv_sdbar_table'
+        class='border_4_3'>
+        <tbody>
+            <tr>
+                <td align="right">&search.marc.tag;</td>
+                <td align="left"><input name='advanced.marc.tag' maxlength='3' size='3' /></td>
+                <td align="right">&search.marc.subfield;</td>
+                <td align="left"><input name='advanced.marc.subfield' maxlength='1' size='1' /></td>
+            </tr>
+            <tr>
+                <td align="right">&search.marc.value;</td>
+                <td colspan='3' align="left"><input name='advanced.marc.value' size='18' /></td>
+            </tr>
+            <tr name='crow' class='hide_me'>
+                <td colspan='4' align='center'>
+                <a href='javascript:void(0);' class='classic_link'
+                    onclick='
+                        var div = $("adv_marc_search_sidebar");
+                        if( div.getElementsByTagName("table").length > 1 )
+                            div.removeChild(this.parentNode.parentNode.parentNode.parentNode);'>&common.close;</a>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+    <div id='adv_marc_submit' class='adv_quick_search_submit'>
+        <a style='margin-right: 4px; position:relative;top:-10px;'
+            class='classic_link'
+            href='javascript:advAddMARC();'>&search.marc.add.row;</a>
+        <!-- <a style='margin-left: 4px;' class='classic_link' href='javascript:advMARCRun();'>&common.submit;</a> -->
+        <img alt="Search"
+            src="/opac/skin/kcls/graphics/search_btn.gif"
+            onclick='advMARCRun();' style="cursor:pointer;" />
+    </div>
+</div>
+<!-- ****************** end: advanced_global.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/advanced_search.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/advanced_search.tt2
deleted file mode 100644
index a6fb5e8..0000000
--- a/Open-ILS/web/templates/default/kcls-wire/parts/advanced_search.tt2
+++ /dev/null
@@ -1,348 +0,0 @@
-<!-- ****************** advanced_global.xml ***************************** -->
-<table id='adv_global_search' class='data_grid data_grid_center' width='100%'>
-	<tr style='border-bottom: none;'>
-
-		<!-- Contains the user-addable(?) rows to define search class, containment and text -->
-		<td valign='top' width='65%' style='border-bottom: none;'>
-			<table width='100%' id='adv_global_input_table'>
-	
-				<thead>
-					<tr><td><div style="width:100%;" class="header_middle">&advanced.search.title;</div></td></tr>
-				</thead>
-				<tbody id='adv_global_tbody'>
-                    [% INCLUDE "default/kcls-wire/parts/adv_global_row.tt2" %]
-
-					<!-- add a new row -->
-					<tr id='adv_global_addrow'>
-						<td align='left' style="padding-top:7px;">
-							<a href="javascript:;" onclick='advAddGblRow();'>Add Search Row</a>
-                            <button onclick='advSubmitGlobal();' class="hide_me">&advanced.search.submit;</button>
-						</td>
-					</tr>
-
-				</tbody>
-			</table>
-		</td>
-	</tr>
-	<tr>
-		<td align='center'>
-		&advanced.search.library;<br /><br />
-            [% INCLUDE "default/kcls-wire/parts/libselect.tt2" %]
-			<br /><br />
-			<span>&result.limit2avail;</span>
-			<input type='checkbox' id='opac.result.limit2avail'/>
-		</td>
-	</tr>
-	
-	
-	<tr>
-		<td colspan="2">
-			<table width='100%'>
-				<thead>
-                    <tr>
-                        <td colspan='2' align='center'>&advanced.search.filters;</td>
-                    </tr>
-				</thead>
-				<tbody>
-					<tr>
-						<td align='right' class="hide_me">
-							<span>&advanced.item.form;</span>
-						</td>
-						<td align='left' class="hide_me">
-							<select multiple='multiple' size='3' id='adv_global_item_form'>
-							</select>	
-						</td>
-						<td align='right'>
-                            <span>&advanced.item.type;</span><br />
-                        </td>
-						<td align='left'>
-							<select multiple='multiple' size='3' id='adv_global_item_type' class='hide_me'>
-							</select>	
-							<select multiple='multiple' size='3' id='adv_global_item_type_basic'>
-<option value=''>&opac.search.allFormats;</option>
-<option value='a'>Book</option>
-<option value='i'>Book on cassette</option>
-<option value='n'>Book on CD</option>
-<option value='x'>Download music</option>
-<option value='y'>Download video</option>
-<option value='h'>DVD</option>
-<option value='w'>eBook - Audio</option>
-<option value='v'>eBook - Text</option>
-<option value='e'>Equipment</option>
-<option value='f'>Films</option>
-<option value='o'>Kit</option>
-<option value='q'>Large print</option>
-<option value='b'>Magazine</option>
-<option value='d'>Microform</option>
-<option value='k'>Music cassette</option>
-<option value='j'>Music CD</option>
-<option value='l'>Music LP</option>
-<option value='p'>Newspaper</option>
-<option value='t'>Online</option>
-<option value='u'>Player</option>
-<option value='c'>Printed music</option>
-<option value='2'>Read along with cassette</option>
-<option value='5'>Read along with CD</option>	
-<option value='c'>Scores</option>	
-<option value='m'>Software</option>
-<option value='g'>Video</option>
-<option value='r'>3-D Object</option>
-<option value='z'>Map</option>
-<option value='s'>Slide set</option>
-
-							</select>	
-						</td>
-
-						<td align='right' class="hide_me">
-							<span>&advanced.literary.form;</span>
-							<a id='adv_global_lit_form_link_adv' class='classic_link adv_adv_link'
-								href='javascript:void(0);' onclick='
-								hideMe($("adv_global_lit_form_basic"));
-								unHideMe($("adv_global_lit_form"));
-								hideMe(this);
-								unHideMe($("adv_global_lit_form_link_basic"));
-								'>&advanced.link;</a>
-
-							<a id='adv_global_lit_form_link_basic' class='hide_me classic_link adv_adv_link'
-								href='javascript:void(0);' onclick='
-								unHideMe($("adv_global_lit_form_basic"));
-								hideMe($("adv_global_lit_form"));
-								unHideMe($("adv_global_lit_form_link_adv"));
-								hideMe(this);
-								'>&advanced.basic.link;</a>
-						</td>
-						<td align='left' class="hide_me">
-							<select multiple='multiple' size='3' id='adv_global_lit_form' class='hide_me'>
-							</select>	
-							<select multiple='multiple' size='3' id='adv_global_lit_form_basic'>
-								<option value='0 '>&advanced.non.fiction;</option>
-								<option value='1'>&advanced.fiction;</option>
-							</select>	
-						</td>
-
-						<td align='right'>
-							<span>&advanced.language;</span>
-						</td>
-
-						<td align='left'>
-							<select multiple='multiple' size='3' id='adv_global_lang'>
-								[% INCLUDE "default/kcls-wire/parts/item_lang_options.tt2" %]
-							</select>
-						</td>
-
-						<td align='right' class="hide_me">
-							<span>&advanced.audience;</span>
-
-							<a id='adv_global_audience_link_adv' class='classic_link adv_adv_link'
-								href='javascript:void(0);' onclick='
-								hideMe($("adv_global_audience_basic"));
-								unHideMe($("adv_global_audience"));
-								hideMe(this);
-								unHideMe($("adv_global_audience_link_basic"));
-								'>&advanced.link;</a>
-
-							<a id='adv_global_audience_link_basic' class='hide_me classic_link adv_adv_link'
-								href='javascript:void(0);' onclick='
-								unHideMe($("adv_global_audience_basic"));
-								hideMe($("adv_global_audience"));
-								unHideMe($("adv_global_audience_link_adv"));
-								hideMe(this);'>&advanced.basic.link;</a>
-						</td>
-
-						<td align='left' class="hide_me">
-							<select multiple='multiple' size='3' id='adv_global_audience' class='hide_me'>
-							</select>
-							<select multiple='multiple' size='3' id='adv_global_audience_basic'>
-								<option value='e '>&advanced.adult;</option>
-								<option value='abcdj'>&advanced.juvenile;</option>
-								<option value='fg '>&advanced.general;</option>
-							</select>
-						</td>
-
-						<td align='right' class="hide_me">
-							<span>&advanced.biblevel;</span>
-						</td>
-						<td align='left' class="hide_me">
-							<select multiple='multiple' size='3' id='adv_global_bib_level'>
-							</select>	
-						</td>
-					</tr>
-					
-					<tr>
-						<td align='right'>
-							<span>&advanced.filter.pubyear;</span>
-						</td>
-						<td align='left'>
-							<select id='adv_global_pub_date_type' onchange='
-                                if($("adv_global_pub_date_type").selectedIndex == 3)
-                                    unHideMe($("adv_global_pub_date_2_span"));
-                                else
-                                    hideMe($("adv_global_pub_date_2_span"));'>
-                                <option value='equals' selected='selected'>&advanced.filter.pubyear.equals;</option>
-                                <option value='before'>&advanced.filter.pubyear.before;</option>
-                                <option value='after'>&advanced.filter.pubyear.after;</option>
-                                <option value='between'>&advanced.filter.pubyear.between;</option>
-							</select>	
-                            <div style='margin-top:5px;'>
-                                <input id='adv_global_pub_date_1' type='text' size='4' maxlength='4'/>
-                                <span id='adv_global_pub_date_2_span' class='hide_me'>
-                                   &common.and; <input id='adv_global_pub_date_2' type='text' size='4' maxlength='4'/>
-                                </span>
-                            </div>
-						</td>
-					</tr>
-
-
-                    <!-- copy location selector -->
-                    <tr id='adv_copy_location_filter_row' class='hide_me'>
-                        <td align='right'>&opac.advanced.copy_loc_filter;</td>
-                        <td align='left' id='adv_copy_location_filter_td'>
-                            <select size='3' id='adv_copy_location_filter_select' multiple='multiple'>
-                            </select>
-                        </td>
-                    </tr>
-				</tbody>
-			</table>
-		</td>
-	</tr>
-
-	<tr style='border-top: none;'>
-		<td align='center' valign='top' style='border-top: none;' colspan='2'>
-
-			<table style='border: none; width: 100%;'>
-				<tr>
-					<td align='center' width='100%'>
-						<table class='' width='100%'>
-			
-							<thead>
-								<tr>
-									<td align='center' width='50%'>&advanced.sort.criteria;</td>
-									<td align='center'></td>
-								</tr>
-							</thead>
-			
-							<tbody>
-								<tr>
-
-                           <script language='javascript' type='text/javascript'>
-                              function __setsortsel() {
-                                 var sel = $('adv_global_sort_by')
-										   if(sel.selectedIndex == 0) {
-											   $("adv_global_sort_dir").disabled = true;
-											   $("adv_global_sort_dir").selectedIndex = 0;
-										   } else $("adv_global_sort_dir").disabled = false;
-                              }
-                           </script>
-
-									<td align=''>
-										<select id='adv_global_sort_by' onchange='__setsortsel();'>
-											<option value='rel'>&advanced.relevance;</option>
-											<option value='title'>&common.title;</option>
-											<option value='author'>&common.author;</option>
-											<option value='pubdate'>&advanced.pubdate;</option>
-										</select>
-									</td>
-								</tr>
-			
-								<tr>
-
-									<td>
-										<select id='adv_global_sort_dir' disabled='disabled'>
-											<option value='asc'>&advanced.sort.asc;</option>
-											<option value='desc'>&advanced.sort.desc;</option>
-										</select>
-									</td>
-
-                           <!-- force the enable/disable sort dir code to run -->
-                           <script language='javascript' type='text/javascript'>__setsortsel();</script>
-								</tr>
-								<tr>
-									<td align='center' class="hide_me">
-										<span>&advanced.frbrize;</span>
-										<input id='adv_group_titles' type='checkbox' />
-									</td>
-                                    <td align='center'>
-
-                                    </td>
-								</tr>
-							</tbody>
-						</table>
-					</td>
-				</tr>
-			</table>
-		</td>
-
-	</tr>
-
-	<tr class='border_4_2'>
-		<td align="left" colspan='2'>
-		<img src="/opac/skin/kcls/graphics/search_btn.gif" alt="Search" onclick='advSubmitGlobal();' style="cursor:pointer;" />
-		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-		<a href="javascript:;" onclick='clearSearchBoxes();' style="position: relative; top: -9px;">Reset Form</a>
-		</td>
-	</tr>
-
-</table>
-
-
-<div id='adv_quick_search_sidebar' class='sidebar_chunk hide_me' style='text-align:center; margin-top: 20px; width:400px;'> 
-	<div id='adv_quick_search'>
-		<div class='adv_quick_search color_4'><b>&sidebar.quick.search;</b></div>
-		<div style='margin-top: 8px;'>
-			<table><tbody><tr>
-				<td>
-					<select id='adv_quick_type'>
-						<option value='isbn'>&opac.advanced.quick.isbn;</option>
-						<option value='issn'>&opac.advanced.quick.issn;</option>
-						<option value='cn'>&opac.advanced.quick.cn;</option>
-						<option value='lccn'>&opac.advanced.quick.lccn;</option>
-						<option value='tcn'>&opac.advanced.quick.tcn;</option>
-						<option value='barcode'>&opac.advanced.quick.barcode;</option>
-					</select>
-				</td><td>
-					<input type='text' id='adv_quick_text' size='16' />
-				</td>
-			</tr></tbody></table>
-		</div>
-
-		<div style='margin-top: 8px;' class='adv_quick_search_submit'>
-		<img src="/opac/skin/kcls/graphics/search_btn.gif" alt="Search" id="adv_quick_submit" onclick='advGenericSearch();' style="cursor:pointer;" />
-			<!-- <a id='adv_quick_submit' href='javascript:advGenericSearch();' class='classic_link'>&common.submit;</a> -->
-		</div>
-	</div>
-</div>
-
-
-<div id='adv_marc_search_sidebar' class='sidebar_chunk hide_me' style='width:400px; margin-top: 20px;'> 
-	<div class='adv_quick_search color_4'><b>&search.marc;</b></div>
-	<table style='margin: 3px; width: 100%;' id='adv_sdbar_table' class='border_4_3'>
-		<tbody>
-			<tr>
-				<td align="right">&search.marc.tag;</td>
-				<td align="left"><input name='advanced.marc.tag' maxlength='3' size='3' /></td>
-				<td align="right">&search.marc.subfield;</td>
-				<td align="left"><input name='advanced.marc.subfield' maxlength='1' size='1' /></td>
-			</tr>
-			<tr>
-				<td align="right">&search.marc.value;</td>
-				<td colspan='3' align="left"><input name='advanced.marc.value' size='18' /></td>
-			</tr>
-			<tr name='crow' class='hide_me'>
-				<td colspan='4' align='center'>
-				<a href='javascript:void(0);' class='classic_link'
-					onclick='
-						var div = $("adv_marc_search_sidebar");
-						if( div.getElementsByTagName("table").length > 1 )
-							div.removeChild(this.parentNode.parentNode.parentNode.parentNode);'>&common.close;</a>
-				</td>
-			</tr>
-							
-		</tbody>
-	</table>
-	<div id='adv_marc_submit' class='adv_quick_search_submit'>
-		<a style='margin-right: 4px; position:relative;top:-10px;' class='classic_link' href='javascript:advAddMARC();'>&search.marc.add.row;</a>
-		<!-- <a style='margin-left: 4px;' class='classic_link' href='javascript:advMARCRun();'>&common.submit;</a> -->
-		<img alt="Search" src="/opac/skin/kcls/graphics/search_btn.gif" onclick='advMARCRun();' style="cursor:pointer;" />
-	</div>
-</div>
-<!-- ****************** end: advanced_global.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2
index 664b421..984c999 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2
@@ -1,8 +1,9 @@
 <!-- ****************** libselect.xml ***************************** -->
-	<span id='depth_selector_span'>
+    <span id='depth_selector_span'>
         <select id='depth_selector'><!-- XXX TODO --></select>
-	</span>
-	<span style="display:none" id='lib_selector_span'>
-		<a id='lib_selector_link' class='classic_link' href='javascript:void(0)'>&library.select.help;</a>
-	</span>
+    </span>
+    <span style="display:none" id='lib_selector_span'>
+        <a id='lib_selector_link' class='classic_link'
+            href='javascript:void(0)'>&library.select.help;</a>
+    </span>
 <!-- ****************** end: libselect.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
index 04b8ff4..ceca37e 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
@@ -18,8 +18,12 @@
             </td>
         </tr>
         <tr>
-            <td>[% INCLUDE "default/kcls-wire/parts/format_selector.tt2" %]</td>
-            <td>[% INCLUDE "default/kcls-wire/parts/libselect.tt2" %]</td>
+            <td>
+                [% INCLUDE "default/kcls-wire/parts/format_selector.tt2" %]
+            </td>
+            <td>
+                [% INCLUDE "default/kcls-wire/parts/libselect.tt2" %]
+            </td>
         </tr>
     </table>
  

commit cc5e1ae70eceb8210f3c9de9be09f8be8570205a
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 1 15:29:34 2011 -0500

    whitespace, syntax, and title fixes

diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2
index 69a9a3b..b0c26ef 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2
@@ -1,102 +1,102 @@
 <!-- ****************** rdetail_cn_details.xml ***************************** -->
 <table class='hide_me'>
-	<tbody>
-		<tr style='border: 3px solid #E0E0E0;' id='rdetail_volume_details_row' templateRow='1'>
-			<td colspan='10'>
-				<div style='text-align: center; margin-top: 6px; margin-bottom: 6px'>
-					<a name='print' href='javascript:void(0);' class='classic_link'>&rdetail.print;</a>
-					<table class='data_grid data_grid_center' style='width: 100%'>
-						<thead>
-							<tr>
-								<td width='33%'>&rdetail.cn.barcode;</td>
-								<td>&common.status;</td>
-								<td>&rdetail.cn.location;</td>
-								<td name='age_protect_label' class='hide_me'>&rdetail.cn.hold.age;</td>
-								<td name='create_date_label' class='hide_me'>&rdetail.cn.genesis;</td>
-								<td name='holdable_label' class='hide_me'>&rdetail.cn.holdable;</td>
-								<td name='due_date_label' class='hide_me'>&rdetail.cn.due;</td>
-							</tr>
-						</thead>
-						<tbody name='copies_tbody' class='copy_details_table' width='100%'>
-							<tr name='copies_row'>
-								<td>
-									<span name='barcode'> </span>
+    <tbody>
+        <tr style='border: 3px solid #E0E0E0;' id='rdetail_volume_details_row' templateRow='1'>
+            <td colspan='10'>
+                <div style='text-align: center; margin-top: 6px; margin-bottom: 6px'>
+                    <a name='print' href='javascript:void(0);' class='classic_link'>&rdetail.print;</a>
+                    <table class='data_grid data_grid_center' style='width: 100%'>
+                        <thead>
+                            <tr>
+                                <td width='33%'>&rdetail.cn.barcode;</td>
+                                <td>&common.status;</td>
+                                <td>&rdetail.cn.location;</td>
+                                <td name='age_protect_label' class='hide_me'>&rdetail.cn.hold.age;</td>
+                                <td name='create_date_label' class='hide_me'>&rdetail.cn.genesis;</td>
+                                <td name='holdable_label' class='hide_me'>&rdetail.cn.holdable;</td>
+                                <td name='due_date_label' class='hide_me'>&rdetail.cn.due;</td>
+                            </tr>
+                        </thead>
+                        <tbody name='copies_tbody' class='copy_details_table' width='100%'>
+                            <tr name='copies_row'>
+                                <td>
+                                    <span name='barcode'> </span>
                                     <a class='hide_me classic_link copy_more_info'
                                         name='details_link'>&rdetail.cn.more;</a>
                                     <a class='hide_me classic_link copy_more_info'
                                         name='less_details_link'>&rdetail.cn.less;</a>
                                     <a class='hide_me classic_link copy_more_info'
                                         name='copy_hold_link' href='javascript:void(0);'>&rdetail.cn.hold;</a>
-								</td>
-								<td name='status'> </td>
-								<td name='location'> </td>
-								<td name='age_protect_value' class='hide_me'>&rdetail.cn.disabled;</td>
-								<td name='create_date_value' class='hide_me'> </td>
-								<td name='copy_holdable_td' class='hide_me'>
-									<span name='copy_is_holdable'> </span>
-								</td>
-								<td name='copy_due_date_td' class='hide_me'>
-									<span name='copy_due_date'> </span>
-								</td>
-							</tr>
+                                </td>
+                                <td name='status'> </td>
+                                <td name='location'> </td>
+                                <td name='age_protect_value' class='hide_me'>&rdetail.cn.disabled;</td>
+                                <td name='create_date_value' class='hide_me'> </td>
+                                <td name='copy_holdable_td' class='hide_me'>
+                                    <span name='copy_is_holdable'> </span>
+                                </td>
+                                <td name='copy_due_date_td' class='hide_me'>
+                                    <span name='copy_due_date'> </span>
+                                </td>
+                            </tr>
 
-							<tr name='copy_extras_row' class='hide_me'>
-								<td colspan='10'>
-									<table width='100%' class='data_grid'>
-										<tbody name='extras_tbody'>
-											<tr name='extras_row' class='hide_me'>
-												<td name='type' width='20%'> 
+                            <tr name='copy_extras_row' class='hide_me'>
+                                <td colspan='10'>
+                                    <table width='100%' class='data_grid'>
+                                        <tbody name='extras_tbody'>
+                                            <tr name='extras_row' class='hide_me'>
+                                                <td name='type' width='20%'> 
                                                     <span name='note' class='hide_me'>
                                                         <b>&rdetail.cn.note;</b>
                                                     </span>
                                                     <span name='cat' class='hide_me'>
                                                         <b>&rdetail.cn.category;</b>
                                                     </span>
-												</td>
-												<td>
-													<span name='key'> </span> : <span name='value'> </span>
-												</td>
-											</tr>
-										</tbody>
-									</table>
-								</td>
-							</tr>
-						</tbody>
-					</table>
-				</div>
-			</td>
-		</tr>
-	</tbody>
+                                                </td>
+                                                <td>
+                                                    <span name='key'> </span> : <span name='value'> </span>
+                                                </td>
+                                            </tr>
+                                        </tbody>
+                                    </table>
+                                </td>
+                            </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </td>
+        </tr>
+    </tbody>
 </table>
 
 <span class='hide_me' id='rdetail.yes'>&common.yes;</span>
 <span class='hide_me' id='rdetail.no'>&common.no;</span>
 
 <div id='rdetail_print_details' class='hide_me'>
-	<div style='text-align: center; padding: 20px; width: 100%'>
-		<div style='width:100%; border: 2px solid #E0F0E0; margin-bottom: 20px;'>
+    <div style='text-align: center; padding: 20px; width: 100%'>
+        <div style='width:100%; border: 2px solid #E0F0E0; margin-bottom: 20px;'>
             <input type='submit' value='&rdetail.cn.print;' onclick='window.print();' />
-		</div>
-		<div name='body'> 
-			<table>
-				<tbody name='tbody'>
-					<tr><td>&common.library;</td><td colspan='2' name='lib'></td></tr>
-					<tr><td>&common.title;</td><td colspan='2' name='title'></td></tr>
-					<tr><td>&common.author;</td><td colspan='2' name='author'></td></tr>
-					<tr><td>&common.edition;</td><td colspan='2' name='edition'></td></tr>
-					<tr><td>&common.pubdate;</td><td colspan='2' name='pubdate'></td></tr>
-					<tr><td>&common.publisher;</td><td colspan='2' name='publisher'></td></tr>
-					<tr><td>&common.physical;</td><td colspan='2' name='phys'></td></tr>
-					<tr>
-						<td colspan='3' style='background: #E0F0E0;'> </td>
-					</tr>
+        </div>
+        <div name='body'> 
+            <table>
+                <tbody name='tbody'>
+                    <tr><td>&common.library;</td><td colspan='2' name='lib'></td></tr>
+                    <tr><td>&common.title;</td><td colspan='2' name='title'></td></tr>
+                    <tr><td>&common.author;</td><td colspan='2' name='author'></td></tr>
+                    <tr><td>&common.edition;</td><td colspan='2' name='edition'></td></tr>
+                    <tr><td>&common.pubdate;</td><td colspan='2' name='pubdate'></td></tr>
+                    <tr><td>&common.publisher;</td><td colspan='2' name='publisher'></td></tr>
+                    <tr><td>&common.physical;</td><td colspan='2' name='phys'></td></tr>
+                    <tr>
+                        <td colspan='3' style='background: #E0F0E0;'> </td>
+                    </tr>
                     <tr name='cnrow'>
                         <td><b>&common.callnumber;</b></td>
                         <td><b colspan='2' name='cn'></b></td>
                     </tr>
-				</tbody>
-			</table>
-		</div>
-	</div>
+                </tbody>
+            </table>
+        </div>
+    </div>
 </div>
 <!-- ****************** end: rdetail_cn_details.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2
index cc607e6..5ae3fe1 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2
@@ -1,31 +1,31 @@
 <!-- ****************** rdetail_extras.xml ***************************** -->
 <div xmlns:xi="http://www.w3.org/2001/XInclude" id="rdetail_main_div" class="">
-	<table class='hide_me rdetails_extra_links'>
-		<thead>
-			<tr>
-				<td id='rdetail_annotation_link' class='hide_me rdetail_extras_td'
-					style='padding-right: 15px; padding-left: 15px;' >
-					<a href='javascript:rdetailShowExtra("annotation");' 
-						class='classic_link'>&rdetail.extras.annotation;</a>
-				</td>
-			</tr>
-		</thead>
-	</table>
+    <table class='hide_me rdetails_extra_links'>
+        <thead>
+            <tr>
+                <td id='rdetail_annotation_link' class='hide_me rdetail_extras_td'
+                    style='padding-right: 15px; padding-left: 15px;' >
+                    <a href='javascript:rdetailShowExtra("annotation");' 
+                        class='classic_link'>&rdetail.extras.annotation;</a>
+                </td>
+            </tr>
+        </thead>
+    </table>
 
-	<div id='rdetail_extras_div' style='width: 100%;'> 
-		<div id='rdetail_extras_loading' class='hide_me' 
-			style='padding: 10px;'>&common.loading;</div>
+    <div id='rdetail_extras_div' style='width: 100%;'> 
+        <div id='rdetail_extras_loading' class='hide_me' 
+            style='padding: 10px;'>&common.loading;</div>
 
         <div rel="rdetail_summary_div" rel2="summary" class="rdetail_extras hide_me" id="rdetail_summary_link">
             <div class="rdetail_extras_hr"></div>
-		    <div class="rdetail_extras_link">
+            <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("summary");'><img
                     alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("summary");'
                     class="rdetail_extras_lbl">Summary</a>
-		    </div>
-		</div>
-		<div id='rdetail_summary_div' class='rdetail_extras_div hide_me'> 
+            </div>
+        </div>
+        <div id='rdetail_summary_div' class='rdetail_extras_div hide_me'> 
             <table style="margin-bottom:10px;" cellpadding="0" cellspacing="0" border="0">
                 <tr>
                     <td width="1" style="padding-right:7px;" valign="top">
@@ -36,19 +36,19 @@
                     </td>
                 </tr>
             </table>
-			<iframe width="100%" height="500" id="content_cafe_summary" frameborder="0" />
-		</div>
-		
+            <iframe width="100%" height="500" id="content_cafe_summary" frameborder="0"></iframe>
+        </div>
+        
         <div rel="rdetail_subject_div" rel2="subject" class="rdetail_extras hide_me" id="rdetail_subject_link">
             <div class="rdetail_extras_hr"></div>
-		    <div class="rdetail_extras_link">
+            <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("subject");'><img
                     alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
-			    <a href='javascript:rdetailShowExtra("subject");' class="rdetail_extras_lbl">subject</a>
-		    </div>
-		</div>
+                <a href='javascript:rdetailShowExtra("subject");' class="rdetail_extras_lbl">subject</a>
+            </div>
+        </div>
 
-		<div id='rdetail_subject_div' class='rdetail_extras_div hide_me'> 
+        <div id='rdetail_subject_div' class='rdetail_extras_div hide_me'> 
             <table cellpadding="0" cellspacing="0" border="0">
                 <tr>
                     <td width="1" style="padding-right:7px;" valign="top">
@@ -125,29 +125,29 @@
         <div rel="rdetail_content_div" rel2="content"
             class="rdetail_extras hide_me" id="rdetail_content_link">
             <div class="rdetail_extras_hr"></div>
-		    <div class="rdetail_extras_link">
+            <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("content");'><img alt=""
                     src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
-			    <a href='javascript:rdetailShowExtra("content");' class="rdetail_extras_lbl">Contents</a>
-		    </div>
-		</div>
+                <a href='javascript:rdetailShowExtra("content");' class="rdetail_extras_lbl">Contents</a>
+            </div>
+        </div>
 
-		<div id='rdetail_content_div' class='rdetail_extras_div hide_me'>
+        <div id='rdetail_content_div' class='rdetail_extras_div hide_me'>
             <strong>Contents:</strong>
             <div id='rdetail_content_div_inner' style="padding-bottom:10px;"></div>
             <strong>&rdetail.extras.toc;:</strong>
             <div id='rdetail_toc_div' class='rdetail_extras_div'></div>
-		</div>
-		
+        </div>
+        
         <div rel="rdetail_authors_div" rel2="authors"
             class="rdetail_extras hide_me" id="rdetail_authors_link"><div class="rdetail_extras_hr"></div>
-		    <div class="rdetail_extras_link">
+            <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("authors");'><img
                     alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
-			    <a href='javascript:rdetailShowExtra("authors");' class="rdetail_extras_lbl">Author</a>
-		    </div>
-		</div>
-		<div id='rdetail_authors_div' class='rdetail_extras_div hide_me'>
+                <a href='javascript:rdetailShowExtra("authors");' class="rdetail_extras_lbl">Author</a>
+            </div>
+        </div>
+        <div id='rdetail_authors_div' class='rdetail_extras_div hide_me'>
             <strong>Authors:</strong>
             <div id="rdetail_authors_inner" style="padding-bottom:10px;"></div>
             <strong>Added Authors:</strong>
@@ -158,35 +158,35 @@
             <div id="rdetail_cast" style="padding-bottom:10px;"></div>
             <strong>Author Notes:</strong>
             <div id='rdetail_anotes_div' class='rdetail_extras_div'> </div>
-		</div>
-		
+        </div>
+        
         <div rel="rdetail_series_div" rel2="series"
             class="rdetail_extras hide_me" id="rdetail_series_link"><div class="rdetail_extras_hr"></div>
-		    <div class="rdetail_extras_link">
+            <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("series");'><img
                     alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("series");'
                     class="rdetail_extras_lbl">series</a>
-		    </div>
-		</div>
+            </div>
+        </div>
 
-		<div id='rdetail_series_div' class='rdetail_extras_div hide_me'> 
+        <div id='rdetail_series_div' class='rdetail_extras_div hide_me'> 
             <strong>Series:</strong>
             <div id='rdetail_series_container'></div>
-		</div>
-		
+        </div>
+        
         <div rel="rdetail_awards_div" rel2="awards"
             class="rdetail_extras hide_me" id="rdetail_awards_link">
             <div class="rdetail_extras_hr"></div>
-		    <div class="rdetail_extras_link">
+            <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("awards");'><img
                     alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("awards");'
                     class="rdetail_extras_lbl">awards, reviews &amp; suggested reads</a>
-		    </div>
-		</div>
+            </div>
+        </div>
 
-		<div id='rdetail_awards_div' class='rdetail_extras_div hide_me'> 
+        <div id='rdetail_awards_div' class='rdetail_extras_div hide_me'> 
             <strong>Awards:</strong>
             <div id='rdetail_awards_cont' style="margin-bottom:20px;"></div>
                 <strong>Patron Reviews:</strong>
@@ -198,122 +198,122 @@
                 <div id='rdetail_review_container' style="margin-bottom:20px;"></div>
                 <strong>Suggested Reads:</strong>
                 <div id='rdetail_novelist_div' class='rdetail_extras_div'>
-			    <div id="NoveListSelect" class="NoveListSelect">
+                <div id="NoveListSelect" class="NoveListSelect">
                     <div id="NoveListAnchor" class="NoveListSelect"></div>
                     <div id="novsuggestions"></div>
                     <div id="nextreads"></div>
                     <div id="novrelatedauthors"></div>
-			        <div id="novrelateditems"></div>
-			    </div>
-			</div>
-		</div>
-		
+                    <div id="novrelateditems"></div>
+                </div>
+            </div>
+        </div>
+        
         <div rel="rdetail_reviews_div" rel2="reviews" class="rdetail_extras hide_me"
             id="rdetail_reviews_link">
             <div class="rdetail_extras_hr"></div>
-		    <div class="rdetail_extras_link">
+            <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("reviews");'><img
                     alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("reviews");'
                     class="rdetail_extras_lbl">&rdetail.extras.reviews;</a>
-		    </div>
-		</div>
+            </div>
+        </div>
 
-		<div id='rdetail_reviews_div' class='rdetail_extras_div hide_me'> </div>
+        <div id='rdetail_reviews_div' class='rdetail_extras_div hide_me'> </div>
 
         <div rel="rdetail_excerpt_div" rel2="excerpt"
             class="rdetail_extras hide_me" id="rdetail_excerpt_link">
             <div class="rdetail_extras_hr"></div>
-		    <div class="rdetail_extras_link">
+            <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("excerpt");'><img
                     alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("excerpt");'
                     class="rdetail_extras_lbl">&rdetail.extras.excerpt;</a>
-		    </div>
-		</div>
+            </div>
+        </div>
 
-		<div id='rdetail_excerpt_div' class='rdetail_extras_div hide_me'> </div>
-		
+        <div id='rdetail_excerpt_div' class='rdetail_extras_div hide_me'> </div>
+        
         <div rel="rdetail_preview_div" rel2="preview"
             class="rdetail_extras hide_me" id="rdetail_preview_link">
             <div class="rdetail_extras_hr"></div>
-		    <div class="rdetail_extras_link">
+            <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("preview");'><img
                     alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("preview");'
                     class="rdetail_extras_lbl">&rdetail.extras.preview;</a>
-		    </div>
-		</div>
+            </div>
+        </div>
 
-		<div id='rdetail_preview_div' class='rdetail_extras_div hide_me'> </div>
-		
+        <div id='rdetail_preview_div' class='rdetail_extras_div hide_me'> </div>
+        
         <div rel="rdetail_novelist_div" rel2="novelist"
             class="rdetail_extras hide_me" id="rdetail_novelist_link">
             <div class="rdetail_extras_hr"></div>
-		    <div class="rdetail_extras_link">
+            <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("novelist");'><img
                     alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("novelist");'
                     class="rdetail_extras_lbl">&rdetail.extras.novelist;</a>
-		    </div>
-		</div>
+            </div>
+        </div>
 
         <div rel="rdetail_cn_browse_div" rel2="cn" class="rdetail_extras"
             id="rdetail_viewcn_link">
             <div class="rdetail_extras_hr"></div>
-		    <div class="rdetail_extras_link">
+            <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("cn");'><img
                     alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("cn");'
                     class="rdetail_extras_lbl">&rdetail.extras.browser;</a>
-		    </div>
-		</div>
+            </div>
+        </div>
 
-		<div id='rdetail_cn_browse_div' style='text-align: center;' class='hide_me'>
+        <div id='rdetail_cn_browse_div' style='text-align: center;' class='hide_me'>
             <div id='cn_browse_none' class='hide_me color_4'
                 style='width: 90%; text-align: center; margin: 10px;'>
-				&rdetail.extras.call.null;
-			</div>
+                &rdetail.extras.call.null;
+            </div>
 
-			<div id='rdetail_cn_browse_select_div' 
-				style='width: 100%; border: 1px solid black; padding: 6px; margin-top: 5px;'>
-				<span>&rdetail.extras.call.local; </span>
-				<select id='cn_browse_selector'> </select>
-			</div>
+            <div id='rdetail_cn_browse_select_div' 
+                style='width: 100%; border: 1px solid black; padding: 6px; margin-top: 5px;'>
+                <span>&rdetail.extras.call.local; </span>
+                <select id='cn_browse_selector'> </select>
+            </div>
             [% INCLUDE "default/kcls-wire/parts/cn_browse.tt2" %]
-		</div>
+        </div>
 
         [% INCLUDE "default/kcls-wire/parts/record/cn_details.tt2" %]
 
         <div rel="rdetail_copy_info_div" rel2="copyinfo"
             class="rdetail_extras" id="rdetail_copy_info_link">
             <div class="rdetail_extras_hr"></div>
-		    <div class="rdetail_extras_link">
+            <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("copyinfo");'><img
                     alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("copyinfo");'
                     class="rdetail_extras_lbl">&rdetail.extras.summary;</a>
-		    </div>
-		</div>
+            </div>
+        </div>
 
         [% INCLUDE "default/kcls-wire/parts/record/copyinfo.tt2" %]
 
         <div rel="rdetail_marc_div" rel2="marc" class="rdetail_extras" id="rdetail_viewmarc_link">
             <div class="rdetail_extras_hr"></div>
-		    <div class="rdetail_extras_link">
+            <div class="rdetail_extras_link">
                 <a href='javascript:rdetailShowExtra("marc");'><img
                     alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
                 <a href='javascript:rdetailShowExtra("marc");'
                     class="rdetail_extras_lbl">&rdetail.extras.marc;</a>
-		    </div>
-		</div>
-		<div id='rdetail_marc_div' class='rdetail_extras_div hide_me'>
-			<div id='rdetail_view_marc_box'></div>
-		</div>
-	</div>
-	<div id='rdetail_preview_full_text' class='hide_me'>&rdetail.extras.preview.fulltext;</div>
-	<div id='rdetail_preview_title' class='hide_me'>&rdetail.extras.preview.title;</div>
-	<div id='rdetail_preview_badge' class='hide_me'>&rdetail.extras.preview.badge;</div>
+            </div>
+        </div>
+        <div id='rdetail_marc_div' class='rdetail_extras_div hide_me'>
+            <div id='rdetail_view_marc_box'></div>
+        </div>
+    </div>
+    <div id='rdetail_preview_full_text' class='hide_me'>&rdetail.extras.preview.fulltext;</div>
+    <div id='rdetail_preview_title' class='hide_me'>&rdetail.extras.preview.title;</div>
+    <div id='rdetail_preview_badge' class='hide_me'>&rdetail.extras.preview.badge;</div>
 </div>
 
 <!-- XXX TODO Novelist stuff here? -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/record.tt2 b/Open-ILS/web/templates/default/kcls-wire/record.tt2
index 7717f87..db3196c 100644
--- a/Open-ILS/web/templates/default/kcls-wire/record.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/record.tt2
@@ -1,6 +1,6 @@
 [%  WRAPPER "default/kcls-wire/parts/base.tt2";
     INCLUDE "default/kcls-wire/parts/topnav.tt2";
-    ctx.page_title = "Account Login" %]
+    ctx.page_title = "Record Detail" %]
 [% BLOCK html_head -%]
 <style type="text/css">
     #rdetail_copy_info_table { font-size: 8pt; }

commit 7b20d3052155ce1769c131ff26b5ef099f1eacfb
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 1 15:25:55 2011 -0500

    forgot this for record

diff --git a/Open-ILS/web/templates/default/kcls-wire/record.tt2 b/Open-ILS/web/templates/default/kcls-wire/record.tt2
index b56a597..7717f87 100644
--- a/Open-ILS/web/templates/default/kcls-wire/record.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/record.tt2
@@ -2,7 +2,10 @@
     INCLUDE "default/kcls-wire/parts/topnav.tt2";
     ctx.page_title = "Account Login" %]
 [% BLOCK html_head -%]
-<script type="text/javascript" src="/opac/skin/kcls/js/contentslider.js"></script>
+<style type="text/css">
+    #rdetail_copy_info_table { font-size: 8pt; }
+    #rdetail_copy_info_table td { padding: 3px; }
+</style>
 [%- END %]
     <div id="search-wrapper">
         [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]

commit 3abda51204acf8109ef3aac8c39704b9c78b926f
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 1 15:25:29 2011 -0500

    record more complete

diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/cn_browse.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/cn_browse.tt2
new file mode 100644
index 0000000..b104391
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/cn_browse.tt2
@@ -0,0 +1,43 @@
+<!-- ****************** cn_browse.xml ***************************** -->
+<div id='cn_browse' class='hide_me cn_browser' 
+    style='width: 95%; text-align: center; padding: 15px;'>
+    <div id='cn_browse_loading' class='cn_browse_loading hide_me'>&common.cn.loading;</div>
+    <div id='cn_browse_div'> 
+        <div style='width: 90%; text-align: center; margin: 10px;' class='color_4'>
+            <span>&common.cn.browsing;</span>
+            <b style='margin-left: 6px;' id='cn_browse_where'> </b>
+        </div>
+        <table class='data_grid bookshelf' width='100%'>
+            <thead>
+                <tr>
+                    <td>
+                        <a id='cn_browse_next' class='classic_link' 
+                        href='javascript:cnBrowsePrev();'><b>&common.cn.previous;</b></a>
+                    </td>
+                    <td colspan='1' align='center'>&common.cn.shelf;</td>
+                    <td>
+                        <a id='cn_browse_prev' class='classic_link' 
+                            href='javascript:cnBrowseNext();'><b>&common.cn.next;</b></a>
+                    </td>
+                </tr>
+            </thead>
+            <tbody id='cn_tbody'>
+                <tr id='cn_browse_row'>
+                    <td id='cn_browse_td' class='cn_browse_item' width='25%' valign='top'>
+                        <a><img height='60' width='50' 
+                            class='cn_browse_info' name='cn_browse_pic' border='0' /></a>
+                        <div style='font-weight: bold;' class='cn_browse_info' name='cn_browse_cn'></div>
+                        <div class='cn_browse_info'>
+                            <a name='cn_browse_title' class='classic_link'></a>
+                        </div>
+                        <div class='cn_browse_info'>
+                            <a name='cn_browse_author' class='classic_link'>  </a>
+                        </div>
+                        <div class='cn_browse_info' name='cn_browse_lib'>  </div>
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+</div>
+<!-- ****************** end: cn_browse.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2
new file mode 100644
index 0000000..69a9a3b
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/cn_details.tt2
@@ -0,0 +1,102 @@
+<!-- ****************** rdetail_cn_details.xml ***************************** -->
+<table class='hide_me'>
+	<tbody>
+		<tr style='border: 3px solid #E0E0E0;' id='rdetail_volume_details_row' templateRow='1'>
+			<td colspan='10'>
+				<div style='text-align: center; margin-top: 6px; margin-bottom: 6px'>
+					<a name='print' href='javascript:void(0);' class='classic_link'>&rdetail.print;</a>
+					<table class='data_grid data_grid_center' style='width: 100%'>
+						<thead>
+							<tr>
+								<td width='33%'>&rdetail.cn.barcode;</td>
+								<td>&common.status;</td>
+								<td>&rdetail.cn.location;</td>
+								<td name='age_protect_label' class='hide_me'>&rdetail.cn.hold.age;</td>
+								<td name='create_date_label' class='hide_me'>&rdetail.cn.genesis;</td>
+								<td name='holdable_label' class='hide_me'>&rdetail.cn.holdable;</td>
+								<td name='due_date_label' class='hide_me'>&rdetail.cn.due;</td>
+							</tr>
+						</thead>
+						<tbody name='copies_tbody' class='copy_details_table' width='100%'>
+							<tr name='copies_row'>
+								<td>
+									<span name='barcode'> </span>
+                                    <a class='hide_me classic_link copy_more_info'
+                                        name='details_link'>&rdetail.cn.more;</a>
+                                    <a class='hide_me classic_link copy_more_info'
+                                        name='less_details_link'>&rdetail.cn.less;</a>
+                                    <a class='hide_me classic_link copy_more_info'
+                                        name='copy_hold_link' href='javascript:void(0);'>&rdetail.cn.hold;</a>
+								</td>
+								<td name='status'> </td>
+								<td name='location'> </td>
+								<td name='age_protect_value' class='hide_me'>&rdetail.cn.disabled;</td>
+								<td name='create_date_value' class='hide_me'> </td>
+								<td name='copy_holdable_td' class='hide_me'>
+									<span name='copy_is_holdable'> </span>
+								</td>
+								<td name='copy_due_date_td' class='hide_me'>
+									<span name='copy_due_date'> </span>
+								</td>
+							</tr>
+
+							<tr name='copy_extras_row' class='hide_me'>
+								<td colspan='10'>
+									<table width='100%' class='data_grid'>
+										<tbody name='extras_tbody'>
+											<tr name='extras_row' class='hide_me'>
+												<td name='type' width='20%'> 
+                                                    <span name='note' class='hide_me'>
+                                                        <b>&rdetail.cn.note;</b>
+                                                    </span>
+                                                    <span name='cat' class='hide_me'>
+                                                        <b>&rdetail.cn.category;</b>
+                                                    </span>
+												</td>
+												<td>
+													<span name='key'> </span> : <span name='value'> </span>
+												</td>
+											</tr>
+										</tbody>
+									</table>
+								</td>
+							</tr>
+						</tbody>
+					</table>
+				</div>
+			</td>
+		</tr>
+	</tbody>
+</table>
+
+<span class='hide_me' id='rdetail.yes'>&common.yes;</span>
+<span class='hide_me' id='rdetail.no'>&common.no;</span>
+
+<div id='rdetail_print_details' class='hide_me'>
+	<div style='text-align: center; padding: 20px; width: 100%'>
+		<div style='width:100%; border: 2px solid #E0F0E0; margin-bottom: 20px;'>
+            <input type='submit' value='&rdetail.cn.print;' onclick='window.print();' />
+		</div>
+		<div name='body'> 
+			<table>
+				<tbody name='tbody'>
+					<tr><td>&common.library;</td><td colspan='2' name='lib'></td></tr>
+					<tr><td>&common.title;</td><td colspan='2' name='title'></td></tr>
+					<tr><td>&common.author;</td><td colspan='2' name='author'></td></tr>
+					<tr><td>&common.edition;</td><td colspan='2' name='edition'></td></tr>
+					<tr><td>&common.pubdate;</td><td colspan='2' name='pubdate'></td></tr>
+					<tr><td>&common.publisher;</td><td colspan='2' name='publisher'></td></tr>
+					<tr><td>&common.physical;</td><td colspan='2' name='phys'></td></tr>
+					<tr>
+						<td colspan='3' style='background: #E0F0E0;'> </td>
+					</tr>
+                    <tr name='cnrow'>
+                        <td><b>&common.callnumber;</b></td>
+                        <td><b colspan='2' name='cn'></b></td>
+                    </tr>
+				</tbody>
+			</table>
+		</div>
+	</div>
+</div>
+<!-- ****************** end: rdetail_cn_details.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/copyinfo.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/copyinfo.tt2
new file mode 100644
index 0000000..6c78071
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/copyinfo.tt2
@@ -0,0 +1,68 @@
+<!-- ****************** rdetail_copyinfo.xml ***************************** -->
+<div id='rdetail_copy_info_div' class='rdetail_extras_div hide_me'>
+    <div style='width: 100%; text-align: center; padding-bottom: 5px;'>
+        <span>
+            <a href='javascript:void(0);' id='copy_info_local_link' 
+                class='rdetail_copy_nav_link hide_me classic_link'><b>&rdetail.copyInfo.local;</b></a>
+        </span>
+        <span width=''>
+            <a href='javascript:void(0);' id='copy_info_all_link' 
+                class='rdetail_copy_nav_link classic_link'><b>&rdetail.copyInfo.all;</b></a>
+        </span>
+    </div>
+    <table id='rdetail_copy_info_table' class='data_grid'>
+        <thead>
+            <tr>
+                <td class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.library;</td>
+                <td class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.callnumber;</td>
+                <td name='rdetail_copylocation_header' class='rdetail_copy_info_header_cell hide_me'>
+                    &rdetail.copyInfo.copylocation;
+                </td>
+                <td class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.actions;</td>
+                <td nowrap='nowrap' class='rdetail_copy_info_header_cell' id='rdetail_copy_info_status'> 
+                    <div name='rdetail_status_cell'> </div>
+                </td>
+            </tr>
+        </thead>
+        <tbody id='rdetail_copy_info_tbody'>
+            <tr id='rdetail_copy_info_row' class='hide_me'>
+                <td name='rdetail_library_cell'>
+                    <a name='lib_print_link' class='hide_me classic_link'
+                        style='font-size: 8pt; padding-left: 20px;'>&rdetail.copyInfo.print;</a>
+                </td>
+                <td name='rdetail_callnumber_cell'> </td>
+                <td class="hide_me" name='rdetail_copylocation_cell'> </td>
+                <td name='rdetail_actions_cell'> 
+                    <div style='padding-bottom: 1px;'>
+                        <a style='font-size: 8pt;'
+                            name='details' class='hide_me classic_link'>&rdetail.copyInfo.details;</a>
+                    </div>
+                    <div style='margin-top: 2px;'>
+                        <a name='browse' style='font-size: 8pt;'
+                            class='hide_me classic_link'>&rdetail.copyInfo.browse;</a>
+                    </div>
+                    <div style='margin-top: 2px;' name='hold_div' class='hide_me'>
+                        <a name='hold' style='font-size: 8pt;' href='javascript:void(0);'
+                            class='classic_link'>&rdetail.copyInfo.hold;</a>
+                    </div>
+                </td>
+                <td nowrap='nowrap' class='rdetail_copy_count_cell vertical' 
+                    name='rdetail_copy_count_cell'>
+                </td>
+            </tr>
+            <tr id='rdetail_copy_info_loading'>
+                <td>
+                    &rdetail.loading;
+                </td>
+            </tr>
+        </tbody>
+    </table>
+    <!-- <table class='hide_me'>
+        <tbody>
+        <tr style='border: 3px solid #E0E0E0;' id='rdetail_volume_details_row'><td colspan='10'></td></tr>
+        </tbody>
+    </table> -->
+    <br/><br/>
+    <div id='rdetail_copy_info_none' class='hide_me'>&rdetail.noneAvailable;</div>
+</div> <!-- copy info -->
+<!-- ****************** end: rdetail_copyinfo.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2
index c8f0d2c..cc607e6 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2
@@ -280,10 +280,10 @@
 				<span>&rdetail.extras.call.local; </span>
 				<select id='cn_browse_selector'> </select>
 			</div>
-            <!-- XXX TODO common/cn_browse -->
+            [% INCLUDE "default/kcls-wire/parts/cn_browse.tt2" %]
 		</div>
 
-        <!-- XXX TODO rdetail_cn_details -->
+        [% INCLUDE "default/kcls-wire/parts/record/cn_details.tt2" %]
 
         <div rel="rdetail_copy_info_div" rel2="copyinfo"
             class="rdetail_extras" id="rdetail_copy_info_link">
@@ -295,7 +295,8 @@
                     class="rdetail_extras_lbl">&rdetail.extras.summary;</a>
 		    </div>
 		</div>
-		<!-- XXX TODO rdetail_copyinfo -->
+
+        [% INCLUDE "default/kcls-wire/parts/record/copyinfo.tt2" %]
 
         <div rel="rdetail_marc_div" rel2="marc" class="rdetail_extras" id="rdetail_viewmarc_link">
             <div class="rdetail_extras_hr"></div>

commit 1204fe7210646df75dbce5ce64672bc053bbce3c
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Feb 1 14:34:28 2011 -0500

    Add record page; cleanup and reorg

diff --git a/Open-ILS/web/templates/default/kcls-wire/login.tt2 b/Open-ILS/web/templates/default/kcls-wire/login.tt2
index a402a6f..0cf55a5 100644
--- a/Open-ILS/web/templates/default/kcls-wire/login.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/login.tt2
@@ -10,8 +10,8 @@
     </div>
     <div id="content-wrapper">
         <div id="main-content">
-            [% INCLUDE "default/kcls-wire/parts/login_form.tt2" %]
-            <div style="clear:both;height:15px;"></div>	
+            [% INCLUDE "default/kcls-wire/parts/login/form.tt2" %]
+            <div style="clear:both;height:30px;"></div>	
         </div>
     </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/login_form.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/login_form.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/login/form.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2
new file mode 100644
index 0000000..905e91d
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/body.tt2
@@ -0,0 +1,114 @@
+<!-- ****************** page_rdetail.xml ***************************** -->
+<div id='canvas_main' class='canvas'>
+    <div id="rdetail_header">
+        <div style="float:left;">
+            Search Results&nbsp;&nbsp;&nbsp;
+            <span id="rdetail_result_count" class="hide_me">
+                Showing Item <strong id='np_offset'></strong>
+                &nbsp;of&nbsp;<strong id='np_count'></strong>
+            </span>
+        </div>
+        <div id="rdetail_result_nav">
+            <span class="hide_me">
+                <a class='np_nav_link classic_link' id='np_start'
+                    href='javascript:rdetailStart();'
+                    title="&rdetail.page.results;">&rdetail.start;</a>
+                </span>
+                <a class='np_nav_link classic_link hide_me' id='np_prev'
+                    href='javascript:rdetailPrev();'
+                    title='&rdetail.page.previous;'><span
+                        class="nav_arrow_fix">&#9668;</span> Previous</a>
+                <span style="padding:0px 10px;"> </span>
+                <a class='np_nav_link classic_link hide_me' id='np_next'
+                    href='javascript:rdetailNext();'
+                    title='&rdetail.page.next;'>Next <span
+                        class="nav_arrow_fix">&#9658;</span></a>
+                <span class="hide_me"><a class='np_nav_link classic_link'
+                    id='np_end' href='javascript:rdetailEnd();'
+                    title="&rdetail.page.last;">&rdetail.end;</a></span>
+        </div>
+        <div style="clear:both;"></div>
+    </div>
+
+    <table width='100%' id='np_table' border='0' class="hide_me">
+        <tbody>
+            <tr class='color_4'>
+                <td style='vertical-align: top;' align="center">
+                    <span style="float:left"><a href="javascript:;"
+                        onclick="history.go(-1);">&laquo; Back</a></span>
+                    <span></span>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+
+    <table style='' class='rdetail_header color_1 hide_me' width='100%'
+        border="0" cellspacing="0" cellpadding="0">
+        <tbody>
+            <tr>
+                <td width='33%' align='left' class="hide_me">
+                    <span>&rdetail.detailMain.headerLabel;</span>
+                </td>
+                <td align='right' style='padding-right: 7px;' width='33%'>
+                    <span id='rdetail_exp_refworks_span' class='hide_me'
+                        style='padding-right: 7px;'>
+                        <a id='rdetail_exp_refworks'>&opac.holds.exportRefWorks;</a>
+                    </span>
+                    <span style='padding-right: 7px;' class='hide_me'
+                        id='rdetail_more_actions'>
+                        <select id='rdetail_more_actions_selector'
+                            style='max-width: 11em;' class="hide_me">
+                            <option value='start'>
+                                &rdetail.more;
+                            </option>
+                            <option disabled='disabled'>
+                                --------------
+                            </option>
+                            <option disabled='disabled'>
+                                &rdetail.bookbag.add;
+                            </option>
+                            <option disabled='disabled'>
+                                --------------
+                            </option>
+                            <option value='new_bookbag'
+                                onclick='rdetailNewBookbag();'>
+                                &rdetail.bookbag.create;
+                            </option>
+                        </select>
+                    </span>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+
+    <div style='font-weight: bold; padding: 5px; margin: 5px; width: 100%;' 
+        class='hide_me color_4' id='rdetail_deleted_exp'>
+        &rdetail.record.deleted;
+    </div>
+
+    [% INCLUDE "default/kcls-wire/parts/record/summary.tt2" %]
+    <br />
+    <div style="width:100%;" class="hide_me">
+        <div style="float:right;" class="hide_me" id="lib_info_more">
+            <button onclick="unHideMe($('lib_info_less'));unHideMe($('rdetails_status2'));hideMe($('lib_info_more'));">More...</button>
+        </div>
+        <div style="float:right;" class="hide_me" id="lib_info_less">
+            <button onclick="hideMe($('lib_info_less'));hideMe($('rdetails_status2'));unHideMe($('lib_info_more'));">...Less</button>
+        </div>
+    </div>
+    [% INCLUDE "default/kcls-wire/parts/record/extras.tt2" %]
+
+    <div class='hide_me' id='rdetail_bb_none'>
+        &rdetail.none;
+    </div>
+    <div class='hide_me' id='rdetail_bb_item_success'>
+        &rdetail.bookbag.add.success;
+    </div>
+    <div class='hide_me' id='rdetail_bb_new'>
+        &rdetail.bookbag.name;
+    </div>
+    <div class='hide_me' id='rdetail_bb_success'>
+        &rdetail.bookbag.create.success;
+    </div>
+</div>
+<!-- ****************** end; page_rdetail.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2
new file mode 100644
index 0000000..c8f0d2c
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/extras.tt2
@@ -0,0 +1,320 @@
+<!-- ****************** rdetail_extras.xml ***************************** -->
+<div xmlns:xi="http://www.w3.org/2001/XInclude" id="rdetail_main_div" class="">
+	<table class='hide_me rdetails_extra_links'>
+		<thead>
+			<tr>
+				<td id='rdetail_annotation_link' class='hide_me rdetail_extras_td'
+					style='padding-right: 15px; padding-left: 15px;' >
+					<a href='javascript:rdetailShowExtra("annotation");' 
+						class='classic_link'>&rdetail.extras.annotation;</a>
+				</td>
+			</tr>
+		</thead>
+	</table>
+
+	<div id='rdetail_extras_div' style='width: 100%;'> 
+		<div id='rdetail_extras_loading' class='hide_me' 
+			style='padding: 10px;'>&common.loading;</div>
+
+        <div rel="rdetail_summary_div" rel2="summary" class="rdetail_extras hide_me" id="rdetail_summary_link">
+            <div class="rdetail_extras_hr"></div>
+		    <div class="rdetail_extras_link">
+                <a href='javascript:rdetailShowExtra("summary");'><img
+                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                <a href='javascript:rdetailShowExtra("summary");'
+                    class="rdetail_extras_lbl">Summary</a>
+		    </div>
+		</div>
+		<div id='rdetail_summary_div' class='rdetail_extras_div hide_me'> 
+            <table style="margin-bottom:10px;" cellpadding="0" cellspacing="0" border="0">
+                <tr>
+                    <td width="1" style="padding-right:7px;" valign="top">
+                        <strong>Summary: </strong>
+                    </td>
+                    <td>
+                        <div id='rdetail_summary_container'></div>
+                    </td>
+                </tr>
+            </table>
+			<iframe width="100%" height="500" id="content_cafe_summary" frameborder="0" />
+		</div>
+		
+        <div rel="rdetail_subject_div" rel2="subject" class="rdetail_extras hide_me" id="rdetail_subject_link">
+            <div class="rdetail_extras_hr"></div>
+		    <div class="rdetail_extras_link">
+                <a href='javascript:rdetailShowExtra("subject");'><img
+                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+			    <a href='javascript:rdetailShowExtra("subject");' class="rdetail_extras_lbl">subject</a>
+		    </div>
+		</div>
+
+		<div id='rdetail_subject_div' class='rdetail_extras_div hide_me'> 
+            <table cellpadding="0" cellspacing="0" border="0">
+                <tr>
+                    <td width="1" style="padding-right:7px;" valign="top">
+                        <strong>Subject: </strong>
+                    </td>
+                    <td>
+                        <div id='rdetail_subject_container'></div>
+                    </td>
+                </tr>
+                <tr>
+                    <td width="1" style="padding:5px 7px 0px 0px;" valign="top">
+                        <strong>Genre: </strong>
+                    </td>
+                    <td style="padding-top:5px;">
+                        <div id='rdetail_genre_cont'></div>
+                    </td>
+                </tr>
+                <tr>
+                    <td width="1" style="padding:5px 7px 0px 0px;white-space:nowrap;"
+                        nowrap="nowrap" valign="top">
+                        <strong>Topic Heading: </strong>
+                    </td>
+                    <td style="padding-top:5px;">
+                        <div id='rdetail_topic_cont'></div>
+                    </td>
+                </tr>
+                <tr>
+                    <td width="1" style="padding:5px 7px 0px 0px;white-space:nowrap;"
+                        nowrap="nowrap" valign="top">
+                        <strong>Geographic Setting: </strong>
+                    </td>
+                    <td style="padding-top:5px;">
+                        <div id='rdetail_geo_cont'></div>
+                    </td>
+                </tr>
+                <tr>
+                    <td width="1" style="padding:5px 7px 0px 0px;white-space:nowrap;"
+                        nowrap="nowrap" valign="top">
+                        <strong>Biographical Subject: </strong>
+                    </td>
+                    <td style="padding-top:5px;">
+                        <div id='rdetail_bio_cont'></div>
+                    </td>
+                </tr>
+                <tr>
+                    <td width="1" style="padding:5px 7px 0px 0px;white-space:nowrap;"
+                        nowrap="nowrap" valign="top">
+                        <strong>Character Attributes: </strong>
+                    </td>
+                    <td style="padding-top:5px;">
+                        <div id='rdetail_attrib_cont'></div>
+                    </td>
+                </tr>
+                <tr>
+                    <td width="1" style="padding:5px 7px 0px 0px;" valign="top">
+                        <strong>Setting: </strong>
+                    </td>
+                    <td style="padding-top:5px;">
+                        <div id='rdetail_setting_cont'></div>
+                    </td>
+                </tr>
+                <tr>
+                    <td width="1" style="padding:5px 7px 0px 0px;white-space:nowrap;"
+                        nowrap="nowrap" valign="top">
+                        <strong>Time Period: </strong>
+                    </td>
+                    <td style="padding-top:5px;">
+                        <div id='rdetail_time_cont'></div>
+                    </td>
+                </tr>
+            </table>
+        </div>
+
+        <div rel="rdetail_content_div" rel2="content"
+            class="rdetail_extras hide_me" id="rdetail_content_link">
+            <div class="rdetail_extras_hr"></div>
+		    <div class="rdetail_extras_link">
+                <a href='javascript:rdetailShowExtra("content");'><img alt=""
+                    src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+			    <a href='javascript:rdetailShowExtra("content");' class="rdetail_extras_lbl">Contents</a>
+		    </div>
+		</div>
+
+		<div id='rdetail_content_div' class='rdetail_extras_div hide_me'>
+            <strong>Contents:</strong>
+            <div id='rdetail_content_div_inner' style="padding-bottom:10px;"></div>
+            <strong>&rdetail.extras.toc;:</strong>
+            <div id='rdetail_toc_div' class='rdetail_extras_div'></div>
+		</div>
+		
+        <div rel="rdetail_authors_div" rel2="authors"
+            class="rdetail_extras hide_me" id="rdetail_authors_link"><div class="rdetail_extras_hr"></div>
+		    <div class="rdetail_extras_link">
+                <a href='javascript:rdetailShowExtra("authors");'><img
+                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+			    <a href='javascript:rdetailShowExtra("authors");' class="rdetail_extras_lbl">Author</a>
+		    </div>
+		</div>
+		<div id='rdetail_authors_div' class='rdetail_extras_div hide_me'>
+            <strong>Authors:</strong>
+            <div id="rdetail_authors_inner" style="padding-bottom:10px;"></div>
+            <strong>Added Authors:</strong>
+            <div id="rdetail_moar_authors" style="padding-bottom:10px;"></div>
+            <strong>Credits:</strong>
+            <div id="rdetail_credits" style="padding-bottom:10px;"></div>
+            <strong>Cast:</strong>
+            <div id="rdetail_cast" style="padding-bottom:10px;"></div>
+            <strong>Author Notes:</strong>
+            <div id='rdetail_anotes_div' class='rdetail_extras_div'> </div>
+		</div>
+		
+        <div rel="rdetail_series_div" rel2="series"
+            class="rdetail_extras hide_me" id="rdetail_series_link"><div class="rdetail_extras_hr"></div>
+		    <div class="rdetail_extras_link">
+                <a href='javascript:rdetailShowExtra("series");'><img
+                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                <a href='javascript:rdetailShowExtra("series");'
+                    class="rdetail_extras_lbl">series</a>
+		    </div>
+		</div>
+
+		<div id='rdetail_series_div' class='rdetail_extras_div hide_me'> 
+            <strong>Series:</strong>
+            <div id='rdetail_series_container'></div>
+		</div>
+		
+        <div rel="rdetail_awards_div" rel2="awards"
+            class="rdetail_extras hide_me" id="rdetail_awards_link">
+            <div class="rdetail_extras_hr"></div>
+		    <div class="rdetail_extras_link">
+                <a href='javascript:rdetailShowExtra("awards");'><img
+                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                <a href='javascript:rdetailShowExtra("awards");'
+                    class="rdetail_extras_lbl">awards, reviews &amp; suggested reads</a>
+		    </div>
+		</div>
+
+		<div id='rdetail_awards_div' class='rdetail_extras_div hide_me'> 
+            <strong>Awards:</strong>
+            <div id='rdetail_awards_cont' style="margin-bottom:20px;"></div>
+                <strong>Patron Reviews:</strong>
+                <div id='rdetail_chilifresh_reviews' class='hide_me' style="margin-bottom:20px;">
+                    <div id='chilifreshReviewLink' name='chilifreshReviewLink' class='chili_review'></div>
+                    <div id='chilifreshReviewResult' name='chilifreshReviewResult' style='display:none'></div>
+                </div>
+                <strong>Reviews:</strong>
+                <div id='rdetail_review_container' style="margin-bottom:20px;"></div>
+                <strong>Suggested Reads:</strong>
+                <div id='rdetail_novelist_div' class='rdetail_extras_div'>
+			    <div id="NoveListSelect" class="NoveListSelect">
+                    <div id="NoveListAnchor" class="NoveListSelect"></div>
+                    <div id="novsuggestions"></div>
+                    <div id="nextreads"></div>
+                    <div id="novrelatedauthors"></div>
+			        <div id="novrelateditems"></div>
+			    </div>
+			</div>
+		</div>
+		
+        <div rel="rdetail_reviews_div" rel2="reviews" class="rdetail_extras hide_me"
+            id="rdetail_reviews_link">
+            <div class="rdetail_extras_hr"></div>
+		    <div class="rdetail_extras_link">
+                <a href='javascript:rdetailShowExtra("reviews");'><img
+                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                <a href='javascript:rdetailShowExtra("reviews");'
+                    class="rdetail_extras_lbl">&rdetail.extras.reviews;</a>
+		    </div>
+		</div>
+
+		<div id='rdetail_reviews_div' class='rdetail_extras_div hide_me'> </div>
+
+        <div rel="rdetail_excerpt_div" rel2="excerpt"
+            class="rdetail_extras hide_me" id="rdetail_excerpt_link">
+            <div class="rdetail_extras_hr"></div>
+		    <div class="rdetail_extras_link">
+                <a href='javascript:rdetailShowExtra("excerpt");'><img
+                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                <a href='javascript:rdetailShowExtra("excerpt");'
+                    class="rdetail_extras_lbl">&rdetail.extras.excerpt;</a>
+		    </div>
+		</div>
+
+		<div id='rdetail_excerpt_div' class='rdetail_extras_div hide_me'> </div>
+		
+        <div rel="rdetail_preview_div" rel2="preview"
+            class="rdetail_extras hide_me" id="rdetail_preview_link">
+            <div class="rdetail_extras_hr"></div>
+		    <div class="rdetail_extras_link">
+                <a href='javascript:rdetailShowExtra("preview");'><img
+                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                <a href='javascript:rdetailShowExtra("preview");'
+                    class="rdetail_extras_lbl">&rdetail.extras.preview;</a>
+		    </div>
+		</div>
+
+		<div id='rdetail_preview_div' class='rdetail_extras_div hide_me'> </div>
+		
+        <div rel="rdetail_novelist_div" rel2="novelist"
+            class="rdetail_extras hide_me" id="rdetail_novelist_link">
+            <div class="rdetail_extras_hr"></div>
+		    <div class="rdetail_extras_link">
+                <a href='javascript:rdetailShowExtra("novelist");'><img
+                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                <a href='javascript:rdetailShowExtra("novelist");'
+                    class="rdetail_extras_lbl">&rdetail.extras.novelist;</a>
+		    </div>
+		</div>
+
+        <div rel="rdetail_cn_browse_div" rel2="cn" class="rdetail_extras"
+            id="rdetail_viewcn_link">
+            <div class="rdetail_extras_hr"></div>
+		    <div class="rdetail_extras_link">
+                <a href='javascript:rdetailShowExtra("cn");'><img
+                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                <a href='javascript:rdetailShowExtra("cn");'
+                    class="rdetail_extras_lbl">&rdetail.extras.browser;</a>
+		    </div>
+		</div>
+
+		<div id='rdetail_cn_browse_div' style='text-align: center;' class='hide_me'>
+            <div id='cn_browse_none' class='hide_me color_4'
+                style='width: 90%; text-align: center; margin: 10px;'>
+				&rdetail.extras.call.null;
+			</div>
+
+			<div id='rdetail_cn_browse_select_div' 
+				style='width: 100%; border: 1px solid black; padding: 6px; margin-top: 5px;'>
+				<span>&rdetail.extras.call.local; </span>
+				<select id='cn_browse_selector'> </select>
+			</div>
+            <!-- XXX TODO common/cn_browse -->
+		</div>
+
+        <!-- XXX TODO rdetail_cn_details -->
+
+        <div rel="rdetail_copy_info_div" rel2="copyinfo"
+            class="rdetail_extras" id="rdetail_copy_info_link">
+            <div class="rdetail_extras_hr"></div>
+		    <div class="rdetail_extras_link">
+                <a href='javascript:rdetailShowExtra("copyinfo");'><img
+                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                <a href='javascript:rdetailShowExtra("copyinfo");'
+                    class="rdetail_extras_lbl">&rdetail.extras.summary;</a>
+		    </div>
+		</div>
+		<!-- XXX TODO rdetail_copyinfo -->
+
+        <div rel="rdetail_marc_div" rel2="marc" class="rdetail_extras" id="rdetail_viewmarc_link">
+            <div class="rdetail_extras_hr"></div>
+		    <div class="rdetail_extras_link">
+                <a href='javascript:rdetailShowExtra("marc");'><img
+                    alt="" src="/opac/skin/kcls/graphics/rdetail_arrow.png" /></a>
+                <a href='javascript:rdetailShowExtra("marc");'
+                    class="rdetail_extras_lbl">&rdetail.extras.marc;</a>
+		    </div>
+		</div>
+		<div id='rdetail_marc_div' class='rdetail_extras_div hide_me'>
+			<div id='rdetail_view_marc_box'></div>
+		</div>
+	</div>
+	<div id='rdetail_preview_full_text' class='hide_me'>&rdetail.extras.preview.fulltext;</div>
+	<div id='rdetail_preview_title' class='hide_me'>&rdetail.extras.preview.title;</div>
+	<div id='rdetail_preview_badge' class='hide_me'>&rdetail.extras.preview.badge;</div>
+</div>
+
+<!-- XXX TODO Novelist stuff here? -->
+
+<!-- ****************** end: rdetail_extras.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2
new file mode 100644
index 0000000..fe8fa81
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/record/summary.tt2
@@ -0,0 +1,217 @@
+<!-- ****************** rdetail_summary.xml ***************************** -->
+<abbr class="unapi-id" title='tag:HTTP_HOST,OILS_TIME_YEAR:biblio-record_entry/OILS_OPAC_RID'></abbr><!-- XXX FIXME or remove -->
+<!-- This holds the record summary information -->
+
+<table width="100%" border="0" cellpadding="0" cellspacing="0" id="rdetail_details_table">
+    <tbody id="rdetail_details_tbody">
+        <tr>
+            <td width="90" valign="top" id="rdetail_image_cell">
+                <a id='rdetail_img_link' href='${ident.large}'><img
+                    alt="Image of item" style='border: none;' id='rdetail_image'
+                    src='${ident.small}' onload='unHideMe($("rdetail_img_link"))'
+                    onerror='hideMe($("rdetail.jacket_attrib_div"));hideMe($("rdetail_img_link"));'/></a>
+                <br />
+                <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
+                    <div>&opac.image_provided;</div>
+                    <div>
+                        <a target='_blank' href='&vendor.base_link;'
+                            class='classic_link' id='rdetail.jacket_attrib_link'>&vendor.name;</a>
+                    </div>
+                </div>
+            </td>
+    
+            <td valign="top">
+                <table border="0" cellpadding="0" cellspacing="0" width="100%">
+                    <tr>
+                        <td valign="top">
+                            <span class="rdetail_item" id='rdetail_title'></span><br />
+                            <span style="color:#545454;">&common.author;: </span>
+                            <em><a title='&rdetail.author.search;' id='rdetail_author'></a></em>
+                        </td>
+                        <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
+                            <div style="width:230px;text-align:left;margin-top:3px;">
+                                <div style="float:right;">
+                                    <div style="border-bottom:1px dotted #ccc;padding-top:10px;"
+                                        class="rdetail_aux_utils">
+                                        <a href="place_hold" id="rdetail_place_hold"><img
+                                            src="/opac/skin/kcls/graphics/green_check.png" alt="place hold" />
+                                            <span style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
+                                    </div>
+                                    <div style="padding-top:6px;" class="rdetail_aux_utils">
+                                        <div style="position:absolute;">
+                                            <div style="position:relative;top:5px; left: 25px;">
+                                                <a title="Add to my list" id="add_mylist"
+                                                    href="javascript:addMyList();">Add to my list</a>
+                                            </div>
+                                        </div>
+                                        <a href="javascript:addMyList();"><img
+                                            alt="add to my list"
+                                            src="/opac/skin/kcls/graphics/clipboard.png" /></a>
+                                    </div>
+                                </div>
+                                <div style="float:right;margin-right:17px;">
+                                    <img id="rdetail_tor_pic" alt="Format" class="hide_me" src="" />
+                                </div>
+                            </div>
+                        </td>
+                    </tr>
+                </table>
+                <div style="border-top: 1px dotted #ccc;padding-top:17px;">
+                    <table border="0" cellpadding="0" width="100%">
+                        <tr>
+                            <td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_isbn_lbl" class="">&common.isbn;</strong>
+                            </td>
+                            <td valign="top" id='rdetail_isbn'></td>
+                            <td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_phys_lbl" class="">&common.physical;</strong>
+                            </td>
+                            <td valign="top" id='rdetail_physical_desc'></td>
+                        </tr>
+                        <tr>
+                            <td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_ed_lbl" class="">&common.edition;</strong>
+                            </td>
+                            <td valign="top" id='rdetail_edition'></td>
+                            <td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_form_lbl" class="">&common.format;</strong>
+                            </td>
+                            <td valign="top">
+                                <img alt="Format" id='' class='tor_pic hide_me' />
+                                <span id='rdetail_tor'></span>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_pubdate_lbl" class="">&common.pubdate;</strong>
+                            </td>
+                            <td valign="top" id='rdetail_pubdate'></td>
+                            <td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_sum_lbl" class="">Summary</strong>
+                            </td>
+                            <td valign="top" id='rdetail_abstract'></td>
+                        </tr>
+                        <tr>
+                            <td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_pub_lbl" class="">&common.publisher;</strong>
+                            </td>
+                            <td valign="top" id='rdetail_publisher'></td>
+                            <td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_sub_lbl" class="">&rdetail.summary.subjects;</strong>
+                            </td>
+                            <td valign="top"></td>
+                        </tr>
+                    </table>
+                </div>
+            </td>
+        </tr>
+    </tbody>
+</table>
+<br /><br />
+
+<table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
+    <tr id="rdetails_status_head">
+        <td width="25%">Location</td>
+        <td width="20%">Call Number</td>
+        <td width="18%">Selving Location</td>
+        <td width="17%">Status</td>
+        <td width="20%">Due Date</td>
+    </tr>
+</table>
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+    <tbody id="rdetails_status2" class="hide_me">
+        <tr id="rdetails_status_head2">
+            <td width="25%"></td>
+            <td width="20%"></td>
+            <td width="18%"></td>
+            <td width="17%"></td>
+            <td width="20%"></td>
+        </tr>
+    </tbody>
+</table>
+
+<div id="rdetail_locs_expand">
+    <a href="javascript:;" onclick="expandBoxes('locs',true);"><img
+        src="/opac/skin/kcls/graphics/plus_sign.png" /></a>
+    <a style="position:relative;top:-3px;" href="javascript:;"
+        onclick="expandBoxes('locs',true);">Show more locations</a>
+</div>
+
+<div id="rdetail_locs_collapse" class="hide_me">
+    <a href="javascript:;" onclick="expandBoxes('locs',false);"><img
+        src="/opac/skin/kcls/graphics/plus_sign.png" /></a>
+    <a style="position:relative;top:-3px;" href="javascript:;"
+        onclick="expandBoxes('locs',false);">Collapse locations</a>
+</div>
+
+<div id="rdetail_extras_expand">
+    <a href="javascript:;" onclick="expandBoxes('tabs',true);"><img
+        src="/opac/skin/kcls/graphics/plus_sign.png" /></a>
+    <a style="position:relative;top:-3px;" href="javascript:;"
+        onclick="expandBoxes('tabs',true);">Expand all tabs</a>
+</div>
+
+<div id="rdetail_extras_collapse" class="hide_me">
+    <a href="javascript:;" onclick="expandBoxes('tabs',false);"><img
+        src="/opac/skin/kcls/graphics/plus_sign.png" /></a>
+    <a style="position:relative;top:-3px;" href="javascript:;"
+        onclick="expandBoxes('tabs',false);">Collapse all tabs</a>
+</div>
+
+<div class="hide_me">
+    <table id='' border="0" width="100%">
+        <tbody id='rdetail_details_tbody'>
+            <tr>
+                <td id='' rowspan='2' valign="top" align="center" style="padding-right:10px;">
+                </td>
+                <td class='rdetail_desc' valign="top" colspan="3">
+                    <table border="0" width="100%">
+                        <tr>
+                            <td valign="top">
+                                <div style="padding-bottom:7px;">
+                                    <strong>&common.title;:</strong>
+                                </div>
+                            </td>
+                            <td width="1" valign="top" align="right" style="white-space:nowrap;">
+                                <a href="place_hold" id=''><img alt="Place Hold"
+                                    src="/opac/skin/kcls/graphics/place_hold.gif" /></a>
+                                <a href="javascript:;" id="rd_reviews_and_more" target="_blank"><img
+                                    alt="Reviews and More" src="/opac/skin/kcls/graphics/reviews.gif" /></a>
+                                <a href="javascript:addMyList();" id=""><img alt="Add to My List"
+                                    src="/opac/skin/kcls/graphics/add_mylist.gif" /></a>
+                            </td>
+                        </tr>
+                    </table>
+                </td>        
+            </tr>
+            <tr>
+                <td nowrap='nowrap' colspan="3" valign="bottom" style="padding-bottom:16px;">
+                </td>
+            </tr>
+            <tr>
+                <td><div style="height:20px;"></div></td>
+            </tr>
+        </tbody>
+    </table>
+    <!-- Empty span used for creating unAPI links -->
+    <abbr name="unapi" class="unapi-id"> <!-- unAPI URI goes here --> </abbr>
+</div> <!-- details_body -->
+
+<!-- XXX begin ChiliFresh: need to make this block conditional -->
+<script type="text/javascript">
+    var chilifresh = ''; /* account */
+    if (chilifresh == '(none)') { chilifresh = false; }
+</script>
+<input type="hidden" id="chilifresh_account" name="chilifresh_account"
+    value="" />
+<input type="hidden" id="chilifresh_profile" name="chilifresh_profile"
+    value="" />
+<input type="hidden" id="chilifresh_version" name="chilifresh_version" value="onsite_v1" />
+<input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
+
+<script type="text/javascript">
+//var sslSwitch = (("https:" == document.location.protocol) ? "https://secure." : "http://");
+//document.write(unescape("%3Cscript src='" + sslSwitch + "chilifresh.com/on-site/js/evergreen.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<!-- XXX end ChiliFresh -->
+<!-- ****************** end: rdetail_summary.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/result_header.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/result/header.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/result_header.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/result/header.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/result_lowhits.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/result/lowhits.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/result_lowhits.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/result/lowhits.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/result_table.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/result/table.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/parts/result_table.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/result/table.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/login.tt2 b/Open-ILS/web/templates/default/kcls-wire/record.tt2
similarity index 89%
copy from Open-ILS/web/templates/default/kcls-wire/login.tt2
copy to Open-ILS/web/templates/default/kcls-wire/record.tt2
index a402a6f..b56a597 100644
--- a/Open-ILS/web/templates/default/kcls-wire/login.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/record.tt2
@@ -10,7 +10,7 @@
     </div>
     <div id="content-wrapper">
         <div id="main-content">
-            [% INCLUDE "default/kcls-wire/parts/login_form.tt2" %]
+            [% INCLUDE "default/kcls-wire/parts/record/body.tt2" %]
             <div style="clear:both;height:15px;"></div>	
         </div>
     </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/results.tt2 b/Open-ILS/web/templates/default/kcls-wire/results.tt2
index bee2763..8d8c286 100644
--- a/Open-ILS/web/templates/default/kcls-wire/results.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/results.tt2
@@ -52,10 +52,10 @@
         </div>
         <div id="main-content">
             <div id="tehResultsPage">
-                [% INCLUDE "default/kcls-wire/parts/result_header.tt2" %]
+                [% INCLUDE "default/kcls-wire/parts/result/header.tt2" %]
                 <div id="rresults_page">
-                    [% INCLUDE "default/kcls-wire/parts/result_table.tt2" %]
-                    [% INCLUDE "default/kcls-wire/parts/result_lowhits.tt2" %]
+                    [% INCLUDE "default/kcls-wire/parts/result/table.tt2" %]
+                    [% INCLUDE "default/kcls-wire/parts/result/lowhits.tt2" %]
                 </div>
             </div>
             <div style="clear:both;height:15px;"></div>    

commit 037db9a72a8a678927805ae963ea4183f12622a8
Merge: 803486a 643e4c9
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Jan 31 17:56:42 2011 -0500

    Merge branch 'master' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 803486a30904a1d5b665cfdf1924a7a88c52fd29
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Jan 31 17:44:41 2011 -0500

    results page kinda there

diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/result_lowhits.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/result_lowhits.tt2
new file mode 100644
index 0000000..0514d31
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/result_lowhits.tt2
@@ -0,0 +1,93 @@
+<!-- ****************** result_lowhits.xml ***************************** -->
+<div id='result_low_hits' class='hide_me'>
+    <div id="zero_search_hits" class="hide_me">
+        <div style="float:left;width:300px;margin-top:20px;">
+            <p>Sorry, no entries were found for
+                <strong>&quot;<span id="zero_hits_term"></span>&quot;</strong><br />
+                <span id="zero_hits_label1" class="hide_me">Did you mean
+                    <strong><a id="spell_check_link" href="javascript:;"></a></strong>?</span>
+            </p>
+            <table cellpadding="0" cellspacing="0" border="0">
+                <tr>
+                    <td valign="top" style="padding-right:10px;">
+                        <span id="zero_hits_label2" class="hide_me">Other Possibilities:</span>
+                    </td>
+                    <td id="zero_hits_suggestions"></td>
+                </tr>
+            </table>
+        </div>
+        <div style="float:right;width:353px;background:#ccc;padding:10px;margin-top:7px;">
+            <p>
+                <strong>Still not finding what you are looking for?</strong><br />
+                Request that KCLS purchase the material you are looking for by making a
+                <a href="javascript:;">Purchase Request</a><br />
+                <strong>Note:</strong> You must be logged in to make a Purchase Request<br />
+            </p>
+            <p>
+                <strong>Keyword Search Tips</strong><br />
+                Change to <strong>Advanced Keyword Search.</strong>
+            </p>
+            <p>
+                Adjacency Multiple words are not searched together as a phrase. They will
+                be found in various parts of the record. To search for a phrase, enclose your
+                search terms in quotation marks.<br />
+                (example:  <strong>&quot;garcia marquez&quot;</strong>)
+            </p>
+            <p>
+                <strong>Truncation</strong><br />
+                Words may be right-hand truncated using an asterisk. Use a single asterisk *
+                to truncate from 1-5 characters. Use a double asterisk ** for open-ended truncation.<br />
+                (example: <strong>environment* agency</strong>)
+            </p>
+            <p>
+                <strong>Wildcards</strong><br />
+                You may use a question mark to replace a single character anywhere within a word.<br />
+                example: <strong>wom?</strong>)
+            </p>
+        </div>
+    </div>
+    <div class="hide_me">
+        <div style='text-align: center; padding-bottom: 8px;' class="hide_me">
+            <div id='result_low_hits_msg' class='hide_me'>&result.lowhits.few;</div>
+            <div id='result_zero_hits_msg' class='hide_me'>&result.lowhits.zero;</div>
+        </div>
+
+        <!-- spell checker -->
+        <div id='did_you_mean' class='lowhits_div hide_me'>
+            <span>&result.lowhits.did.you.mean; </span>
+            <!-- <a class='classic_link' id='spell_check_link'> </a> -->
+        </div>
+
+        <div id='low_hits_remove_format' class='lowhits_div hide_me'>
+            <span>&result.lowhits.formats; </span>
+            <a id='low_hits_remove_format_link' class='classic_link'>&result.lowhits.formats.search;</a>
+        </div>
+
+        <div id='low_hits_cross_ref' class='lowhits_div hide_me'>
+            <span>&result.lowhits.related;</span>
+            <div style='padding: 5px;'>
+                <a id='low_hits_xref_link' class='classic_link' style='padding-right: 5px;'> </a>
+            </div>
+        </div>
+
+        <div id='low_hits_expand_range' class='lowhits_div hide_me'>
+            <span>&result.lowhits.expand; </span>
+            <a id='low_hits_expand_link' class='classic_link' style='padding-right: 5px;'> </a>
+        </div>
+
+        <div id='low_hits_search_type' class='lowhits_div hide_me'>
+            <span>&result.lowhits.class;</span>
+            <a id='low_hits_title_search' class='hide_me classic_link' 
+                style='padding-right: 5px;'>&result.lowhits.title;</a>
+            <a id='low_hits_author_search' class='hide_me classic_link' 
+                style='padding-right: 5px;'>&result.lowhits.author;</a>
+            <a id='low_hits_subject_search' class='hide_me classic_link' 
+                style='padding-right: 5px;'>&result.lowhits.subject;</a>
+            <a id='low_hits_series_search' class='hide_me classic_link' 
+                    style='padding-right: 5px;'>&result.lowhits.series;</a>
+            <a id='low_hits_keyword_search' class='hide_me classic_link' 
+                style='padding-right: 5px;'>&result.lowhits.keyword;</a>
+        </div>
+    </div>
+</div>
+<!-- ****************** end: result_lowhits.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/results_body.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/results_body.tt2
deleted file mode 100644
index e69de29..0000000
diff --git a/Open-ILS/web/templates/default/kcls-wire/results.tt2 b/Open-ILS/web/templates/default/kcls-wire/results.tt2
index 2dc8a5e..bee2763 100644
--- a/Open-ILS/web/templates/default/kcls-wire/results.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/results.tt2
@@ -54,8 +54,8 @@
             <div id="tehResultsPage">
                 [% INCLUDE "default/kcls-wire/parts/result_header.tt2" %]
                 <div id="rresults_page">
-                    [% INCLUDE "default/kcls-wire/parts/results_table.tt2" %]
-                    [% INCLUDE "default/kcls-wire/parts/results_lowhits.tt2" %]
+                    [% INCLUDE "default/kcls-wire/parts/result_table.tt2" %]
+                    [% INCLUDE "default/kcls-wire/parts/result_lowhits.tt2" %]
                 </div>
             </div>
             <div style="clear:both;height:15px;"></div>    

commit 3bf44391d56efec11fe159b882317109a956698f
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Jan 31 17:38:52 2011 -0500

    progress on the results page

diff --git a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2 b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
index 287260c..1d6172d 100644
--- a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
@@ -1,6 +1,6 @@
 [%  WRAPPER "default/kcls-wire/parts/base.tt2";
     INCLUDE "default/kcls-wire/parts/topnav.tt2";
-    ctx.page_title = "Home" %]
+    ctx.page_title = "Advanced Search" %]
 [% BLOCK html_head -%]
 <script type="text/javascript" src="/opac/skin/kcls-wire/js/misc.js"></script>
 <style type='text/css'>
diff --git a/Open-ILS/web/templates/default/kcls-wire/login.tt2 b/Open-ILS/web/templates/default/kcls-wire/login.tt2
index 2488f3d..a402a6f 100644
--- a/Open-ILS/web/templates/default/kcls-wire/login.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/login.tt2
@@ -1,6 +1,6 @@
 [%  WRAPPER "default/kcls-wire/parts/base.tt2";
     INCLUDE "default/kcls-wire/parts/topnav.tt2";
-    ctx.page_title = "Home" %]
+    ctx.page_title = "Account Login" %]
 [% BLOCK html_head -%]
 <script type="text/javascript" src="/opac/skin/kcls/js/contentslider.js"></script>
 [%- END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/result_header.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/result_header.tt2
new file mode 100644
index 0000000..e9613ff
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/result_header.tt2
@@ -0,0 +1,38 @@
+<div style="height: 10px;"></div>
+<div id="results_header_nav1">
+    <table cellpadding="0" cellspacing="0" border="0" width="100%">
+        <tr>
+            <td class="h1" width="116">Search Results</td>
+            <td valign="bottom" nowrap="nowrap" width="320" style="white-space:nowrap;" class="hide_me" id="result_numbers1">
+                <span> &common.results; </span>
+                <span id='offset_start' style='font-weight:bold'></span>
+                <span>&nbsp;- </span>
+                <span id='offset_end' style='font-weight:bold'></span>
+                <span>&nbsp;&common.of; </span>
+                <span id='result_count' style='font-weight:bold'></span>
+                <span style='padding-left: 6px;'>
+                    (page
+                </span>
+                <span id='current_page'></span>
+                <span>&nbsp;&common.of; </span>
+                <span id='num_pages'></span>)
+            </td>
+            <td align="right" valign="bottom">
+                <span id='start_end_links_span' class='hide_me'>
+                    <a class='search_page_nav_link' id='prev_link'
+                        title='&rdetail.page.previous;' style="cursor:pointer;">
+                        <span class="nav_arrow_fix">&#9668;</span> Previous
+                    </a>
+                    <span class='hide_me' id='result_info_div'
+                        style='padding-left: 11px; padding-right:11px;'>
+                        <span id="nav_pages"></span>
+                    </span>
+                    <a class='search_page_nav_link' id='next_link'
+                        title='&rdetail.page.next;' style="cursor:pointer;">
+                        Next <span class="nav_arrow_fix">&#9658;</span>
+                    </a>
+                </span>
+            </td>
+        </tr>
+    </table>
+</div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/result_table.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/result_table.tt2
new file mode 100644
index 0000000..2413ca6
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/result_table.tt2
@@ -0,0 +1,258 @@
+<!-- Search results are spit into this table -->
+<!-- ****************** result_table.xml ***************************** -->
+<div id="result_table_div">
+    
+    <table cellpadding="0" cellspacing="0" border="0" width="100%">
+        <tr>
+            <td valign="top" width="1" style="padding-right:20px;">
+                <div style="width:174px;" class="hide_me" id="tehSideBar">SIDEBAR TODO
+                </div>
+            </td>
+            <td style="border-left:1px solid #e9ebf3;padding-right:27px;"
+                width="1"></td>
+            <td valign="top">
+                <table id="res_table" cellpadding="0" cellspacing="0"
+                    border="0" width="100%" style="margin-top:10px;">
+                    <tbody id="result_table">
+                        <tr id='result_table_template' class='hide_me'>
+                            <td class='result_table_row' align='left'
+                                width='100%'>
+                                <table cellpadding="0" cellspacing="0"
+                                    border="0" width="100%"
+                                    class='result_table_subtable'
+                                    id="results_table"
+                                    style="border-collapse: collapse;">
+                                    <tbody class='result_table_subtbody'>
+                                        <tr name='counts_row'>
+                                            <td width="58" valign="top"
+                                                style="font-weight:bold;padding-left:10px;"
+                                                name="results_row_count">1.
+                                            </td>
+                                            <td class='result_table_pic_header'
+                                                width="78" nowrap="nowrap" valign="top">
+                                                <a><img alt="Image of item"
+                                                        name='item_jacket' class='result_table_pic'
+                                                        src='${ident}' /></a><br />
+                                            </td>
+                                            <td class='result_table_title_cell'
+                                                name='result_table_title_cell'
+                                                valign="top">
+                                                <div style="font-weight:bold;">
+                                                    <a title="&result.table.keyword;"
+                                                        name='item_title' class='search_link'>
+                                                    </a>
+                                                </div>
+                                                <span style="font-size:11px;">
+                                                    <div>
+                                                        <em>
+                                                            <a title="&result.table.author;" name='item_author' class='search_link'></a>
+                                                        </em> &nbsp;&nbsp;
+                                                        <span name="results_pub_date"></span>
+                                                    </div>
+                                                    <table cellpadding="0" cellspacing="0" border="0"
+                                                        class="results_info_table">
+                                                        <tr name='bib_cn_list' class='result_table_title_cell'>
+                                                            <td colspan='2'>
+                                                                <span><strong>Call number:</strong></span>
+                                                            </td>
+                                                        </tr>
+                                                        <tr name="results_pub_tr" class="hide_me">
+                                                            <td valign="top">
+                                                                <strong>Publisher:</strong>
+                                                            </td>
+                                                            <td>
+                                                                <span name="results_pub"></span>
+                                                            </td>
+                                                        </tr>
+                                                        <tr name="results_isbn_tr" class="hide_me">
+                                                            <td valign="top">
+                                                                <strong>ISBN:</strong>
+                                                            </td>
+                                                            <td>
+                                                                <span name="results_isbn"></span>
+                                                            </td>
+                                                        </tr>
+                                                        <tr name="results_edition_tr" class="hide_me">
+                                                            <td valign="top">
+                                                                <strong>Edition:</strong>
+                                                            </td>
+                                                            <td> <span name="results_edition"></span></td>
+                                                        </tr>
+                                                        <tr name="results_phys_desc_tr" class="hide_me">
+                                                            <td nowrap="nowrap" valign="top">
+                                                                <strong>Phys. Desc.:</strong>
+                                                            </td>
+                                                            <td>
+                                                                <span name="results_phys_desc"></span>
+                                                            </td>
+                                                        </tr>
+                                                    </table>
+                                                    <div>
+                                                        <span name="copy_holds"></span>
+                                                        <span name="copy_holds2"></span><br />
+                                                        <span name="copy_count_avail"></span>
+                                                        <!-- of <span name="copy_count"></span> on
+                                                        <span name="copy_count_total"></span> copies
+                                                        available-->
+                                                    </div>
+                                                </span>
+                                                <div class="hide_me">
+                                                    <span name='result_table_extra_span' class='hide_me'>
+                                                        <span name='result_table_pub_box'
+                                                            style='padding-left: 10px;'> 
+                                                            <span name='result_table_edition_span'
+                                                                style='padding-left: 10px;'></span> |
+                                                            <span name='result_table_pub_span'> </span> |
+                                                            <span name='result_table_phys_span'> </span>
+                                                        </span>
+                                                    </span>
+                                                </div>
+                                            </td>
+                                            <!-- Copy this td for each copy count appended -->
+                                            <td nowrap='nowrap' name="copy_count_cell"
+                                                class='copy_count_cell hide_me' width="1"> </td>
+                                            <td name='result_table_format_cell'
+                                                class='result_table_format_cell' align="center" width="1"
+                                                style="padding:0px 10px;">
+                                                <img alt="Format" src="" class="hide_me" name="" />
+                                                <span class='hide_me' 
+                                                    style='color: #9999FF; padding-left: 10px; font-size: 7pt; font-weight: 300;'> 
+                                                    <span>&common.relevancy; </span>
+                                                    <span name='relevancy_span'> </span>
+                                                </span>
+                                                <!-- Empty span used for creating unAPI links -->
+                                                <span class="hide_me">
+                                                    <abbr style='padding-left: 8px;' name="unapi" class="unapi-id">
+                                                    <!-- unAPI URI goes here -->
+                                                    </abbr>
+                                                </span>
+                                                <!-- Empty span used for creating Google Book Search-->
+                                                <span name="googleBooksLink" class="hide_me">
+                                                    <a style='padding-left: 8px;'
+                                                        class='classic_link hide_me'
+                                                        name="googleBooks-link">&result.googleBooks.browse;</a>
+                                                </span>
+                                            </td>
+                                            <td nowrap='nowrap' width="1" align="right">
+                                                <div style="width:250px;text-align:left;">
+                                                    <div style="float:right;">
+                                                        <div style="border-bottom:1px dotted #ccc;padding-top:10px;"
+                                                            class="results_aux_utils"><a
+                                                                href="javascript:;" name="place_hold_link"><img
+                                                                src="/opac/skin/kcls/graphics/green_check.png"
+                                                                alt="place hold" /><span
+                                                                    style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
+                                                        </div>
+                                                        <div style="border-bottom:1px dotted #ccc;padding-top:6px;" class="results_aux_utils">
+                                                            <div style="position:absolute;">
+                                                                <div style="position:relative;top:5px; left: 25px;">
+                                                                    <a title="Add to my list"
+                                                                        name="result_my_list_link"
+                                                                        href="javascript:;">Add to my list</a>
+                                                                </div>
+                                                            </div>
+                                                            <a href="javascript:;"
+                                                                name="result_my_list_link_img"><img
+                                                                alt="add to my list"
+                                                                src="/opac/skin/kcls/graphics/clipboard.png" /></a>
+                                                        </div>
+                                                        <div style="padding-top:7px;" class="results_aux_utils">
+                                                            <a title="Reviews and More" target="_blank"
+                                                                name="reviews_and_more" href="javascript:;"><img
+                                                                alt="reviews &amp; more"
+                                                                src="/opac/skin/kcls/graphics/starz.png" /> <span
+                                                                    style="position:relative;top:-5px;">Reviews &amp; More</span></a>
+                                                        </div>
+                                                    </div>
+                                                    <div style="float:right;margin-right:17px;">
+                                                        <img alt="Format" class="hide_me" src=""
+                                                        name="result_mat_type" />
+                                                    </div>
+                                                </div>
+                                            </td>
+                                        </tr>
+                            
+                                        <!-- Placeholder for ChiliFresh Review -->
+                                        <tr class="hide_me" name="chilifreshReview">
+                                            <td></td>
+                                            <td valign="top" colspan="5">
+                                                <div style="position:relative;left:-19px;">
+                                                    <span name="chilifreshReviewLink" class="chili_review"></span>
+                                                    <div name="chilifreshReviewResult" style="display:none"></div>
+                                                </div>
+                                            </td>
+                                        </tr>
+                            
+                                        <tr>
+                                            <td colspan="5">
+                                                <div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div>
+                                                <!-- <hr style="border-bottom:none;*height:0px;" color="#FFCC33" /> -->
+                                            </td>
+                                        </tr>
+                                    </tbody>
+                                </table>
+                            </td>
+                        </tr>
+                    </tbody>
+                </table>
+            </td>
+        </tr>
+    </table>  
+</div>
+
+<div>
+    <table id='' style="width:100%;"> 
+        <tbody id=''>
+            <tr class="hide_me">
+                <td class='result_table_row' width="100%">
+                    <!--#include virtual="result_info.xml"-->
+                </td>
+            </tr>
+            <!-- Template for displaying a search result.  This row template
+            is cloned and inserted for each result returned -->
+        </tbody>
+    </table>
+    <!-- ====================== -->
+    <div class="">
+        <table
+            style='width: 100%;margin-top:20px;border-top:1px dotted #ccc;padding-top:8px;'
+            id='result_info_2' class='hide_me'>
+            <tbody>
+                <tr>
+                    <td valign="top">
+                        <span class='hide_me' id='result_info_div2'
+                            style='font-size: 11px;'>
+                            <span> &common.results; </span> 
+                            <b id='offset_start2'> </b>
+                            <span>&nbsp;- </span>
+                            <b id='offset_end2'> </b>
+                            <span>&nbsp;&common.of; </span>
+                            <b id='result_count2'> </b>
+                            <span style='padding-left: 6px;'> (page </span>
+                            <span id='current_page2'> </span>
+                            <span>&nbsp;&common.of; </span>
+                            <span id='num_pages2'> </span>
+                        </span>
+                    </td>
+                    <td valign="top" id='next_prev_links2' align="right">
+                    <span id='start_end_links_span2' class='hide_me'>
+                        <a class='search_page_nav_link' id='prev_link2'
+                            title='&rdetail.page.previous;' style="cursor:pointer;">
+                            <span class="nav_arrow_fix">&#9668;</span> Previous
+                        </a>
+                        <span id="nav_pages2"
+                            style='padding-left: 11px; padding-right:13px;'></span>
+                        <a class='search_page_nav_link' id='next_link2'
+                            title='&rdetail.page.next;' style="cursor:pointer;">
+                            Next <span class="nav_arrow_fix">&#9658;</span>
+                        </a>
+                        </span>
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+    <!-- ChiliFresh XXX script TODO -->
+</div>
+<!-- ****************** end: result_table.xml ***************************** -->
+
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/results_body.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/results_body.tt2
new file mode 100644
index 0000000..e69de29
diff --git a/Open-ILS/web/templates/default/kcls-wire/results.tt2 b/Open-ILS/web/templates/default/kcls-wire/results.tt2
new file mode 100644
index 0000000..2dc8a5e
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/results.tt2
@@ -0,0 +1,64 @@
+[%  WRAPPER "default/kcls-wire/parts/base.tt2";
+    INCLUDE "default/kcls-wire/parts/topnav.tt2";
+    ctx.page_title = "Search Results" %]
+    <div id="search-wrapper">
+        [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
+        [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="results_header_bar"><!-- XXX give #results_header_bar its own file -->
+            <div id="results_header_inner">
+                <div class="results_header_btns">
+                    <a href="index.xml"><img alt="Another Search"
+                        src="/opac/skin/kcls/graphics/another_search.png"
+                        onmouseover="this.src='/opac/skin/kcls/graphics/another_search_hover.png';"
+                        onmouseout="this.src='/opac/skin/kcls/graphics/another_search.png';" /></a>
+                </div>
+                <div class="results_header_btns">
+                    <a href="advanced"><img alt="Advanced Search"
+                        src="/opac/skin/kcls/graphics/adv_search.png"
+                        onmouseover="this.src='/opac/skin/kcls/graphics/adv_search_hover.png';"
+                        onmouseout="this.src='/opac/skin/kcls/graphics/adv_search.png';" /></a>
+                </div>
+                <div class="results_header_btns" style="width:111px;height:25px;">
+                    <a href="javascript:;" class="hide_me" id="cacheListLink"
+                        onclick="showCachedList();"><img
+                        alt="View My List"
+                        src="/opac/skin/kcls/graphics/view_my_list.png"
+                        onmouseover="this.src='/opac/skin/kcls/graphics/view_my_list_hover.png';"
+                        onmouseout="this.src='/opac/skin/kcls/graphics/view_my_list.png';" /></a>
+                </div>
+                <div class="results_header_div"></div>
+                <div class="results_header_lbl">Sort by</div>
+        <!--#if expr="$OILS_PAGE='rresult.xml' || $OILS_PAGE='mresult.xml'"-->
+        <!--#include virtual="result/filtersort.xml" -->
+        <!--#endif -->
+                <div class="results_header_div"></div>
+                <div class="results_header_lbl">View</div>
+                <select class="results_header_sel" style="width:88px;"
+                    onchange="this.selectedIndex?showDetailedInfo(true):showDetailedInfo(false);">
+                    <option>Simple</option>
+                    <option>Detailed</option>
+                </select>
+                <div class="results_header_div"></div>
+                <input type="checkbox" id="opac.result.limit2avai2"
+                onclick='searchBarSubmit(true, this);'
+                style="float:left;position:relative;top:2px;left:-2px;margin-right:4px;" />
+                <label for="opac.result.limit2avai2" class="results_header_lbl">
+                    Limit to available items
+                </label>
+                <div style="clear:both;"></div>
+            </div>
+        </div>
+        <div id="main-content">
+            <div id="tehResultsPage">
+                [% INCLUDE "default/kcls-wire/parts/result_header.tt2" %]
+                <div id="rresults_page">
+                    [% INCLUDE "default/kcls-wire/parts/results_table.tt2" %]
+                    [% INCLUDE "default/kcls-wire/parts/results_lowhits.tt2" %]
+                </div>
+            </div>
+            <div style="clear:both;height:15px;"></div>    
+        </div>
+    </div>
+[% END %]

commit 90371655ca2c29bab7a8880e8a2e1b1287e3cb69
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Jan 31 16:20:08 2011 -0500

    a little consolidation, a little linking of new pages to each other

diff --git a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2 b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
index 0de7191..287260c 100644
--- a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
@@ -11,20 +11,7 @@
 </style>
 [% END -%]
     <div id="search-wrapper">
-        <div style="margin:auto;width:974px;height:0px;">
-            <div id="user-ql">
-                <script type="text/javascript">
-/* if(grabUser()) {
-    var str = '<div style="float:right;width:214px;">';
-    str += '<div style="position:absolute;"><div style="position:relative;top:-81px;">\n';
-    str += '<div id="quick-links">\n';
-    str += '</div></div></div></div>';
-    document.write(str);
-}*/
-                </script>
-            </div>
         [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
-        </div>
         <div id="adv_search_parent">
             <div id="adv_search_tabs">
                 <a href="javascript:;" alt="Advanced Search" id="adv_search"
diff --git a/Open-ILS/web/templates/default/kcls-wire/home.tt2 b/Open-ILS/web/templates/default/kcls-wire/home.tt2
index 2e17bc2..d828e91 100644
--- a/Open-ILS/web/templates/default/kcls-wire/home.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/home.tt2
@@ -6,20 +6,7 @@
 [%- END %]
 
     <div id="search-wrapper">
-        <div style="margin:auto;width:974px;height:0px;">
-            <div id="user-ql">
-                <script type="text/javascript">
-/* if(grabUser()) {
-    var str = '<div style="float:right;width:214px;">';
-    str += '<div style="position:absolute;"><div style="position:relative;top:-81px;">\n';
-    str += '<div id="quick-links">\n';
-    str += '</div></div></div></div>';
-    document.write(str);
-}*/
-                </script>
-            </div>
         [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
-        </div>
         [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
diff --git a/Open-ILS/web/templates/default/kcls-wire/login.tt2 b/Open-ILS/web/templates/default/kcls-wire/login.tt2
index 1ea4112..2488f3d 100644
--- a/Open-ILS/web/templates/default/kcls-wire/login.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/login.tt2
@@ -5,20 +5,7 @@
 <script type="text/javascript" src="/opac/skin/kcls/js/contentslider.js"></script>
 [%- END %]
     <div id="search-wrapper">
-        <div style="margin:auto;width:974px;height:0px;">
-            <div id="user-ql">
-                <script type="text/javascript">
-/* if(grabUser()) {
-    var str = '<div style="float:right;width:214px;">';
-    str += '<div style="position:absolute;"><div style="position:relative;top:-81px;">\n';
-    str += '<div id="quick-links">\n';
-    str += '</div></div></div></div>';
-    document.write(str);
-}*/
-                </script>
-            </div>
         [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
-        </div>
         [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
index 26c37b4..04b8ff4 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
@@ -2,7 +2,7 @@
     <table cellpadding="0" cellspacing="10" border="0" style="position:relative;left:-10px;">
         <tr>
             <td colspan="3">
-                <span class="search_catalog_lbl">Search the Catalog</span> <a href="javascript:;" id="home_adv_search_link" style="position:relative;top:-1px;left:10px;"><span class="adv_search_font">Advanced Search</span></a>
+                <span class="search_catalog_lbl">Search the Catalog</span> <a href="advanced" id="home_adv_search_link" style="position:relative;top:-1px;left:10px;"><span class="adv_search_font">Advanced Search</span></a>
             </td>
         </tr>
         <tr>
@@ -30,6 +30,6 @@
         </label>
       </div>
       
-    <div id="breadcrumb"><a href="index.xml">Catalog Home</a> &gt;</div>
+    <div id="breadcrumb"><a href="./">Catalog Home</a> &gt;</div>
     <div style="clear:both"></div>
 </div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
index f775126..ea36ba7 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
@@ -5,7 +5,7 @@
         src="/opac/skin/kcls/graphics/KCLS_logo_horiz.gif" /></a></div>
     <div style="float:right;">
         <div id="your-acct-login"><a
-            href="javascript:void(0);" id="home_myopac_link"><img
+            href="login" id="home_myopac_link"><img
             alt="Your Account Log in"
             src="/opac/skin/kcls/graphics/login-btn.png"
             onmouseover="this.src='/opac/skin/kcls/graphics/login-btn-hover.png';"
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
index 4ab334a..13f8028 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
@@ -1,3 +1,16 @@
+        <div style="margin:auto;width:974px;height:0px;">
+            <div id="user-ql">
+                <script type="text/javascript">
+/* if(grabUser()) {
+    var str = '<div style="float:right;width:214px;">';
+    str += '<div style="position:absolute;"><div style="position:relative;top:-81px;">\n';
+    str += '<div id="quick-links">\n';
+    str += '</div></div></div></div>';
+    document.write(str);
+}*/
+                </script>
+            </div>
+
 <!-- ****************** utils.xml ***************************** -->
 
 <div style="float:right;">
@@ -16,4 +29,4 @@
 </div>
 </div>
 
-<!-- ****************** end: utils.xml ***************************** -->
+        </div>

commit fa51c7805f50f4bb37b36545bd45daaf67c28e07
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Jan 31 15:52:35 2011 -0500

    myopac login form

diff --git a/Open-ILS/web/templates/default/kcls-wire/login.tt2 b/Open-ILS/web/templates/default/kcls-wire/login.tt2
new file mode 100644
index 0000000..1ea4112
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/login.tt2
@@ -0,0 +1,30 @@
+[%  WRAPPER "default/kcls-wire/parts/base.tt2";
+    INCLUDE "default/kcls-wire/parts/topnav.tt2";
+    ctx.page_title = "Home" %]
+[% BLOCK html_head -%]
+<script type="text/javascript" src="/opac/skin/kcls/js/contentslider.js"></script>
+[%- END %]
+    <div id="search-wrapper">
+        <div style="margin:auto;width:974px;height:0px;">
+            <div id="user-ql">
+                <script type="text/javascript">
+/* if(grabUser()) {
+    var str = '<div style="float:right;width:214px;">';
+    str += '<div style="position:absolute;"><div style="position:relative;top:-81px;">\n';
+    str += '<div id="quick-links">\n';
+    str += '</div></div></div></div>';
+    document.write(str);
+}*/
+                </script>
+            </div>
+        [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
+        </div>
+        [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content">
+            [% INCLUDE "default/kcls-wire/parts/login_form.tt2" %]
+            <div style="clear:both;height:15px;"></div>	
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/login_form.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/login_form.tt2
new file mode 100644
index 0000000..3d00bf1
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/login_form.tt2
@@ -0,0 +1,149 @@
+<!-- ****************** login.xml ***************************** -->
+<div class="hide_me">
+	<div class='login_text color_1' style='padding: 4px; text-align: center;'>
+		<span>&opac.login.login;</span>
+	</div>
+	<br/>
+</div>
+<div class="hide_me" id="forget_pw">
+    <h1>Password Reset</h1>
+	Username or Barcode<br />
+	<input type="text" id="forget_pw_user" /><br /><br />
+	Email Address on account<br />
+	<input type="text" id="forget_pw_email" /><br />
+    <a href="javascript:;"
+        onclick="iForgotMyPassword($('forget_pw_user').value,$('forget_pw_email').value);">Submit</a> &nbsp;
+    <a href="javascript:;"
+        onclick="unHideMe($('login_box'));hideMe($('forget_pw'));">Cancel</a>
+</div>
+<table id='change_pw_table' class='data_grid hide_me' style='margin-left: 20px;' width='95%'>
+	<thead>
+        <tr><td colspan='2' align='center'><b>&login.password;</b></td></tr>
+    </thead>
+    <tbody>
+        <tr>
+            <td colspan='2' style='padding:10px;'>
+                &login.first.time;
+                &common.password_criteria;
+            </td>
+        </tr>
+        <tr>
+            <td>&login.password.current.enter;</td>
+            <td><input type='password' id='change_pw_current'/></td>
+        </tr>
+        <tr>
+            <td>&login.password.new.enter;</td>
+            <td><input type='password' id='change_pw_1'/></td>
+        </tr>
+        <tr>
+            <td>&login.password.new.reenter;</td>
+            <td><input type='password' id='change_pw_2'/></td>
+        </tr>
+        <tr><td><br/></td><td/></tr>
+        <tr class='color_1'>
+            <td colspan='2' align='center'>
+                <span class='login_text' style='margin-right: 20px;'>
+                    <input type='submit' value='&login.password.update;'  id='change_pw_button'/>
+                </span>
+            </td>
+        </tr>
+    </tbody>
+</table>
+
+<span id='pw_no_match' class='hide_me'>&login.password.nomatch;</span>
+<span id='pw_update_successful' class='hide_me'>&login.password.success;</span>
+<span id='pw_not_strong' class='hide_me'>
+    &login.password.strength;
+    &common.password_criteria;
+</span>
+<span id='patron_card_inactive_alert' class='hide_me'>&login.barcode.inactive;</span>
+<span id='patron_inactive_alert' class='hide_me'>&login.account.inactive;</span>
+<span id='patron_login_failed' class='hide_me'>&login.failed;</span>
+
+<div id="login_box">
+    <div style="height:20px;"></div>
+    <form id='login_form' method='POST' action='javascript:loginDance();'>
+        <table cellpadding="0" cellspacing="0" border="0">
+            <tr>
+                <td valign="top" width="676" class="login_boxes left_brain">
+                    <table cellpadding="0" cellspacing="0" border="0"
+                        width="100%">
+                        <tr>
+	                        <td colspan="2" style="padding-bottom: 10px;">
+                                <h1>Log in to Your Account</h1>
+                                Please enter the following information:
+                                <br /><br />
+                            </td>
+                        </tr>
+                        <tr>
+                            <td width="42%" class="lbl1">
+                                Library Card Number or Username<br />
+                                <span class="lbl2">
+                                    Please include leading zeros and no spaces.
+                                    <br /> Example: 0026626051</span>
+                                <br /><br />
+                            </td>
+                            <td width="58%" valign="top">
+                                <div class="input_bg">
+                                    <input type="text" name="opacUser"
+                                        id="login_username" />
+                                </div>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td colspan="2">
+                                <div style="height:15px;"></div>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td valign="top" class="lbl1">
+                                PIN Number or Password<br />
+                                <span class="lbl2">If this is your first time
+                                    logging in, please enter<br />
+                                    the last 4 digits of your phone number.<br />
+                                    Example: 0926</span>
+                            </td>
+                            <td valign="top">
+                                <div class="input_bg">
+                                    <input name="opacPass" type="password" id="login_password" />
+                                </div>
+                                <div style="padding-top:7px;">
+                                    <input class="hide_me" type="checkbox"
+                                        id="remember_me" name="remember_me" />
+                                    <label class="hide_me"
+                                        style="position:relative;top:-2px;"
+                                        for="remember_me">Remember Me?</label>
+                                </div>
+                                <div style="padding-top:14px;">
+                                    <a href="javascript:;" id="login_button"><img
+                                        alt="Log in" src="/opac/skin/kcls/graphics/login-btn2.png" /></a>
+                                    <input class="hide_me"
+                                        id="login_form_submit" type="submit" />
+                                    <a href="javascript:;" onclick="hideMe($('login_box'));unHideMe($('forget_pw'));"
+                                        style="position:relative;top:-13px;left:2px;font-size:10px;">Forgot your PIN?</a>
+                                </div>
+	                        </td>
+                        </tr>
+                    </table>
+                    <br /><br />
+                </td>
+	            <td><div style="width:10px;"></div></td>
+                <td class="login_boxes right_brain" align="center"
+                    valign="top" width="291">
+                    <a href="http://www.kcls.org/about/contact/"><img
+                        src="/opac/skin/kcls/graphics/questions.png"
+                        alt="Questions?" style="margin-top:29px;" /></a>
+	                <div style="width:182px;color:black;padding:5px 25px;">
+                        Visit our FAQs section for answers to common questions
+                        about how to use your account.
+	                </div>
+                    <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm#FAQs"><img
+                        alt="FAQs" src="/opac/skin/kcls/graphics/faqs-btn.png"
+                        style="margin-top:13px;" /></a>
+	            </td>
+            </tr>
+        </table>
+    </form>
+    <div style="clear:both"></div>
+</div>
+<!-- ****************** end: login.xml ***************************** -->

commit d531c7e0b123386b158e54994bb08d6c5615b68b
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Jan 31 15:22:02 2011 -0500

    minor missing parts from adv search

diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/advanced_search.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/advanced_search.tt2
index 1b6472f..a6fb5e8 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/advanced_search.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/advanced_search.tt2
@@ -15,7 +15,7 @@
 					<!-- add a new row -->
 					<tr id='adv_global_addrow'>
 						<td align='left' style="padding-top:7px;">
-							<a href="javascript:;" id="myopac_new_global_row" onclick='advAddGblRow();'>Add Search Row</a>
+							<a href="javascript:;" onclick='advAddGblRow();'>Add Search Row</a>
                             <button onclick='advSubmitGlobal();' class="hide_me">&advanced.search.submit;</button>
 						</td>
 					</tr>
@@ -126,7 +126,7 @@
 
 						<td align='left'>
 							<select multiple='multiple' size='3' id='adv_global_lang'>
-								<!--#include virtual="../../../../../common/xml/item_lang_options.xml"-->
+								[% INCLUDE "default/kcls-wire/parts/item_lang_options.tt2" %]
 							</select>
 						</td>
 
@@ -305,7 +305,6 @@
 			</tr></tbody></table>
 		</div>
 
-		<span class='hide_me' id='myopac.copy.not.found'>&sidebar.copy.not.found;</span>
 		<div style='margin-top: 8px;' class='adv_quick_search_submit'>
 		<img src="/opac/skin/kcls/graphics/search_btn.gif" alt="Search" id="adv_quick_submit" onclick='advGenericSearch();' style="cursor:pointer;" />
 			<!-- <a id='adv_quick_submit' href='javascript:advGenericSearch();' class='classic_link'>&common.submit;</a> -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/item_lang_options.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/item_lang_options.tt2
new file mode 100644
index 0000000..90ee666
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/item_lang_options.tt2
@@ -0,0 +1,28 @@
+
+<!--
+Language otions for languages that exist in the catalog.
+This file should be updated on occasion.
+
+develooper=# select code,value from config.language_map m 
+	join metabib.rec_descriptor r on (r.item_lang = m.code) group by 1,2;
+-->
+
+<option value='eng'>English</option>
+<option value='spa'>Spanish</option>
+<option value='fre'>French</option>
+<option value='ger'>German</option>
+<option value='ita'>Italian</option>
+<option value='chi'>Chinese</option>
+<option value='jpn'>Japanese</option>
+<option value='kor'>Korean</option>
+<option value='dut'>Dutch</option>
+<option value='gre'>Greek, Modern (1453- )</option>
+<option value='lat'>Latin</option>
+<option value='vie'>Vietnamese</option>
+<option value='rus'>Russian</option>
+<option value='nor'>Norwegian</option>
+<option value='wel'>Welsh</option>
+<option value='pau'>Palauan</option>
+<option value='swe'>Swedish</option>
+<option value='nav'>Navajo</option>
+<option value='und'>Undetermined</option>

commit 252f1967042f1523bbbeb8e1a07e608c9603151e
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Jan 31 14:08:39 2011 -0500

    advanced page getting there

diff --git a/Open-ILS/web/opac/skin/kcls-wire/css/contentslider.css b/Open-ILS/web/opac/skin/kcls-wire/css/contentslider.css
new file mode 100644
index 0000000..64a6d25
--- /dev/null
+++ b/Open-ILS/web/opac/skin/kcls-wire/css/contentslider.css
@@ -0,0 +1,39 @@
+.sliderwrapper{
+position: relative; /*leave as is*/
+overflow: hidden; /*leave as is*/
+width: 675px; /*width of featured content slider*/
+height: 213px;
+}
+
+
+
+.sliderwrapper .contentdiv{
+visibility: hidden; /*leave as is*/
+position: absolute; /*leave as is*/ 
+left: 0;  /*leave as is*/
+top: 0;  /*leave as is*/
+width: 675px; /*width of content DIVs within slider. Total width should equal slider's inner width (390+5+5=400) */
+height: 100%;
+filter:progid:DXImageTransform.Microsoft.alpha(opacity=100);
+-moz-opacity: 1;
+opacity: 1;
+}
+
+.pagination{
+width: 400px; /*Width of pagination DIV. Total width should equal slider's outer width (400+10+10=420)*/
+text-align: right;
+background-color: navy;
+padding: 5px 10px;
+}
+
+.pagination a{
+padding: 0 5px;
+text-decoration: none; 
+color: #00007D;
+background: white;
+}
+
+.pagination a:hover, .pagination a.selected{
+color: #000;
+background-color: #FEE496;
+}
\ No newline at end of file
diff --git a/Open-ILS/web/opac/skin/kcls-wire/css/style.css b/Open-ILS/web/opac/skin/kcls-wire/css/style.css
new file mode 100644
index 0000000..7dbc65f
--- /dev/null
+++ b/Open-ILS/web/opac/skin/kcls-wire/css/style.css
@@ -0,0 +1,860 @@
+body {
+	margin:0;
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 12px;
+	background:#333;
+}
+
+img {
+	border: none;
+}
+
+a {
+	color: #003399;
+	text-decoration: none;
+}
+
+a:hover {
+	text-decoration: underline;
+}
+
+#search-wrapper input[type=text] {
+	border:none;
+	margin:0;
+	padding:0;
+}
+
+#search-wrapper select {
+	border:1px solid #e9ebf3;
+	margin:0;
+	padding:0;
+	width:168px;
+}
+
+/*
+#search-wrapper select {
+	border:0px solid black;
+	filter:alpha(opacity=0);
+	-moz-opacity:0;
+	-khtml-opacity:0;
+	opacity:0;
+	padding:0;
+	margin:0;
+	height:18px;
+	font-size: 12px;
+}
+*/
+h1 {
+	margin:0;
+	margin-bottom: 5px;
+	font-size: 20px;
+	font-weight:normal;
+}
+
+h2 {
+	margin:0;
+	margin-bottom: 5px;
+	font-size: 14px;
+	font-weight:bold;
+}
+
+.hide_me {
+	display: none;
+	visibility: hidden;
+}
+
+div.select-box-wrapper {
+	position:absolute;
+	padding-top:2px;
+	padding-left:3px;
+	overflow:hidden;
+	text-align:left;
+}
+
+div.select-wrapper {
+	border:1px solid #4C8AB0;
+	display:inline-block;
+	position:relative;
+	z-index:2;
+	background:url('/opac/skin/kcls/graphics/dropdown.gif') no-repeat right center;
+}
+
+div.select-wrapper:hover {
+	background:url('/opac/skin/kcls/graphics/dropdown-hover.gif') no-repeat right center;
+}
+
+#dash_wrapper {
+	width:500px;
+	position:relative;
+	top:-26px;
+}
+
+#dashboard {
+	clear:both;
+	float:right;
+	width:384px;
+}
+
+#dashboard span {
+	font-weight:bold;
+	position:relative;
+	left:-1px;
+}
+
+#dash_user {
+	font-weight:bold;
+	text-transform:capitalize;
+}
+
+#header {
+	color: #fff;
+	padding: 26px 0px 26px 0px;
+	width: 974px;
+	margin: auto;
+	font-size:11px;
+}
+
+#header a {
+	color: #fff;
+}
+
+#header a:hover {
+	color: white;
+	text-decoration: none;
+}
+
+#header-links {
+	color: #afafaf;
+	font-size: 11px;
+	font-weight: bold;
+	position: relative;
+	top:4px;
+	
+}
+
+#header-links a {
+	color: #afafaf;
+	display: block;
+	float:left;
+	margin-right:22px;
+}
+
+#header-links a:hover {
+	color: white;
+	text-decoration: none;
+}
+
+#header #header-links2 {
+	position:relative;
+	top:-8px;
+	color: white;
+	padding-bottom: 15px;
+}
+
+#header #header-links2 a {
+	color: white;
+}
+
+#header #header-links2 a:hover {
+	text-decoration: underline;
+}
+
+#header #your-acct-login {
+	padding-top:10px;
+}
+
+#gold-links {
+	margin:auto;
+	width:974px;
+	padding-left:0px;
+}
+
+#util-bar {
+	margin:auto;
+	width:974px;
+	padding-left:0px;
+	height:0px;
+}
+
+#search-wrapper {
+	border-bottom: 1px solid #e9ebf3;
+	padding-bottom: 5px;
+	background: white;
+}
+
+#search_box_wrapper {
+	border:1px solid #e9ebf3;
+	padding: 1px;
+	padding-left:3px;
+}
+
+#search-wrapper #breadcrumb {
+	margin-top:0px;
+	font-size: 10px;
+	float:left;
+}
+
+#search-wrapper #search-within {
+	margin-top:10px;
+	float:right;
+	position:relative;
+	left:-173px;
+}
+
+#search-wrapper #breadcrumb a {
+	color: black;
+}
+
+#search-wrapper #search_frm label {
+	font-size: 10px;
+}
+
+#search-wrapper #search-box {
+	width:974px;
+	margin:auto;
+	padding-left: 0px;
+}
+
+#utils {
+	float:right;
+	z-index:1;
+	width:150px;
+	height:30px;
+	background:url('/opac/skin/kcls/graphics/utils-corner-left.png') no-repeat left top;
+	padding-left: 3px;
+	color: white;
+	position:relative;
+}
+
+#utils a {
+	color: white;
+	font-size: 10px;
+}
+#adv_search_tabs {
+	height:33px;
+	width:974px;
+	margin:auto;
+}
+
+#adv_search_tabs a {
+	float: left;
+	display: block;
+	height:33px;
+	margin-right:7px;
+}
+
+#adv_search {
+	width:156px;
+	background:url('/opac/skin/kcls/graphics/adv_search_on.gif') no-repeat bottom;
+}
+
+#num_search {
+	width:156px;
+	background:url('/opac/skin/kcls/graphics/num_search_off.gif') no-repeat bottom;
+}
+
+#expert_search {
+	width:156px;
+	background:url('/opac/skin/kcls/graphics/expert_search_off.gif') no-repeat bottom;
+}
+
+#acct_tabs {
+	height:33px;
+	width:974px;
+	margin:auto;
+}
+
+#acct_tabs a {
+	float: left;
+	display: block;
+	height:33px;
+	margin-right:7px;
+}
+
+#acct_summary {
+	width:156px;
+	background:url('/opac/skin/kcls/graphics/acct_summary_on.gif') no-repeat bottom;
+}
+
+#acct_checked_out {
+	width:156px;
+	background:url('/opac/skin/kcls/graphics/acct_checked_out_off.gif') no-repeat bottom;
+}
+
+#acct_holds {
+	width:156px;
+	background:url('/opac/skin/kcls/graphics/acct_holds_off.gif') no-repeat bottom;
+}
+
+#acct_prefs {
+	width:156px;
+	background:url('/opac/skin/kcls/graphics/acct_prefs_off.gif') no-repeat bottom;
+}
+
+#acct_favs {
+	width:156px;
+	background:url('/opac/skin/kcls/graphics/acct_favs_off.gif') no-repeat bottom;
+}
+
+#acct_lists {
+	width:156px;
+	background:url('/opac/skin/kcls/graphics/acct_lists_off.gif') no-repeat bottom;
+}
+
+#rdetail_header {
+	font-size:14px;
+	font-weight:bold;
+	color:#074079;
+	padding: 5px 7px 6px 0px;
+	border-bottom: 1px dotted #ccc;
+}
+
+#rdetail_result_count {
+	color: black;
+	font-size: 11px;
+	font-weight: normal;
+}
+
+#rdetail_result_nav {
+	float:right;
+	font-size: 11px;
+	font-weight:normal;
+}
+
+#rdetail_details_table {
+	margin-top: 15px;
+}
+
+#rdetail_title {
+	font-size: 18px;
+}
+
+#rdetail_image_cell {
+	padding-top: 3px;
+	padding-right: 10px;
+}
+
+.rdetail_aux_utils {
+	border-left:1px dotted #ccc;
+	padding-left: 17px;
+	padding-bottom: 6px;
+	padding-right: 70px;
+}
+
+.results_aux_utils {
+	border-left:1px dotted #ccc;
+	padding-left: 17px;
+	padding-bottom: 6px;
+	padding-right: 50px;
+}
+
+#rdetails_status td, #rdetails_status2 td {
+	white-space:nowrap !important;
+	padding: 7px 0px 3px 13px;
+}
+
+#rdetails_status_head td {
+	background-color: #d8d8d8;
+	padding: 13px 0px 13px 13px;
+	font-size: 10px;
+	text-transform: uppercase;
+	font-weight: bold;
+}
+
+#rdetails_status_head2 td {
+	padding: 0px;
+}
+
+.rdetail_extras {
+	height: 29px;
+	background: #9ad0f1;
+	padding-top:1px;
+	margin-bottom: 10px;
+	margin-top: 10px;
+	clear:both;
+}
+
+.rdetail_extras_hr {
+	height: 1px;
+	background: #b7def5;
+	margin-left: 1px;
+	margin-right: 1px;
+}
+
+.rdetail_extras_link {
+	padding-top: 4px;
+	padding-left: 12px;
+	font-size: 10px;
+	text-transform: uppercase;
+	font-weight: bold;
+}
+
+.rdetail_extras_lbl {
+	position: relative;
+	top: -4px;
+	left: 7px;
+}
+
+#paginate-homebanner a.toc {
+	display:block;
+	width:20px;
+	height:20px;
+	background:gray;
+	float:left;
+	margin-left:2px;
+	margin-right:2px;
+	margin-top:2px;
+}
+
+#rdetail_extras_expand, #rdetail_extras_collapse, #rdetail_locs_collapse {
+	margin-left: 13px;
+}
+
+#rdetail_locs_expand, #rdetail_locs_collapse {
+	padding-bottom:3px;
+	margin-top:15px;
+	margin-left:13px;
+}
+
+#rdetail_anotes_div .biography {
+	margin:0;
+}
+
+#paginate-homebanner a.selected {
+	border: 2px solid black;
+	margin-top:0px;
+	margin-left:0px;
+	margin-right:0px;
+}
+
+#hp-buttons {
+	margin: auto;
+	margin-top: 6px;
+	width: 974px;
+}
+
+#hp-welcome {
+	position:absolute;
+	width:295px;
+	height:192px;
+	background: url('/opac/skin/kcls/graphics/banner-bg.png') no-repeat;
+	color: #fff;
+	padding-left: 33px;
+	padding-top: 21px;
+	z-index:9999999999;
+}
+
+#hp-welcome h1 {
+	font-size: 25px;
+	margin-bottom:15px;
+}
+
+#hp-welcome a {
+	color: #fff;
+	text-decoration: underline;
+}
+
+#hp-banner {
+	margin: auto;
+	width:974px;
+	height: 213px;
+}
+
+#hp-ql-table {
+	margin-left: 2px;
+	padding-top: 3px;
+}
+
+#hp-ql-table a {
+	color: #333;
+	font-weight: bold;
+	font-size: 13px;
+	text-transform: uppercase;
+	text-decoration: none;
+	display: block;
+	width: 144px;
+	height: 25px;
+	padding-top: 9px;
+	padding-left: 15px;
+	background: url('/opac/skin/kcls/graphics/button-bg.png') no-repeat;
+}
+
+#hp-ql-bottom {
+	width: 640px;
+	height: 31px;
+	padding-left: 24px;
+	padding-top: 13px;
+	background: url('/opac/skin/kcls/graphics/hp-links-mid.jpg') repeat-x;
+}
+
+#hp-ql-bottom a {
+	display: inline-block;
+	text-decoration: none;
+	color: white;
+	font-size: 15px;
+	font-weight: bold;
+}
+
+#content-wrapper {
+	background: white;
+	min-height: 260px;
+	border-bottom: 1px solid black;
+}
+
+#main-content {
+	width: 974px;
+	margin:auto;
+	padding-left:0px;
+}
+
+#main-content .login_boxes {
+	border: 1px solid #dedede;
+	background:url('/opac/skin/kcls/graphics/login-bg.jpg') top repeat-x;
+	color: #333;
+}
+
+#main-content .login_boxes h1 {
+	font-weight: normal;
+	font-size: 25px;
+	margin:0;
+}
+
+#main-content .left_brain {
+	padding-left:28px;
+	padding-top:25px;
+}
+
+#main-content .left_brain input[type=text], #main-content .left_brain input[type=password] {
+	width:167px;
+	height:18px;
+	margin:0;
+	padding:0;
+	border:none;
+	background: none;
+	font-size: 15px;
+	color: #666;
+}
+
+#main-content .left_brain .input_bg {
+	padding:10px 10px 0px 13px;
+	background: url('/opac/skin/kcls/graphics/login-box-bg.jpg') no-repeat;
+	width:167px;
+	height:29px;
+}
+
+#home-buttons-inner {
+	width:664px;
+	height:117px;
+	background:#bda964;
+}
+
+#holds_temp_parent td {
+	border-bottom:1px solid #dcdbdb;
+}
+
+#holds_temp_parent input, #holds_temp_parent select {
+	margin:0;
+}
+
+
+
+
+#results_header_bar {
+	background: #929292;
+	border-top:1px solid #8b8b8b;
+}
+
+#results_header_inner {
+	height:32px;
+	width:974px;
+	margin:auto;
+	padding-top:6px;
+}
+
+.results_header_btns {
+	float:left;
+	margin-right: 6px;
+}
+
+.results_header_div {
+	float: left;
+	width: 0px;
+	height: 25px;
+	border-left: 1px solid #7c7c7c;
+	border-right: 1px solid #9c9c9c;
+	margin: 0px 13px;
+}
+
+.results_header_lbl {
+	font-weight: bold;
+	float: left;
+	font-size: 11px;
+	color: #191919;
+	position: relative;
+	top: 5px;
+	margin-right: 6px;
+}
+
+.results_header_sel {
+	float:left;
+	position: relative;
+	top: 2px;
+	margin:0;
+}
+
+#results_header_nav1 {
+	padding: 5px 7px 6px 0px;
+	border-bottom: 1px dotted #ccc;
+}
+
+#results_header_nav1 .h1 {
+	font-size:14px;
+	font-weight:bold;
+	color:#074079;
+}
+
+#start_end_links_span {
+	font-size: 11px;
+}
+
+#start_end_links_span2 {
+	font-size: 11px;
+}
+
+.nav_arrow_fix {
+	font-size:8px;
+	position:relative;
+	top:-1px;
+}
+
+#result_table_div {
+	margin-top: 20px;
+}
+
+#result_numbers1 {
+	font-size: 11px;
+	padding-left:15px;
+}
+
+
+
+
+
+
+.icon_text {
+	text-transform:capitalize;
+}
+
+.result_table_title_cell {
+	padding-left: 7px;
+}
+
+#myopac_summary_div p {
+	margin:0;
+	margin-bottom: 10px;
+}
+
+#acct_sum_checked_table td {
+	padding-bottom:5px;
+}
+
+#zero_search_hits p {
+	margin-top:0;
+}
+
+#zero_hits_term {
+	text-transform: uppercase;
+}
+
+#zero_search_hits #spell_check_link {
+	text-transform: uppercase;
+}
+
+#zero_search_hits #zero_hits_suggestions {
+	text-transform: uppercase;
+}
+
+.results_info_table td {
+	padding-right: 10px;
+}
+
+#myopac_holds_main_table {
+	border-collapse: collapse;
+}
+
+#myopac_holds_main_table td {
+	border: 1px solid black;
+	
+}
+
+#myopac_prefs_div .data_grid {
+	border-collapse:collapse;
+}
+
+#myopac_prefs_div .data_grid td {
+	background:#f0f0f0;
+	border-bottom:3px solid white;
+	padding:6px 0px 7px 17px;
+}
+
+.header_middle {
+	height:22px;
+	font-size:14px;
+	font-weight:bold;
+	color:#074079;
+	padding: 0px 7px 0px 0px;
+	border-bottom: 1px dotted #ccc;
+}
+
+.header_middle a {
+	font-size: 12px;
+	font-weight: normal;
+}
+
+.acct_sum_row {
+	padding: 7px 15px;
+	width: 712px;
+	background: #f0f0f0;
+	margin-bottom: 2px;
+	font-size: 10px;
+	font-weight: bold;
+	text-transform: uppercase;
+}
+
+.acct_sum_row a {
+	text-transform: none;
+	font-size: 12px;
+	position:relative;
+	top:-1px;
+}
+
+.acct_sum_row .view_link {
+	font-weight: normal;
+	font-size:12px;
+}
+
+#myopac_sum_fines {
+	float:right;
+	padding: 15px 0px 0px 23px;
+	background: #f0f0f0;
+	width: 177px;
+	height: 166px;
+}
+
+.acct_holds_temp td {
+	text-align: left;
+}
+
+#acct_checked_tabs .align, #acct_holds_tabs .align, #acct_prefs_tabs .align {
+	float:left;
+	/*padding-left:10px;*/
+}
+
+#acct_checked_tabs .selected, #acct_holds_tabs .selected, #acct_prefs_tabs .selected {
+	/*background:url('/opac/skin/kcls/graphics/gray-arrow.png') left 3px no-repeat;*/
+}
+
+#acct_checked_main_header, #acct_holds_main_header, #acct_checked_hist_header, #acct_list_header, #acct_list_header_anon, #temp_list_holds {
+	font-weight:bold;
+	text-transform:uppercase;
+	font-size: 10px;
+}
+
+#acct_checked_main_header td, #acct_holds_main_header td, #acct_checked_hist_header td, #acct_list_header td, #acct_list_header_anon td, #temp_list_holds td {
+	background: #d8d8d8;
+	padding: 8px 0px 7px 0px;
+}
+
+#acct_list_header select, #acct_list_header_anon select {
+	font-weight:normal;
+	text-transform:none;
+}
+
+#acct_holds_activates_table label {
+	font-weight: bold;
+	font-size: 11px;
+	text-transform:uppercase;
+	padding-right: 5px;
+}
+
+.adv_search_font {
+	font-size: 10px;
+}
+
+.search_catalog_lbl {
+	font-size: 14px;
+}
+
+.lbl1 {
+	font-size:14px;
+	font-weight:bold;
+}
+
+.lbl2 {
+	font-size:10px;
+	font-weight:normal;
+	position:relative;
+	top:3px;
+}
+
+#myopac_tabs, #adv_search_parent {
+	background: #929292;
+	border-top:1px solid #8b8b8b;
+	padding-top:5px;
+	margin-bottom:20px;
+}
+
+#adv_search_parent {
+	margin-bottom:0px;
+}
+
+#myopac_loading {
+	width:100%;
+	text-align:center;
+	padding-top:20px;
+	font-size:16px;
+	font-weight:bold;
+}
+
+.chili_link {
+	width:100px !important;
+	text-align: center !important;
+}
+
+.chili_review div.chili_link div {
+	margin: auto;
+}
+
+/* some facet styling */
+.facetClassContainer { margin: 2px; border: 1px solid #CCC; }
+.facetClassLabelContainer { border: 1px solid #CCC; }
+.facetClassLabel { font-weight: bold; text-align: center; }
+.facetFieldContainer {  }
+.facetFieldLabel { padding-left: 2px; margin-top: 5px; margin-bottom: 5px; font-weight: bold; text-align: left; }
+.extraFacetFieldsWrapper { }
+.toggleExtraFacetFieldsButton { float: right; margin: 0px; padding: 0px; }
+.facetFieldLineCount { display: inline-block; border-right: 1px solid #CCC; color: gray; width: 3em; margin-right: 3px }
+.facetField { border-top: 1px solid #CCC; }
+.facetFields { padding-left: 5px; }
+.facetFieldLineValue { overflow: hidden; text-overflow: ellipsis; }
+
+#footer {
+	padding-top:5px;
+	padding-bottom: 10px;
+	color: white;
+	margin: auto;
+	width: 974px;
+	color: #afafaf;
+	font-size: 11px;
+}
+
+#footer a {
+	color: white;
+	color: #afafaf;
+}
+
+.color_4 {
+	text-transform: uppercase;
+	font-weight: bold;
+	font-size: 10px;
+}
diff --git a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
index 42af934..0f3bf81 100644
--- a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
+++ b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
@@ -57,9 +57,9 @@ function swapTabs(el) {
     if (!el) return;
 
     var tabs = [];
-    for (var i = 0; i < el.parentNode.childNodes.length) {
+    for (var i = 0; i < el.parentNode.childNodes.length; i++) {
         var node = el.parentNode.childNodes[i];
-        if (node.nodeType == 1 && node.nodeName == "a")
+        if (node.nodeType == 1 && node.nodeName.toLowerCase() == "a")
             tabs.push(node);
     }
 
diff --git a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2 b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
new file mode 100644
index 0000000..0de7191
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2
@@ -0,0 +1,50 @@
+[%  WRAPPER "default/kcls-wire/parts/base.tt2";
+    INCLUDE "default/kcls-wire/parts/topnav.tt2";
+    ctx.page_title = "Home" %]
+[% BLOCK html_head -%]
+<script type="text/javascript" src="/opac/skin/kcls-wire/js/misc.js"></script>
+<style type='text/css'>
+    .advanced_div { padding-top: 15px; }
+    #adv_global_search select { width: 13em; }
+    #adv_global_input_table select { width: 7em; }
+    .adv_adv_link { font-size: 8pt; color: red; }
+</style>
+[% END -%]
+    <div id="search-wrapper">
+        <div style="margin:auto;width:974px;height:0px;">
+            <div id="user-ql">
+                <script type="text/javascript">
+/* if(grabUser()) {
+    var str = '<div style="float:right;width:214px;">';
+    str += '<div style="position:absolute;"><div style="position:relative;top:-81px;">\n';
+    str += '<div id="quick-links">\n';
+    str += '</div></div></div></div>';
+    document.write(str);
+}*/
+                </script>
+            </div>
+        [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
+        </div>
+        <div id="adv_search_parent">
+            <div id="adv_search_tabs">
+                <a href="javascript:;" alt="Advanced Search" id="adv_search"
+                    onclick="swapTabs(this);"
+                    rel="adv_global_search"></a>
+                <a href="javascript:;" alt="Numeric Search" id="num_search"
+                    onclick="swapTabs(this);"
+                    rel="adv_quick_search_sidebar"></a>
+                <a href="javascript:;" alt="Expert Search" id="expert_search"
+                    onclick="swapTabs(this);"
+                    rel="adv_marc_search_sidebar"></a>
+            </div>
+        </div>
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content">
+            <div class="advanced_div">
+            [% INCLUDE "default/kcls-wire/parts/advanced_search.tt2" %]
+            </div>
+            <div style="clear:both;height:15px;"></div>	
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/adv_global_row.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/adv_global_row.tt2
new file mode 100644
index 0000000..09e213b
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/adv_global_row.tt2
@@ -0,0 +1,35 @@
+<!-- ****************** adv_global_row.xml ***************************** -->
+<tr id='adv_global_trow' type='input'>
+	<td align='left' width='100%' nowrap='nowrap'>
+
+		<!-- select the search class -->
+		<select name='type' style='margin-right: 7px;'>
+			<option value='keyword' selected='selected'>&common.keyword;</option>
+			<option value='title'>&common.title;</option>
+			<option value='author'>&common.author;</option>
+			<option value='subject'>&common.subject;</option>
+			<option value='series'>&common.series;</option>
+			<option value='bibcn'>&common.bibcn;</option>
+			
+			</select>
+	
+		<!-- select how to treat the text -->
+		<select name='contains' style='margin-right: 7px;'>
+			<option value='contains'>&opac.advanced.refined.contains;</option>
+			<option value='nocontains'>&opac.advanced.refined.nocontains;</option>
+			<option value='exact'>&opac.advanced.refined.exact;</option>
+		</select>
+			
+		<!-- search term -->
+		<input type='text' size='18' name='term' style='margin-right: 3px;' />
+	
+		<!-- Remove this row -->
+        <button onclick='
+            var row = this.parentNode.parentNode;
+            var tbody = row.parentNode;
+            if( tbody.getElementsByTagName("tr").length > 2 )
+                row.parentNode.removeChild(row);'>X</button>
+
+	</td>
+</tr>
+<!-- ****************** end: adv_global_row.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/advanced_search.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/advanced_search.tt2
new file mode 100644
index 0000000..1b6472f
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/advanced_search.tt2
@@ -0,0 +1,349 @@
+<!-- ****************** advanced_global.xml ***************************** -->
+<table id='adv_global_search' class='data_grid data_grid_center' width='100%'>
+	<tr style='border-bottom: none;'>
+
+		<!-- Contains the user-addable(?) rows to define search class, containment and text -->
+		<td valign='top' width='65%' style='border-bottom: none;'>
+			<table width='100%' id='adv_global_input_table'>
+	
+				<thead>
+					<tr><td><div style="width:100%;" class="header_middle">&advanced.search.title;</div></td></tr>
+				</thead>
+				<tbody id='adv_global_tbody'>
+                    [% INCLUDE "default/kcls-wire/parts/adv_global_row.tt2" %]
+
+					<!-- add a new row -->
+					<tr id='adv_global_addrow'>
+						<td align='left' style="padding-top:7px;">
+							<a href="javascript:;" id="myopac_new_global_row" onclick='advAddGblRow();'>Add Search Row</a>
+                            <button onclick='advSubmitGlobal();' class="hide_me">&advanced.search.submit;</button>
+						</td>
+					</tr>
+
+				</tbody>
+			</table>
+		</td>
+	</tr>
+	<tr>
+		<td align='center'>
+		&advanced.search.library;<br /><br />
+            [% INCLUDE "default/kcls-wire/parts/libselect.tt2" %]
+			<br /><br />
+			<span>&result.limit2avail;</span>
+			<input type='checkbox' id='opac.result.limit2avail'/>
+		</td>
+	</tr>
+	
+	
+	<tr>
+		<td colspan="2">
+			<table width='100%'>
+				<thead>
+                    <tr>
+                        <td colspan='2' align='center'>&advanced.search.filters;</td>
+                    </tr>
+				</thead>
+				<tbody>
+					<tr>
+						<td align='right' class="hide_me">
+							<span>&advanced.item.form;</span>
+						</td>
+						<td align='left' class="hide_me">
+							<select multiple='multiple' size='3' id='adv_global_item_form'>
+							</select>	
+						</td>
+						<td align='right'>
+                            <span>&advanced.item.type;</span><br />
+                        </td>
+						<td align='left'>
+							<select multiple='multiple' size='3' id='adv_global_item_type' class='hide_me'>
+							</select>	
+							<select multiple='multiple' size='3' id='adv_global_item_type_basic'>
+<option value=''>&opac.search.allFormats;</option>
+<option value='a'>Book</option>
+<option value='i'>Book on cassette</option>
+<option value='n'>Book on CD</option>
+<option value='x'>Download music</option>
+<option value='y'>Download video</option>
+<option value='h'>DVD</option>
+<option value='w'>eBook - Audio</option>
+<option value='v'>eBook - Text</option>
+<option value='e'>Equipment</option>
+<option value='f'>Films</option>
+<option value='o'>Kit</option>
+<option value='q'>Large print</option>
+<option value='b'>Magazine</option>
+<option value='d'>Microform</option>
+<option value='k'>Music cassette</option>
+<option value='j'>Music CD</option>
+<option value='l'>Music LP</option>
+<option value='p'>Newspaper</option>
+<option value='t'>Online</option>
+<option value='u'>Player</option>
+<option value='c'>Printed music</option>
+<option value='2'>Read along with cassette</option>
+<option value='5'>Read along with CD</option>	
+<option value='c'>Scores</option>	
+<option value='m'>Software</option>
+<option value='g'>Video</option>
+<option value='r'>3-D Object</option>
+<option value='z'>Map</option>
+<option value='s'>Slide set</option>
+
+							</select>	
+						</td>
+
+						<td align='right' class="hide_me">
+							<span>&advanced.literary.form;</span>
+							<a id='adv_global_lit_form_link_adv' class='classic_link adv_adv_link'
+								href='javascript:void(0);' onclick='
+								hideMe($("adv_global_lit_form_basic"));
+								unHideMe($("adv_global_lit_form"));
+								hideMe(this);
+								unHideMe($("adv_global_lit_form_link_basic"));
+								'>&advanced.link;</a>
+
+							<a id='adv_global_lit_form_link_basic' class='hide_me classic_link adv_adv_link'
+								href='javascript:void(0);' onclick='
+								unHideMe($("adv_global_lit_form_basic"));
+								hideMe($("adv_global_lit_form"));
+								unHideMe($("adv_global_lit_form_link_adv"));
+								hideMe(this);
+								'>&advanced.basic.link;</a>
+						</td>
+						<td align='left' class="hide_me">
+							<select multiple='multiple' size='3' id='adv_global_lit_form' class='hide_me'>
+							</select>	
+							<select multiple='multiple' size='3' id='adv_global_lit_form_basic'>
+								<option value='0 '>&advanced.non.fiction;</option>
+								<option value='1'>&advanced.fiction;</option>
+							</select>	
+						</td>
+
+						<td align='right'>
+							<span>&advanced.language;</span>
+						</td>
+
+						<td align='left'>
+							<select multiple='multiple' size='3' id='adv_global_lang'>
+								<!--#include virtual="../../../../../common/xml/item_lang_options.xml"-->
+							</select>
+						</td>
+
+						<td align='right' class="hide_me">
+							<span>&advanced.audience;</span>
+
+							<a id='adv_global_audience_link_adv' class='classic_link adv_adv_link'
+								href='javascript:void(0);' onclick='
+								hideMe($("adv_global_audience_basic"));
+								unHideMe($("adv_global_audience"));
+								hideMe(this);
+								unHideMe($("adv_global_audience_link_basic"));
+								'>&advanced.link;</a>
+
+							<a id='adv_global_audience_link_basic' class='hide_me classic_link adv_adv_link'
+								href='javascript:void(0);' onclick='
+								unHideMe($("adv_global_audience_basic"));
+								hideMe($("adv_global_audience"));
+								unHideMe($("adv_global_audience_link_adv"));
+								hideMe(this);'>&advanced.basic.link;</a>
+						</td>
+
+						<td align='left' class="hide_me">
+							<select multiple='multiple' size='3' id='adv_global_audience' class='hide_me'>
+							</select>
+							<select multiple='multiple' size='3' id='adv_global_audience_basic'>
+								<option value='e '>&advanced.adult;</option>
+								<option value='abcdj'>&advanced.juvenile;</option>
+								<option value='fg '>&advanced.general;</option>
+							</select>
+						</td>
+
+						<td align='right' class="hide_me">
+							<span>&advanced.biblevel;</span>
+						</td>
+						<td align='left' class="hide_me">
+							<select multiple='multiple' size='3' id='adv_global_bib_level'>
+							</select>	
+						</td>
+					</tr>
+					
+					<tr>
+						<td align='right'>
+							<span>&advanced.filter.pubyear;</span>
+						</td>
+						<td align='left'>
+							<select id='adv_global_pub_date_type' onchange='
+                                if($("adv_global_pub_date_type").selectedIndex == 3)
+                                    unHideMe($("adv_global_pub_date_2_span"));
+                                else
+                                    hideMe($("adv_global_pub_date_2_span"));'>
+                                <option value='equals' selected='selected'>&advanced.filter.pubyear.equals;</option>
+                                <option value='before'>&advanced.filter.pubyear.before;</option>
+                                <option value='after'>&advanced.filter.pubyear.after;</option>
+                                <option value='between'>&advanced.filter.pubyear.between;</option>
+							</select>	
+                            <div style='margin-top:5px;'>
+                                <input id='adv_global_pub_date_1' type='text' size='4' maxlength='4'/>
+                                <span id='adv_global_pub_date_2_span' class='hide_me'>
+                                   &common.and; <input id='adv_global_pub_date_2' type='text' size='4' maxlength='4'/>
+                                </span>
+                            </div>
+						</td>
+					</tr>
+
+
+                    <!-- copy location selector -->
+                    <tr id='adv_copy_location_filter_row' class='hide_me'>
+                        <td align='right'>&opac.advanced.copy_loc_filter;</td>
+                        <td align='left' id='adv_copy_location_filter_td'>
+                            <select size='3' id='adv_copy_location_filter_select' multiple='multiple'>
+                            </select>
+                        </td>
+                    </tr>
+				</tbody>
+			</table>
+		</td>
+	</tr>
+
+	<tr style='border-top: none;'>
+		<td align='center' valign='top' style='border-top: none;' colspan='2'>
+
+			<table style='border: none; width: 100%;'>
+				<tr>
+					<td align='center' width='100%'>
+						<table class='' width='100%'>
+			
+							<thead>
+								<tr>
+									<td align='center' width='50%'>&advanced.sort.criteria;</td>
+									<td align='center'></td>
+								</tr>
+							</thead>
+			
+							<tbody>
+								<tr>
+
+                           <script language='javascript' type='text/javascript'>
+                              function __setsortsel() {
+                                 var sel = $('adv_global_sort_by')
+										   if(sel.selectedIndex == 0) {
+											   $("adv_global_sort_dir").disabled = true;
+											   $("adv_global_sort_dir").selectedIndex = 0;
+										   } else $("adv_global_sort_dir").disabled = false;
+                              }
+                           </script>
+
+									<td align=''>
+										<select id='adv_global_sort_by' onchange='__setsortsel();'>
+											<option value='rel'>&advanced.relevance;</option>
+											<option value='title'>&common.title;</option>
+											<option value='author'>&common.author;</option>
+											<option value='pubdate'>&advanced.pubdate;</option>
+										</select>
+									</td>
+								</tr>
+			
+								<tr>
+
+									<td>
+										<select id='adv_global_sort_dir' disabled='disabled'>
+											<option value='asc'>&advanced.sort.asc;</option>
+											<option value='desc'>&advanced.sort.desc;</option>
+										</select>
+									</td>
+
+                           <!-- force the enable/disable sort dir code to run -->
+                           <script language='javascript' type='text/javascript'>__setsortsel();</script>
+								</tr>
+								<tr>
+									<td align='center' class="hide_me">
+										<span>&advanced.frbrize;</span>
+										<input id='adv_group_titles' type='checkbox' />
+									</td>
+                                    <td align='center'>
+
+                                    </td>
+								</tr>
+							</tbody>
+						</table>
+					</td>
+				</tr>
+			</table>
+		</td>
+
+	</tr>
+
+	<tr class='border_4_2'>
+		<td align="left" colspan='2'>
+		<img src="/opac/skin/kcls/graphics/search_btn.gif" alt="Search" onclick='advSubmitGlobal();' style="cursor:pointer;" />
+		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+		<a href="javascript:;" onclick='clearSearchBoxes();' style="position: relative; top: -9px;">Reset Form</a>
+		</td>
+	</tr>
+
+</table>
+
+
+<div id='adv_quick_search_sidebar' class='sidebar_chunk hide_me' style='text-align:center; margin-top: 20px; width:400px;'> 
+	<div id='adv_quick_search'>
+		<div class='adv_quick_search color_4'><b>&sidebar.quick.search;</b></div>
+		<div style='margin-top: 8px;'>
+			<table><tbody><tr>
+				<td>
+					<select id='adv_quick_type'>
+						<option value='isbn'>&opac.advanced.quick.isbn;</option>
+						<option value='issn'>&opac.advanced.quick.issn;</option>
+						<option value='cn'>&opac.advanced.quick.cn;</option>
+						<option value='lccn'>&opac.advanced.quick.lccn;</option>
+						<option value='tcn'>&opac.advanced.quick.tcn;</option>
+						<option value='barcode'>&opac.advanced.quick.barcode;</option>
+					</select>
+				</td><td>
+					<input type='text' id='adv_quick_text' size='16' />
+				</td>
+			</tr></tbody></table>
+		</div>
+
+		<span class='hide_me' id='myopac.copy.not.found'>&sidebar.copy.not.found;</span>
+		<div style='margin-top: 8px;' class='adv_quick_search_submit'>
+		<img src="/opac/skin/kcls/graphics/search_btn.gif" alt="Search" id="adv_quick_submit" onclick='advGenericSearch();' style="cursor:pointer;" />
+			<!-- <a id='adv_quick_submit' href='javascript:advGenericSearch();' class='classic_link'>&common.submit;</a> -->
+		</div>
+	</div>
+</div>
+
+
+<div id='adv_marc_search_sidebar' class='sidebar_chunk hide_me' style='width:400px; margin-top: 20px;'> 
+	<div class='adv_quick_search color_4'><b>&search.marc;</b></div>
+	<table style='margin: 3px; width: 100%;' id='adv_sdbar_table' class='border_4_3'>
+		<tbody>
+			<tr>
+				<td align="right">&search.marc.tag;</td>
+				<td align="left"><input name='advanced.marc.tag' maxlength='3' size='3' /></td>
+				<td align="right">&search.marc.subfield;</td>
+				<td align="left"><input name='advanced.marc.subfield' maxlength='1' size='1' /></td>
+			</tr>
+			<tr>
+				<td align="right">&search.marc.value;</td>
+				<td colspan='3' align="left"><input name='advanced.marc.value' size='18' /></td>
+			</tr>
+			<tr name='crow' class='hide_me'>
+				<td colspan='4' align='center'>
+				<a href='javascript:void(0);' class='classic_link'
+					onclick='
+						var div = $("adv_marc_search_sidebar");
+						if( div.getElementsByTagName("table").length > 1 )
+							div.removeChild(this.parentNode.parentNode.parentNode.parentNode);'>&common.close;</a>
+				</td>
+			</tr>
+							
+		</tbody>
+	</table>
+	<div id='adv_marc_submit' class='adv_quick_search_submit'>
+		<a style='margin-right: 4px; position:relative;top:-10px;' class='classic_link' href='javascript:advAddMARC();'>&search.marc.add.row;</a>
+		<!-- <a style='margin-left: 4px;' class='classic_link' href='javascript:advMARCRun();'>&common.submit;</a> -->
+		<img alt="Search" src="/opac/skin/kcls/graphics/search_btn.gif" onclick='advMARCRun();' style="cursor:pointer;" />
+	</div>
+</div>
+<!-- ****************** end: advanced_global.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
index 061b306..a4a23b6 100644
--- a/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
@@ -1,13 +1,12 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
-]>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.locale %]' xml:lang='[% ctx.locale %]'>
     <head>
-        <link rel="stylesheet" type="text/css" href="/opac/skin/kcls/css/style.css" />
-        <link rel="stylesheet" type="text/css" href="/opac/skin/kcls/css/contentslider.css" />
+        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+        <link rel="stylesheet" type="text/css" href="/opac/skin/kcls-wire/css/style.css" />
+        <link rel="stylesheet" type="text/css" href="/opac/skin/kcls-wire/css/contentslider.css" />
         <title>Catalog - King County Library - [% ctx.page_title %]</title>
         <link rel="unapi-server" type="application/xml" title="unAPI"
             href="/opac/extras/unapi" />
-        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
         [% BLOCK html_head; END; # provide a default that can be overridden %]
         [% PROCESS html_head %]
     </head>

commit a86bbd44497b985fea2b156a1b5972d23fbc13be
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Jan 31 13:10:20 2011 -0500

    enough super-lite js to make the advanced page with its tabbiness work

diff --git a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
new file mode 100644
index 0000000..42af934
--- /dev/null
+++ b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js
@@ -0,0 +1,78 @@
+/* Some really basic utils copied mostly from old opac js:
+ * opac_utils.js, utils.js, misc.js (kcls). */
+function $(id) { return document.getElementById(id); }
+
+function swapCSSClass(obj, old, newc) {
+	removeCSSClass(obj, old);
+	addCSSClass(obj, newc);
+}
+
+function addCSSClass(e,c) {
+	if(!e || !c) return;
+
+	var css_class_string = e.className;
+	var css_class_array;
+
+	if(css_class_string)
+		css_class_array = css_class_string.split(/\s+/);
+
+	var string_ip = ""; /*strip out nulls*/
+	for (var css_class in css_class_array) {
+		if (css_class_array[css_class] == c) { return; }
+		if(css_class_array[css_class] !=null)
+			string_ip += css_class_array[css_class] + " ";
+	}
+	string_ip += c;
+	e.className = string_ip;
+}
+
+function removeCSSClass(e, c) {
+	if(!e || !c) return;
+
+	var css_class_string = '';
+
+	var css_class_array = e.className;
+	if( css_class_array )
+		css_class_array = css_class_array.split(/\s+/);
+
+	var first = 1;
+	for (var css_class in css_class_array) {
+		if (css_class_array[css_class] != c) {
+			if (first == 1) {
+				css_class_string = css_class_array[css_class];
+				first = 0;
+			} else {
+				css_class_string = css_class_string + ' ' +
+					css_class_array[css_class];
+			}
+		}
+	}
+	e.className = css_class_string;
+}
+
+function hideMe(obj) { addCSSClass(obj, "hide_me"); }
+function unHideMe(obj) { removeCSSClass(obj, "hide_me"); }
+
+function swapTabs(el) {
+    if (!el) return;
+
+    var tabs = [];
+    for (var i = 0; i < el.parentNode.childNodes.length) {
+        var node = el.parentNode.childNodes[i];
+        if (node.nodeType == 1 && node.nodeName == "a")
+            tabs.push(node);
+    }
+
+    for (var n = 0; n < tabs.length; n++) {
+        var i = tabs[n];
+        if (i == el) {
+            unHideMe($(i.rel));
+            i.style.background = "url('/opac/skin/kcls/graphics/" +
+                i.id + "_on.gif') no-repeat bottom";
+        } else {
+            hideMe($(i.rel));
+            i.style.background = "url('/opac/skin/kcls/graphics/" +
+                i.id + "_off.gif') no-repeat bottom";
+        }
+    }
+}

commit cd2b89bfa7a381a94d8a451f207b7d0867b34414
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Jan 31 12:56:42 2011 -0500

    cleanup and reorg parts so far

diff --git a/Open-ILS/web/templates/default/kcls-wire/home.tt2 b/Open-ILS/web/templates/default/kcls-wire/home.tt2
index 67433f6..2e17bc2 100644
--- a/Open-ILS/web/templates/default/kcls-wire/home.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/home.tt2
@@ -1,31 +1,32 @@
-[%  WRAPPER "default/kcls-wire/base.tt2";
-    INCLUDE "default/kcls-wire/topnav.tt2";
+[%  WRAPPER "default/kcls-wire/parts/base.tt2";
+    INCLUDE "default/kcls-wire/parts/topnav.tt2";
     ctx.page_title = "Home" %]
+[% BLOCK html_head -%]
+<script type="text/javascript" src="/opac/skin/kcls/js/contentslider.js"></script>
+[%- END %]
 
-<div id="search-wrapper">
-    <div style="margin:auto;width:974px;height:0px;">
-        <div id="user-ql">
-            <script type="text/javascript">
+    <div id="search-wrapper">
+        <div style="margin:auto;width:974px;height:0px;">
+            <div id="user-ql">
+                <script type="text/javascript">
 /* if(grabUser()) {
-	var str = '<div style="float:right;width:214px;">';
-	str += '<div style="position:absolute;"><div style="position:relative;top:-81px;">\n';
-	str += '<div id="quick-links">\n';
-	str += '</div></div></div></div>';
-	document.write(str);
+    var str = '<div style="float:right;width:214px;">';
+    str += '<div style="position:absolute;"><div style="position:relative;top:-81px;">\n';
+    str += '<div id="quick-links">\n';
+    str += '</div></div></div></div>';
+    document.write(str);
 }*/
-            </script>
+                </script>
+            </div>
+        [% INCLUDE "default/kcls-wire/parts/utils.tt2" %]
         </div>
-    [% INCLUDE "default/kcls-wire/utils.tt2" %]
+        [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]
     </div>
-
-    [% INCLUDE "default/kcls-wire/searchbar.tt2" %]
-</div>
-
-<div id="content-wrapper">
-    <div id="main-content">
-        <div style="height:15px;clear:both;"></div>
-        [% INCLUDE "default/kcls-wire/homesearch.tt2" %]
-	    <div style="clear:both;height:15px;"></div>	
+    <div id="content-wrapper">
+        <div id="main-content">
+            <div style="height:15px;clear:both;"></div>
+            [% INCLUDE "default/kcls-wire/parts/homesearch.tt2" %]
+            <div style="clear:both;height:15px;"></div>	
+        </div>
     </div>
-</div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/base.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
similarity index 93%
rename from Open-ILS/web/templates/default/kcls-wire/base.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
index 48396d5..061b306 100644
--- a/Open-ILS/web/templates/default/kcls-wire/base.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/base.tt2
@@ -13,6 +13,6 @@
     </head>
     <body>
         [% content %] 
-        [% INCLUDE "default/kcls-wire/footer.tt2" %]
+        [% INCLUDE "default/kcls-wire/parts/footer.tt2" %]
     </body>
 </html>
diff --git a/Open-ILS/web/templates/default/kcls-wire/footer.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/footer.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/footer.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/footer.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/format_selector.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/format_selector.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/format_selector.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/format_selector.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/homesearch.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/homesearch.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/homesearch.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/libselect.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/libselect.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/libselect.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/searchbar.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
similarity index 88%
rename from Open-ILS/web/templates/default/kcls-wire/searchbar.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
index 593257a..26c37b4 100644
--- a/Open-ILS/web/templates/default/kcls-wire/searchbar.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/parts/searchbar.tt2
@@ -6,7 +6,7 @@
             </td>
         </tr>
         <tr>
-            <td>[% INCLUDE "default/kcls-wire/stypes_selector.tt2" %]</td>
+            <td>[% INCLUDE "default/kcls-wire/parts/stypes_selector.tt2" %]</td>
             <td>
                 <div id="search_box_wrapper">
                     <input type="text" id="search_box" style="width:162px;" value="Search Keyword" onfocus="if (this.value=='Search Keyword'){this.value='';this.style.color='#000';}" onblur="if (this.value==''){this.value='Search Keyword';this.style.color='#999';}" />
@@ -18,8 +18,8 @@
             </td>
         </tr>
         <tr>
-            <td>[% INCLUDE "default/kcls-wire/format_selector.tt2" %]</td>
-            <td>[% INCLUDE "default/kcls-wire/libselect.tt2" %]</td>
+            <td>[% INCLUDE "default/kcls-wire/parts/format_selector.tt2" %]</td>
+            <td>[% INCLUDE "default/kcls-wire/parts/libselect.tt2" %]</td>
         </tr>
     </table>
  
diff --git a/Open-ILS/web/templates/default/kcls-wire/stypes_selector.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/stypes_selector.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/stypes_selector.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/stypes_selector.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/tips.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/tips.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/tips.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/tips.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/topnav.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/topnav.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/topnav.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/utils.tt2 b/Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-wire/utils.tt2
rename to Open-ILS/web/templates/default/kcls-wire/parts/utils.tt2

commit 47d3efe6fae7fba3fbd13f24bb28167b4ffd40ce
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Jan 31 12:21:25 2011 -0500

    kind of have the home page working, minus entity renderin

diff --git a/Open-ILS/web/templates/default/kcls-new/home.tt2 b/Open-ILS/web/templates/default/kcls-new/home.tt2
deleted file mode 100644
index c6d1118..0000000
--- a/Open-ILS/web/templates/default/kcls-new/home.tt2
+++ /dev/null
@@ -1,119 +0,0 @@
-[% INCLUDE "topnav.tt2" %]
-
-<div id="search-wrapper">
-    <div style="margin:auto;width:974px;height:0px;">
-        <div id="user-ql">
-            <script type="text/javascript">
-/* if(grabUser()) {
-	var str = '<div style="float:right;width:214px;">';
-	str += '<div style="position:absolute;"><div style="position:relative;top:-81px;">\n';
-	str += '<div id="quick-links">\n';
-	str += '</div></div></div></div>';
-	document.write(str);
-}*/
-            </script>
-        </div>
-    [% INCLUDE utils.tt2 %]
-    </div>
-
-    [% INCLUDE searchbar.tt2 %]
-</div>
-
-<div id="content-wrapper">
-    <div id="myopac_tabs" class="hide_me">
-        <div id="acct_tabs">
-            <a href="myopac/main" id="acct_summary" rel="myopac_summary_div"></a>
-            <a href="myopac/circs" id="acct_checked_out" rel="myopac_checked_div"></a>
-            <a href="myopac/holds" id="acct_holds" rel="myopac_holds_div"></a>
-            <a href="myopac/prefs" id="acct_prefs" rel="myopac_prefs_div"></a>
-            <a href="myopac/bookbags" id="acct_lists" rel="myopac_bookbag_div"></a>
-            <a href="myopac/fines" class="hide_me" id="acct_favs" style="margin-right:0px;" rel="myopac_fines_div"></a>
-        </div>
-    </div>
-
-    <div id="adv_search_parent" class="hide_me">
-        <div id="adv_search_tabs">
-            <a href="javascript:;" alt="Advanced Search" id="adv_search" onclick="swapTabs(this);" rel="adv_global_search"></a>
-            <a href="javascript:;" alt="Numeric Search" id="num_search" onclick="swapTabs(this);" rel="adv_quick_search_sidebar"></a>
-            <a href="javascript:;" alt="Expert Search" id="expert_search" onclick="swapTabs(this);" rel="adv_marc_search_sidebar"></a>
-        </div>
-    </div>
-
-    <div id="results_header_bar" class="hide_me">
-        <div id="results_header_inner">
-            <div class="results_header_btns">
-                <a href="index.xml"><img
-                    alt="Another Search"
-                    src="/opac/skin/kcls/graphics/another_search.png"
-                    onmouseover="this.src='/opac/skin/kcls/graphics/another_search_hover.png';"
-                    onmouseout="this.src='/opac/skin/kcls/graphics/another_search.png';"
-                    /></a>
-            </div>
-            <div class="results_header_btns">
-                <a href="javascript:;"
-                    onclick="goTo(buildOPACLink({page:ADVANCED}));"><img
-                    alt="Advanced Search"
-                    src="/opac/skin/kcls/graphics/adv_search.png"
-                    onmouseover="this.src='/opac/skin/kcls/graphics/adv_search_hover.png';"
-                    onmouseout="this.src='/opac/skin/kcls/graphics/adv_search.png';"
-                    /></a>
-            </div>
-            <div class="results_header_btns" style="width:111px;height:25px;">
-                <a href="javascript:;" class="hide_me" id="cacheListLink"
-                    onclick="showCachedList();"><img
-                    alt="View My List"
-                    src="/opac/skin/kcls/graphics/view_my_list.png"
-                    onmouseover="this.src='/opac/skin/kcls/graphics/view_my_list_hover.png';"
-                    onmouseout="this.src='/opac/skin/kcls/graphics/view_my_list.png';"
-                    /></a>
-            </div>
- 
-            <div class="results_header_div"></div>
-            <div class="results_header_lbl">Sort by</div>
-            <!-- XXX TODO -->filter/sorter thign here
-            <div class="results_header_div"></div>
-            <div class="results_header_lbl">View</div>
-            <select class="results_header_sel" style="width:88px;" onchange="this.selectedIndex?showDetailedInfo(true):showDetailedInfo(false);">
-                <option>Simple</option>
-                <option>Detailed</option>
-            </select>
-            <div class="results_header_div"></div>
-            <input type="checkbox" id="opac.result.limit2avai2"
-            onclick='searchBarSubmit(true, this);'
-            style="float:left;position:relative;top:2px;left:-2px;margin-right:4px;" />
-            <label for="opac.result.limit2avai2" class="results_header_lbl">
-                Limit to available items
-            </label>
-            <div style="clear:both;"></div>
-        </div>
-    </div>
-
-    <div id="main-content">
-        <!-- XXX TODO if not(myopac,advanced,result) -->
-        <div style="height:15px;clear:both;"></div>
-        <!-- XXX TODO endif -->
-<!--#if expr="$OILS_PAGE='index.xml'"-->
-	<!--#include virtual="common/altcanvas.xml"-->
-	<!--#include virtual="home/homesearch.xml"-->
-<!--#else-->
-	<!--#if expr="$OILS_PAGE='rresult.xml'"-->
-        <div id="tehResultsPage"><!-- XXX matches ABC below -->
-	<!--#include virtual="result/result_header.xml"-->
-	    <div id="rresults_page">
-	<!--#endif-->
-	<!--#include virtual="common/altcanvas.xml"--> 
-	<!--#include virtual="common/ilsevents.xml"--> 
-	<!--#include virtual="page_${OILS_PAGE}"-->
-	
-	<!--#if expr="$OILS_PAGE!='advanced.xml'"-->
-	<!--#include virtual="common/statusbar.xml"-->
-	<!--#endif-->
-	<!--#if expr="$OILS_PAGE='advanced.xml'"-->
-	<style type="text/css">#search-wrapper{padding:0; border:none;}</style>
-	<!--#endif-->
-	<!--#include virtual="common/tips.xml"-->
-    <!--#if expr="$OILS_PAGE='rresult.xml'"--></div></div><!--#endif--><!-- XXX matches ABC above -->
-<!--#endif-->
-	<div style="clear:both;height:15px;"></div>	
-    </div>
-</div>
diff --git a/Open-ILS/web/templates/default/kcls-new/searchbar.tt2 b/Open-ILS/web/templates/default/kcls-new/searchbar.tt2
deleted file mode 100644
index ea62775..0000000
--- a/Open-ILS/web/templates/default/kcls-new/searchbar.tt2
+++ /dev/null
@@ -1 +0,0 @@
-searchbar todo
diff --git a/Open-ILS/web/templates/default/kcls-new/topnav.tt2 b/Open-ILS/web/templates/default/kcls-new/topnav.tt2
deleted file mode 100644
index 8cd6067..0000000
--- a/Open-ILS/web/templates/default/kcls-new/topnav.tt2
+++ /dev/null
@@ -1 +0,0 @@
-topnav todo
diff --git a/Open-ILS/web/templates/default/kcls-new/utils.tt2 b/Open-ILS/web/templates/default/kcls-new/utils.tt2
deleted file mode 100644
index d103dca..0000000
--- a/Open-ILS/web/templates/default/kcls-new/utils.tt2
+++ /dev/null
@@ -1 +0,0 @@
-utils todo
diff --git a/Open-ILS/web/templates/default/kcls-new/base.tt2 b/Open-ILS/web/templates/default/kcls-wire/base.tt2
similarity index 62%
rename from Open-ILS/web/templates/default/kcls-new/base.tt2
rename to Open-ILS/web/templates/default/kcls-wire/base.tt2
index 4d8da96..48396d5 100644
--- a/Open-ILS/web/templates/default/kcls-new/base.tt2
+++ b/Open-ILS/web/templates/default/kcls-wire/base.tt2
@@ -1,17 +1,18 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
+]>
 <html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.locale %]' xml:lang='[% ctx.locale %]'>
     <head>
-        <link rel="stylesheet" type="text/css" href="css/style.css" />
-        <link rel="stylesheet" type="text/css" href="css/contentslider.css" />
+        <link rel="stylesheet" type="text/css" href="/opac/skin/kcls/css/style.css" />
+        <link rel="stylesheet" type="text/css" href="/opac/skin/kcls/css/contentslider.css" />
         <title>Catalog - King County Library - [% ctx.page_title %]</title>
-        <!-- Don't think we're going to need this anymore.
-        <link rel="unapi-server" type="application/xml" title="unAPI" href="/opac/extras/unapi"/> -->
+        <link rel="unapi-server" type="application/xml" title="unAPI"
+            href="/opac/extras/unapi" />
         <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
         [% BLOCK html_head; END; # provide a default that can be overridden %]
         [% PROCESS html_head %]
     </head>
     <body>
         [% content %] 
-        [% footer %]
+        [% INCLUDE "default/kcls-wire/footer.tt2" %]
     </body>
 </html>
diff --git a/Open-ILS/web/templates/default/kcls-new/footer.tt2 b/Open-ILS/web/templates/default/kcls-wire/footer.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/kcls-new/footer.tt2
rename to Open-ILS/web/templates/default/kcls-wire/footer.tt2
diff --git a/Open-ILS/web/templates/default/kcls-wire/format_selector.tt2 b/Open-ILS/web/templates/default/kcls-wire/format_selector.tt2
new file mode 100644
index 0000000..8f23865
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/format_selector.tt2
@@ -0,0 +1,42 @@
+<!-- ****************** format_selector.xml ***************************** -->
+<select id='format_selector'>
+    <option value=''>&opac.search.allFormats;</option>
+    <option value='a'>Book</option>
+    <option value='i'>Book on cassette</option>
+    <option value='n'>Book on CD</option>
+    <option value='x'>Download music</option>
+    <option value='y'>Download video</option>
+    <option value='h'>DVD</option>
+    <option value='w'>eBook - Audio</option>
+    <option value='v'>eBook - Text</option>
+    <option value='e'>Equipment</option>
+    <option value='f'>Films</option>
+    <option value='o'>Kit</option>
+    <option value='q'>Large print</option>
+    <option value='b'>Magazine</option>
+    <option value='d'>Microform</option>
+    <option value='k'>Music cassette</option>
+    <option value='j'>Music CD</option>
+    <option value='l'>Music LP</option>
+    <option value='p'>Newspaper</option>
+    <option value='t'>Online</option>
+    <option value='u'>Player</option>
+    <option value='c'>Printed music</option>
+    <option value='2'>Read along with cassette</option>
+    <option value='5'>Read along with CD</option>	
+    <option value='c'>Scores</option>	
+    <option value='m'>Software</option>
+    <option value='g'>Video</option>
+    <option value='r'>3-D Object</option>
+    <option value='z'>Map</option>
+    <option value='s'>Slide set</option>	
+<!--
+	<option value='at'>&opac.search.books;</option>
+	<option value='at-d'>&opac.search.largePrint;</option>
+	<option value='i'>&opac.search.audioBooks;</option>
+	<option value='g'>&opac.search.videoRecordings;</option>
+	<option value='j'>&opac.search.music;</option>
+	<option value='m'>&opac.search.electronic;</option>
+-->
+</select>
+<!-- ****************** end: format_selector.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/home.tt2 b/Open-ILS/web/templates/default/kcls-wire/home.tt2
new file mode 100644
index 0000000..67433f6
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/home.tt2
@@ -0,0 +1,31 @@
+[%  WRAPPER "default/kcls-wire/base.tt2";
+    INCLUDE "default/kcls-wire/topnav.tt2";
+    ctx.page_title = "Home" %]
+
+<div id="search-wrapper">
+    <div style="margin:auto;width:974px;height:0px;">
+        <div id="user-ql">
+            <script type="text/javascript">
+/* if(grabUser()) {
+	var str = '<div style="float:right;width:214px;">';
+	str += '<div style="position:absolute;"><div style="position:relative;top:-81px;">\n';
+	str += '<div id="quick-links">\n';
+	str += '</div></div></div></div>';
+	document.write(str);
+}*/
+            </script>
+        </div>
+    [% INCLUDE "default/kcls-wire/utils.tt2" %]
+    </div>
+
+    [% INCLUDE "default/kcls-wire/searchbar.tt2" %]
+</div>
+
+<div id="content-wrapper">
+    <div id="main-content">
+        <div style="height:15px;clear:both;"></div>
+        [% INCLUDE "default/kcls-wire/homesearch.tt2" %]
+	    <div style="clear:both;height:15px;"></div>	
+    </div>
+</div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/kcls-wire/homesearch.tt2 b/Open-ILS/web/templates/default/kcls-wire/homesearch.tt2
new file mode 100644
index 0000000..77a50ca
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/homesearch.tt2
@@ -0,0 +1,115 @@
+<!-- ****************** homesearch.xml ***************************** -->
+<div id="hp-banner">
+  <div id="hp-welcome">
+    <h1>Welcome to the<br />New Library Catalog!</h1>
+    Featuring enhanced holds, management<br />tools, improved self checkout, and more.<br /><br />
+    <a href="http://www.kcls.org/newcatalog" style="position:relative;top:5px;">Learn more &raquo;</a><br /><br />
+    
+    <div id="paginate-homebanner">
+      <!-- <a href="#" class="next">next</a>
+      <a href="#" class="prev">prev</a> -->
+      
+      
+<!-- ************************************ home page rotator navigator start ************************************* -->
+      <a class="toc" href="#1" rel="1" style="background:gray;"></a>
+      <a class="toc" href="#2" rel="2" style="background:#ffc331;"></a>
+      <a class="toc" href="#3" rel="3" style="background:pink;"></a>
+      <a class="toc" href="#4" rel="4" style="background:#2bb0fd;"></a>
+      <a class="toc" href="#5" rel="5" style="background:#54987f;"></a>
+      <a class="toc" href="#6" rel="6" style="background:#decc92;"></a>
+      <a class="toc" href="#7" rel="7" style="background:white;"></a>
+<!-- **************************************** home page navigator end ******************************************* -->
+
+
+
+
+<!-- DON'T TOUCH THESE NEXT 4 LINES! -->
+    </div>
+  </div>
+  <div style="float:right;width:675px;height:213px;color:green;overflow:hidden;">
+  <div id="homebanner" class="sliderwrapper">
+  
+  
+  
+  
+  
+  
+<!-- ************************************ home page banner start ********************************************** -->
+    <div class="contentdiv" style="background:white;">
+      <a href="http://www.kcls.org/newcatalog"><img alt="New catalog" src="/opac/skin/kcls/graphics/banner1.jpg" /></a>
+    </div>
+    <div class="contentdiv" style="background:#ffc331;">
+      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
+      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
+    </div>
+    <div class="contentdiv" style="background:pink;">
+      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
+      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
+    </div>
+    <div class="contentdiv" style="background:#2bb0fd;">
+      <br />
+      <img src="/opac/skin/kcls/graphics/KCLS_logo_horiz.gif" /><br />
+      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
+      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
+    </div>
+    <div class="contentdiv" style="background:#54987f;">
+      <div style="width:700px;height:30px;border:1px solid red;"></div>
+      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
+      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
+    </div>
+    <div class="contentdiv" style="background:#decc92;">
+      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
+      test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />
+    </div>
+    <div class="contentdiv" style="background:white;">
+      <table cellpadding="0" cellspacing="0" border="0" style="width:100%;height:100%;"><tr><td align="center" style="width:100%;height:100%;border:1px solid black;">
+        They call me Box Boy.
+      </td></tr></table>
+    </div>
+<!-- ************************************* home page banner end *********************************************** -->
+
+
+
+
+
+
+  </div>
+
+<script type="text/javascript">
+featuredcontentslider.init({
+id: "homebanner",
+contentsource: ["inline", ""],
+toc: "markup",
+nextprev: ["", ""],
+enablefade: [true, 0.04],
+onChange: function(previndex, curindex){},
+
+
+autorotate: [true, 3000] //pause time (in milliseconds)
+})
+</script>
+
+    <div style="position:absolute;z-index:101;"><div style="position:relative;"><a href="http://www.kcls.org/newcatalog" style="display:block;width:675px;height:213px;"></a></div></div>
+      <img alt="New catalog" src="/opac/skin/kcls/graphics/banner1.jpg" />
+    
+    
+    
+  </div>
+</div>
+
+<div id="hp-buttons">
+  <div style="float:left;"><img src="/opac/skin/kcls/graphics/hp-links-left.jpg" /></div>
+  <div style="float:left;">
+    <div id="home-buttons-inner">
+      <table cellpadding="0" cellspacing="5" border="0" id="hp-ql-table">
+          <tr><td colspan="4"><span style="color: #333;font-weight: bold;font-size: 13px;">Browse for:</span></td></tr>
+        <tr><td><a href="http://www.kcls.org/booksandreading/">books</a></td><td><a href="http://www.kcls.org/movies/movies_browse.cfm">movies</a></td><td><a href="http://www.kcls.org/ecollection/">downloads</a></td><td><a href="http://www.kcls.org/websites/">websites</a></td></tr>
+        <tr><td><a href="http://www.kcls.org/music/">music</a></td><td><a href="http://www.kcls.org/databases/subject_categories.cfm#17">magazines</a></td><td><a href="http://www.kcls.org/databases/">databases</a></td><td><a href="http://www.kcls.org/answers/">answers</a></td></tr>
+      </table>
+    </div>
+  </div>
+  <div style="float:left;"><img src="/opac/skin/kcls/graphics/hp-links-right.jpg" /></div>
+  <div style="float:right;"><a href="http://www.kcls.org/locations"><img alt="Locations" src="/opac/skin/kcls/graphics/locations.jpg" /></a></div>
+  <div style="clear:both;"></div>
+</div>
+<!-- ****************** end: homesearch.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/libselect.tt2 b/Open-ILS/web/templates/default/kcls-wire/libselect.tt2
new file mode 100644
index 0000000..664b421
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/libselect.tt2
@@ -0,0 +1,8 @@
+<!-- ****************** libselect.xml ***************************** -->
+	<span id='depth_selector_span'>
+        <select id='depth_selector'><!-- XXX TODO --></select>
+	</span>
+	<span style="display:none" id='lib_selector_span'>
+		<a id='lib_selector_link' class='classic_link' href='javascript:void(0)'>&library.select.help;</a>
+	</span>
+<!-- ****************** end: libselect.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/searchbar.tt2 b/Open-ILS/web/templates/default/kcls-wire/searchbar.tt2
new file mode 100644
index 0000000..593257a
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/searchbar.tt2
@@ -0,0 +1,35 @@
+<div id="search-box">    
+    <table cellpadding="0" cellspacing="10" border="0" style="position:relative;left:-10px;">
+        <tr>
+            <td colspan="3">
+                <span class="search_catalog_lbl">Search the Catalog</span> <a href="javascript:;" id="home_adv_search_link" style="position:relative;top:-1px;left:10px;"><span class="adv_search_font">Advanced Search</span></a>
+            </td>
+        </tr>
+        <tr>
+            <td>[% INCLUDE "default/kcls-wire/stypes_selector.tt2" %]</td>
+            <td>
+                <div id="search_box_wrapper">
+                    <input type="text" id="search_box" style="width:162px;" value="Search Keyword" onfocus="if (this.value=='Search Keyword'){this.value='';this.style.color='#000';}" onblur="if (this.value==''){this.value='Search Keyword';this.style.color='#999';}" />
+                    <input id='facet_box' type='hidden' />
+                </div>
+            </td>
+            <td valign="top">
+                <div style="position:absolute;"><div style="position:relative;top:-3px;"><input type="button" id="search_submit" value="GO" class="hide_me" /><a href="javascript:;" id="search_submit_alt" onclick="$('search_submit').click()"><img alt="Search" src="/opac/skin/kcls/graphics/go-btn.png" onmouseover="this.src='/opac/skin/kcls/graphics/go-btn-hover.png';" onmouseout="this.src='/opac/skin/kcls/graphics/go-btn.png';" /></a></div></div>
+            </td>
+        </tr>
+        <tr>
+            <td>[% INCLUDE "default/kcls-wire/format_selector.tt2" %]</td>
+            <td>[% INCLUDE "default/kcls-wire/libselect.tt2" %]</td>
+        </tr>
+    </table>
+ 
+    <div class="hide_me">
+        <input type="checkbox" id="opac.result.limit2avail" />
+        <label style="position:relative;top:-3px;" for="opac.result.limit2avail">
+            <span style="font-size:10px;">Limit to available items</span>
+        </label>
+      </div>
+      
+    <div id="breadcrumb"><a href="index.xml">Catalog Home</a> &gt;</div>
+    <div style="clear:both"></div>
+</div>
diff --git a/Open-ILS/web/templates/default/kcls-wire/stypes_selector.tt2 b/Open-ILS/web/templates/default/kcls-wire/stypes_selector.tt2
new file mode 100644
index 0000000..9bde3bf
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/stypes_selector.tt2
@@ -0,0 +1,10 @@
+<!-- ****************** stypes_selector.xml ***************************** -->
+<select id='search_type_selector'>
+	<option value='keyword' selected='selected'>&common.keyword;</option>
+	<option value='title'>&common.title;</option>
+	<option value='author'>&common.author;</option>
+	<option value='subject'>&common.subject;</option>
+	<option value='series'>&common.series;</option>
+	<option value='cn'>Call Number</option>
+</select>
+<!-- ****************** end: stypes_selector.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/tips.tt2 b/Open-ILS/web/templates/default/kcls-wire/tips.tt2
new file mode 100644
index 0000000..477429e
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/tips.tt2
@@ -0,0 +1,11 @@
+<!-- ****************** tips.xml ***************************** -->
+<div class="hide_me">
+    <div id='tips' class='tips hide_me'>
+        <div class='hide_me'>
+            <span>&common.tips.tip1;</span>
+            <span>&common.tips.tip2;</span>
+        </div>
+        <span style="font-weight: bold;">&tips.label;</span>
+    </div>
+</div>
+<!-- ****************** end: tips.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/topnav.tt2 b/Open-ILS/web/templates/default/kcls-wire/topnav.tt2
new file mode 100644
index 0000000..f775126
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/topnav.tt2
@@ -0,0 +1,31 @@
+<!-- ****************** top_nav.xml ***************************** -->
+<div id="header">
+    <div style="float:left;"><a
+        href="http://www.kcls.org"><img alt="KCLS Logo"
+        src="/opac/skin/kcls/graphics/KCLS_logo_horiz.gif" /></a></div>
+    <div style="float:right;">
+        <div id="your-acct-login"><a
+            href="javascript:void(0);" id="home_myopac_link"><img
+            alt="Your Account Log in"
+            src="/opac/skin/kcls/graphics/login-btn.png"
+            onmouseover="this.src='/opac/skin/kcls/graphics/login-btn-hover.png';"
+            onmouseout="this.src='/opac/skin/kcls/graphics/login-btn.png';" /></a></div>
+
+
+    </div>
+    <div style="clear:both;height:0px;margin:0px;padding:0px;"></div>
+</div>
+<div style="height:24px;background:#252525;">
+    <div id="gold-links">
+        <div id="header-links">
+            <a href="http://www.kcls.org/usingthelibrary/index.cfm">Using the Library</a>
+            <a href="http://www.kcls.org/booksandreading/">Books &amp; Reading</a>
+            <a href="http://www.kcls.org/research/index.cfm">Research &amp; Homework</a>
+            <a href="http://www.kcls.org/programs/">Programs &amp; Classes</a>
+            <a href="http://www.kcls.org/events/">Events</a>
+            <a href="/opac/extras/mobile/">Mobile Catalog</a>
+            <a href="http://www.kcls.org/about/">About KCLS</a>
+        </div>
+    </div>
+</div>
+<!-- ****************** end: top_nav.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/kcls-wire/utils.tt2 b/Open-ILS/web/templates/default/kcls-wire/utils.tt2
new file mode 100644
index 0000000..4ab334a
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-wire/utils.tt2
@@ -0,0 +1,19 @@
+<!-- ****************** utils.xml ***************************** -->
+
+<div style="float:right;">
+<div style="position:relative;">
+<img src="/opac/skin/kcls/graphics/utils-corner-left.png" style="float:left;" />
+  <div style="float:left;width:163px;height:30px;background:url('/opac/skin/kcls/graphics/utils-corner-mid.png') repeat-x top;"> 
+  
+  	<a href="javascript:history.go(-1)" style="position:relative;top:1px;left:10px;"><img alt="Back" src="/opac/skin/kcls/graphics/tool_back.png" /></a>
+	<a href="./" style="position:relative;top:3px;left:20px;"><img src="/opac/skin/kcls/graphics/tool_home.png" alt="Homepage" /></a>
+	<a href="javascript:window.print();" style="position:relative;top:5px;left:30px;"><img src="/opac/skin/kcls/graphics/tool_print.png" alt="Print Page" /></a>
+	<a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm" style="position:relative;top:2px;left:40px;"><img alt="Help" src="/opac/skin/kcls/graphics/tool_help.png" /></a>
+   	<a href="javascript:history.go(+1)" style="position:relative;top:2px;left:50px;"><img src="/opac/skin/kcls/graphics/tool_forward.png" alt="Forward" /></a>
+	
+  </div>
+<img src="/opac/skin/kcls/graphics/utils-corner-right.png" style="float:left;" />
+</div>
+</div>
+
+<!-- ****************** end: utils.xml ***************************** -->

commit 9ae8e71055eef778f8ffe644bd8890e1b789f0fe
Merge: e6d067f 4ae10dd
Author: senator <lebbeous at esilibrary.com>
Date:   Mon Jan 31 10:08:09 2011 -0500

    Merge branch 'opac-tt-poc' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 4ae10ddb44191e726917447f54e7fbf5c5e4b6fd
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Jan 31 09:59:52 2011 -0500

    moved EGCatLoader to be consistent w/ new perlmod layout

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
similarity index 100%
rename from Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
rename to Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm

commit dbd5c57bb0e3ea3a33022c55e0bbb661ea9a9743
Merge: 54fad5d 3e5eba9
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Mon Jan 31 09:54:05 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 54fad5d3dce2a39ab2eb6708ccb3dd63688195e5
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Sun Jan 30 20:16:54 2011 -0500

    initial bookbags stub page

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 1c2dca6..bda7662 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -130,6 +130,7 @@ sub load {
     return $self->load_myopac_circs if $path =~ /opac\/myopac\/circs/;
     return $self->load_myopac_fines if $path =~ /opac\/myopac\/fines/;
     return $self->load_myopac_update_email if $path =~ /opac\/myopac\/update_email/;
+    return $self->load_myopac_bookbags if $path =~ /opac\/myopac\/bookbags/;
     return $self->load_myopac if $path =~ /opac\/myopac/;
     # ----------------------------------------------------------------
 
@@ -959,8 +960,25 @@ sub load_myopac_update_email {
     $self->apache->print($self->cgi->redirect(-url => $url));
 
     return Apache2::Const::REDIRECT;
+}
+
+sub load_myopac_bookbags {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+    my $limit = $self->cgi->param('limit') || 0;
+    my $offset = $self->cgi->param('offset') || 0;
 
+    my $args = {order_by => {cbreb => 'name'}};
+    $args->{limit} = $limit if $limit;
+    $args->{offset} = $limit if $limit;
 
+    $ctx->{bookbags} = $e->search_container_biblio_record_entry_bucket([
+        {owner => $self->editor->requestor->id, btype => 'bookbag'},
+        $args
+    ]);
+
+    return Apache2::Const::OK;
 }
 
 
diff --git a/Open-ILS/web/templates/default/opac/myopac/bookbags.tt2 b/Open-ILS/web/templates/default/opac/myopac/bookbags.tt2
index 6e359d4..0ac2dc0 100644
--- a/Open-ILS/web/templates/default/opac/myopac/bookbags.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/bookbags.tt2
@@ -4,11 +4,49 @@
     table { border-collapse: collapse; }
     table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
     table tr:nth-child(odd) { background-color:#ded; }
+    #action_div { width: 95%; }
+    #action-buttons { float:right; }
 </style>
 [% END %]
 
 [% WRAPPER "default/opac/base.tt2" %]
 [% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "bookbags" %]
-<p><em>XXX TODO</em></p>
+
+[% IF ctx.bookbags.size == 0 %]
+<b>No Bookbags</b>
+[% STOP; END %]
+
+<form method='POST' id='bbag-form'>
+    <div id='action_div'>
+        <div id='action-buttons'>
+            <select name='action'>
+                <option value='delete'>Delete Selected</option>
+                <option value='delete_all'>Delete All</option>
+            </select>
+            <input type='submit' value='Go'/>
+        </div>
+    </div>
+    <table>
+        <thead>
+            <tr>
+                <th>Name</th>
+                <th>Public</th>
+                <th>Created On</th>
+                <th>Items</th>
+            </tr>
+        </thead>
+        <tbody>
+            [% FOR bbag IN ctx.bookbags %]
+                <tr [% IF loop.count % 2 == 1 %] class='bbag-table-odd' [% END %]>
+                    <td>[% bbag.name %]</td>
+                    <td>[% bbag.pub == 't' ? 'Yes' : 'No' %]</td>
+                    <td>[% date.format(ctx.parse_datetime(bbag.create_time),'%Y-%m-%d') %]</td>
+                    <td>XXX</td>
+                </tr>
+            [% END %]
+        </tbody>
+    </table>
+</form>
+
 
 [% END %]

commit 040b9d0028ed34ccbbc42af262b6342045d478d6
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Sun Jan 30 19:51:22 2011 -0500

    minor terminology change

diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index adc53ae..27f960d 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -101,7 +101,7 @@
                             </div>
                             <div style='float:right'>
                                 <span>[% rec.copy_counts.available %] / [% rec.copy_counts.visible %]</span>
-                                <span style='padding-left:10px;'><a href='place_hold?hold_target=[% rec.bre.id %]&hold_type=T'>Place Hold</a></span>
+                                <span style='padding-left:10px;'><a href='place_hold?hold_target=[% rec.bre.id %]&hold_type=T'>Hold</a></span>
                             </div>
                         </div><br/>
                         <div>[% attrs.author %]</div>

commit 9b52ee88894701dac9144a0b84ec854b2735c513
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Sun Jan 30 19:51:05 2011 -0500

    report when 0 items to list in circs/holds page

diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 55ab95b..5f08d2e 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -16,6 +16,10 @@
 [% WRAPPER "default/opac/base.tt2" %]
 [% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "circs" %]
 
+[% IF ctx.circs.size == 0 %]
+<b>No Items Checked Out</b>
+[% STOP; END %]
+
 <form method='POST' id='circ-form'>
     <div id='action_div'>
         [% IF ctx.success_renewals > 0 %]
@@ -65,7 +69,6 @@
                     </td>
                 </tr>
                 [% END %]
-
             [% END %]
         </tbody>
     </table>
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 84b4650..d919849 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -12,6 +12,11 @@
 [% PROCESS "default/opac/common.tt2" %]
 [% WRAPPER "default/opac/base.tt2" %]
 [% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "holds" %]
+
+[% IF ctx.holds.size == 0 %]
+<b>No Items On Hold</b>
+[% STOP; END %]
+
 <form method='POST'>
 
     <div id='action_div'>

commit 09ad4943aab4234913370986cb7642b4546bee8d
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Sun Jan 30 19:50:32 2011 -0500

    added sample update-email operation; cleaned out some debug code

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 091d1ac..1c2dca6 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -129,6 +129,7 @@ sub load {
     return $self->load_myopac_holds if $path =~ /opac\/myopac\/holds/;
     return $self->load_myopac_circs if $path =~ /opac\/myopac\/circs/;
     return $self->load_myopac_fines if $path =~ /opac\/myopac\/fines/;
+    return $self->load_myopac_update_email if $path =~ /opac\/myopac\/update_email/;
     return $self->load_myopac if $path =~ /opac\/myopac/;
     # ----------------------------------------------------------------
 
@@ -370,7 +371,6 @@ sub load_rresults {
         $cgi->param('depth') : $ctx->{find_aou}->($loc)->ou_type->depth;
 
     my $args = {limit => $limit, offset => $page * $limit, org_unit => $loc, depth => $depth}; 
-    $self->apache->log->warn("Search : " . OpenSRF::Utils::JSON->perl2JSON($args));
 
     $query = "$query $facet" if $facet; # TODO
     my $results;
@@ -540,7 +540,6 @@ sub fetch_user_holds {
         while($batch_idx < $top_idx) {
             my $hold_id = $hold_ids->[$batch_idx++];
             last unless $hold_id;
-            $self->apache->log->warn("fetching hold $hold_id");
             my $ses = OpenSRF::AppSession->create('open-ils.circ');
             my $req = $ses->request(
                 'open-ils.circ.hold.details.retrieve', 
@@ -565,7 +564,6 @@ sub fetch_user_holds {
         }
         for my $req_data (@ses) {
             push(@collected, {hold => $req_data->{req}->gather(1)});
-            $self->apache->log->warn("fetched a hold");
             $req_data->{ses}->kill_me;
         }
         @ses = $mk_req_batch->();
@@ -721,7 +719,7 @@ sub load_place_hold {
         }
 
         # hold permit failed
-        $self->apache->log->warn('hold permit result ' . OpenSRF::Utils::JSON->perl2JSON($allowed));
+        $logger->info('hold permit result ' . OpenSRF::Utils::JSON->perl2JSON($allowed));
     }
 
     return Apache2::Const::OK;
@@ -940,4 +938,30 @@ sub load_myopac_fines {
      return Apache2::Const::OK;
 }       
 
+sub load_myopac_update_email {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+    my $email = $self->cgi->param('email') || '';
+
+    unless($email =~ /.+\@.+\..+/) { # TODO better regex?
+        $ctx->{invalid_email} = $email;
+        return Apache2::Const::OK;
+    }
+
+    my $stat = $U->simplereq(
+        'open-ils.actor', 
+        'open-ils.actor.user.email.update', 
+        $e->authtoken, $email);
+
+    my $url = $self->apache->unparsed_uri;
+    $url =~ s/update_email/main/;
+    $self->apache->print($self->cgi->redirect(-url => $url));
+
+    return Apache2::Const::REDIRECT;
+
+
+}
+
+
 1;
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
index dc86a48..33a533e 100644
--- a/Open-ILS/web/templates/default/opac/myopac/main.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -1,8 +1,7 @@
 [% BLOCK html_head %]
 <style>
-    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
-    table { border-collapse: collapse; }
-    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
+    table { text-align: center; padding: 20px; margin-top: 30px; border-collapse: collapse; }
+    table td { padding: 5px 15px 5px 15px; border-bottom: 1px solid #ddd; text-align: left;}
     table tr:nth-child(odd) { background-color:#ded; }
 </style>
 [% END %]
@@ -29,6 +28,7 @@
     <tr>
         <td>Email Address</td>
         <td>[% ctx.user.email %]</td>
+        <td><a href='update_email'>Change</a></td>
     </tr>
     <tr>
         <td>Phone</td>
diff --git a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2 b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
new file mode 100644
index 0000000..7666c8f
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
@@ -0,0 +1,20 @@
+[% BLOCK html_head %]
+<style>
+    table { text-align: center; padding: 20px; margin-top: 30px; border-collapse: collapse; }
+    table td { padding: 5px 15px 5px 15px; border-bottom: 1px solid #ddd; text-align: left;}
+    table tr:nth-child(odd) { background-color:#ded; }
+</style>
+[% END %]
+
+[% WRAPPER "default/opac/base.tt2" %]
+[% INCLUDE "default/opac/myopac/_links.tt2" %]
+
+<form method='POST'>
+    <table> 
+        <tr><td>Current Email</td><td>[% ctx.user.email %]</td></tr>
+        <tr><td>New Email</td><td><input type='text' name='email'/></td></tr>
+    </table>
+    <input type='submit'/>
+</form>
+
+[% END %]

commit 47deb2525c631f5f4c558ce1482c3cff176650f4
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Sun Jan 30 19:00:25 2011 -0500

    added org selector to search form; added 'loc' param to search next/prev links

diff --git a/Open-ILS/web/templates/default/opac/common.tt2 b/Open-ILS/web/templates/default/opac/common.tt2
index e343c9c..76b4646 100644
--- a/Open-ILS/web/templates/default/opac/common.tt2
+++ b/Open-ILS/web/templates/default/opac/common.tt2
@@ -11,7 +11,7 @@
     [% END %]
         <option value='[% org_unit.id %]' [% IF org_unit.id == value %] selected='selected' [% END %]>
             [% 
-                pad = org_unit.ou_type.depth * 4;
+                pad = org_unit.ou_type.depth * 2;
                 FOR idx IN [0..pad]; '&nbsp;'; END;
                 org_unit.name;
             %]
diff --git a/Open-ILS/web/templates/default/opac/home.tt2 b/Open-ILS/web/templates/default/opac/home.tt2
index d1c2e05..9faf5e6 100644
--- a/Open-ILS/web/templates/default/opac/home.tt2
+++ b/Open-ILS/web/templates/default/opac/home.tt2
@@ -7,12 +7,14 @@
 [% END %]
 
 [% WRAPPER "default/opac/base.tt2" %]
+[% PROCESS "default/opac/common.tt2" %]
 
 <div id='home_div'>
     <img src='/images/eg_logo.jpg'/>
     <br/><br/>
     <form action='./results' method='GET'>
-        <input type='text' name='query' value='[% query %]'/>
+        <input type='text' name='query' size='50' value='[% query %]'/>
+        [% PROCESS build_org_selector name='loc' %]
         <input type='submit'/>
         <input type='hidden' name='page' value='0'/>
     </form>
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index d9ee02e..84b4650 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -27,7 +27,6 @@
             <input type='Submit' value='Go'/>
         </div>
     </div>
-
     <table>
         <thead>
             <tr>
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 601acd5..adc53ae 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -21,11 +21,13 @@
     page = CGI.param('page') || 0; 
     query = CGI.param('query');
     page_count = POSIX.ceil(ctx.hit_count / ctx.page_size);
+    loc = CGI.param('loc');
 %]
 
 <div id='form_div'>
     <form action='./results' method='GET'>
         <input type='text' name='query' size='50' value='[% query %]'/>
+        [% PROCESS build_org_selector name='loc' value=loc %]
         <input type='submit'/>
         <input type='hidden' name='page' value='0'/>
     </form>
@@ -71,8 +73,14 @@
         <td id='right_block'>
             <div>
                 <span>Hits: [% ctx.hit_count %] / Page [% page + 1 %] of [% page_count %]</span>
-                <a [% IF page > 0 %] href='?page=[% page - 1 %]&query=[% query | uri %]' [% END %]>Prev</a>  
-                <a [% IF (page + 1) < page_count %] href='?page=[% page + 1 %]&query=[% query | uri %]' [% END %]>Next</a>
+                [% 
+                    q = query | url;
+                    np_link = '?query=' _ q;
+                    IF loc; np_link = np_link _ "&loc=" _ loc; END;
+                    IF depth or depth == 0; np_link = np_link _ "&depth=" _ depth; END;
+                %]
+                <a [% IF page > 0 %] href='[% np_link %]&page=[% page - 1 %]' [% END %]>Prev</a>  
+                <a [% IF (page + 1) < page_count %] href='[% np_link %]&page=[% page + 1 %]' [% END %]>Next</a>
             </div>
             <table id='record_table'>
                 [%

commit 8caecf36024cbfb21cbceae11d3329c24b50ce3c
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Sun Jan 30 18:57:47 2011 -0500

    fixed some cache bugs; added org location/depth search params; added org settings handler

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index d30a779..091d1ac 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -16,8 +16,6 @@ use OpenILS::Utils::Fieldmapper;
 use DateTime::Format::ISO8601;
 my $U = 'OpenILS::Application::AppUtils';
 
-my %cache; # proc-level cache
-
 sub _icon_by_mattype {  # XXX This is KCLS specific stuff that needs to be
                         # genericized later.
     my $mattype = shift;
@@ -138,14 +136,18 @@ sub load {
 }
 
 # general purpose utility functions added to the environment
+
+my %cache = (
+    map => {aou => {}}, # others added dynamically as needed
+    list => {},
+    org_settings => {}
+);
+
 sub load_helpers {
     my $self = shift;
     my $e = $self->editor;
     my $ctx = $self->ctx;
 
-    $cache{map} = {}; # public object maps
-    $cache{list} = {}; # public object lists
-
     # fetch-on-demand-and-cache subs for commonly used public data
     my @public_classes = qw/ccs aout cifm citm clm/;
 
@@ -170,7 +172,7 @@ sub load_helpers {
             return $cache{list}{$hint};
         };
     
-        $cache{map}{$hint} = {};
+        $cache{map}{$hint} = {} unless $cache{map}{$hint};
 
         $ctx->{$find_key} = sub {
             my $id = shift;
@@ -211,7 +213,6 @@ sub load_helpers {
     };
 
     # Add a special handler for the tree-shaped org unit cache
-    $cache{map}{aou} = {};
     $ctx->{find_aou} = sub {
         my $org_id = shift;
         $ctx->{aou_tree}->(); # force the org tree to load
@@ -231,7 +232,15 @@ sub load_helpers {
             $date->month,
             $date->year
         );
-    }
+    };
+
+    $ctx->{get_org_setting} = sub {
+        my($org_id, $setting) = @_;
+        $cache{org_settings}{$org_id} = {} unless $cache{org_settings}{$org_id};
+        $cache{org_settings}{$org_id}{$setting} = $U->ou_ancestor_setting_value($org_id, $setting)
+            unless exists $cache{org_settings}{$org_id}{$setting};
+        return $cache{org_settings}{$org_id}{$setting};
+    };
 }
 
 # context additions: 
@@ -245,6 +254,7 @@ sub load_common {
     my $ctx = $self->ctx;
 
     $ctx->{referer} = $self->cgi->referer;
+    $ctx->{is_staff} = ($self->apache->headers_in->get('User-Agent') =~ 'oils_xulrunner');
 
     if($e->authtoken($self->cgi->cookie('ses'))) {
 
@@ -353,16 +363,23 @@ sub load_rresults {
     my $page = $cgi->param('page') || 0;
     my $facet = $cgi->param('facet');
     my $query = $cgi->param('query');
-    my $limit = $cgi->param('limit') || 10; # XXX user settings
-    my $args = {limit => $limit, offset => $page * $limit}; 
-    $query = "$query $facet" if $facet;
+    my $limit = $cgi->param('limit') || 10; # TODO user settings
+
+    my $loc = $cgi->param('loc') || $ctx->{aou_tree}->()->id;
+    my $depth = defined $cgi->param('depth') ? 
+        $cgi->param('depth') : $ctx->{find_aou}->($loc)->ou_type->depth;
+
+    my $args = {limit => $limit, offset => $page * $limit, org_unit => $loc, depth => $depth}; 
+    $self->apache->log->warn("Search : " . OpenSRF::Utils::JSON->perl2JSON($args));
+
+    $query = "$query $facet" if $facet; # TODO
     my $results;
 
     try {
-        $results = $U->simplereq(
-            'open-ils.search',
-            'open-ils.search.biblio.multiclass.query.staff', 
-            $args, $query, 1);
+
+        my $method = 'open-ils.search.biblio.multiclass.query';
+        $method .= '.staff' if $ctx->{is_staff};
+        $results = $U->simplereq('open-ils.search', $method, $args, $query, 1);
 
     } catch Error with {
         my $err = shift;
@@ -552,7 +569,7 @@ sub fetch_user_holds {
             $req_data->{ses}->kill_me;
         }
         @ses = $mk_req_batch->();
-        last unless @ses;
+        last unless @collected or @ses;
         $first = 0;
     }
     # ----------------------------------------------------------------

commit aca8ee212ea10bbea48fc67a15ccb4e5558c192d
Author: Bill Erickson <erickson at esilibrary.com>
Date:   Sun Jan 30 18:56:11 2011 -0500

    protect against undef string warnings

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
index 256350c..e804562 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
@@ -232,8 +232,8 @@ sub parse_config {
     $ctx->{media_prefix} = (ref $data->{media_prefix}) ? '' : $data->{media_prefix};
     $ctx->{base_path} = (ref $data->{base_path}) ? '' : $data->{base_path};
     $ctx->{template_paths} = [];
-    $ctx->{force_valid_xml} = ($data->{force_valid_xml} =~ /true/io) ? 1 : 0;
-    $ctx->{debug_template} = ($data->{debug_template} =~ /true/io) ? 1 : 0;
+    $ctx->{force_valid_xml} = ( ($data->{force_valid_xml}||'') =~ /true/io) ? 1 : 0;
+    $ctx->{debug_template} = ( ($data->{debug_template}||'')  =~ /true/io) ? 1 : 0;
     $ctx->{default_template_extension} = $data->{default_template_extension} || 'tt2';
     $ctx->{web_dir} = $data->{web_dir};
 

commit 7af224f0d8f88f7277cf3dccbd96a86038b2c036
Author: Bill Erickson <berick at esilibrary.com>
Date:   Sat Jan 29 10:30:52 2011 -0500

    make title/author links on holds page

diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index b783d17..d9ee02e 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -47,8 +47,8 @@
                 [% attrs = {marc_xml => hold.marc_xml}; %]
                 [% PROCESS get_marc_attrs args=attrs; %]
             <tr>
-                <td>[% attrs.title %]</td>
-                <td>[% attrs.author %]</td>
+                <td><a href='../record/[% hold.hold.bre.id %]'>[% attrs.title %]</a></td>
+                <td><a href='../results?query=au:[% attrs.author | url %]'>[% attrs.author %]</a></td>
                 <td>
                     [%
                         format_desc = ctx.find_citm(attrs.mattype).value;

commit 06f8d4b63be3bc8fa6a5bf2edb1d4ca35ea4ccee
Merge: 0418e38 49c4916
Author: Bill Erickson <berick at esilibrary.com>
Date:   Sat Jan 29 10:25:55 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 0418e38ef5a703a54709081fa7c964f9225d62d7
Author: Bill Erickson <berick at esilibrary.com>
Date:   Sat Jan 29 10:25:45 2011 -0500

    minor circs page tweaks: disable renew option when no renewals left;  make title/author links

diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index fc63b31..55ab95b 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -43,13 +43,16 @@
             [% FOR circ IN ctx.circs %]
                 [% attrs = {marc_xml => circ.marc_xml}; %]
                 [% PROCESS get_marc_attrs args=attrs; %]
+
                 <tr [% IF loop.count % 2 == 1 %] class='circ-table-odd' [% END %]>
-                    <td>[% attrs.title %]</td>
-                    <td>[% attrs.author %]</td>
+                    <td><a href='../record/[% circ.circ.target_copy.call_number.record.id %]'>[% attrs.title %]</a></td>
+                    <td><a href='../results?query=au:[% attrs.author | url %]'>[% attrs.author %]</a></td>
                     <td>[% date.format(ctx.parse_datetime(circ.circ.due_date),'%Y-%m-%d') %]</td>
                     <td><em>[% circ.circ.renewal_remaining %]</em></td>
-                    <td><input name='circ' value='[% circ.circ.id %]' type='checkbox'/></td>
+                    <td><input name='circ' value='[% circ.circ.id %]' type='checkbox' 
+                        [% IF circ.circ.renewal_remaining < 1 %] disabled='disabled' [% END %]/></td>
                 </tr>
+
                 [% IF circ.renewal_response and circ.renewal_response.textcode != 'SUCCESS' %]
                 <tr [% IF loop.count % 2 == 1 %] class='circ-table-odd' [% END %]>
                     <td colspan='0'>
@@ -62,6 +65,7 @@
                     </td>
                 </tr>
                 [% END %]
+
             [% END %]
         </tbody>
     </table>

commit e6d067f4f04c36006ba729cd278235e3ebeb7805
Author: senator <lebbeous at esilibrary.com>
Date:   Fri Jan 28 14:30:17 2011 -0500

    beginning of boiling down the home page of the kcls skin

diff --git a/Open-ILS/web/templates/default/kcls-new/base.tt2 b/Open-ILS/web/templates/default/kcls-new/base.tt2
new file mode 100644
index 0000000..4d8da96
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-new/base.tt2
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.locale %]' xml:lang='[% ctx.locale %]'>
+    <head>
+        <link rel="stylesheet" type="text/css" href="css/style.css" />
+        <link rel="stylesheet" type="text/css" href="css/contentslider.css" />
+        <title>Catalog - King County Library - [% ctx.page_title %]</title>
+        <!-- Don't think we're going to need this anymore.
+        <link rel="unapi-server" type="application/xml" title="unAPI" href="/opac/extras/unapi"/> -->
+        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+        [% BLOCK html_head; END; # provide a default that can be overridden %]
+        [% PROCESS html_head %]
+    </head>
+    <body>
+        [% content %] 
+        [% footer %]
+    </body>
+</html>
diff --git a/Open-ILS/web/templates/default/kcls-new/footer.tt2 b/Open-ILS/web/templates/default/kcls-new/footer.tt2
new file mode 100644
index 0000000..aebbd48
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-new/footer.tt2
@@ -0,0 +1,25 @@
+<!-- Google Analytics -->
+<script type="text/javascript">
+/* uncomment when ready */ /*
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-3018520-10']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+*/
+</script>
+<!-- End Google Analytics -->
+
+<div id="footer">
+    <a href="http://www.kcls.org/usingthelibrary/request/">Request a Purchase</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/usingthelibrary/request/">Interlibrary Loan</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/about/contact/">Contact Us</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/usingthelibrary/catalog_help/">Site Help</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/usingthelibrary/policies/privacy.cfm">Privacy Statement</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/about/support/">Support KCLS</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/employment/">Employment</a> 
+</div>
diff --git a/Open-ILS/web/templates/default/kcls-new/home.tt2 b/Open-ILS/web/templates/default/kcls-new/home.tt2
new file mode 100644
index 0000000..c6d1118
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-new/home.tt2
@@ -0,0 +1,119 @@
+[% INCLUDE "topnav.tt2" %]
+
+<div id="search-wrapper">
+    <div style="margin:auto;width:974px;height:0px;">
+        <div id="user-ql">
+            <script type="text/javascript">
+/* if(grabUser()) {
+	var str = '<div style="float:right;width:214px;">';
+	str += '<div style="position:absolute;"><div style="position:relative;top:-81px;">\n';
+	str += '<div id="quick-links">\n';
+	str += '</div></div></div></div>';
+	document.write(str);
+}*/
+            </script>
+        </div>
+    [% INCLUDE utils.tt2 %]
+    </div>
+
+    [% INCLUDE searchbar.tt2 %]
+</div>
+
+<div id="content-wrapper">
+    <div id="myopac_tabs" class="hide_me">
+        <div id="acct_tabs">
+            <a href="myopac/main" id="acct_summary" rel="myopac_summary_div"></a>
+            <a href="myopac/circs" id="acct_checked_out" rel="myopac_checked_div"></a>
+            <a href="myopac/holds" id="acct_holds" rel="myopac_holds_div"></a>
+            <a href="myopac/prefs" id="acct_prefs" rel="myopac_prefs_div"></a>
+            <a href="myopac/bookbags" id="acct_lists" rel="myopac_bookbag_div"></a>
+            <a href="myopac/fines" class="hide_me" id="acct_favs" style="margin-right:0px;" rel="myopac_fines_div"></a>
+        </div>
+    </div>
+
+    <div id="adv_search_parent" class="hide_me">
+        <div id="adv_search_tabs">
+            <a href="javascript:;" alt="Advanced Search" id="adv_search" onclick="swapTabs(this);" rel="adv_global_search"></a>
+            <a href="javascript:;" alt="Numeric Search" id="num_search" onclick="swapTabs(this);" rel="adv_quick_search_sidebar"></a>
+            <a href="javascript:;" alt="Expert Search" id="expert_search" onclick="swapTabs(this);" rel="adv_marc_search_sidebar"></a>
+        </div>
+    </div>
+
+    <div id="results_header_bar" class="hide_me">
+        <div id="results_header_inner">
+            <div class="results_header_btns">
+                <a href="index.xml"><img
+                    alt="Another Search"
+                    src="/opac/skin/kcls/graphics/another_search.png"
+                    onmouseover="this.src='/opac/skin/kcls/graphics/another_search_hover.png';"
+                    onmouseout="this.src='/opac/skin/kcls/graphics/another_search.png';"
+                    /></a>
+            </div>
+            <div class="results_header_btns">
+                <a href="javascript:;"
+                    onclick="goTo(buildOPACLink({page:ADVANCED}));"><img
+                    alt="Advanced Search"
+                    src="/opac/skin/kcls/graphics/adv_search.png"
+                    onmouseover="this.src='/opac/skin/kcls/graphics/adv_search_hover.png';"
+                    onmouseout="this.src='/opac/skin/kcls/graphics/adv_search.png';"
+                    /></a>
+            </div>
+            <div class="results_header_btns" style="width:111px;height:25px;">
+                <a href="javascript:;" class="hide_me" id="cacheListLink"
+                    onclick="showCachedList();"><img
+                    alt="View My List"
+                    src="/opac/skin/kcls/graphics/view_my_list.png"
+                    onmouseover="this.src='/opac/skin/kcls/graphics/view_my_list_hover.png';"
+                    onmouseout="this.src='/opac/skin/kcls/graphics/view_my_list.png';"
+                    /></a>
+            </div>
+ 
+            <div class="results_header_div"></div>
+            <div class="results_header_lbl">Sort by</div>
+            <!-- XXX TODO -->filter/sorter thign here
+            <div class="results_header_div"></div>
+            <div class="results_header_lbl">View</div>
+            <select class="results_header_sel" style="width:88px;" onchange="this.selectedIndex?showDetailedInfo(true):showDetailedInfo(false);">
+                <option>Simple</option>
+                <option>Detailed</option>
+            </select>
+            <div class="results_header_div"></div>
+            <input type="checkbox" id="opac.result.limit2avai2"
+            onclick='searchBarSubmit(true, this);'
+            style="float:left;position:relative;top:2px;left:-2px;margin-right:4px;" />
+            <label for="opac.result.limit2avai2" class="results_header_lbl">
+                Limit to available items
+            </label>
+            <div style="clear:both;"></div>
+        </div>
+    </div>
+
+    <div id="main-content">
+        <!-- XXX TODO if not(myopac,advanced,result) -->
+        <div style="height:15px;clear:both;"></div>
+        <!-- XXX TODO endif -->
+<!--#if expr="$OILS_PAGE='index.xml'"-->
+	<!--#include virtual="common/altcanvas.xml"-->
+	<!--#include virtual="home/homesearch.xml"-->
+<!--#else-->
+	<!--#if expr="$OILS_PAGE='rresult.xml'"-->
+        <div id="tehResultsPage"><!-- XXX matches ABC below -->
+	<!--#include virtual="result/result_header.xml"-->
+	    <div id="rresults_page">
+	<!--#endif-->
+	<!--#include virtual="common/altcanvas.xml"--> 
+	<!--#include virtual="common/ilsevents.xml"--> 
+	<!--#include virtual="page_${OILS_PAGE}"-->
+	
+	<!--#if expr="$OILS_PAGE!='advanced.xml'"-->
+	<!--#include virtual="common/statusbar.xml"-->
+	<!--#endif-->
+	<!--#if expr="$OILS_PAGE='advanced.xml'"-->
+	<style type="text/css">#search-wrapper{padding:0; border:none;}</style>
+	<!--#endif-->
+	<!--#include virtual="common/tips.xml"-->
+    <!--#if expr="$OILS_PAGE='rresult.xml'"--></div></div><!--#endif--><!-- XXX matches ABC above -->
+<!--#endif-->
+	<div style="clear:both;height:15px;"></div>	
+    </div>
+</div>
diff --git a/Open-ILS/web/templates/default/kcls-new/searchbar.tt2 b/Open-ILS/web/templates/default/kcls-new/searchbar.tt2
new file mode 100644
index 0000000..ea62775
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-new/searchbar.tt2
@@ -0,0 +1 @@
+searchbar todo
diff --git a/Open-ILS/web/templates/default/kcls-new/topnav.tt2 b/Open-ILS/web/templates/default/kcls-new/topnav.tt2
new file mode 100644
index 0000000..8cd6067
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-new/topnav.tt2
@@ -0,0 +1 @@
+topnav todo
diff --git a/Open-ILS/web/templates/default/kcls-new/utils.tt2 b/Open-ILS/web/templates/default/kcls-new/utils.tt2
new file mode 100644
index 0000000..d103dca
--- /dev/null
+++ b/Open-ILS/web/templates/default/kcls-new/utils.tt2
@@ -0,0 +1 @@
+utils todo

commit c85e7cf6884639c9278bc084236fe4d04bc06928
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jan 27 17:40:47 2011 -0500

    holds retrieval is a hefty process, created a parallelizer for testing; shows good speed improvemetn on larger batches of holds

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 3c217f4..d30a779 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -503,19 +503,66 @@ sub fetch_user_holds {
 
     return $hold_ids if $ids_only or @$hold_ids == 0;
 
+    my $args = {
+        suppress_notices => 1,
+        suppress_transits => 1,
+        suppress_mvr => 1,
+        suppress_patron_details => 1,
+        include_bre => $flesh ? 1 : 0
+    };
+
+    # ----------------------------------------------------------------
+    # batch version for testing;  initial test show 40% speed 
+    # savings on larger sets (>20) of holds.
+    # ----------------------------------------------------------------
+    my $batch_size = 8;
+    my $batch_idx = 0;
+    my $mk_req_batch = sub {
+        my @ses;
+        my $top_idx = $batch_idx + $batch_size;
+        while($batch_idx < $top_idx) {
+            my $hold_id = $hold_ids->[$batch_idx++];
+            last unless $hold_id;
+            $self->apache->log->warn("fetching hold $hold_id");
+            my $ses = OpenSRF::AppSession->create('open-ils.circ');
+            my $req = $ses->request(
+                'open-ils.circ.hold.details.retrieve', 
+                $e->authtoken, $hold_id, $args);
+            push(@ses, {ses => $ses, req => $req});
+        }
+        return @ses;
+    };
+
+    my $first = 1;
+    my @collected;
+    my @holds;
+    my @ses;
+    while(1) {
+        @ses = $mk_req_batch->() if $first;
+        last if $first and not @ses;
+        if(@collected) {
+            while(my $blob = pop(@collected)) {
+                $blob->{marc_xml} = XML::LibXML->new->parse_string($blob->{hold}->{bre}->marc) if $flesh;
+                push(@holds, $blob);
+            }
+        }
+        for my $req_data (@ses) {
+            push(@collected, {hold => $req_data->{req}->gather(1)});
+            $self->apache->log->warn("fetched a hold");
+            $req_data->{ses}->kill_me;
+        }
+        @ses = $mk_req_batch->();
+        last unless @ses;
+        $first = 0;
+    }
+    # ----------------------------------------------------------------
+
+=head
     my $req = $circ->request(
         # TODO .authoritative version is chewing up cstores
         # 'open-ils.circ.hold.details.batch.retrieve.authoritative', 
         'open-ils.circ.hold.details.batch.retrieve', 
-        $e->authtoken, 
-        $hold_ids,
-        {
-            suppress_notices => 1,
-            suppress_transits => 1,
-            suppress_mvr => 1,
-            suppress_patron_details => 1,
-            include_bre => 1
-        }
+        $e->authtoken, $hold_ids, $args
     );
 
     my @holds;
@@ -528,6 +575,8 @@ sub fetch_user_holds {
     }
 
     $circ->kill_me;
+=cut
+
     return \@holds;
 }
 

commit e851be21c630ddf3a25283b6ed8e7f2258fa82b1
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Jan 27 16:28:59 2011 -0500

    Show hold statuses

diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 50e3d01..b783d17 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -60,14 +60,26 @@
                     [%  END %]
                 </td>
                 <td>[% ctx.find_aou(hold.hold.hold.pickup_lib).name %]</td>
-                <td>[% hold.hold.hold.status %]<!-- see myOShowHoldStatus() in skin/default/js/myopac.js --></td>
+                <td>[%
+                    IF hold.hold.status == 4;
+                        "Available";
+                    ELSIF hold.hold.estimated_wait;
+                        "Estimated wait (days): "; hold.hold.estimated_wait;
+                    ELSIF hold.hold.status == 3;
+                        "In Transit";
+                    ELSIF hold.hold.status < 3;
+                        "Waiting for copy";
+                    END;
+                %]</td>
                 <td>[% IF hold.hold.hold.frozen == 't' %] No [% ELSE %] Yes [% END %]</td>
                 <td>[% 
                     IF hold.hold.hold.frozen == 't' AND hold.hold.hold.thaw_date;
                         date.format(ctx.parse_datetime(hold.hold.hold.thaw_date),'%Y-%m-%d'); 
+                    ELSE;
+                        '-';
                     END 
                 %]</td>
-                <td>[% hold.hold.hold.expire_time %]</td>
+                <td>[% hold.hold.hold.expire_time ? hold.hold.hold.expire_time : '-' %]</td>
                 <td><input type='checkbox' name='hold_id' value='[% hold.hold.hold.id %]'/></td>
             </tr>
             [% END %]

commit 996ae74ab723791e5c45c0c43c9129100ffe7aa1
Merge: b875dea f3c0d03
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jan 27 16:00:34 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit b875dead389ce6794ac2f9c7d776b1b30b479b6b
Merge: 3f19fda aba35b4
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jan 27 16:00:25 2011 -0500

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 3f19fda33a92fc608b2a516ea02dd35ec856cec6
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jan 27 16:00:19 2011 -0500

    more holds placement work; use http referer as default redirect_to option for login page and post-holds-placement page; when a secure resource is requested, redirect to login page

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index aabc73d..4fb05ec 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -2,6 +2,7 @@ package OpenILS::WWW::EGCatLoader;
 use strict; use warnings;
 use CGI;
 use XML::LibXML;
+use URI::Escape;
 use Digest::MD5 qw(md5_hex);
 use Apache2::Const -compile => qw(OK DECLINED FORBIDDEN HTTP_INTERNAL_SERVER_ERROR REDIRECT HTTP_BAD_REQUEST);
 use OpenSRF::AppSession;
@@ -81,8 +82,12 @@ sub load {
     # ----------------------------------------------------------------
     # These pages require authentication
     # ----------------------------------------------------------------
-    return Apache2::Const::FORBIDDEN unless $self->cgi->https;
-    return $self->load_logout unless $self->editor->requestor;
+    unless($self->cgi->https and $self->editor->requestor) {
+        # If a secure resource is requested insecurely, redirect to the login page
+        my $url = 'https://' . $self->apache->hostname . $self->ctx->{base_path} . "/opac/login";
+        $self->apache->print($self->cgi->redirect(-url => $url));
+        return Apache2::Const::REDIRECT;
+    }
 
     return $self->load_place_hold if $path =~ /opac\/place_hold/;
     return $self->load_myopac_holds if $path =~ /opac\/myopac\/holds/;
@@ -201,6 +206,8 @@ sub load_common {
     my $e = $self->editor;
     my $ctx = $self->ctx;
 
+    $ctx->{referer} = $self->cgi->referer;
+
     if($e->authtoken($self->cgi->cookie('ses'))) {
 
         if($e->checkauth) {
@@ -260,7 +267,7 @@ sub load_login {
 
     $self->apache->print(
         $cgi->redirect(
-            -url => $cgi->param('origin') || $home,
+            -url => $cgi->param('redirect_to') || $home,
             -cookie => $cgi->cookie(
                 -name => 'ses',
                 -path => '/',
@@ -597,13 +604,18 @@ sub load_place_hold {
             if($stat and $stat > 0) {
 
                 # if successful, return the user to the requesting page
-                $self->apache->print($cgi->redirect(-url => $cgi->referer));
+                $self->apache->log->info("Redirecting back to " . $cgi->param('redirect_to'));
+                $self->apache->print($cgi->redirect(-url => $cgi->param('redirect_to')));
                 return Apache2::Const::REDIRECT;
 
             } else {
+
                 $ctx->{hold_failed} = 1; # XXX process the events, etc
             }
         }
+
+        # hold permit failed
+        $self->apache->log->warn('hold permit result ' . OpenSRF::Utils::JSON->perl2JSON($allowed));
     }
 
     return Apache2::Const::OK;
diff --git a/Open-ILS/web/templates/default/opac/login.tt2 b/Open-ILS/web/templates/default/opac/login.tt2
index a6e8b14..1bae958 100644
--- a/Open-ILS/web/templates/default/opac/login.tt2
+++ b/Open-ILS/web/templates/default/opac/login.tt2
@@ -26,7 +26,7 @@
                 </td>
             </tr>
         </table>
-        <input type='hidden' name='origin' value='[% CGI.param('origin') %]'/>
+        <input type='hidden' name='redirect_to' value='[% CGI.param('redirect_to') || ctx.referer | replace('^http:', 'https:') %]'/>
     </form>
 </div>
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/place_hold.tt2 b/Open-ILS/web/templates/default/opac/place_hold.tt2
index 71810a7..91996ad 100644
--- a/Open-ILS/web/templates/default/opac/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/place_hold.tt2
@@ -25,7 +25,7 @@
         <input type='Submit'/>
         <input type='hidden' name='hold_target' value='[% CGI.param('hold_target') %]'/>
         <input type='hidden' name='hold_type' value='[% CGI.param('hold_type') %]'/>
-        <input type='hidden' name='origin' value='[% CGI.param('origin') %]'/>
+        <input type='hidden' name='redirect_to' value='[% ctx.referer %]'/>
     </form>
     [% END %]
 </div>
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 700010e..601acd5 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -51,9 +51,8 @@
                 [% ELSE %]
                     [% 
                         login = CGI.url("-path" => 1).replace('^http:', 'https:').replace('/results','/login');
-                        origin = CGI.url("-absolute" => 1, "-path" => 1, "-query" => 1) | uri 
                     %]
-                    <a href='[% login _ '?origin=' _ origin %]'>Login</a>
+                    <a href='[% login %]'>Login</a>
                 [% END %]
             </div>
             <div>

commit aba35b4f9830fb6cb891283ef3bf520a1504a474
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Jan 27 15:49:27 2011 -0500

    show kcls-style mat-type images for holds

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index aabc73d..666cb66 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -17,6 +17,44 @@ my $U = 'OpenILS::Application::AppUtils';
 
 my %cache; # proc-level cache
 
+sub _icon_by_mattype {  # XXX This is KCLS specific stuff that needs to be
+                        # genericized later.
+    my $mattype = shift;
+
+    my %type_map = (
+        "a" => "media_book.jpg",
+        "b" => "media_magazines.jpg",
+        "c" => "media_printedmusic.jpg",
+        "d" => "media_microform.jpg",
+        "e" => "media_equipment.jpg",
+        "f" => "media_films.jpg",
+        "g" => "",
+        "h" => "media_dvd.jpg",
+        "i" => "media_bookoncassette.jpg",
+        "j" => "media_musiccd.jpg",
+        "k" => "media_musiccassette.jpg",
+        "l" => "media_musicrecord.jpg",
+        "m" => "media_software.jpg",
+        "n" => "media_bookoncd.jpg",
+        "o" => "media_kit.jpg",
+        "p" => "media_newspaper.jpg",
+        "q" => "media_largeprint.jpg",
+        "r" => "media_3dobject.jpg",
+        "s" => "media_slide.jpg",
+        "t" => "media_online.jpg",
+        "u" => "media_eaudio.jpg",
+        "v" => "media_ebooktext.jpg",
+        "w" => "media_eaudio.jpg",
+        "x" => "media_downloadmusic.jpg",
+        "y" => "media_downloadvideo.jpg",
+        "z" => "media_map.jpg",
+        "2" => "media_cassettewithbook.jpg",
+        "5" => "media_cdwithbook.jpg"
+    );
+
+    return $type_map{$mattype};
+}
+
 sub new {
     my($class, $apache, $ctx) = @_;
 
@@ -542,6 +580,8 @@ sub load_myopac_holds {
 
     $ctx->{holds} = $self->fetch_user_holds(undef, 0, 1, $limit, $offset);
 
+    $ctx->{"icon_by_mattype"} = \&_icon_by_mattype;
+
     return Apache2::Const::OK;
 }
 
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 4d57ed6..50e3d01 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -50,9 +50,14 @@
                 <td>[% attrs.title %]</td>
                 <td>[% attrs.author %]</td>
                 <td>
-                    [% format_desc = ctx.find_citm(attrs.mattype).value; %]<!-- XXX in situations where we might show M-type holds, this won't be good enough -->
+                    [%
+                        format_desc = ctx.find_citm(attrs.mattype).value;
+                        icon_filename = ctx.icon_by_mattype(attrs.mattype);
+                        IF icon_filename;
+                    %]<!-- XXX in situations where we might show M-type holds, this won't be good enough -->
                     <img alt="[% format_desc %]" title="[% format_desc %]"
-                        src="[% ctx.icon_by_mattype(attrs.mattype) %]" />
+                        src="/images/mattype/[% icon_filename %]" />
+                    [%  END %]
                 </td>
                 <td>[% ctx.find_aou(hold.hold.hold.pickup_lib).name %]</td>
                 <td>[% hold.hold.hold.status %]<!-- see myOShowHoldStatus() in skin/default/js/myopac.js --></td>

commit 7239df2447038528c723f7194e797336797a4f84
Merge: a259cba c200206
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Jan 27 15:04:25 2011 -0500

    Merge branch 'opac-tt-poc' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit a259cba9d14f6492c3485752360b3726d70598d6
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Jan 27 15:04:07 2011 -0500

    format/mat-type start

diff --git a/Open-ILS/web/templates/default/opac/marc_attrs.tt2 b/Open-ILS/web/templates/default/opac/marc_attrs.tt2
index 9cdad34..73f12c3 100644
--- a/Open-ILS/web/templates/default/opac/marc_attrs.tt2
+++ b/Open-ILS/web/templates/default/opac/marc_attrs.tt2
@@ -10,6 +10,7 @@
         args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
         args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
         args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
+        args.mattype = xml.findnodes('//*[@tag="998"]/*[@code="d"]').textContent; # XXX this is KCLS-specific and will need to change
 
         # clean up the ISBN
         args.isbn_clean = args.isbn.replace('\ .*', '');
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 1151614..4d57ed6 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -49,7 +49,11 @@
             <tr>
                 <td>[% attrs.title %]</td>
                 <td>[% attrs.author %]</td>
-                <td>[% hold.hold.hold.holdable_formats %]<!-- see _myOPACFleshHoldTitle(), search for "mods_formats" in skin/default/js/myopac.js; holdable_formats is wrong --></td>
+                <td>
+                    [% format_desc = ctx.find_citm(attrs.mattype).value; %]<!-- XXX in situations where we might show M-type holds, this won't be good enough -->
+                    <img alt="[% format_desc %]" title="[% format_desc %]"
+                        src="[% ctx.icon_by_mattype(attrs.mattype) %]" />
+                </td>
                 <td>[% ctx.find_aou(hold.hold.hold.pickup_lib).name %]</td>
                 <td>[% hold.hold.hold.status %]<!-- see myOShowHoldStatus() in skin/default/js/myopac.js --></td>
                 <td>[% IF hold.hold.hold.frozen == 't' %] No [% ELSE %] Yes [% END %]</td>

commit c200206169d0dcdf53463953b38c523f55d03204
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jan 27 14:55:44 2011 -0500

    more holds work; added item form/type/lang maps to list of public access classes; removed some unused test tempates

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 167f408..aabc73d 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -104,7 +104,7 @@ sub load_helpers {
     $cache{list} = {}; # public object lists
 
     # fetch-on-demand-and-cache subs for commonly used public data
-    my @public_classes = qw/ccs aout/;
+    my @public_classes = qw/ccs aout cifm citm clm/;
 
     for my $hint (@public_classes) {
 
@@ -112,6 +112,8 @@ sub load_helpers {
             $Fieldmapper::fieldmap->{$_}->{hint} eq $hint
         } keys %{ $Fieldmapper::fieldmap };
 
+        my $ident_field =  $Fieldmapper::fieldmap->{$class}->{identity};
+
 	    $class =~ s/Fieldmapper:://o;
 	    $class =~ s/::/_/g;
 
@@ -130,7 +132,7 @@ sub load_helpers {
         $ctx->{$find_key} = sub {
             my $id = shift;
             return $cache{map}{$hint}{$id} if $cache{map}{$hint}{$id}; 
-            ($cache{map}{$hint}{$id}) = grep { $_->id == $id } @{$ctx->{$list_key}->()};
+            ($cache{map}{$hint}{$id}) = grep { $_->$ident_field eq $id } @{$ctx->{$list_key}->()};
             return $cache{map}{$hint}{$id};
         };
 
@@ -547,10 +549,11 @@ sub load_place_hold {
     my $self = shift;
     my $ctx = $self->ctx;
     my $e = $self->editor;
+    my $cgi = $self->cgi;
     $self->ctx->{page} = 'place_hold';
 
-    $ctx->{hold_target} = $self->cgi->param('hold_target');
-    $ctx->{hold_type} = $self->cgi->param('hold_type');
+    $ctx->{hold_target} = $cgi->param('hold_target');
+    $ctx->{hold_type} = $cgi->param('hold_type');
     $ctx->{default_pickup_lib} = $e->requestor->home_ou; # XXX staff
 
     if($ctx->{hold_type} eq 'T') {
@@ -560,7 +563,7 @@ sub load_place_hold {
 
     $ctx->{marc_xml} = XML::LibXML->new->parse_string($ctx->{record}->marc);
 
-    if(my $pickup_lib = $self->cgi->param('pickup_lib')) {
+    if(my $pickup_lib = $cgi->param('pickup_lib')) {
 
         my $args = {
             patronid => $e->requestor->id,
@@ -592,13 +595,15 @@ sub load_place_hold {
             );
 
             if($stat and $stat > 0) {
-                $ctx->{hold_success} = 1;
+
+                # if successful, return the user to the requesting page
+                $self->apache->print($cgi->redirect(-url => $cgi->referer));
+                return Apache2::Const::REDIRECT;
+
             } else {
                 $ctx->{hold_failed} = 1; # XXX process the events, etc
             }
         }
-
-        # place the hold and deliver results
     }
 
     return Apache2::Const::OK;
diff --git a/Open-ILS/web/templates/default/opac/place_hold.tt2 b/Open-ILS/web/templates/default/opac/place_hold.tt2
index b92315b..71810a7 100644
--- a/Open-ILS/web/templates/default/opac/place_hold.tt2
+++ b/Open-ILS/web/templates/default/opac/place_hold.tt2
@@ -25,6 +25,7 @@
         <input type='Submit'/>
         <input type='hidden' name='hold_target' value='[% CGI.param('hold_target') %]'/>
         <input type='hidden' name='hold_type' value='[% CGI.param('hold_type') %]'/>
+        <input type='hidden' name='origin' value='[% CGI.param('origin') %]'/>
     </form>
     [% END %]
 </div>
diff --git a/Open-ILS/web/templates/default/opac/records.tt2 b/Open-ILS/web/templates/default/opac/records.tt2
deleted file mode 100644
index 7d53268..0000000
--- a/Open-ILS/web/templates/default/opac/records.tt2
+++ /dev/null
@@ -1,31 +0,0 @@
-[% WRAPPER "default/opac/base.tt2" %]
-[% ctx.page_title = "Results" %]
-[% page = ctx.cgi.param('page') || 0; %]
-<a href='?page=[% page - 1 %]'>Prev</a>  <a href='?page=[% page + 1 %]'>Next</a>
-<br/>
-
-<table>
-[%
-    e = ctx.editor;
-    idx = 0;
-    WHILE idx < 10;
-        id = idx + page * 10;
-        attrs = e.search_acq_lineitem_attr({lineitem => id});
-        isbn = '';
-        FOR attr IN attrs; 
-            IF attr.attr_name == 'isbn';
-                isbn = attr.attr_value;
-                LAST;
-            END;
-        END;
-        idx = idx + 1;
-%]
-
-<tr>
-    <td><img width='65' height='90' src='/opac/extras/ac/jacket/small/[% isbn %]'/></td>
-    <td>[% FOR attr IN attrs; attr.attr_value _ ' / '; END; %]</td>
-</tr>
-
-    [% END %]
-</table>
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index fa09cca..700010e 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -88,10 +88,15 @@
                         [% END %]
                     </td>
                     <td width='auto'>
-                        <div>
-                            <a href='record/[% rec.bre.id %]'>[% attrs.title %]</a>
-                            <span style='padding-left:10px;'>[% rec.copy_counts.available %] / [% rec.copy_counts.visible %]</span>
-                        </div>
+                        <div width='99%'>
+                            <div style='float:left'>
+                                <a href='record/[% rec.bre.id %]'>[% attrs.title %]</a>
+                            </div>
+                            <div style='float:right'>
+                                <span>[% rec.copy_counts.available %] / [% rec.copy_counts.visible %]</span>
+                                <span style='padding-left:10px;'><a href='place_hold?hold_target=[% rec.bre.id %]&hold_type=T'>Place Hold</a></span>
+                            </div>
+                        </div><br/>
                         <div>[% attrs.author %]</div>
                         <div>[% attrs.isbn || attrs.issn || attrs.upc %] [% attrs.publisher %] [% attrs.pubdate %]</div>
                     </td>
diff --git a/Open-ILS/web/templates/default/opac/welcome.tt2 b/Open-ILS/web/templates/default/opac/welcome.tt2
deleted file mode 100644
index 0cccd3f..0000000
--- a/Open-ILS/web/templates/default/opac/welcome.tt2
+++ /dev/null
@@ -1,27 +0,0 @@
-<div style='position:absolute; top:0px; right:0px; border-left:1px solid #9A9; border-bottom:1px solid #9A9; padding: 10px; background:#ded'>
-    [% IF ctx.user; %]
-        <table>
-            <tr>
-                <td colspan='2' style='border-bottom:1px solid #9A9'>Welcome, [% ctx.user.usrname %]!</td>
-            </tr>
-            <tr>
-                <td>Total Holds</td><td>[% ctx.user_stats.holds.total %]</td>
-            </tr>
-            <tr>
-                <td>Ready Holds</td><td>[% ctx.user_stats.holds.ready %]</td>
-            </tr>
-            <tr>
-                <td>Items Out</td><td>[% ctx.user_stats.checkouts.out %]</td>
-            </tr>
-            <tr>
-                <td>Fines</td><td>$[% ctx.user_stats.fines.balance_owed %]</td>
-            </tr>
-            <tr>
-                <td><a href='logout'>Logout</a></td>
-                <td><a href='myopac/main'>Account</a></td>
-            </tr>
-        </table>
-    [% ELSE %]
-        <a href='[% ctx.base_url.replace('^http:', 'https:') _ ctx.base_path _ '/opac/login' %]'>Login</a>
-    [% END %]
-</div>

commit 1d1c91127fc612b075b7f41f01209e33b584a983
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Jan 27 14:21:47 2011 -0500

    Holds editing is totally giraffes for the moment

diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 65d71a7..1151614 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -40,7 +40,6 @@
                 <th>Activate on...</th>
                 <th>Expiration Date</th>
                 <th>Select</th>
-                <th>Edit</th>
             </tr>
         </thead>
         <tbody>
@@ -61,7 +60,6 @@
                 %]</td>
                 <td>[% hold.hold.hold.expire_time %]</td>
                 <td><input type='checkbox' name='hold_id' value='[% hold.hold.hold.id %]'/></td>
-                <td><em>XXX TODO</em></td>
             </tr>
             [% END %]
         </tbody>

commit 28ef2f017d13a0de11036585a97887e333228ca4
Merge: 1d0a2ea bb2adf1
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Jan 27 12:37:04 2011 -0500

    Merge branch 'opac-tt-poc' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 1d0a2eabeb628e5b9fda75c28316ee269193175a
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Jan 27 12:36:52 2011 -0500

    fines summary

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index eecc750..44dc711 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -682,7 +682,10 @@ sub load_myopac_fines {
     my $ctx = $self->ctx;
     $ctx->{"fines"} = {
         "circulation" => [],
-        "grocery" => []
+        "grocery" => [],
+        "total_paid" => 0,
+        "total_owed" => 0,
+        "balance_owed" => 0
     };
 
     my $limit = $self->cgi->param('limit') || 0;
@@ -726,6 +729,11 @@ sub load_myopac_fines {
             $last_billing = pop(@billings);
         }
 
+        # XXX TODO switch to some money-safe non-fp library for math
+        $ctx->{"fines"}->{$_} += $mobts->$_ for (
+            qw/total_paid total_owed balance_owed/
+        );
+
         push(
             @{$ctx->{"fines"}->{$mobts->grocery ? "grocery" : "circulation"}},
             {
diff --git a/Open-ILS/web/templates/default/opac/common.tt2 b/Open-ILS/web/templates/default/opac/common.tt2
index c702b95..e343c9c 100644
--- a/Open-ILS/web/templates/default/opac/common.tt2
+++ b/Open-ILS/web/templates/default/opac/common.tt2
@@ -23,5 +23,5 @@
 [% END %]
 
 [% PROCESS 'default/opac/marc_attrs.tt2' %]
-
-
+[% USE date %]
+[% USE money = format('$%.2f') %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 3c156cc..fc63b31 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -15,8 +15,6 @@
 [% PROCESS "default/opac/common.tt2" %]
 [% WRAPPER "default/opac/base.tt2" %]
 [% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "circs" %]
-[% USE date %]
-
 
 <form method='POST' id='circ-form'>
     <div id='action_div'>
diff --git a/Open-ILS/web/templates/default/opac/myopac/fines.tt2 b/Open-ILS/web/templates/default/opac/myopac/fines.tt2
index 49ecf30..727322f 100644
--- a/Open-ILS/web/templates/default/opac/myopac/fines.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/fines.tt2
@@ -8,8 +8,6 @@
 </style>
 [% END %]
 
-[% USE date %]
-[% USE money = format('$%.2f') %]
 [% PROCESS "default/opac/common.tt2" %]
 [% WRAPPER "default/opac/base.tt2" %]
 [% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "fines" %]
@@ -24,7 +22,9 @@
     </thead>
     <tbody>
         <tr>
-            <td colspan="3"><em>XXX TODO</em></td>
+            <td>[% money(ctx.fines.total_owed) %]</td>
+            <td>[% money(ctx.fines.total_paid) %]</td>
+            <td>[% money(ctx.fines.balance_owed) %]</td>
         </tr>
     </tbody>
 </table>
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 86df64b..cea7f41 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -7,7 +7,6 @@
 </style>
 [% END %]
 
-[% USE date %]
 [% PROCESS "default/opac/common.tt2" %]
 [% WRAPPER "default/opac/base.tt2" %]
 [% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "holds" %]

commit bb2adf1516637f47180784403b7651de0602bf80
Merge: 880ac99 c7c03f4
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jan 27 12:11:03 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 880ac99a32751a044e3204eaac6a6a9540e3ce1f
Merge: 9f15347 07d571a
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jan 27 12:10:56 2011 -0500

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 9f1534789a5ffa4941afbbb268196b611649690d
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jan 27 12:10:49 2011 -0500

    added perl bits for hold cancel/suspend/activate all/selected w/ sample tempate components

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 785cd11..d544721 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -429,24 +429,36 @@ sub load_myopac {
     return Apache2::Const::OK;
 }
 
-sub load_myopac_holds {
+
+sub fetch_user_holds {
     my $self = shift;
-    my $e = $self->editor;
-    my $ctx = $self->ctx;
+    my $hold_ids = shift;
+    my $ids_only = shift;
+    my $flesh = shift;
+    my $limit = shift;
+    my $offset = shift;
 
-    my $limit = $self->cgi->param('limit') || 0;
-    my $offset = $self->cgi->param('offset') || 0;
+    my $e = $self->editor;
 
     my $circ = OpenSRF::AppSession->create('open-ils.circ');
-    my $hold_ids = $circ->request(
-        'open-ils.circ.holds.id_list.retrieve', 
-        $e->authtoken, 
-        $e->requestor->id
-    )->gather(1);
 
-    $hold_ids = [ grep { defined $_ } @$hold_ids[$offset..($offset + $limit - 1)] ] if $limit or $offset;
+    if(!$hold_ids) {
+
+        $hold_ids = $circ->request(
+            'open-ils.circ.holds.id_list.retrieve.authoritative', 
+            $e->authtoken, 
+            $e->requestor->id
+        )->gather(1);
+    
+        $hold_ids = [ grep { defined $_ } @$hold_ids[$offset..($offset + $limit - 1)] ] if $limit or $offset;
+    }
+
+
+    return $hold_ids if $ids_only or @$hold_ids == 0;
 
     my $req = $circ->request(
+        # TODO .authoritative version is chewing up cstores
+        # 'open-ils.circ.hold.details.batch.retrieve.authoritative', 
         'open-ils.circ.hold.details.batch.retrieve', 
         $e->authtoken, 
         $hold_ids,
@@ -459,18 +471,75 @@ sub load_myopac_holds {
         }
     );
 
-    # any requests we can fire off here?
-    
-    $ctx->{holds} = []; 
+    my @holds;
     while(my $resp = $req->recv) {
         my $hold = $resp->content;
-        push(@{$ctx->{holds}}, {
+        push(@holds, {
             hold => $hold,
-            marc_xml => XML::LibXML->new->parse_string($hold->{bre}->marc)
+            marc_xml => ($flesh) ? XML::LibXML->new->parse_string($hold->{bre}->marc) : undef
         });
     }
 
     $circ->kill_me;
+    return \@holds;
+}
+
+sub handle_hold_update {
+    my $self = shift;
+    my $action = shift;
+    my $e = $self->editor;
+
+
+    my @hold_ids = $self->cgi->param('hold_id'); # for non-_all actions
+    @hold_ids = @{$self->fetch_user_holds(undef, 1)} if $action =~ /_all/;
+
+    my $circ = OpenSRF::AppSession->create('open-ils.circ');
+
+    if($action =~ /cancel/) {
+
+        for my $hold_id (@hold_ids) {
+            my $resp = $circ->request(
+                'open-ils.circ.hold.cancel', $e->authtoken, $hold_id, 6 )->gather(1); # 6 == patron-cancelled-via-opac
+        }
+
+    } else {
+        
+        my $vlist = [];
+        for my $hold_id (@hold_ids) {
+            my $vals = {id => $hold_id};
+
+            if($action =~ /activate/) {
+                $vals->{frozen} = 'f';
+                $vals->{thaw_date} = undef;
+
+            } elsif($action =~ /suspend/) {
+                $vals->{frozen} = 't';
+                # $vals->{thaw_date} = TODO;
+            }
+            push(@$vlist, $vals);
+        }
+
+        $circ->request('open-ils.circ.hold.update.batch.atomic', $e->authtoken, undef, $vlist)->gather(1);
+    }
+
+    $circ->kill_me;
+    return undef;
+}
+
+sub load_myopac_holds {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+    
+
+    my $limit = $self->cgi->param('limit') || 0;
+    my $offset = $self->cgi->param('offset') || 0;
+    my $action = $self->cgi->param('action') || '';
+
+    $self->handle_hold_update($action) if $action;
+
+    $ctx->{holds} = $self->fetch_user_holds(undef, 0, 1, $limit, $offset);
+
     return Apache2::Const::OK;
 }
 
@@ -662,7 +731,6 @@ sub load_myopac_circs {
         my ($resp) = grep { $_->{copy} == $data->{circ}->target_copy->id } @results;
 
         if($resp) {
-            #$self->apache->log->warn("renewal response: " . OpenSRF::Utils::JSON->perl2JSON($resp));
             my $evt = ref($resp->{evt}) eq 'ARRAY' ? $resp->{evt}->[0] : $resp->{evt};
             $data->{renewal_response} = $evt;
             $success_renewals++ if $evt->{textcode} eq 'SUCCESS';
@@ -687,7 +755,7 @@ sub load_myopac_fines {
 
     my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
 
-    # TODO: This should really use a ML call, but the existing calls 
+    # TODO: This should really be a ML call, but the existing calls 
     # return an excessive amount of data and don't offer streaming
 
     my %paging = ($limit or $offset) ? (limit => $limit, offset => $offset) : ();
@@ -738,5 +806,4 @@ sub load_myopac_fines {
      return Apache2::Const::OK;
 }       
 
-
 1;
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 86df64b..8ac0be6 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -4,6 +4,8 @@
     table { border-collapse: collapse; }
     table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
     table tr:nth-child(odd) { background-color:#ded; }
+    #action_div { width: 95%; }
+    #action-buttons { float:right; }
 </style>
 [% END %]
 
@@ -11,39 +13,59 @@
 [% PROCESS "default/opac/common.tt2" %]
 [% WRAPPER "default/opac/base.tt2" %]
 [% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "holds" %]
-<table>
-    <thead>
-        <tr>
-            <th>Title</th>
-            <th>Author</th>
-            <th>Formats</th>
-            <th>Pickup Location</th>
-            <th>Status</th>
-            <th>Active</th>
-            <th>Activate on...</th>
-            <th>Expiration Date</th>
-            <th>Select</th>
-            <th>Edit</th>
-        </tr>
-    </thead>
-    <tbody>
-        [% FOR hold IN ctx.holds %]
-            [% attrs = {marc_xml => hold.marc_xml}; %]
-            [% PROCESS get_marc_attrs args=attrs; %]
-        <tr>
-            <td>[% attrs.title %]</td>
-            <td>[% attrs.author %]</td>
-            <td>[% hold.hold.hold.holdable_formats %]<!-- see _myOPACFleshHoldTitle(), search for "mods_formats" in skin/default/js/myopac.js; holdable_formats is wrong --></td>
-            <td>[% ctx.find_aou(hold.hold.hold.pickup_lib).name %]</td>
-            <td>[% hold.hold.hold.status %]<!-- see myOShowHoldStatus() in skin/default/js/myopac.js --></td>
-            <td></td>
-            <td></td>
-            <td>[% hold.hold.hold.expire_time %]</td>
-            <td><em>XXX TODO</em></td>
-            <td><em>XXX TODO</em></td>
-        </tr>
-        [% END %]
-    </tbody>
-</table>
+<form method='POST'>
 
+    <div id='action_div'>
+        <div id='action-buttons'>
+            <select name='action'>
+                <option value='cancel'>Cancel Selected</option>
+                <option value='cancel_all'>Cancel All</option>
+                <option value='suspend'>Suspend Selected</option>
+                <option value='suspend_all'>Suspend All</option>
+                <option value='activate'>Activate Selected</option>
+                <option value='activate_all'>Activate All</option>
+            </select>
+            <input type='Submit' value='Go'/>
+        </div>
+    </div>
+
+    <table>
+        <thead>
+            <tr>
+                <th>Title</th>
+                <th>Author</th>
+                <th>Formats</th>
+                <th>Pickup Location</th>
+                <th>Status</th>
+                <th>Active</th>
+                <th>Activate on...</th>
+                <th>Expiration Date</th>
+                <th>Select</th>
+                <th>Edit</th>
+            </tr>
+        </thead>
+        <tbody>
+            [% FOR hold IN ctx.holds %]
+                [% attrs = {marc_xml => hold.marc_xml}; %]
+                [% PROCESS get_marc_attrs args=attrs; %]
+            <tr>
+                <td>[% attrs.title %]</td>
+                <td>[% attrs.author %]</td>
+                <td>[% hold.hold.hold.holdable_formats %]<!-- see _myOPACFleshHoldTitle(), search for "mods_formats" in skin/default/js/myopac.js; holdable_formats is wrong --></td>
+                <td>[% ctx.find_aou(hold.hold.hold.pickup_lib).name %]</td>
+                <td>[% hold.hold.hold.status %]<!-- see myOShowHoldStatus() in skin/default/js/myopac.js --></td>
+                <td>[% IF hold.hold.hold.frozen == 't' %] No [% ELSE %] Yes [% END %]</td>
+                <td>[% 
+                    IF hold.hold.hold.frozen == 't' AND hold.hold.hold.thaw_date;
+                        date.format(ctx.parse_datetime(hold.hold.hold.thaw_date),'%Y-%m-%d'); 
+                    END 
+                %]</td>
+                <td>[% hold.hold.hold.expire_time %]</td>
+                <td><input type='checkbox' name='hold_id' value='[% hold.hold.hold.id %]'/></td>
+                <td><em>XXX TODO</em></td>
+            </tr>
+            [% END %]
+        </tbody>
+    </table>
+</form> 
 [% END %]

commit 07d571a6a6623a7be1a11821dd47cae4b88ba601
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Jan 27 12:04:11 2011 -0500

    This isn't the time/place for finesse, but these tweaks make development easier

diff --git a/Open-ILS/web/templates/default/opac/myopac/_links.tt2 b/Open-ILS/web/templates/default/opac/myopac/_links.tt2
index bbac0ae..b034198 100644
--- a/Open-ILS/web/templates/default/opac/myopac/_links.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/_links.tt2
@@ -1,4 +1,4 @@
-[%
+<div>[%
 pages = [
     {url => "main", name => "My Account"},
     {url => "circs", name => "Items Out"},
@@ -7,11 +7,14 @@ pages = [
     {url => "prefs", name => "Account Preferences"},
     {url => "bookbags", name => "My Bookbags"}
 ];
-FOREACH page IN pages;
-    IF page.url != myopac_page %] <a href="[% page.url %]">[% END;
+FOREACH page IN pages %]
+    <span style="margin: 0 0.5em;">
+    [% IF page.url != myopac_page %]<a href="[% page.url %]">[% END;
         page.name;
         IF page.url != myopac_page %]</a>
-    [% ELSE;
-        ctx.page_title = page.name;
-    END;
-END %]
+    [% ELSE; ctx.page_title = page.name; END %]</span>
+[% END %]</div>
+<ul>
+    <li><a href="../home">Home</a></li>
+    <li><a href="../logout">Logout</a></li>
+</ul>

commit 66ee020758c991ee741c16b275db25ec003b9b55
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Jan 27 11:47:45 2011 -0500

    ctx.responses was for debugging; don't need it

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index fe1e0e5..eecc750 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -716,7 +716,6 @@ sub load_myopac_fines {
         }
     );
 
-    $ctx->{"responses"} = 0;
     while(my $resp = $req->recv) {
         my $mobts = $resp->content;
         my $circ = $mobts->circulation;
@@ -727,7 +726,6 @@ sub load_myopac_fines {
             $last_billing = pop(@billings);
         }
 
-        $ctx->{"responses"}++;
         push(
             @{$ctx->{"fines"}->{$mobts->grocery ? "grocery" : "circulation"}},
             {

commit 3daf8eb0c18cc375d96555630f9214e93502217a
Merge: d93d488 eef76bc
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Jan 27 11:46:31 2011 -0500

    Merge branch 'opac-tt-poc' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc

diff --cc Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index e45341b,785cd11..fe1e0e5
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@@ -663,12 -680,9 +680,12 @@@ sub load_myopac_fines 
      my $self = shift;
      my $e = $self->editor;
      my $ctx = $self->ctx;
 -    $ctx->{transactions} = [];
 +    $ctx->{"fines"} = {
 +        "circulation" => [],
 +        "grocery" => []
 +    };
  
-     my $limit = $self->cgi->param('limit') || 10;
+     my $limit = $self->cgi->param('limit') || 0;
      my $offset = $self->cgi->param('offset') || 0;
  
      my $cstore = OpenSRF::AppSession->create('open-ils.cstore');

commit d93d488fcccbf329c241a950adca62c5f24e4e35
Author: senator <lebbeous at esilibrary.com>
Date:   Thu Jan 27 11:45:55 2011 -0500

    some fines display. tweak eg_vhost (IfModule ...)

diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf
index bdb7721..99564e8 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf
+++ b/Open-ILS/examples/apache/eg_vhost.conf
@@ -561,9 +561,11 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
 <Location /eg/opac>
     PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
 #    Disable caching for development..
-#    Header set Expires "Thu, 19 Nov 1981 08:52:00 GM"
-#    Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
-#    Header set Pragma "no-cache"
+    <IfModule mod_headers.c>
+#        Header set Expires "Thu, 19 Nov 1981 08:52:00 GM"
+#        Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
+#        Header set Pragma "no-cache"
+    </IfModule>
 </Location>
 
 # Note: the template processor will decline handling anything it does not
diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 33e7675..e45341b 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -663,7 +663,10 @@ sub load_myopac_fines {
     my $self = shift;
     my $e = $self->editor;
     my $ctx = $self->ctx;
-    $ctx->{transactions} = [];
+    $ctx->{"fines"} = {
+        "circulation" => [],
+        "grocery" => []
+    };
 
     my $limit = $self->cgi->param('limit') || 10;
     my $offset = $self->cgi->param('offset') || 0;
@@ -695,6 +698,7 @@ sub load_myopac_fines {
         }
     );
 
+    $ctx->{"responses"} = 0;
     while(my $resp = $req->recv) {
         my $mobts = $resp->content;
         my $circ = $mobts->circulation;
@@ -705,8 +709,9 @@ sub load_myopac_fines {
             $last_billing = pop(@billings);
         }
 
+        $ctx->{"responses"}++;
         push(
-            @{$ctx->{transactions}},
+            @{$ctx->{"fines"}->{$mobts->grocery ? "grocery" : "circulation"}},
             {
                 xact => $mobts,
                 last_grocery_billing => $last_billing,
diff --git a/Open-ILS/web/templates/default/opac/myopac/fines.tt2 b/Open-ILS/web/templates/default/opac/myopac/fines.tt2
index cf9d23c..49ecf30 100644
--- a/Open-ILS/web/templates/default/opac/myopac/fines.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/fines.tt2
@@ -4,11 +4,16 @@
     table { border-collapse: collapse; }
     table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
     table tr:nth-child(odd) { background-color:#ded; }
+    h2 { margin-bottom: 0; }
 </style>
 [% END %]
 
+[% USE date %]
+[% USE money = format('$%.2f') %]
+[% PROCESS "default/opac/common.tt2" %]
 [% WRAPPER "default/opac/base.tt2" %]
 [% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "fines" %]
+<h2>Summary</h2>
 <table>
     <thead>
         <tr>
@@ -17,6 +22,86 @@
             <th>Balance Owed</th>
         </tr>
     </thead>
+    <tbody>
+        <tr>
+            <td colspan="3"><em>XXX TODO</em></td>
+        </tr>
+    </tbody>
+</table>
+
+[% IF ctx.fines.circulation.size > 0 %]
+<h2>Overdue materials</h2>
+<table>
+    <thead>
+        <tr>
+            <th>Title</th>
+            <th>Author</th>
+            <th>Checkout Date</th>
+            <th>Due Date</th>
+            <th>Date Returned</th>
+            <th>Balance Owed</th>
+        </tr>
+    </thead>
+    <tbody>
+    [% FOR f IN ctx.fines.circulation %]
+        [% attrs = {marc_xml => f.marc_xml}; %]
+        [% PROCESS get_marc_attrs args=attrs; %]
+        <tr>
+            <td>[% attrs.title %]</td>
+            <td>[% attrs.author %]</td>
+            <td>[% date.format(
+                ctx.parse_datetime(f.xact.circulation.xact_start), "%Y-%m-%d"
+            ) %]</td>
+            <td>[% date.format(
+                ctx.parse_datetime(f.xact.circulation.due_date), "%Y-%m-%d"
+            ) %]</td>
+            <td>[%
+                IF f.xact.circulation.checkin_time;
+                    date.format(
+                        ctx.parse_datetime(f.xact.circulation.checkin_time),
+                        "%Y-%m-%d"
+                    );
+                END %]</td><!-- XXX TODO display stop_fines_time if set? Display something instead of blank like "fines accruing" ? -->
+            <td>[% money(f.xact.balance_owed) %]</td>
+        </tr>
+    [% END %]
+    </tbody>
 </table>
+[% END %]
+
+[% IF ctx.fines.grocery.size > 0 %]
+<h2>Other Fees</h2>
+<table>
+    <thead>
+        <tr>
+            <th>Transaction Start Time</th>
+            <th>Last Payment Time</th>
+            <th>Initial Amount Owed</th>
+            <th>Total Amount Paid</th>
+            <th>Balance Owed</th>
+            <th>Billing Type</th>
+        </tr>
+    </thead>
+    <tbody>
+    [% FOR f IN ctx.fines.grocery %]
+        <tr>
+            <td>[%
+                date.format(
+                    ctx.parse_datetime(f.xact.xact_start), "%Y-%m-%d"
+                ) %]</td>
+            <td>[% IF f.xact.last_payment_ts;
+                    date.format(
+                        ctx.parse_datetime(f.xact.last_payment_ts), "%Y-%m-%d"
+                        );
+                    END %]</td>
+            <td>[% money(f.xact.total_owed) %]</td>
+            <td>[% money(f.xact.total_paid) %]</td>
+            <td>[% money(f.xact.balance_owed) %]</td>
+            <td>[% f.xact.last_billing_type %]</td>
+        </tr>
+    [% END %]
+    </tbody>
+</table>
+[% END %]
 
 [% END %]

commit eef76bcd595c0e4a2f5ec8f2318545a22c25a0e9
Merge: 02d28e8 1959c9d
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jan 27 09:56:32 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 02d28e8491ac3546afd008e180f305a46bbec6ba
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jan 27 09:56:26 2011 -0500

    added support for reporting renewal responses in the template

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 33e7675..785cd11 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -7,6 +7,7 @@ use Apache2::Const -compile => qw(OK DECLINED FORBIDDEN HTTP_INTERNAL_SERVER_ERR
 use OpenSRF::AppSession;
 use OpenSRF::EX qw/:try/;
 use OpenSRF::Utils qw/:datetime/;
+use OpenSRF::Utils::JSON;
 use OpenSRF::Utils::Logger qw/$logger/;
 use OpenILS::Application::AppUtils;
 use OpenILS::Utils::CStoreEditor qw/:funcs/;
@@ -433,7 +434,7 @@ sub load_myopac_holds {
     my $e = $self->editor;
     my $ctx = $self->ctx;
 
-    my $limit = $self->cgi->param('limit') || 10;
+    my $limit = $self->cgi->param('limit') || 0;
     my $offset = $self->cgi->param('offset') || 0;
 
     my $circ = OpenSRF::AppSession->create('open-ils.circ');
@@ -443,7 +444,7 @@ sub load_myopac_holds {
         $e->requestor->id
     )->gather(1);
 
-    $hold_ids = [ grep { defined $_ } @$hold_ids[$offset..($offset + $limit - 1)] ];
+    $hold_ids = [ grep { defined $_ } @$hold_ids[$offset..($offset + $limit - 1)] ] if $limit or $offset;
 
     my $req = $circ->request(
         'open-ils.circ.hold.details.batch.retrieve', 
@@ -612,21 +613,20 @@ sub handle_circ_renew {
     my $ctx = $self->ctx;
 
     my @renew_ids = $self->cgi->param('circ');
-    $self->apache->log->warn("renewal ids: @renew_ids");
 
-    my $circs = $self->fetch_user_circs(1, ($action eq 'renew') ? [@renew_ids] : undef);
+    my $circs = $self->fetch_user_circs(0, ($action eq 'renew') ? [@renew_ids] : undef);
 
     # TODO: fire off renewal calls in batches to speed things up
-    $ctx->{renewal_responses} = [];
+    my @responses;
     for my $circ (@$circs) {
 
-        my $resp = $U->simplereq(
+        my $evt = $U->simplereq(
             'open-ils.circ', 
             'open-ils.circ.renew',
             $self->editor->authtoken,
             {
                 patron_id => $self->editor->requestor->id,
-                copy_id => $circ->{circ}->target_copy->id,
+                copy_id => $circ->{circ}->target_copy,
                 opac_renewal => 1
             }
         );
@@ -634,10 +634,10 @@ sub handle_circ_renew {
         # TODO return these, then insert them into the circ data 
         # blob that is shoved into the template for each circ
         # so the template won't have to match them
-        push(@{$ctx->{renewal_responses}}, $resp); 
+        push(@responses, {copy => $circ->{circ}->target_copy, evt => $evt});
     }
 
-    return undef;
+    return @responses;
 }
 
 
@@ -647,15 +647,32 @@ sub load_myopac_circs {
     my $ctx = $self->ctx;
 
     $ctx->{circs} = [];
-    my $limit = $self->cgi->param('limit') || 10;
+    my $limit = $self->cgi->param('limit') || 0; # 0 == unlimited
     my $offset = $self->cgi->param('offset') || 0;
     my $action = $self->cgi->param('action') || '';
 
     # perform the renewal first if necessary
-    $self->handle_circ_renew($action) if $action =~ /renew/;
+    my @results = $self->handle_circ_renew($action) if $action =~ /renew/;
 
     $ctx->{circs} = $self->fetch_user_circs(1, undef, $limit, $offset);
 
+    my $success_renewals = 0;
+    my $failed_renewals = 0;
+    for my $data (@{$ctx->{circs}}) {
+        my ($resp) = grep { $_->{copy} == $data->{circ}->target_copy->id } @results;
+
+        if($resp) {
+            #$self->apache->log->warn("renewal response: " . OpenSRF::Utils::JSON->perl2JSON($resp));
+            my $evt = ref($resp->{evt}) eq 'ARRAY' ? $resp->{evt}->[0] : $resp->{evt};
+            $data->{renewal_response} = $evt;
+            $success_renewals++ if $evt->{textcode} eq 'SUCCESS';
+            $failed_renewals++ if $evt->{textcode} ne 'SUCCESS';
+        }
+    }
+
+    $ctx->{success_renewals} = $success_renewals;
+    $ctx->{failed_renewals} = $failed_renewals;
+
     return Apache2::Const::OK;
 }
 
@@ -665,7 +682,7 @@ sub load_myopac_fines {
     my $ctx = $self->ctx;
     $ctx->{transactions} = [];
 
-    my $limit = $self->cgi->param('limit') || 10;
+    my $limit = $self->cgi->param('limit') || 0;
     my $offset = $self->cgi->param('offset') || 0;
 
     my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
@@ -673,6 +690,8 @@ sub load_myopac_fines {
     # TODO: This should really use a ML call, but the existing calls 
     # return an excessive amount of data and don't offer streaming
 
+    my %paging = ($limit or $offset) ? (limit => $limit, offset => $offset) : ();
+
     my $req = $cstore->request(
         'open-ils.cstore.direct.money.open_billable_transaction_summary.search',
         {
@@ -690,8 +709,7 @@ sub load_myopac_fines {
                 acn => ['record']
             },
             order_by => { mobts => 'xact_start' },
-            limit => $limit,
-            offset => $offset
+            %paging
         }
     );
 
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 33f3e3f..3c156cc 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -3,8 +3,12 @@
     table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
     table { border-collapse: collapse; }
     table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
-    table tr:nth-child(odd) { background-color:#ded; }
-    #action_div { width: 95%; text-align: right }
+    #action_div { width: 95%; }
+    .renew-summary { float:left; padding-right: 10px;}
+    #action-buttons { float:right; }
+    .circ-table-odd { background-color:#ded; }
+    .failure-text { font-weight: bold; color: red; }
+    #circ-form { margin-top: 20px; }
 </style>
 [% END %]
 
@@ -13,10 +17,19 @@
 [% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "circs" %]
 [% USE date %]
 
-<form method='POST'>
+
+<form method='POST' id='circ-form'>
     <div id='action_div'>
-        <button type='submit' value='renew' name='action'>Renew Selected</button>
-        <button type='submit' value='renew_all' name='action'>Renew All</button>
+        [% IF ctx.success_renewals > 0 %]
+            <div class='renew-summary'><b>Successfully renewed [% ctx.success_renewals %] items.</b></div>
+        [% END %]
+        [% IF ctx.failed_renewals > 0 %]
+            <div class='renew-summary'><b>Failed to renew [% ctx.failed_renewals %] items.</b></div>
+        [% END %]
+        <div id='action-buttons'>
+            <button type='submit' value='renew' name='action'>Renew Selected</button>
+            <button type='submit' value='renew_all' name='action'>Renew All</button>
+        </div>
     </div>
     <table>
         <thead>
@@ -32,13 +45,25 @@
             [% FOR circ IN ctx.circs %]
                 [% attrs = {marc_xml => circ.marc_xml}; %]
                 [% PROCESS get_marc_attrs args=attrs; %]
-                <tr>
+                <tr [% IF loop.count % 2 == 1 %] class='circ-table-odd' [% END %]>
                     <td>[% attrs.title %]</td>
                     <td>[% attrs.author %]</td>
                     <td>[% date.format(ctx.parse_datetime(circ.circ.due_date),'%Y-%m-%d') %]</td>
                     <td><em>[% circ.circ.renewal_remaining %]</em></td>
                     <td><input name='circ' value='[% circ.circ.id %]' type='checkbox'/></td>
                 </tr>
+                [% IF circ.renewal_response and circ.renewal_response.textcode != 'SUCCESS' %]
+                <tr [% IF loop.count % 2 == 1 %] class='circ-table-odd' [% END %]>
+                    <td colspan='0'>
+                        <div class='failure-text'>
+                            [% circ.renewal_response.textcode %] 
+                            [% IF circ.renewal_response.payload.fail_part and circ.renewal_response.payload.fail_part != circ.renewal_response.textcode %]
+                                [% circ.renewal_response.payload.fail_part %]
+                            [% END %]
+                        </div>
+                    </td>
+                </tr>
+                [% END %]
             [% END %]
         </tbody>
     </table>

commit fd90917cca68c056c1e63eb3c3509f579f1fad08
Merge: ed0c643 bc219ca
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jan 26 17:15:03 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit ed0c64332e953ec40c024a0e6889ee47bee9058b
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jan 26 17:14:40 2011 -0500

    initial support for renew all and renew selected, w/ stub template implementation;  still some to-do's

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 8468bdc..33e7675 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -535,60 +535,127 @@ sub load_place_hold {
 }
 
 
-sub load_myopac_circs {
+sub fetch_user_circs {
     my $self = shift;
+    my $flesh = shift; # flesh bib data, etc.
+    my $circ_ids = shift;
+    my $limit = shift;
+    my $offset = shift;
+
     my $e = $self->editor;
-    my $ctx = $self->ctx;
-    $ctx->{circs} = [];
 
-    my $limit = $self->cgi->param('limit') || 10;
-    my $offset = $self->cgi->param('offset') || 0;
+    my @circ_ids;
 
-    my $circ_data = $U->simplereq(
-        'open-ils.actor', 
-        'open-ils.actor.user.checked_out',
-        $e->authtoken, 
-        $e->requestor->id
-    );
+    if($circ_ids) {
+        @circ_ids = @$circ_ids;
 
-    my @circ_ids =  ( @{$circ_data->{overdue}}, @{$circ_data->{out}} );
-    @circ_ids = grep { defined $_ } @circ_ids[0..($offset + $limit - 1)];
+    } else {
+
+        my $circ_data = $U->simplereq(
+            'open-ils.actor', 
+            'open-ils.actor.user.checked_out',
+            $e->authtoken, 
+            $e->requestor->id
+        );
+
+        @circ_ids =  ( @{$circ_data->{overdue}}, @{$circ_data->{out}} );
+
+        if($limit or $offset) {
+            @circ_ids = grep { defined $_ } @circ_ids[0..($offset + $limit - 1)];
+        }
+    }
 
-    return Apache2::Const::OK unless @circ_ids;
+    return [] unless @circ_ids;
 
     my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
-    my $req = $cstore->request(
-        'open-ils.cstore.direct.action.circulation.search', 
-        {id => \@circ_ids},
-        {
-            flesh => 3,
-            flesh_fields => {
-                circ => ['target_copy'],
-                acp => ['call_number'],
-                acn => ['record']
-            }
+
+    my $qflesh = {
+        flesh => 3,
+        flesh_fields => {
+            circ => ['target_copy'],
+            acp => ['call_number'],
+            acn => ['record']
         }
-    );
+    };
+
+    $e->xact_begin;
+    my $circs = $e->search_action_circulation(
+        [{id => \@circ_ids}, ($flesh) ? $qflesh : {}], {substream => 1});
 
     my @circs;
-    while(my $resp = $req->recv) {
-        my $circ = $resp->content;
+    for my $circ (@$circs) {
         push(@circs, {
             circ => $circ, 
-            marc_xml => ($circ->target_copy->call_number->id == -1) ? 
-                undef :  # pre-cat copy, use the dummy title/author instead
-                XML::LibXML->new->parse_string($circ->target_copy->call_number->record->marc),
+            marc_xml => ($flesh and $circ->target_copy->call_number->id != -1) ? 
+                XML::LibXML->new->parse_string($circ->target_copy->call_number->record->marc) : 
+                undef  # pre-cat copy, use the dummy title/author instead
         });
     }
+    $e->xact_rollback;
 
     # make sure the final list is in the correct order
+    my @sorted_circs;
     for my $id (@circ_ids) {
         push(
-            @{$ctx->{circs}}, 
+            @sorted_circs,
             (grep { $_->{circ}->id == $id } @circs)
         );
     }
 
+    return \@sorted_circs;
+}
+
+
+sub handle_circ_renew {
+    my $self = shift;
+    my $action = shift;
+    my $ctx = $self->ctx;
+
+    my @renew_ids = $self->cgi->param('circ');
+    $self->apache->log->warn("renewal ids: @renew_ids");
+
+    my $circs = $self->fetch_user_circs(1, ($action eq 'renew') ? [@renew_ids] : undef);
+
+    # TODO: fire off renewal calls in batches to speed things up
+    $ctx->{renewal_responses} = [];
+    for my $circ (@$circs) {
+
+        my $resp = $U->simplereq(
+            'open-ils.circ', 
+            'open-ils.circ.renew',
+            $self->editor->authtoken,
+            {
+                patron_id => $self->editor->requestor->id,
+                copy_id => $circ->{circ}->target_copy->id,
+                opac_renewal => 1
+            }
+        );
+
+        # TODO return these, then insert them into the circ data 
+        # blob that is shoved into the template for each circ
+        # so the template won't have to match them
+        push(@{$ctx->{renewal_responses}}, $resp); 
+    }
+
+    return undef;
+}
+
+
+sub load_myopac_circs {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+
+    $ctx->{circs} = [];
+    my $limit = $self->cgi->param('limit') || 10;
+    my $offset = $self->cgi->param('offset') || 0;
+    my $action = $self->cgi->param('action') || '';
+
+    # perform the renewal first if necessary
+    $self->handle_circ_renew($action) if $action =~ /renew/;
+
+    $ctx->{circs} = $self->fetch_user_circs(1, undef, $limit, $offset);
+
     return Apache2::Const::OK;
 }
 
diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 1ca1a4d..33f3e3f 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -4,6 +4,7 @@
     table { border-collapse: collapse; }
     table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
     table tr:nth-child(odd) { background-color:#ded; }
+    #action_div { width: 95%; text-align: right }
 </style>
 [% END %]
 
@@ -11,29 +12,36 @@
 [% WRAPPER "default/opac/base.tt2" %]
 [% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "circs" %]
 [% USE date %]
-<table>
-    <thead>
-        <tr>
-            <th>Title</th>
-            <th>Author</th>
-            <th>Due Date</th>
-            <th>Renewals Remaining</th>
-            <th>Select</th>
-        </tr>
-    </thead>
-    <tbody>
-        [% FOR circ IN ctx.circs %]
-            [% attrs = {marc_xml => circ.marc_xml}; %]
-            [% PROCESS get_marc_attrs args=attrs; %]
+
+<form method='POST'>
+    <div id='action_div'>
+        <button type='submit' value='renew' name='action'>Renew Selected</button>
+        <button type='submit' value='renew_all' name='action'>Renew All</button>
+    </div>
+    <table>
+        <thead>
             <tr>
-                <td>[% attrs.title %]</td>
-                <td>[% attrs.author %]</td>
-                <td>[% date.format(ctx.parse_datetime(circ.circ.due_date),'%Y-%m-%d') %]</td>
-                <td><em>[% circ.circ.renewal_remaining %]</em></td>
-                <td><em>XXX TODO</em></td>
+                <th>Title</th>
+                <th>Author</th>
+                <th>Due Date</th>
+                <th>Renewals Remaining</th>
+                <th>Select</th>
             </tr>
-        [% END %]
-    </tbody>
-</table>
+        </thead>
+        <tbody>
+            [% FOR circ IN ctx.circs %]
+                [% attrs = {marc_xml => circ.marc_xml}; %]
+                [% PROCESS get_marc_attrs args=attrs; %]
+                <tr>
+                    <td>[% attrs.title %]</td>
+                    <td>[% attrs.author %]</td>
+                    <td>[% date.format(ctx.parse_datetime(circ.circ.due_date),'%Y-%m-%d') %]</td>
+                    <td><em>[% circ.circ.renewal_remaining %]</em></td>
+                    <td><input name='circ' value='[% circ.circ.id %]' type='checkbox'/></td>
+                </tr>
+            [% END %]
+        </tbody>
+    </table>
+</form>
 
 [% END %]

commit 1fd8fa5f2e4d6b2d370eb2766c7d3735cef53b01
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jan 26 15:17:31 2011 -0500

    fix perl sort comparator

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index a7c7fee..8468bdc 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -634,7 +634,7 @@ sub load_myopac_fines {
 
         my $last_billing;
         if($mobts->grocery) {
-            my @billings = sort { $a->billing_ts <=> $b->billing_ts } @{$mobts->grocery->billings};
+            my @billings = sort { $a->billing_ts cmp $b->billing_ts } @{$mobts->grocery->billings};
             $last_billing = pop(@billings);
         }
 

commit a1a23b07ef139ec133aeb8304ca22627ac44bbf0
Merge: 6f273f0 879d493
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jan 26 15:15:14 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 6f273f01ba8fa51d2a3614587546345afd894d51
Merge: e7527d5 b13145b
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jan 26 15:14:26 2011 -0500

    Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc
    
    Conflicts:
    	Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm


commit e7527d597af4881c62e3cc309dd6a2ef83646915
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jan 26 14:54:53 2011 -0500

    initial fines list handler

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index b41bab8..a7c7fee 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -86,6 +86,7 @@ sub load {
     return $self->load_place_hold if $path =~ /opac\/place_hold/;
     return $self->load_myopac_holds if $path =~ /opac\/myopac\/holds/;
     return $self->load_myopac_circs if $path =~ /opac\/myopac\/circs/;
+    return $self->load_myopac_fines if $path =~ /opac\/myopac\/fines/;
     return $self->load_myopac if $path =~ /opac\/myopac/;
     # ----------------------------------------------------------------
 
@@ -591,6 +592,66 @@ sub load_myopac_circs {
     return Apache2::Const::OK;
 }
 
+sub load_myopac_fines {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+    $ctx->{transactions} = [];
+
+    my $limit = $self->cgi->param('limit') || 10;
+    my $offset = $self->cgi->param('offset') || 0;
+
+    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
+
+    # TODO: This should really use a ML call, but the existing calls 
+    # return an excessive amount of data and don't offer streaming
+
+    my $req = $cstore->request(
+        'open-ils.cstore.direct.money.open_billable_transaction_summary.search',
+        {
+            usr => $e->requestor->id,
+            balance_owed => {'!=' => 0}
+        },
+        {
+            flesh => 4,
+            flesh_fields => {
+                mobts => ['circulation', 'grocery'],
+                mg => ['billings'],
+                mb => ['btype'],
+                circ => ['target_copy'],
+                acp => ['call_number'],
+                acn => ['record']
+            },
+            order_by => { mobts => 'xact_start' },
+            limit => $limit,
+            offset => $offset
+        }
+    );
+
+    while(my $resp = $req->recv) {
+        my $mobts = $resp->content;
+        my $circ = $mobts->circulation;
+
+        my $last_billing;
+        if($mobts->grocery) {
+            my @billings = sort { $a->billing_ts <=> $b->billing_ts } @{$mobts->grocery->billings};
+            $last_billing = pop(@billings);
+        }
+
+        push(
+            @{$ctx->{transactions}},
+            {
+                xact => $mobts,
+                last_grocery_billing => $last_billing,
+                marc_xml => ($mobts->xact_type ne 'circulation' or $circ->target_copy->call_number->id == -1) ?
+                    undef :
+                    XML::LibXML->new->parse_string($circ->target_copy->call_number->record->marc),
+            } 
+        );
+    }
+
+     return Apache2::Const::OK;
+}       
 
 
 1;

commit 5bfdad25a814271b848dfe0fe85007868d7bd304
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jan 26 13:53:18 2011 -0500

    don't attempt to load account pages without valid ses and SSL

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index c05388f..b41bab8 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -3,7 +3,7 @@ use strict; use warnings;
 use CGI;
 use XML::LibXML;
 use Digest::MD5 qw(md5_hex);
-use Apache2::Const -compile => qw(OK DECLINED HTTP_INTERNAL_SERVER_ERROR REDIRECT HTTP_BAD_REQUEST);
+use Apache2::Const -compile => qw(OK DECLINED FORBIDDEN HTTP_INTERNAL_SERVER_ERROR REDIRECT HTTP_BAD_REQUEST);
 use OpenSRF::AppSession;
 use OpenSRF::EX qw/:try/;
 use OpenSRF::Utils qw/:datetime/;
@@ -70,16 +70,24 @@ sub load {
     return $stat unless $stat == Apache2::Const::OK;
 
     my $path = $self->apache->path_info;
+
     return $self->load_home if $path =~ /opac\/home/;
     return $self->load_login if $path =~ /opac\/login/;
     return $self->load_logout if $path =~ /opac\/logout/;
     return $self->load_rresults if $path =~ /opac\/results/;
     return $self->load_record if $path =~ /opac\/record/;
-    return $self->load_place_hold if $path =~ /opac\/place_hold/;
 
+    # ----------------------------------------------------------------
+    # These pages require authentication
+    # ----------------------------------------------------------------
+    return Apache2::Const::FORBIDDEN unless $self->cgi->https;
+    return $self->load_logout unless $self->editor->requestor;
+
+    return $self->load_place_hold if $path =~ /opac\/place_hold/;
     return $self->load_myopac_holds if $path =~ /opac\/myopac\/holds/;
     return $self->load_myopac_circs if $path =~ /opac\/myopac\/circs/;
     return $self->load_myopac if $path =~ /opac\/myopac/;
+    # ----------------------------------------------------------------
 
     return Apache2::Const::OK;
 }
@@ -265,9 +273,7 @@ sub load_login {
 sub load_logout {
     my $self = shift;
 
-    my $path = $self->apache->uri;
-    $path =~ s/(\/[^\/]+$)/\/home/;
-    my $url = 'http://' . $self->apache->hostname . "$path";
+    my $url = 'http://' . $self->apache->hostname . $self->ctx->{base_path} . "/opac/home";
 
     $self->apache->print(
         $self->cgi->redirect(

commit b13145be873c9280a204004afe86b5c43e8950d5
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Jan 26 12:23:38 2011 -0500

    show some holds

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index e9682ca..e8f253d 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -77,6 +77,9 @@ sub load {
     return $self->load_record if $path =~ /opac\/record/;
     return $self->load_place_hold if $path =~ /opac\/place_hold/;
 
+    # XXX here is where we need to add a check for session timeout, either that
+    # or have load_* check something...
+
     return $self->load_myopac_holds if $path =~ /opac\/myopac\/holds/;
     return $self->load_myopac_circs if $path =~ /opac\/myopac\/circs/;
     return $self->load_myopac if $path =~ /opac\/myopac/;
@@ -404,8 +407,6 @@ sub load_record {
 # context additions: 
 #   user : au object, fleshed
 sub load_myopac {
-    # XXX This crashes on session timeout, so somewhere around here we need to
-    # add handling for that
     my $self = shift;
     $self->ctx->{page} = 'myopac';
 
diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 4f5aee8..86df64b 100644
--- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -7,6 +7,8 @@
 </style>
 [% END %]
 
+[% USE date %]
+[% PROCESS "default/opac/common.tt2" %]
 [% WRAPPER "default/opac/base.tt2" %]
 [% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "holds" %]
 <table>
@@ -24,6 +26,24 @@
             <th>Edit</th>
         </tr>
     </thead>
+    <tbody>
+        [% FOR hold IN ctx.holds %]
+            [% attrs = {marc_xml => hold.marc_xml}; %]
+            [% PROCESS get_marc_attrs args=attrs; %]
+        <tr>
+            <td>[% attrs.title %]</td>
+            <td>[% attrs.author %]</td>
+            <td>[% hold.hold.hold.holdable_formats %]<!-- see _myOPACFleshHoldTitle(), search for "mods_formats" in skin/default/js/myopac.js; holdable_formats is wrong --></td>
+            <td>[% ctx.find_aou(hold.hold.hold.pickup_lib).name %]</td>
+            <td>[% hold.hold.hold.status %]<!-- see myOShowHoldStatus() in skin/default/js/myopac.js --></td>
+            <td></td>
+            <td></td>
+            <td>[% hold.hold.hold.expire_time %]</td>
+            <td><em>XXX TODO</em></td>
+            <td><em>XXX TODO</em></td>
+        </tr>
+        [% END %]
+    </tbody>
 </table>
 
 [% END %]

commit f75bddeb036090feb9f592500f96f15976de3b50
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Jan 26 11:20:05 2011 -0500

    show some circs in myopac -> items out

diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
index 9e80139..1ca1a4d 100644
--- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -7,8 +7,10 @@
 </style>
 [% END %]
 
+[% PROCESS "default/opac/common.tt2" %]
 [% WRAPPER "default/opac/base.tt2" %]
 [% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "circs" %]
+[% USE date %]
 <table>
     <thead>
         <tr>
@@ -16,9 +18,22 @@
             <th>Author</th>
             <th>Due Date</th>
             <th>Renewals Remaining</th>
-            <th>Renewals Remaining</th>
+            <th>Select</th>
         </tr>
     </thead>
+    <tbody>
+        [% FOR circ IN ctx.circs %]
+            [% attrs = {marc_xml => circ.marc_xml}; %]
+            [% PROCESS get_marc_attrs args=attrs; %]
+            <tr>
+                <td>[% attrs.title %]</td>
+                <td>[% attrs.author %]</td>
+                <td>[% date.format(ctx.parse_datetime(circ.circ.due_date),'%Y-%m-%d') %]</td>
+                <td><em>[% circ.circ.renewal_remaining %]</em></td>
+                <td><em>XXX TODO</em></td>
+            </tr>
+        [% END %]
+    </tbody>
 </table>
 
 [% END %]

commit a673560fb58d9727a3d962ccd40511c2210c0ef8
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Jan 26 10:28:50 2011 -0500

    Make myopac subpages' names match what bill had in mind

diff --git a/Open-ILS/web/templates/default/opac/myopac/_links.tt2 b/Open-ILS/web/templates/default/opac/myopac/_links.tt2
index 4ab11d4..bbac0ae 100644
--- a/Open-ILS/web/templates/default/opac/myopac/_links.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/_links.tt2
@@ -1,8 +1,8 @@
 [%
 pages = [
     {url => "main", name => "My Account"},
-    {url => "items_out", name => "Items Out"},
-    {url => "items_held", name => "Items on Hold"},
+    {url => "circs", name => "Items Out"},
+    {url => "holds", name => "Items on Hold"},
     {url => "fines", name => "Fines"},
     {url => "prefs", name => "Account Preferences"},
     {url => "bookbags", name => "My Bookbags"}
diff --git a/Open-ILS/web/templates/default/opac/myopac/items_out.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
similarity index 88%
rename from Open-ILS/web/templates/default/opac/myopac/items_out.tt2
rename to Open-ILS/web/templates/default/opac/myopac/circs.tt2
index ca93991..9e80139 100644
--- a/Open-ILS/web/templates/default/opac/myopac/items_out.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2
@@ -8,7 +8,7 @@
 [% END %]
 
 [% WRAPPER "default/opac/base.tt2" %]
-[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "items_out" %]
+[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "circs" %]
 <table>
     <thead>
         <tr>
diff --git a/Open-ILS/web/templates/default/opac/myopac/items_held.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
similarity index 90%
rename from Open-ILS/web/templates/default/opac/myopac/items_held.tt2
rename to Open-ILS/web/templates/default/opac/myopac/holds.tt2
index 3954298..4f5aee8 100644
--- a/Open-ILS/web/templates/default/opac/myopac/items_held.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2
@@ -8,7 +8,7 @@
 [% END %]
 
 [% WRAPPER "default/opac/base.tt2" %]
-[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "items_held" %]
+[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "holds" %]
 <table>
     <thead>
         <tr>

commit d1ffafa79626bc731b2765ff0a5deb2464a511cc
Merge: 92b7938 ac718f2
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Jan 26 10:23:23 2011 -0500

    Merge branch 'opac-tt-poc' of ssh://senator@yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 92b79385fb5eb1c6be1270345f731f250880f138
Author: senator <lebbeous at esilibrary.com>
Date:   Wed Jan 26 10:23:00 2011 -0500

    myopac primitive framework

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 676781f..460e051 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -386,6 +386,8 @@ sub load_record {
 # context additions: 
 #   user : au object, fleshed
 sub load_myopac {
+    # XXX This crashes on session timeout, so somewhere around here we need to
+    # add handling for that
     my $self = shift;
     $self->ctx->{page} = 'myopac';
 
diff --git a/Open-ILS/web/templates/default/opac/myopac/bookbags.tt2 b/Open-ILS/web/templates/default/opac/myopac/bookbags.tt2
new file mode 100644
index 0000000..6e359d4
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/bookbags.tt2
@@ -0,0 +1,14 @@
+[% BLOCK html_head %]
+<style>
+    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
+    table { border-collapse: collapse; }
+    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
+    table tr:nth-child(odd) { background-color:#ded; }
+</style>
+[% END %]
+
+[% WRAPPER "default/opac/base.tt2" %]
+[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "bookbags" %]
+<p><em>XXX TODO</em></p>
+
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/fines.tt2 b/Open-ILS/web/templates/default/opac/myopac/fines.tt2
new file mode 100644
index 0000000..cf9d23c
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/fines.tt2
@@ -0,0 +1,22 @@
+[% BLOCK html_head %]
+<style>
+    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
+    table { border-collapse: collapse; }
+    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
+    table tr:nth-child(odd) { background-color:#ded; }
+</style>
+[% END %]
+
+[% WRAPPER "default/opac/base.tt2" %]
+[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "fines" %]
+<table>
+    <thead>
+        <tr>
+            <th>Total Owed</th>
+            <th>Total Paid</th>
+            <th>Balance Owed</th>
+        </tr>
+    </thead>
+</table>
+
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/items_held.tt2 b/Open-ILS/web/templates/default/opac/myopac/items_held.tt2
new file mode 100644
index 0000000..3954298
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/items_held.tt2
@@ -0,0 +1,29 @@
+[% BLOCK html_head %]
+<style>
+    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
+    table { border-collapse: collapse; }
+    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
+    table tr:nth-child(odd) { background-color:#ded; }
+</style>
+[% END %]
+
+[% WRAPPER "default/opac/base.tt2" %]
+[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "items_held" %]
+<table>
+    <thead>
+        <tr>
+            <th>Title</th>
+            <th>Author</th>
+            <th>Formats</th>
+            <th>Pickup Location</th>
+            <th>Status</th>
+            <th>Active</th>
+            <th>Activate on...</th>
+            <th>Expiration Date</th>
+            <th>Select</th>
+            <th>Edit</th>
+        </tr>
+    </thead>
+</table>
+
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/items_out.tt2 b/Open-ILS/web/templates/default/opac/myopac/items_out.tt2
new file mode 100644
index 0000000..ca93991
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/items_out.tt2
@@ -0,0 +1,24 @@
+[% BLOCK html_head %]
+<style>
+    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
+    table { border-collapse: collapse; }
+    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
+    table tr:nth-child(odd) { background-color:#ded; }
+</style>
+[% END %]
+
+[% WRAPPER "default/opac/base.tt2" %]
+[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "items_out" %]
+<table>
+    <thead>
+        <tr>
+            <th>Title</th>
+            <th>Author</th>
+            <th>Due Date</th>
+            <th>Renewals Remaining</th>
+            <th>Renewals Remaining</th>
+        </tr>
+    </thead>
+</table>
+
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/prefs.tt2 b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
new file mode 100644
index 0000000..d9a60ba
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/prefs.tt2
@@ -0,0 +1,15 @@
+[% BLOCK html_head %]
+<style>
+    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
+    table { border-collapse: collapse; }
+    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
+    table tr:nth-child(odd) { background-color:#ded; }
+</style>
+[% END %]
+
+[% WRAPPER "default/opac/base.tt2" %]
+[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "prefs" %]
+<p><em>XXX TODO Need to find out whether the list of pref fields can/should be generated
+    from db entries or something.</em></p>
+
+[% END %]

commit ac718f28fbcecefc71707cfd0ae6e505d0315af6
Merge: 303ac85 c158eb8
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jan 26 10:00:01 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 303ac85c01907b11dbd441b0982a79109b78f5f8
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jan 26 09:59:51 2011 -0500

    initial user circulations list call

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 213f4cb..c05388f 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -6,10 +6,12 @@ use Digest::MD5 qw(md5_hex);
 use Apache2::Const -compile => qw(OK DECLINED HTTP_INTERNAL_SERVER_ERROR REDIRECT HTTP_BAD_REQUEST);
 use OpenSRF::AppSession;
 use OpenSRF::EX qw/:try/;
+use OpenSRF::Utils qw/:datetime/;
 use OpenSRF::Utils::Logger qw/$logger/;
 use OpenILS::Application::AppUtils;
 use OpenILS::Utils::CStoreEditor qw/:funcs/;
 use OpenILS::Utils::Fieldmapper;
+use DateTime::Format::ISO8601;
 my $U = 'OpenILS::Application::AppUtils';
 
 my %cache; # proc-level cache
@@ -76,6 +78,7 @@ sub load {
     return $self->load_place_hold if $path =~ /opac\/place_hold/;
 
     return $self->load_myopac_holds if $path =~ /opac\/myopac\/holds/;
+    return $self->load_myopac_circs if $path =~ /opac\/myopac\/circs/;
     return $self->load_myopac if $path =~ /opac\/myopac/;
 
     return Apache2::Const::OK;
@@ -159,6 +162,21 @@ sub load_helpers {
         $ctx->{aou_tree}->(); # force the org tree to load
         return $cache{map}{aou}{$org_id};
     };
+
+    # turns an ISO date into something TT can understand
+    $ctx->{parse_datetime} = sub {
+        my $date = shift;
+        $date = DateTime::Format::ISO8601->new->parse_datetime(cleanse_ISO8601($date));
+        return sprintf(
+            "%0.2d:%0.2d:%0.2d %0.2d-%0.2d-%0.4d",
+            $date->hour,
+            $date->minute,
+            $date->second,
+            $date->day,
+            $date->month,
+            $date->year
+        );
+    }
 }
 
 # context additions: 
@@ -418,7 +436,7 @@ sub load_myopac_holds {
         $e->requestor->id
     )->gather(1);
 
-    $hold_ids = [ @$hold_ids[$offset..($offset + $limit - 1)] ];
+    $hold_ids = [ grep { defined $_ } @$hold_ids[$offset..($offset + $limit - 1)] ];
 
     my $req = $circ->request(
         'open-ils.circ.hold.details.batch.retrieve', 
@@ -448,7 +466,6 @@ sub load_myopac_holds {
     return Apache2::Const::OK;
 }
 
-# context additions: 
 sub load_place_hold {
     my $self = shift;
     my $ctx = $self->ctx;
@@ -510,4 +527,64 @@ sub load_place_hold {
     return Apache2::Const::OK;
 }
 
+
+sub load_myopac_circs {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+    $ctx->{circs} = [];
+
+    my $limit = $self->cgi->param('limit') || 10;
+    my $offset = $self->cgi->param('offset') || 0;
+
+    my $circ_data = $U->simplereq(
+        'open-ils.actor', 
+        'open-ils.actor.user.checked_out',
+        $e->authtoken, 
+        $e->requestor->id
+    );
+
+    my @circ_ids =  ( @{$circ_data->{overdue}}, @{$circ_data->{out}} );
+    @circ_ids = grep { defined $_ } @circ_ids[0..($offset + $limit - 1)];
+
+    return Apache2::Const::OK unless @circ_ids;
+
+    my $cstore = OpenSRF::AppSession->create('open-ils.cstore');
+    my $req = $cstore->request(
+        'open-ils.cstore.direct.action.circulation.search', 
+        {id => \@circ_ids},
+        {
+            flesh => 3,
+            flesh_fields => {
+                circ => ['target_copy'],
+                acp => ['call_number'],
+                acn => ['record']
+            }
+        }
+    );
+
+    my @circs;
+    while(my $resp = $req->recv) {
+        my $circ = $resp->content;
+        push(@circs, {
+            circ => $circ, 
+            marc_xml => ($circ->target_copy->call_number->id == -1) ? 
+                undef :  # pre-cat copy, use the dummy title/author instead
+                XML::LibXML->new->parse_string($circ->target_copy->call_number->record->marc),
+        });
+    }
+
+    # make sure the final list is in the correct order
+    for my $id (@circ_ids) {
+        push(
+            @{$ctx->{circs}}, 
+            (grep { $_->{circ}->id == $id } @circs)
+        );
+    }
+
+    return Apache2::Const::OK;
+}
+
+
+
 1;

commit 8f40776e98e4520dbe7ce5c582c78fce6b675fe8
Merge: 776a03e 882d9df
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jan 26 08:40:07 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 776a03e0bd48eaa72b308793e44f87b9273eaf4b
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jan 26 08:39:22 2011 -0500

    for listing holds, taking advantage of batch retrieve args to reduce data size; added limit/offset to holds list for paging

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 676781f..213f4cb 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -408,6 +408,9 @@ sub load_myopac_holds {
     my $e = $self->editor;
     my $ctx = $self->ctx;
 
+    my $limit = $self->cgi->param('limit') || 10;
+    my $offset = $self->cgi->param('offset') || 0;
+
     my $circ = OpenSRF::AppSession->create('open-ils.circ');
     my $hold_ids = $circ->request(
         'open-ils.circ.holds.id_list.retrieve', 
@@ -415,20 +418,30 @@ sub load_myopac_holds {
         $e->requestor->id
     )->gather(1);
 
+    $hold_ids = [ @$hold_ids[$offset..($offset + $limit - 1)] ];
+
     my $req = $circ->request(
         'open-ils.circ.hold.details.batch.retrieve', 
         $e->authtoken, 
-        $hold_ids
+        $hold_ids,
+        {
+            suppress_notices => 1,
+            suppress_transits => 1,
+            suppress_mvr => 1,
+            suppress_patron_details => 1,
+            include_bre => 1
+        }
     );
 
     # any requests we can fire off here?
-    # XXX use marc attrs instead of the mvr's returned by hold.details
     
     $ctx->{holds} = []; 
     while(my $resp = $req->recv) {
         my $hold = $resp->content;
-        # need to fetch anything else?
-        push(@{$ctx->{holds}}, $hold);
+        push(@{$ctx->{holds}}, {
+            hold => $hold,
+            marc_xml => XML::LibXML->new->parse_string($hold->{bre}->marc)
+        });
     }
 
     $circ->kill_me;

commit a6f2181892b72685dbaf4beb0d35a7dad5e1acbe
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jan 26 08:37:50 2011 -0500

    added call args to open-ils.circ.hold.details.*.retrieve to allow the caller to scale back the returned data set

diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
index c95bafe..f2a2006 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
@@ -2629,10 +2629,10 @@ __PACKAGE__->register_method(
 );
 
 sub uber_hold {
-	my($self, $client, $auth, $hold_id) = @_;
+	my($self, $client, $auth, $hold_id, $args) = @_;
 	my $e = new_editor(authtoken=>$auth);
 	$e->checkauth or return $e->event;
-    return uber_hold_impl($e, $hold_id);
+    return uber_hold_impl($e, $hold_id, $args);
 }
 
 __PACKAGE__->register_method(
@@ -2643,17 +2643,18 @@ __PACKAGE__->register_method(
 );
 
 sub batch_uber_hold {
-	my($self, $client, $auth, $hold_ids) = @_;
+	my($self, $client, $auth, $hold_ids, $args) = @_;
 	my $e = new_editor(authtoken=>$auth);
 	$e->checkauth or return $e->event;
-    $client->respond(uber_hold_impl($e, $_)) for @$hold_ids;
+    $client->respond(uber_hold_impl($e, $_, $args)) for @$hold_ids;
     return undef;
 }
 
 sub uber_hold_impl {
-    my($e, $hold_id) = @_;
+    my($e, $hold_id, $args) = @_;
 
 	my $resp = {};
+    $args ||= {};
 
 	my $hold = $e->retrieve_action_hold_request(
 		[
@@ -2682,27 +2683,33 @@ sub uber_hold_impl {
 	my $user = $hold->usr;
 	$hold->usr($user->id);
 
-	my $card = $e->retrieve_actor_card($user->card)
-		or return $e->event;
 
-	my( $mvr, $volume, $copy ) = find_hold_mvr($e, $hold);
+	my( $mvr, $volume, $copy, $issuance, $bre ) = find_hold_mvr($e, $hold, $args->{suppress_mvr});
 
-	flesh_hold_notices([$hold], $e);
-	flesh_hold_transits([$hold]);
+	flesh_hold_notices([$hold], $e) unless $args->{suppress_notices};
+	flesh_hold_transits([$hold]) unless $args->{suppress_transits};
 
     my $details = retrieve_hold_queue_status_impl($e, $hold);
 
-    return {
+    my $resp = {
         hold           => $hold,
         copy           => $copy,
         volume         => $volume,
-        mvr            => $mvr,
-        patron_first   => $user->first_given_name,
-        patron_last    => $user->family_name,
-        patron_barcode => $card->barcode,
-        patron_alias   => $user->alias,
         %$details
     };
+
+    $resp->{mvr} = $mvr unless $args->{suppress_mvr};
+    unless($args->{suppress_patron_details}) {
+	    my $card = $e->retrieve_actor_card($user->card) or return $e->event;
+        $resp->{patron_first}   = $user->first_given_name,
+        $resp->{patron_last}    = $user->family_name,
+        $resp->{patron_barcode} = $card->barcode,
+        $resp->{patron_alias}   = $user->alias,
+    };
+
+    $resp->{bre} = $bre if $args->{include_bre};
+
+    return $resp;
 }
 
 
@@ -2712,7 +2719,7 @@ sub uber_hold_impl {
 # hold is all about
 # -----------------------------------------------------
 sub find_hold_mvr {
-	my( $e, $hold ) = @_;
+	my( $e, $hold, $no_mvr ) = @_;
 
 	my $tid;
 	my $copy;
@@ -2761,7 +2768,7 @@ sub find_hold_mvr {
 
     # TODO return metarcord mvr for M holds
 	my $title = $e->retrieve_biblio_record_entry($tid);
-	return ( $U->record_to_mvr($title), $volume, $copy, $issuance );
+	return ( ($no_mvr) ? undef : $U->record_to_mvr($title), $volume, $copy, $issuance, $title );
 }
 
 __PACKAGE__->register_method(

commit fa76342c2b1269b27b1da8e9e04eb992f4aaba5b
Author: senator <lebbeous at esilibrary.com>
Date:   Tue Jan 25 18:48:41 2011 -0500

    starts

diff --git a/Open-ILS/web/templates/default/opac/myopac/_links.tt2 b/Open-ILS/web/templates/default/opac/myopac/_links.tt2
new file mode 100644
index 0000000..4ab11d4
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac/_links.tt2
@@ -0,0 +1,17 @@
+[%
+pages = [
+    {url => "main", name => "My Account"},
+    {url => "items_out", name => "Items Out"},
+    {url => "items_held", name => "Items on Hold"},
+    {url => "fines", name => "Fines"},
+    {url => "prefs", name => "Account Preferences"},
+    {url => "bookbags", name => "My Bookbags"}
+];
+FOREACH page IN pages;
+    IF page.url != myopac_page %] <a href="[% page.url %]">[% END;
+        page.name;
+        IF page.url != myopac_page %]</a>
+    [% ELSE;
+        ctx.page_title = page.name;
+    END;
+END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
similarity index 89%
rename from Open-ILS/web/templates/default/opac/myopac.tt2
rename to Open-ILS/web/templates/default/opac/myopac/main.tt2
index fc8c74c..dc86a48 100644
--- a/Open-ILS/web/templates/default/opac/myopac.tt2
+++ b/Open-ILS/web/templates/default/opac/myopac/main.tt2
@@ -7,11 +7,8 @@
 </style>
 [% END %]
 
-[% 
-    WRAPPER "default/opac/base.tt2"; 
-    ctx.page_title = "My Account";
-%]
-
+[% WRAPPER "default/opac/base.tt2" %]
+[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "main" %]
 <table>
     <tr>
         <td>First Name</td>
@@ -39,6 +36,4 @@
     </tr>
 </table>
 
-
-
 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 2a495f5..fa09cca 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -37,7 +37,7 @@
                 [% IF ctx.user; %]
                     <div id='links_div'>
                         <div><a href='home'>Home</a></div>
-                        <div><a href='myopac'>Account</a></div>
+                        <div><a href='myopac/main'>Account</a></div>
                         <div><a href='logout'>Logout</a></div>
                     </div>
                     <hr/>
diff --git a/Open-ILS/web/templates/default/opac/welcome.tt2 b/Open-ILS/web/templates/default/opac/welcome.tt2
index 85d19ac..0cccd3f 100644
--- a/Open-ILS/web/templates/default/opac/welcome.tt2
+++ b/Open-ILS/web/templates/default/opac/welcome.tt2
@@ -18,7 +18,7 @@
             </tr>
             <tr>
                 <td><a href='logout'>Logout</a></td>
-                <td><a href='myopac'>Account</a></td>
+                <td><a href='myopac/main'>Account</a></td>
             </tr>
         </table>
     [% ELSE %]

commit f57f775e402df6d1a205ce387971703641642ad5
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Jan 25 17:40:37 2011 -0500

    added generic public object fetch-and-cache routine; added stub holds retrieval, but more to come on that

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index d9a71b6..676781f 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -37,7 +37,7 @@ sub apache {
     return $self->{apache};
 }
 
-# runtime context
+# runtime / template context
 sub ctx {
     my($self, $ctx) = @_;
     $self->{ctx} = $ctx if $ctx;
@@ -63,57 +63,102 @@ sub cgi {
 sub load {
     my $self = shift;
 
-    my $path = $self->apache->path_info;
     $self->load_helpers;
-
     my $stat = $self->load_common;
     return $stat unless $stat == Apache2::Const::OK;
 
+    my $path = $self->apache->path_info;
     return $self->load_home if $path =~ /opac\/home/;
     return $self->load_login if $path =~ /opac\/login/;
     return $self->load_logout if $path =~ /opac\/logout/;
     return $self->load_rresults if $path =~ /opac\/results/;
     return $self->load_record if $path =~ /opac\/record/;
-    return $self->load_myopac if $path =~ /opac\/myopac/;
     return $self->load_place_hold if $path =~ /opac\/place_hold/;
 
+    return $self->load_myopac_holds if $path =~ /opac\/myopac\/holds/;
+    return $self->load_myopac if $path =~ /opac\/myopac/;
+
     return Apache2::Const::OK;
 }
 
 # general purpose utility functions added to the environment
-# context additions: 
-#   find_org_unit : function(id) => aou object
-#   org_tree : function(id) => aou object, top of tree, fleshed
 sub load_helpers {
     my $self = shift;
-    $cache{org_unit_map} = {};
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
 
-    # pull the org unit from the cached org tree
-    $self->ctx->{find_org_unit} = sub {
-        my $org_id = shift;
-        return undef unless defined $org_id;
-        return $cache{org_unit_map}{$org_id} if defined $cache{org_unit_map}{$org_id};
-        my $tree = shift || $self->ctx->{org_tree}->();
-        return $cache{org_unit_map}{$org_id} = $tree if $tree->id == $org_id;
-        for my $child (@{$tree->children}) {
-            my $node = $self->ctx->{find_org_unit}->($org_id, $child);
-            return $node if $node;
-        }
-        return undef;
-    };
+    $cache{map} = {}; # public object maps
+    $cache{list} = {}; # public object lists
+
+    # fetch-on-demand-and-cache subs for commonly used public data
+    my @public_classes = qw/ccs aout/;
+
+    for my $hint (@public_classes) {
+
+        my ($class) = grep {
+            $Fieldmapper::fieldmap->{$_}->{hint} eq $hint
+        } keys %{ $Fieldmapper::fieldmap };
+
+	    $class =~ s/Fieldmapper:://o;
+	    $class =~ s/::/_/g;
 
-    $self->ctx->{org_tree} = sub {
-        unless($cache{org_tree}) {
-            $cache{org_tree} = $self->editor->search_actor_org_unit([
+        # copy statuses
+        my $list_key = $hint . '_list';
+        my $find_key = "find_$hint";
+
+        $ctx->{$list_key} = sub {
+            my $method = "retrieve_all_$class";
+            $cache{list}{$hint} = $e->$method() unless $cache{list}{$hint};
+            return $cache{list}{$hint};
+        };
+    
+        $cache{map}{$hint} = {};
+
+        $ctx->{$find_key} = sub {
+            my $id = shift;
+            return $cache{map}{$hint}{$id} if $cache{map}{$hint}{$id}; 
+            ($cache{map}{$hint}{$id}) = grep { $_->id == $id } @{$ctx->{$list_key}->()};
+            return $cache{map}{$hint}{$id};
+        };
+
+    }
+
+    $ctx->{aou_tree} = sub {
+
+        # fetch the org unit tree
+        unless($cache{aou_tree}) {
+            my $tree = $e->search_actor_org_unit([
 			    {   parent_ou => undef},
 			    {   flesh            => -1,
-				    flesh_fields    => {aou =>  ['children', 'ou_type']},
+				    flesh_fields    => {aou =>  ['children']},
 				    order_by        => {aou => 'name'}
 			    }
 		    ])->[0];
+
+            # flesh the org unit type for each org unit
+            # and simultaneously set the id => aou map cache
+            sub flesh_aout {
+                my $node = shift;
+                my $ctx = shift;
+                $node->ou_type( $ctx->{find_aout}->($node->ou_type) );
+                $cache{map}{aou}{$node->id} = $node;
+                flesh_aout($_, $ctx) foreach @{$node->children};
+            };
+            flesh_aout($tree, $ctx);
+
+            $cache{aou_tree} = $tree;
         }
-        return $cache{org_tree};
-    }
+
+        return $cache{aou_tree};
+    };
+
+    # Add a special handler for the tree-shaped org unit cache
+    $cache{map}{aou} = {};
+    $ctx->{find_aou} = sub {
+        my $org_id = shift;
+        $ctx->{aou_tree}->(); # force the org tree to load
+        return $cache{map}{aou}{$org_id};
+    };
 }
 
 # context additions: 
@@ -317,6 +362,7 @@ sub load_rresults {
 #   record : bre object
 sub load_record {
     my $self = shift;
+    $self->ctx->{page} = 'record';
 
     my $rec_id = $self->ctx->{page_args}->[0]
         or return Apache2::Const::HTTP_BAD_REQUEST;
@@ -341,6 +387,7 @@ sub load_record {
 #   user : au object, fleshed
 sub load_myopac {
     my $self = shift;
+    $self->ctx->{page} = 'myopac';
 
     $self->ctx->{user} = $self->editor->retrieve_actor_user([
         $self->ctx->{user}->id,
@@ -356,11 +403,44 @@ sub load_myopac {
     return Apache2::Const::OK;
 }
 
+sub load_myopac_holds {
+    my $self = shift;
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+
+    my $circ = OpenSRF::AppSession->create('open-ils.circ');
+    my $hold_ids = $circ->request(
+        'open-ils.circ.holds.id_list.retrieve', 
+        $e->authtoken, 
+        $e->requestor->id
+    )->gather(1);
+
+    my $req = $circ->request(
+        'open-ils.circ.hold.details.batch.retrieve', 
+        $e->authtoken, 
+        $hold_ids
+    );
+
+    # any requests we can fire off here?
+    # XXX use marc attrs instead of the mvr's returned by hold.details
+    
+    $ctx->{holds} = []; 
+    while(my $resp = $req->recv) {
+        my $hold = $resp->content;
+        # need to fetch anything else?
+        push(@{$ctx->{holds}}, $hold);
+    }
+
+    $circ->kill_me;
+    return Apache2::Const::OK;
+}
+
 # context additions: 
 sub load_place_hold {
     my $self = shift;
     my $ctx = $self->ctx;
     my $e = $self->editor;
+    $self->ctx->{page} = 'place_hold';
 
     $ctx->{hold_target} = $self->cgi->param('hold_target');
     $ctx->{hold_type} = $self->cgi->param('hold_type');
diff --git a/Open-ILS/web/templates/default/opac/common.tt2 b/Open-ILS/web/templates/default/opac/common.tt2
index 0500725..c702b95 100644
--- a/Open-ILS/web/templates/default/opac/common.tt2
+++ b/Open-ILS/web/templates/default/opac/common.tt2
@@ -4,7 +4,7 @@
     BLOCK build_org_selector;
         first_run = 0;
         IF !org_unit;
-            org_unit = ctx.org_tree;
+            org_unit = ctx.aou_tree;
             first_run = 1;
 %]
     <select id='[% id %]' name='[% name %]'>
diff --git a/Open-ILS/web/templates/default/opac/record.tt2 b/Open-ILS/web/templates/default/opac/record.tt2
index b12e9dd..24f1203 100644
--- a/Open-ILS/web/templates/default/opac/record.tt2
+++ b/Open-ILS/web/templates/default/opac/record.tt2
@@ -67,10 +67,10 @@
         [% FOR acn IN record.call_numbers %]
             [% FOR acp IN acn.copies %]
                 <tr>
-                    <td>[% ctx.find_org_unit(acn.owning_lib).shortname %]</td>
+                    <td>[% ctx.find_aou(acn.owning_lib).shortname %]</td>
                     <td>[% acn.label %]</td>
                     <td>[% acp.barcode %]</td>
-                    <td>[% acp.status %]</td>
+                    <td>[% ctx.find_ccs(acp.status).name %]</td>
                 </tr>
             [% END %]
         [% END %]

commit 8741018cfdc0000d2964b5bea9ae33800a32daa8
Merge: fa94b05 2667dc6
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Jan 25 17:39:46 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit fa94b05ce67bffad80308d77044dc98794a15fd5
Merge: 7feabe7 2f897a0
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Jan 25 14:43:38 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 7feabe770b9fa55d251f65053d4351b2b3574926
Merge: 06c277e d436733
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Jan 24 09:42:08 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 06c277edbeb641c89ac431fe927992499df3bf7d
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jan 21 17:27:26 2011 -0500

    path based record display, primitive facet links

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 754616c..d9a71b6 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -73,7 +73,7 @@ sub load {
     return $self->load_login if $path =~ /opac\/login/;
     return $self->load_logout if $path =~ /opac\/logout/;
     return $self->load_rresults if $path =~ /opac\/results/;
-    return $self->load_rdetail if $path =~ /opac\/rdetail/;
+    return $self->load_record if $path =~ /opac\/record/;
     return $self->load_myopac if $path =~ /opac\/myopac/;
     return $self->load_place_hold if $path =~ /opac\/place_hold/;
 
@@ -233,9 +233,11 @@ sub load_rresults {
 
     $ctx->{page} = 'rresult';
     my $page = $cgi->param('page') || 0;
+    my $facet = $cgi->param('facet');
     my $query = $cgi->param('query');
     my $limit = $cgi->param('limit') || 10; # XXX user settings
     my $args = {limit => $limit, offset => $page * $limit}; 
+    $query = "$query $facet" if $facet;
     my $results;
 
     try {
@@ -268,9 +270,9 @@ sub load_rresults {
 
     unless($cache{cmf}) {
         $cache{cmf} = $e->search_config_metabib_field({id => {'!=' => undef}});
-        $cache{cmc} = $e->search_config_metabib_class({name => {'!=' => undef}});
         $ctx->{metabib_field} = $cache{cmf};
-        $ctx->{metabib_class} = $cache{cmc};
+        #$cache{cmc} = $e->search_config_metabib_class({name => {'!=' => undef}});
+        #$ctx->{metabib_class} = $cache{cmc};
     }
 
     my @data;
@@ -304,8 +306,7 @@ sub load_rresults {
 
     for my $cmf_id (keys %$facets) {  # quick-n-dirty
         my ($cmf) = grep { $_->id eq $cmf_id } @{$cache{cmf}};
-        $facets->{$cmf->label} = $facets->{$cmf_id};
-        delete $facets->{$cmf_id};
+        $facets->{$cmf_id} = {cmf => $cmf, data => $facets->{$cmf_id}};
     }
     $ctx->{search_facets} = $facets;
 
@@ -314,7 +315,7 @@ sub load_rresults {
 
 # context additions: 
 #   record : bre object
-sub load_rdetail {
+sub load_record {
     my $self = shift;
 
     my $rec_id = $self->ctx->{page_args}->[0]
diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
index 6d38a83..256350c 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
@@ -21,7 +21,7 @@ sub import {
     my $self = shift;
     $web_config_file = shift;
     unless(-r $web_config_file) {
-        warn "Invalid web config $web_config_file";
+        warn "Invalid web config $web_config_file\n";
         return;
     }
     check_web_config();
@@ -80,7 +80,7 @@ sub run_context_loader {
         return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
     }
 
-    $r->log->warn("context loader resulted in status $stat");
+    $r->log->info("context loader resulted in status $stat");
     return $stat;
 }
 
diff --git a/Open-ILS/web/templates/default/opac/record.tt2 b/Open-ILS/web/templates/default/opac/record.tt2
index 26e30dd..b12e9dd 100644
--- a/Open-ILS/web/templates/default/opac/record.tt2
+++ b/Open-ILS/web/templates/default/opac/record.tt2
@@ -28,7 +28,7 @@
             </td>
         </tr>
         [% IF attrs.title %]<tr><td>Title</td><td>[% attrs.title %]</td></tr>[% END %]
-        [% IF attrs.author %]<tr><td>Author</td><td><a href='results?query=au:[% attrs.author | uri %]'>[% attrs.author %]</a></td></tr>[% END %]
+        [% IF attrs.author %]<tr><td>Author</td><td><a href='../results?query=au:[% attrs.author | uri %]'>[% attrs.author %]</a></td></tr>[% END %]
         [% IF attrs.isbn %]<tr><td>ISBN</td><td>[% attrs.isbn %]</td></tr>[% END %]
         [% IF attrs.issn %]<tr><td>ISSN</td><td>[% attrs.issn %]</td></tr>[% END %]
         [% IF attrs.upc %]<tr><td>UPC</td><td>[% attrs.upc %]</td></tr>[% END %]
@@ -43,10 +43,10 @@
                     s1 = node.childNodes.1.textContent;
                 %]
                 [% IF s0 %]
-                    <a href='results?query=su:[% s0 | url %]'>[% s0 %]</a>
+                    <a href='../results?query=su:[% s0 | url %]'>[% s0 %]</a>
                     [% IF s1 %]
                     <span>--</span>
-                    <a href='results?query=su:[% s1 | url %]'>[% s1 %]</a>
+                    <a href='../results?query=su:[% s1 | url %]'>[% s1 %]</a>
                     [% END %]
                     <br/>
                 [% END %]
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 956e4ea..2a495f5 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -58,10 +58,12 @@
             </div>
             <div>
                 [% FOR facet_type IN ctx.search_facets.keys %]
-                    <b>[% facet_type %]</b>
+                    [% cmf = ctx.search_facets.$facet_type.cmf %]
+                    <b>[% cmf.label %]</b>
                     <ul>
-                        [% FOR facet IN ctx.search_facets.$facet_type.keys %]
-                            <li>[% facet %] / [% ctx.search_facets.$facet_type.$facet %]</li>
+                        [% FOR facet IN ctx.search_facets.$facet_type.data.keys %]
+                            [% facet_count = ctx.search_facets.$facet_type.data.$facet %]
+                            <li><a href='results?query=[% query | url %]&facet=[% cmf.field_class %]|[% cmf.name %][[% facet | url %]]'>[% facet_count %] / [% facet %]</a></li>
                         [% END %]
                     </ul>
                 [% END %]
@@ -87,7 +89,7 @@
                     </td>
                     <td width='auto'>
                         <div>
-                            <a href='rdetail/[% rec.bre.id %]'>[% attrs.title %]</a>
+                            <a href='record/[% rec.bre.id %]'>[% attrs.title %]</a>
                             <span style='padding-left:10px;'>[% rec.copy_counts.available %] / [% rec.copy_counts.visible %]</span>
                         </div>
                         <div>[% attrs.author %]</div>

commit 02c27ea404e5efc7235b62cb7c858fb6b025ccc7
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jan 21 17:27:16 2011 -0500

    path based record display, primitive facet links

diff --git a/Open-ILS/web/templates/default/opac/rdetail.tt2 b/Open-ILS/web/templates/default/opac/record.tt2
similarity index 100%
rename from Open-ILS/web/templates/default/opac/rdetail.tt2
rename to Open-ILS/web/templates/default/opac/record.tt2

commit d859f2e863b047fcd85f40dd7d9fc6ec2023e5b8
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jan 21 16:18:07 2011 -0500

    repaired subject rending on detail page

diff --git a/Open-ILS/web/templates/default/opac/rdetail.tt2 b/Open-ILS/web/templates/default/opac/rdetail.tt2
index f32bd49..26e30dd 100644
--- a/Open-ILS/web/templates/default/opac/rdetail.tt2
+++ b/Open-ILS/web/templates/default/opac/rdetail.tt2
@@ -37,7 +37,7 @@
         <tr>
             <td>Subjects</td>
             <td>
-            [% FOR node IN marc_xml.findnodes('//*[@tag="650"]') %]
+            [% FOR node IN ctx.marc_xml.findnodes('//*[@tag="650"]') %]
                 [% 
                     s0 = node.childNodes.0.textContent;
                     s1 = node.childNodes.1.textContent;

commit 42dc7c5d0841d7809d35e4d7e4db214f1af6a58e
Merge: 6c76986 323218c
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jan 21 16:09:12 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 6c76986dc79f368b971a0bb49263c3ee62c8c7e4
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jan 21 16:09:07 2011 -0500

    use path-based bib IDs instead of GET params

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 98eff62..754616c 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -3,7 +3,7 @@ use strict; use warnings;
 use CGI;
 use XML::LibXML;
 use Digest::MD5 qw(md5_hex);
-use Apache2::Const -compile => qw(OK DECLINED HTTP_INTERNAL_SERVER_ERROR REDIRECT);
+use Apache2::Const -compile => qw(OK DECLINED HTTP_INTERNAL_SERVER_ERROR REDIRECT HTTP_BAD_REQUEST);
 use OpenSRF::AppSession;
 use OpenSRF::EX qw/:try/;
 use OpenSRF::Utils::Logger qw/$logger/;
@@ -317,8 +317,11 @@ sub load_rresults {
 sub load_rdetail {
     my $self = shift;
 
+    my $rec_id = $self->ctx->{page_args}->[0]
+        or return Apache2::Const::HTTP_BAD_REQUEST;
+
     $self->ctx->{record} = $self->editor->retrieve_biblio_record_entry([
-        $self->cgi->param('record'),
+        $rec_id,
         {
             flesh => 2, 
             flesh_fields => {
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index a0e13a8..956e4ea 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -87,7 +87,7 @@
                     </td>
                     <td width='auto'>
                         <div>
-                            <a href='rdetail?record=[% rec.bre.id %]'>[% attrs.title %]</a>
+                            <a href='rdetail/[% rec.bre.id %]'>[% attrs.title %]</a>
                             <span style='padding-left:10px;'>[% rec.copy_counts.available %] / [% rec.copy_counts.visible %]</span>
                         </div>
                         <div>[% attrs.author %]</div>

commit 998da3e93682fa8346e08e0bdfde12c330c81b72
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jan 21 16:08:50 2011 -0500

    move template finder in front of context loader, so that context loader has access to path-based page arguments

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
index 4980f79..6d38a83 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
@@ -35,14 +35,16 @@ sub handler {
     my $base = $ctx->{base_path};
 
     $r->content_type('text/html; encoding=utf8');
-    my $stat = run_context_loader($r, $ctx);
-    return $stat unless $stat == Apache2::Const::OK;
 
     my($template, $page_args, $as_xml) = find_template($r, $base, $ctx);
+    $ctx->{page_args} = $page_args;
+
+    my $stat = run_context_loader($r, $ctx);
+
+    return $stat unless $stat == Apache2::Const::OK;
     return Apache2::Const::DECLINED unless $template;
 
     $template = $ctx->{skin} . "/$template";
-    $ctx->{page_args} = $page_args;
 
     my $tt = Template->new({
         OUTPUT => ($as_xml) ?  sub { parse_as_xml($r, $ctx, @_); } : $r,

commit ee400b45d9ae07a962172a24e61c417a8e0abf18
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jan 21 10:20:36 2011 -0500

    don't muck w/ media_prefix if it's unset

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
index 3929285..4980f79 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
@@ -122,7 +122,7 @@ sub load_context {
         $ctx->{theme} . ' : locale = ' . $ctx->{locale});
 
     my $mprefix = $ctx->{media_prefix};
-    if($mprefix !~ /^http/ and $mprefix !~ /^\//) {
+    if($mprefix and $mprefix !~ /^http/ and $mprefix !~ /^\//) {
         # if a hostname is provided /w no protocol, match the protocol to the current page
         $ctx->{media_prefix} = ($cgi->https) ? "https://$mprefix" : "http://$mprefix";
     }

commit c848fca56a43671ececa2ff427adc626636a99ba
Merge: a922f30 0bfbeab
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jan 21 09:54:32 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit a922f30b30e6b53ab7733b288f206743ce9f1d13
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jan 20 17:05:28 2011 -0500

    better call parallization

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 12cecce..98eff62 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -227,29 +227,18 @@ sub load_logout {
 #   records : list of bre's and copy-count objects
 sub load_rresults {
     my $self = shift;
-
     my $cgi = $self->cgi;
     my $ctx = $self->ctx;
     my $e = $self->editor;
 
     $ctx->{page} = 'rresult';
-
-    unless($cache{cmf}) {
-        $cache{cmf} = $e->search_config_metabib_field({id => {'!=' => undef}});
-        $cache{cmc} = $e->search_config_metabib_class({name => {'!=' => undef}});
-        $ctx->{metabib_field} = $cache{cmf};
-        $ctx->{metabib_class} = $cache{cmc};
-    }
-
     my $page = $cgi->param('page') || 0;
     my $query = $cgi->param('query');
     my $limit = $cgi->param('limit') || 10; # XXX user settings
-
     my $args = {limit => $limit, offset => $page * $limit}; 
     my $results;
 
     try {
-
         $results = $U->simplereq(
             'open-ils.search',
             'open-ils.search.biblio.multiclass.query.staff', 
@@ -270,14 +259,20 @@ sub load_rresults {
 
     return Apache2::Const::OK if @$rec_ids == 0;
 
-    my $search = OpenSRF::AppSession->create('open-ils.search');
-    my $facet_req = $search->request('open-ils.search.facet_cache.retrieve', $results->{facet_key}, 10);
-    
     my $cstore1 = OpenSRF::AppSession->create('open-ils.cstore');
-
     my $bre_req = $cstore1->request(
         'open-ils.cstore.direct.biblio.record_entry.search', {id => $rec_ids});
 
+    my $search = OpenSRF::AppSession->create('open-ils.search');
+    my $facet_req = $search->request('open-ils.search.facet_cache.retrieve', $results->{facet_key}, 10);
+
+    unless($cache{cmf}) {
+        $cache{cmf} = $e->search_config_metabib_field({id => {'!=' => undef}});
+        $cache{cmc} = $e->search_config_metabib_class({name => {'!=' => undef}});
+        $ctx->{metabib_field} = $cache{cmf};
+        $ctx->{metabib_class} = $cache{cmc};
+    }
+
     my @data;
     while(my $resp = $bre_req->recv) {
         my $bre = $resp->content; 

commit 8122820700da795ea26b120c0aa082d9d369a59e
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jan 20 13:59:20 2011 -0500

    use a single cache var instead of polluting with a series of global cache variables; protect against search calls that return an exception

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 45f9340..12cecce 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -5,12 +5,15 @@ use XML::LibXML;
 use Digest::MD5 qw(md5_hex);
 use Apache2::Const -compile => qw(OK DECLINED HTTP_INTERNAL_SERVER_ERROR REDIRECT);
 use OpenSRF::AppSession;
+use OpenSRF::EX qw/:try/;
 use OpenSRF::Utils::Logger qw/$logger/;
 use OpenILS::Application::AppUtils;
 use OpenILS::Utils::CStoreEditor qw/:funcs/;
 use OpenILS::Utils::Fieldmapper;
 my $U = 'OpenILS::Application::AppUtils';
 
+my %cache; # proc-level cache
+
 sub new {
     my($class, $apache, $ctx) = @_;
 
@@ -81,18 +84,17 @@ sub load {
 # context additions: 
 #   find_org_unit : function(id) => aou object
 #   org_tree : function(id) => aou object, top of tree, fleshed
-my $cached_org_tree;
-my %org_unit_map;
 sub load_helpers {
     my $self = shift;
+    $cache{org_unit_map} = {};
 
     # pull the org unit from the cached org tree
     $self->ctx->{find_org_unit} = sub {
         my $org_id = shift;
         return undef unless defined $org_id;
-        return $org_unit_map{$org_id} if defined $org_unit_map{$org_id};
+        return $cache{org_unit_map}{$org_id} if defined $cache{org_unit_map}{$org_id};
         my $tree = shift || $self->ctx->{org_tree}->();
-        return $org_unit_map{$org_id} = $tree if $tree->id == $org_id;
+        return $cache{org_unit_map}{$org_id} = $tree if $tree->id == $org_id;
         for my $child (@{$tree->children}) {
             my $node = $self->ctx->{find_org_unit}->($org_id, $child);
             return $node if $node;
@@ -101,8 +103,8 @@ sub load_helpers {
     };
 
     $self->ctx->{org_tree} = sub {
-        unless($cached_org_tree) {
-            $cached_org_tree = $self->editor->search_actor_org_unit([
+        unless($cache{org_tree}) {
+            $cache{org_tree} = $self->editor->search_actor_org_unit([
 			    {   parent_ou => undef},
 			    {   flesh            => -1,
 				    flesh_fields    => {aou =>  ['children', 'ou_type']},
@@ -110,7 +112,7 @@ sub load_helpers {
 			    }
 		    ])->[0];
         }
-        return $cached_org_tree;
+        return $cache{org_tree};
     }
 }
 
@@ -223,8 +225,6 @@ sub load_logout {
 #   page_size
 #   hit_count
 #   records : list of bre's and copy-count objects
-my $cmf_cache;
-my $cmc_cache;
 sub load_rresults {
     my $self = shift;
 
@@ -234,33 +234,44 @@ sub load_rresults {
 
     $ctx->{page} = 'rresult';
 
-    unless($cmf_cache) {
-        $cmf_cache = $e->search_config_metabib_field({id => {'!=' => undef}});
-        $cmc_cache = $e->search_config_metabib_class({name => {'!=' => undef}});
-        $ctx->{metabib_field} = $cmf_cache;
-        $ctx->{metabib_class} = $cmc_cache;
+    unless($cache{cmf}) {
+        $cache{cmf} = $e->search_config_metabib_field({id => {'!=' => undef}});
+        $cache{cmc} = $e->search_config_metabib_class({name => {'!=' => undef}});
+        $ctx->{metabib_field} = $cache{cmf};
+        $ctx->{metabib_class} = $cache{cmc};
     }
 
-
     my $page = $cgi->param('page') || 0;
     my $query = $cgi->param('query');
     my $limit = $cgi->param('limit') || 10; # XXX user settings
 
     my $args = {limit => $limit, offset => $page * $limit}; 
-    my $results = $U->simplereq('open-ils.search',
-        'open-ils.search.biblio.multiclass.query.staff', $args, $query, 1);
+    my $results;
 
-    my $search = OpenSRF::AppSession->create('open-ils.search');
-    my $facet_req = $search->request('open-ils.search.facet_cache.retrieve', $results->{facet_key}, 10);
+    try {
+
+        $results = $U->simplereq(
+            'open-ils.search',
+            'open-ils.search.biblio.multiclass.query.staff', 
+            $args, $query, 1);
+
+    } catch Error with {
+        my $err = shift;
+        $logger->error("multiclass search error: $err");
+        $results = {count => 0, ids => []};
+    };
 
     my $rec_ids = [map { $_->[0] } @{$results->{ids}}];
 
-    $ctx->{page_size} = $limit;
-    $ctx->{hit_count} = $results->{count};
     $ctx->{records} = [];
     $ctx->{search_facets} = {};
+    $ctx->{page_size} = $limit;
+    $ctx->{hit_count} = $results->{count};
 
     return Apache2::Const::OK if @$rec_ids == 0;
+
+    my $search = OpenSRF::AppSession->create('open-ils.search');
+    my $facet_req = $search->request('open-ils.search.facet_cache.retrieve', $results->{facet_key}, 10);
     
     my $cstore1 = OpenSRF::AppSession->create('open-ils.cstore');
 
@@ -271,6 +282,7 @@ sub load_rresults {
     while(my $resp = $bre_req->recv) {
         my $bre = $resp->content; 
 
+        # XXX farm out to multiple cstore sessions before loop, then collect after
         my $copy_counts = $e->json_query(
             {from => ['asset.record_copy_count', 1, $bre->id, 0]})->[0];
 
@@ -296,7 +308,7 @@ sub load_rresults {
     my $facets = $facet_req->gather(1);
 
     for my $cmf_id (keys %$facets) {  # quick-n-dirty
-        my ($cmf) = grep { $_->id eq $cmf_id } @$cmf_cache;
+        my ($cmf) = grep { $_->id eq $cmf_id } @{$cache{cmf}};
         $facets->{$cmf->label} = $facets->{$cmf_id};
         delete $facets->{$cmf_id};
     }

commit 2cc654a0e798b985a56f2cebc39187fc3cad12bc
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jan 20 13:10:51 2011 -0500

    protect against empty search results

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 634797d..45f9340 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -257,6 +257,10 @@ sub load_rresults {
 
     $ctx->{page_size} = $limit;
     $ctx->{hit_count} = $results->{count};
+    $ctx->{records} = [];
+    $ctx->{search_facets} = {};
+
+    return Apache2::Const::OK if @$rec_ids == 0;
     
     my $cstore1 = OpenSRF::AppSession->create('open-ils.cstore');
 
@@ -282,7 +286,6 @@ sub load_rresults {
     $cstore1->kill_me;
 
     # shove recs into context in search results order
-    $ctx->{records} = [];
     for my $rec_id (@$rec_ids) { 
         push(
             @{$ctx->{records}},

commit 587346bc826a0855c17ca10b426e0ec7fd5a7867
Merge: baae15c 4830c97
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jan 20 09:23:16 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit baae15cec012420847b7120c16141280773760c9
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jan 19 13:17:48 2011 -0500

    use explicit odd/even classes since some browsers don't support css3 odd/even selector

diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index f862973..a0e13a8 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -6,6 +6,7 @@
     #record_table { border-collapse: collapse; width:100%; }
     #record_table td { padding: 3px; border-bottom: 1px solid #ddd; }
     #record_table tr:nth-child(odd) { background-color:#ded; }
+    .record-table-odd { background-color:#ded; }
     #form_div { text-align: center; width: 100%; margin-top: 10px;}
     #links_div { margin-bottom: 10px; padding: 5px;}
 </style>
@@ -78,7 +79,7 @@
                     attrs = {marc_xml => rec.marc_xml};
                     PROCESS get_marc_attrs args=attrs;
                 %]
-                <tr>
+                <tr [% IF loop.count % 2 == 1 %] class='record-table-odd' [% END %]>
                     <td style='width:52px;height:72px'>
                         [% IF attrs.isbn %]
                         <img width='50' height='70' src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% attrs.isbn_clean || attrs.upc %]'/>

commit 7ce86b649904dfb4b1d7b20c4bfbb049afc69f9f
Merge: 4c91024 11216f3
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Jan 19 12:22:33 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 4c91024f33197ec6f343d2b8a475148fafa72752
Merge: a826a07 8df6989
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Jan 18 15:01:27 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit a826a07ffea7032caac67d9fff9d4a6712df31ec
Merge: 7af1d37 32bb3a1
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Jan 18 14:39:36 2011 -0500

    Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equinox into opac-tt-poc


commit 7af1d3762dd42cb75e891d6dfc96ec0f12f4d1ba
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Jan 18 11:48:11 2011 -0500

    make better use of media_prefix; only apply ses cookie in secure context; updated docs

diff --git a/Open-ILS/examples/oils_web.xml.example b/Open-ILS/examples/oils_web.xml.example
index c5d3622..e5f0efb 100644
--- a/Open-ILS/examples/oils_web.xml.example
+++ b/Open-ILS/examples/oils_web.xml.example
@@ -9,8 +9,24 @@
         files have the following filename extension -->
     <default_template_extension>tt2</default_template_extension>
 
-    <!-- media_prefix can be a remote server.  
-         E.g. <media_prefix>http://static.example.com/media</media_prefix> -->
+    <!-- Media Prefix.  Allows static files to be served from an alternate domain/server
+
+            Examples:
+
+                # local URL path
+                <media_prefix>/media</media_prefix> 
+
+                # server w/ path.  
+                <media_prefix>static.example.com/media</media_prefix> 
+
+                ===
+                In the first 2 examples, the request protocol (http vs https) will
+                match the protocol of the current page
+                ===
+
+                # full-qualified with static protocol
+                <media_prefix>http://static.example.com/media</media_prefix> 
+     -->
     <media_prefix/>
 
     <!-- If set to true, all output will be parsed as XML before delivery to the client.  
diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
index 18afc95..634797d 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -187,6 +187,7 @@ sub load_login {
             -cookie => $cgi->cookie(
                 -name => 'ses',
                 -path => '/',
+                -secure => 1,
                 -value => $response->{payload}->{authtoken},
                 -expires => CORE::time + $response->{payload}->{authtime}
             )
diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
index 50de099..3929285 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
@@ -120,6 +120,14 @@ sub load_context {
         parse_accept_lang($r->headers_in->get('Accept-Language')) || 'en-US';
     $r->log->debug('skin = ' . $ctx->{skin} . ' : theme = ' . 
         $ctx->{theme} . ' : locale = ' . $ctx->{locale});
+
+    my $mprefix = $ctx->{media_prefix};
+    if($mprefix !~ /^http/ and $mprefix !~ /^\//) {
+        # if a hostname is provided /w no protocol, match the protocol to the current page
+        $ctx->{media_prefix} = ($cgi->https) ? "https://$mprefix" : "http://$mprefix";
+    }
+
+
     return $ctx;
 }
 
diff --git a/Open-ILS/web/templates/default/opac/rdetail.tt2 b/Open-ILS/web/templates/default/opac/rdetail.tt2
index a4966fd..f32bd49 100644
--- a/Open-ILS/web/templates/default/opac/rdetail.tt2
+++ b/Open-ILS/web/templates/default/opac/rdetail.tt2
@@ -22,7 +22,9 @@
     <table id='record_table' style='width:auto'>
         <tr>
             <td rowspan='10' style='width:55px; vertical-align:top; padding-right:4px;'>
-                <img width='50' height='70' src='/opac/extras/ac/jacket/small/[% attrs.isbn_clean || attrs.upc %]'/>
+                [% IF attrs.isbn_clean || attrs.upc %]
+                <img width='50' height='70' src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% attrs.isbn_clean || attrs.upc %]'/>
+                [% END %]
             </td>
         </tr>
         [% IF attrs.title %]<tr><td>Title</td><td>[% attrs.title %]</td></tr>[% END %]
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
index 8704eeb..f862973 100644
--- a/Open-ILS/web/templates/default/opac/results.tt2
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -81,7 +81,7 @@
                 <tr>
                     <td style='width:52px;height:72px'>
                         [% IF attrs.isbn %]
-                        <img width='50' height='70' src='/opac/extras/ac/jacket/small/[% attrs.isbn_clean || attrs.upc %]'/>
+                        <img width='50' height='70' src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% attrs.isbn_clean || attrs.upc %]'/>
                         [% END %]
                     </td>
                     <td width='auto'>

commit e86d0dcfa3552f469fdbb3b7d5af742e2a092b1b
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Jan 18 10:37:07 2011 -0500

    added sample cache-killer for tt opac for development purposes

diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf
index 1c4ec45..bdb7721 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf
+++ b/Open-ILS/examples/apache/eg_vhost.conf
@@ -560,6 +560,10 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
 </Location>
 <Location /eg/opac>
     PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
+#    Disable caching for development..
+#    Header set Expires "Thu, 19 Nov 1981 08:52:00 GM"
+#    Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
+#    Header set Pragma "no-cache"
 </Location>
 
 # Note: the template processor will decline handling anything it does not

commit cd7d9592cc7aab99968defbfe3b5fc8b9106e1ac
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Jan 18 10:34:12 2011 -0500

    added the default config options for running the tt opac.  only the eg_vhost change is needed

diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf
index 033504f..1c4ec45 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf
+++ b/Open-ILS/examples/apache/eg_vhost.conf
@@ -547,7 +547,21 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
     Options +ExecCGI
     PerlSendHeader On
     allow from all
+    <IfModule mod_deflate.c>
+        SetOutputFilter DEFLATE
+        BrowserMatch ^Mozilla/4 gzip-only-text/html
+        BrowserMatch ^Mozilla/4\.0[678] no-gzip
+        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
+        SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
+        <IfModule mod_headers.c>
+            Header append Vary User-Agent env=!dont-vary
+        </IfModule>
+    </IfModule>
+</Location>
+<Location /eg/opac>
+    PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
 </Location>
+
 # Note: the template processor will decline handling anything it does not
 # have an explicit configuration for, which means it will fall back to 
 # Apache to serve the file.  However, in the interest of speed, go ahead 
diff --git a/Open-ILS/examples/oils_web.xml.example b/Open-ILS/examples/oils_web.xml.example
index 60f1573..c5d3622 100644
--- a/Open-ILS/examples/oils_web.xml.example
+++ b/Open-ILS/examples/oils_web.xml.example
@@ -18,6 +18,9 @@
         XML parsing adds overhead, so this should only be used for debugging -->
     <force_valid_xml>false</force_valid_xml>
 
+    <!-- Turn on template-toolkit debugging, which reports on undefined blocks, macros, etc. -->
+    <debug_template>false</debug_template>
+
     <!-- Where templates can be found.  Paths will be checked in the order entered here.
          It's possible to override individual or sets of templates by putting them into
          a path in front of the default template path -->

commit 93cc378ec835e778dbc90fa04f150368e38e5afd
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Jan 18 09:59:16 2011 -0500

    Proof of concept Template-Toolkit OPAC

diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
new file mode 100644
index 0000000..18afc95
--- /dev/null
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
@@ -0,0 +1,405 @@
+package OpenILS::WWW::EGCatLoader;
+use strict; use warnings;
+use CGI;
+use XML::LibXML;
+use Digest::MD5 qw(md5_hex);
+use Apache2::Const -compile => qw(OK DECLINED HTTP_INTERNAL_SERVER_ERROR REDIRECT);
+use OpenSRF::AppSession;
+use OpenSRF::Utils::Logger qw/$logger/;
+use OpenILS::Application::AppUtils;
+use OpenILS::Utils::CStoreEditor qw/:funcs/;
+use OpenILS::Utils::Fieldmapper;
+my $U = 'OpenILS::Application::AppUtils';
+
+sub new {
+    my($class, $apache, $ctx) = @_;
+
+    my $self = bless({}, ref($class) || $class);
+
+    $self->apache($apache);
+    $self->ctx($ctx);
+    $self->cgi(CGI->new);
+
+    OpenILS::Utils::CStoreEditor->init; # just in case
+    $self->editor(new_editor());
+
+    return $self;
+}
+
+
+# current Apache2::RequestRec;
+sub apache {
+    my($self, $apache) = @_;
+    $self->{apache} = $apache if $apache;
+    return $self->{apache};
+}
+
+# runtime context
+sub ctx {
+    my($self, $ctx) = @_;
+    $self->{ctx} = $ctx if $ctx;
+    return $self->{ctx};
+}
+
+# cstore editor
+sub editor {
+    my($self, $editor) = @_;
+    $self->{editor} = $editor if $editor;
+    return $self->{editor};
+}
+
+# CGI handle
+sub cgi {
+    my($self, $cgi) = @_;
+    $self->{cgi} = $cgi if $cgi;
+    return $self->{cgi};
+}
+
+
+# load common data, then load page data
+sub load {
+    my $self = shift;
+
+    my $path = $self->apache->path_info;
+    $self->load_helpers;
+
+    my $stat = $self->load_common;
+    return $stat unless $stat == Apache2::Const::OK;
+
+    return $self->load_home if $path =~ /opac\/home/;
+    return $self->load_login if $path =~ /opac\/login/;
+    return $self->load_logout if $path =~ /opac\/logout/;
+    return $self->load_rresults if $path =~ /opac\/results/;
+    return $self->load_rdetail if $path =~ /opac\/rdetail/;
+    return $self->load_myopac if $path =~ /opac\/myopac/;
+    return $self->load_place_hold if $path =~ /opac\/place_hold/;
+
+    return Apache2::Const::OK;
+}
+
+# general purpose utility functions added to the environment
+# context additions: 
+#   find_org_unit : function(id) => aou object
+#   org_tree : function(id) => aou object, top of tree, fleshed
+my $cached_org_tree;
+my %org_unit_map;
+sub load_helpers {
+    my $self = shift;
+
+    # pull the org unit from the cached org tree
+    $self->ctx->{find_org_unit} = sub {
+        my $org_id = shift;
+        return undef unless defined $org_id;
+        return $org_unit_map{$org_id} if defined $org_unit_map{$org_id};
+        my $tree = shift || $self->ctx->{org_tree}->();
+        return $org_unit_map{$org_id} = $tree if $tree->id == $org_id;
+        for my $child (@{$tree->children}) {
+            my $node = $self->ctx->{find_org_unit}->($org_id, $child);
+            return $node if $node;
+        }
+        return undef;
+    };
+
+    $self->ctx->{org_tree} = sub {
+        unless($cached_org_tree) {
+            $cached_org_tree = $self->editor->search_actor_org_unit([
+			    {   parent_ou => undef},
+			    {   flesh            => -1,
+				    flesh_fields    => {aou =>  ['children', 'ou_type']},
+				    order_by        => {aou => 'name'}
+			    }
+		    ])->[0];
+        }
+        return $cached_org_tree;
+    }
+}
+
+# context additions: 
+#   authtoken : string
+#   user : au object
+#   user_status : hash of user circ numbers
+sub load_common {
+    my $self = shift;
+
+    my $e = $self->editor;
+    my $ctx = $self->ctx;
+
+    if($e->authtoken($self->cgi->cookie('ses'))) {
+
+        if($e->checkauth) {
+
+            $ctx->{authtoken} = $e->authtoken;
+            $ctx->{user} = $e->requestor;
+            $ctx->{user_stats} = $U->simplereq(
+                'open-ils.actor', 
+                'open-ils.actor.user.opac.vital_stats', 
+                $e->authtoken, $e->requestor->id);
+
+        } else {
+
+            return $self->load_logout;
+        }
+    }
+
+    return Apache2::Const::OK;
+}
+
+sub load_home {
+    my $self = shift;
+    $self->ctx->{page} = 'home';
+    return Apache2::Const::OK;
+}
+
+
+sub load_login {
+    my $self = shift;
+    my $cgi = $self->cgi;
+
+    $self->ctx->{page} = 'login';
+
+    my $username = $cgi->param('username');
+    my $password = $cgi->param('password');
+
+    return Apache2::Const::OK unless $username and $password;
+
+	my $seed = $U->simplereq(
+        'open-ils.auth', 
+		'open-ils.auth.authenticate.init',
+        $username);
+
+	my $response = $U->simplereq(
+        'open-ils.auth', 
+		'open-ils.auth.authenticate.complete', 
+		{	username => $username, 
+			password => md5_hex($seed . md5_hex($password)), 
+			type => 'opac' 
+        }
+    );
+
+    # XXX check event, redirect as necessary
+
+    my $home = $self->apache->unparsed_uri;
+    $home =~ s/\/login/\/home/;
+
+    $self->apache->print(
+        $cgi->redirect(
+            -url => $cgi->param('origin') || $home,
+            -cookie => $cgi->cookie(
+                -name => 'ses',
+                -path => '/',
+                -value => $response->{payload}->{authtoken},
+                -expires => CORE::time + $response->{payload}->{authtime}
+            )
+        )
+    );
+
+    return Apache2::Const::REDIRECT;
+}
+
+sub load_logout {
+    my $self = shift;
+
+    my $path = $self->apache->uri;
+    $path =~ s/(\/[^\/]+$)/\/home/;
+    my $url = 'http://' . $self->apache->hostname . "$path";
+
+    $self->apache->print(
+        $self->cgi->redirect(
+            -url => $url,
+            -cookie => $self->cgi->cookie(
+                -name => 'ses',
+                -path => '/',
+                -value => '',
+                -expires => '-1h'
+            )
+        )
+    );
+
+    return Apache2::Const::REDIRECT;
+}
+
+# context additions: 
+#   page_size
+#   hit_count
+#   records : list of bre's and copy-count objects
+my $cmf_cache;
+my $cmc_cache;
+sub load_rresults {
+    my $self = shift;
+
+    my $cgi = $self->cgi;
+    my $ctx = $self->ctx;
+    my $e = $self->editor;
+
+    $ctx->{page} = 'rresult';
+
+    unless($cmf_cache) {
+        $cmf_cache = $e->search_config_metabib_field({id => {'!=' => undef}});
+        $cmc_cache = $e->search_config_metabib_class({name => {'!=' => undef}});
+        $ctx->{metabib_field} = $cmf_cache;
+        $ctx->{metabib_class} = $cmc_cache;
+    }
+
+
+    my $page = $cgi->param('page') || 0;
+    my $query = $cgi->param('query');
+    my $limit = $cgi->param('limit') || 10; # XXX user settings
+
+    my $args = {limit => $limit, offset => $page * $limit}; 
+    my $results = $U->simplereq('open-ils.search',
+        'open-ils.search.biblio.multiclass.query.staff', $args, $query, 1);
+
+    my $search = OpenSRF::AppSession->create('open-ils.search');
+    my $facet_req = $search->request('open-ils.search.facet_cache.retrieve', $results->{facet_key}, 10);
+
+    my $rec_ids = [map { $_->[0] } @{$results->{ids}}];
+
+    $ctx->{page_size} = $limit;
+    $ctx->{hit_count} = $results->{count};
+    
+    my $cstore1 = OpenSRF::AppSession->create('open-ils.cstore');
+
+    my $bre_req = $cstore1->request(
+        'open-ils.cstore.direct.biblio.record_entry.search', {id => $rec_ids});
+
+    my @data;
+    while(my $resp = $bre_req->recv) {
+        my $bre = $resp->content; 
+
+        my $copy_counts = $e->json_query(
+            {from => ['asset.record_copy_count', 1, $bre->id, 0]})->[0];
+
+        push(@data,
+            {
+                bre => $bre,
+                marc_xml => XML::LibXML->new->parse_string($bre->marc),
+                copy_counts => $copy_counts
+            }
+        );
+    }
+
+    $cstore1->kill_me;
+
+    # shove recs into context in search results order
+    $ctx->{records} = [];
+    for my $rec_id (@$rec_ids) { 
+        push(
+            @{$ctx->{records}},
+            grep { $_->{bre}->id == $rec_id } @data
+        );
+    }
+
+    my $facets = $facet_req->gather(1);
+
+    for my $cmf_id (keys %$facets) {  # quick-n-dirty
+        my ($cmf) = grep { $_->id eq $cmf_id } @$cmf_cache;
+        $facets->{$cmf->label} = $facets->{$cmf_id};
+        delete $facets->{$cmf_id};
+    }
+    $ctx->{search_facets} = $facets;
+
+    return Apache2::Const::OK;
+}
+
+# context additions: 
+#   record : bre object
+sub load_rdetail {
+    my $self = shift;
+
+    $self->ctx->{record} = $self->editor->retrieve_biblio_record_entry([
+        $self->cgi->param('record'),
+        {
+            flesh => 2, 
+            flesh_fields => {
+                bre => ['call_numbers'],
+                acn => ['copies'] # limit, paging, etc.
+            }
+        }
+    ]);
+
+    $self->ctx->{marc_xml} = XML::LibXML->new->parse_string($self->ctx->{record}->marc);
+
+    return Apache2::Const::OK;
+}
+
+# context additions: 
+#   user : au object, fleshed
+sub load_myopac {
+    my $self = shift;
+
+    $self->ctx->{user} = $self->editor->retrieve_actor_user([
+        $self->ctx->{user}->id,
+        {
+            flesh => 1,
+            flesh_fields => {
+                au => ['card']
+                # ...
+            }
+        }
+    ]);
+
+    return Apache2::Const::OK;
+}
+
+# context additions: 
+sub load_place_hold {
+    my $self = shift;
+    my $ctx = $self->ctx;
+    my $e = $self->editor;
+
+    $ctx->{hold_target} = $self->cgi->param('hold_target');
+    $ctx->{hold_type} = $self->cgi->param('hold_type');
+    $ctx->{default_pickup_lib} = $e->requestor->home_ou; # XXX staff
+
+    if($ctx->{hold_type} eq 'T') {
+        $ctx->{record} = $e->retrieve_biblio_record_entry($ctx->{hold_target});
+    }
+    # ...
+
+    $ctx->{marc_xml} = XML::LibXML->new->parse_string($ctx->{record}->marc);
+
+    if(my $pickup_lib = $self->cgi->param('pickup_lib')) {
+
+        my $args = {
+            patronid => $e->requestor->id,
+            titleid => $ctx->{hold_target}, # XXX
+            pickup_lib => $pickup_lib,
+            depth => 0, # XXX
+        };
+
+        my $allowed = $U->simplereq(
+            'open-ils.circ',
+            'open-ils.circ.title_hold.is_possible',
+            $e->authtoken, $args
+        );
+
+        if($allowed->{success} == 1) {
+            my $hold = Fieldmapper::action::hold_request->new;
+
+            $hold->pickup_lib($pickup_lib);
+            $hold->requestor($e->requestor->id);
+            $hold->usr($e->requestor->id); # XXX staff
+            $hold->target($ctx->{hold_target});
+            $hold->hold_type($ctx->{hold_type});
+            # frozen, expired, etc..
+
+            my $stat = $U->simplereq(
+                'open-ils.circ',
+                'open-ils.circ.holds.create',
+                $e->authtoken, $hold
+            );
+
+            if($stat and $stat > 0) {
+                $ctx->{hold_success} = 1;
+            } else {
+                $ctx->{hold_failed} = 1; # XXX process the events, etc
+            }
+        }
+
+        # place the hold and deliver results
+    }
+
+    return Apache2::Const::OK;
+}
+
+1;
diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
index 42eb6ff..50de099 100644
--- a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
+++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm
@@ -7,6 +7,7 @@ use File::stat;
 use Apache2::Const -compile => qw(OK DECLINED HTTP_INTERNAL_SERVER_ERROR);
 use Apache2::Log;
 use OpenSRF::EX qw(:try);
+use OpenILS::Utils::CStoreEditor;
 
 use constant OILS_HTTP_COOKIE_SKIN => 'oils:skin';
 use constant OILS_HTTP_COOKIE_THEME => 'oils:theme';
@@ -32,16 +33,21 @@ sub handler {
     check_web_config($r); # option to disable this
     my $ctx = load_context($r);
     my $base = $ctx->{base_path};
+
+    $r->content_type('text/html; encoding=utf8');
+    my $stat = run_context_loader($r, $ctx);
+    return $stat unless $stat == Apache2::Const::OK;
+
     my($template, $page_args, $as_xml) = find_template($r, $base, $ctx);
     return Apache2::Const::DECLINED unless $template;
 
     $template = $ctx->{skin} . "/$template";
     $ctx->{page_args} = $page_args;
-    $r->content_type('text/html; encoding=utf8');
 
     my $tt = Template->new({
         OUTPUT => ($as_xml) ?  sub { parse_as_xml($r, $ctx, @_); } : $r,
         INCLUDE_PATH => $ctx->{template_paths},
+        DEBUG => $ctx->{debug_template}
     });
 
     unless($tt->process($template, {ctx => $ctx})) {
@@ -52,6 +58,30 @@ sub handler {
     return Apache2::Const::OK;
 }
 
+
+sub run_context_loader {
+    my $r = shift;
+    my $ctx = shift;
+
+    my $stat = Apache2::Const::OK;
+
+    my $loader = $r->dir_config('OILSWebContextLoader');
+    return $stat unless $loader;
+
+    eval {
+        $loader->use;
+        $stat = $loader->new($r, $ctx)->load;
+    };
+
+    if($@) {
+        $r->log->error("Context Loader error: $@");
+        return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+    }
+
+    $r->log->warn("context loader resulted in status $stat");
+    return $stat;
+}
+
 sub parse_as_xml {
     my $r = shift;
     my $ctx = shift;
@@ -65,7 +95,7 @@ sub parse_as_xml {
         $data = $ctx->{final_dtd} . "\n" . $data;
         $success = 1;
     } otherwise {
-	my $e = shift;
+	    my $e = shift;
         my $err = "Invalid XML: $e";
         $r->log->error($err);
         $r->content_type('text/plain; encoding=utf8');
@@ -79,7 +109,8 @@ sub parse_as_xml {
 sub load_context {
     my $r = shift;
     my $cgi = CGI->new;
-    my $ctx = $web_config->{ctx};
+    my $ctx = {}; # new context for each page load
+    $ctx->{$_} = $web_config->{base_ctx}->{$_} for keys %{$web_config->{base_ctx}};
     $ctx->{hostname} = $r->hostname;
     $ctx->{base_url} = $cgi->url(-base => 1);
     $ctx->{skin} = $cgi->cookie(OILS_HTTP_COOKIE_SKIN) || 'default';
@@ -192,6 +223,7 @@ sub parse_config {
     $ctx->{base_path} = (ref $data->{base_path}) ? '' : $data->{base_path};
     $ctx->{template_paths} = [];
     $ctx->{force_valid_xml} = ($data->{force_valid_xml} =~ /true/io) ? 1 : 0;
+    $ctx->{debug_template} = ($data->{debug_template} =~ /true/io) ? 1 : 0;
     $ctx->{default_template_extension} = $data->{default_template_extension} || 'tt2';
     $ctx->{web_dir} = $data->{web_dir};
 
@@ -217,7 +249,7 @@ sub parse_config {
         }
     }
 
-    return {ctx => $ctx, handlers => $handlers};
+    return {base_ctx => $ctx, handlers => $handlers};
 }
 
 package PathConfig;
diff --git a/Open-ILS/web/templates/default/opac/base.tt2 b/Open-ILS/web/templates/default/opac/base.tt2
new file mode 100644
index 0000000..6d54607
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/base.tt2
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.locale %]' xml:lang='[% ctx.locale %]'>
+    <head>
+        <title>[% ctx.page_title %]</title>
+        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+        [% BLOCK html_head; END; # provide a default that can be overridden %]
+        [% PROCESS html_head %]
+    </head>
+    <body>
+        [% content %] 
+    </body>
+</html>
diff --git a/Open-ILS/web/templates/default/opac/common.tt2 b/Open-ILS/web/templates/default/opac/common.tt2
new file mode 100644
index 0000000..0500725
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/common.tt2
@@ -0,0 +1,27 @@
+[% 
+    # Org Unit Selector Widget : 
+    #   PROCESS build_org_selector id='selector-id' name='selector-name'
+    BLOCK build_org_selector;
+        first_run = 0;
+        IF !org_unit;
+            org_unit = ctx.org_tree;
+            first_run = 1;
+%]
+    <select id='[% id %]' name='[% name %]'>
+    [% END %]
+        <option value='[% org_unit.id %]' [% IF org_unit.id == value %] selected='selected' [% END %]>
+            [% 
+                pad = org_unit.ou_type.depth * 4;
+                FOR idx IN [0..pad]; '&nbsp;'; END;
+                org_unit.name;
+            %]
+        </option>
+        [% FOR child IN org_unit.children; PROCESS build_org_selector org_unit = child; END %]
+    [% IF first_run %]
+    </select>
+    [% END %]
+[% END %]
+
+[% PROCESS 'default/opac/marc_attrs.tt2' %]
+
+
diff --git a/Open-ILS/web/templates/default/opac/home.tt2 b/Open-ILS/web/templates/default/opac/home.tt2
new file mode 100644
index 0000000..d1c2e05
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/home.tt2
@@ -0,0 +1,22 @@
+[% ctx.page_title = "Home" %]
+
+[% BLOCK html_head %]
+<style>
+    #home_div { text-align: center; width: 100%; margin-top: 30px;}
+</style>
+[% END %]
+
+[% WRAPPER "default/opac/base.tt2" %]
+
+<div id='home_div'>
+    <img src='/images/eg_logo.jpg'/>
+    <br/><br/>
+    <form action='./results' method='GET'>
+        <input type='text' name='query' value='[% query %]'/>
+        <input type='submit'/>
+        <input type='hidden' name='page' value='0'/>
+    </form>
+</div>
+
+
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/login.tt2 b/Open-ILS/web/templates/default/opac/login.tt2
new file mode 100644
index 0000000..a6e8b14
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/login.tt2
@@ -0,0 +1,32 @@
+[% BLOCK html_head %]
+<style>
+</style>
+[% END %]
+
+[% 
+    USE CGI;
+    WRAPPER "default/opac/base.tt2"; 
+    ctx.page_title = "Login";
+%]
+
+<div style='width:400px; text-align:center; border: 1px solid #888'>
+    <form method='POST'>
+        <table>
+            <tr>
+                <td>Username or Barcode</td>
+                <td><input name='username' type='text'/></td>
+            </tr>
+            <tr>
+                <td>Password</td>
+                <td><input name='password' type='password'/></td>
+            </tr>
+            <tr>
+                <td colspan='2' style='text-align:center'>
+                    <input type='submit'/>
+                </td>
+            </tr>
+        </table>
+        <input type='hidden' name='origin' value='[% CGI.param('origin') %]'/>
+    </form>
+</div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/marc_attrs.tt2 b/Open-ILS/web/templates/default/opac/marc_attrs.tt2
new file mode 100644
index 0000000..9cdad34
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/marc_attrs.tt2
@@ -0,0 +1,17 @@
+[% 
+    # Extract MARC fields from XML
+    #   get_marc_attrs( { marc_xml => doc } )
+    BLOCK get_marc_attrs;
+        xml = args.marc_xml;
+        args.isbn = xml.findnodes('//*[@tag="020"]/*[@code="a"]').textContent;
+        args.upc = xml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
+        args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
+        args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
+        args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
+        args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
+        args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
+
+        # clean up the ISBN
+        args.isbn_clean = args.isbn.replace('\ .*', '');
+    END;
+%]
diff --git a/Open-ILS/web/templates/default/opac/myopac.tt2 b/Open-ILS/web/templates/default/opac/myopac.tt2
new file mode 100644
index 0000000..fc8c74c
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/myopac.tt2
@@ -0,0 +1,44 @@
+[% BLOCK html_head %]
+<style>
+    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
+    table { border-collapse: collapse; }
+    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
+    table tr:nth-child(odd) { background-color:#ded; }
+</style>
+[% END %]
+
+[% 
+    WRAPPER "default/opac/base.tt2"; 
+    ctx.page_title = "My Account";
+%]
+
+<table>
+    <tr>
+        <td>First Name</td>
+        <td>[% ctx.user.first_given_name %]</td>
+    </tr>
+    <tr>
+        <td>Middle Name</td>
+        <td>[% ctx.user.second_given_name %]</td>
+    </tr>
+    <tr>
+        <td>Last Name</td>
+        <td>[% ctx.user.family_name %]</td>
+    </tr>
+    <tr>
+        <td>Library Card</td>
+        <td>[% ctx.user.card.barcode %]</td>
+    </tr>
+    <tr>
+        <td>Email Address</td>
+        <td>[% ctx.user.email %]</td>
+    </tr>
+    <tr>
+        <td>Phone</td>
+        <td>[% ctx.user.day_phone %]</td>
+    </tr>
+</table>
+
+
+
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/place_hold.tt2 b/Open-ILS/web/templates/default/opac/place_hold.tt2
new file mode 100644
index 0000000..b92315b
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/place_hold.tt2
@@ -0,0 +1,32 @@
+[% BLOCK html_head %]
+<style>
+</style>
+[% END %]
+
+[% 
+    USE CGI;
+    PROCESS "default/opac/common.tt2";
+    WRAPPER "default/opac/base.tt2"; 
+    ctx.page_title = "Place Hold";
+    attrs = {marc_xml => ctx.marc_xml};
+    PROCESS get_marc_attrs args=attrs;
+%]
+
+
+<div>
+    <div>Placing hold on [% attrs.title %], by [% attrs.author %]</div>
+    [% IF ctx.hold_success %] 
+        <div>Succeeded</div>
+    [% ELSIF ctx.hold_failed %]
+        <div>Failed...</div>
+    [% ELSE %]
+    <form action='place_hold' method='POST'>
+        Choose a pickup Library [% PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib %]
+        <input type='Submit'/>
+        <input type='hidden' name='hold_target' value='[% CGI.param('hold_target') %]'/>
+        <input type='hidden' name='hold_type' value='[% CGI.param('hold_type') %]'/>
+    </form>
+    [% END %]
+</div>
+
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/rdetail.tt2 b/Open-ILS/web/templates/default/opac/rdetail.tt2
new file mode 100644
index 0000000..a4966fd
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/rdetail.tt2
@@ -0,0 +1,80 @@
+[% BLOCK html_head %]
+<style>
+    table { width: 100%; padding: 20px; margin-top: 30px; }
+    table { border-collapse: collapse; }
+    table td { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
+    table th { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
+    table tr:nth-child(even) { background-color:#ded; }
+    #record_table td { padding-left: 15px; padding-right: 15px; }
+</style>
+[% END %]
+
+[% 
+    WRAPPER "default/opac/base.tt2"; 
+    PROCESS "default/opac/common.tt2";
+    ctx.page_title = "Details";
+    record = ctx.record;
+    attrs = {marc_xml => ctx.marc_xml};
+    PROCESS get_marc_attrs args=attrs;
+%]
+
+<div id='detail_div'>
+    <table id='record_table' style='width:auto'>
+        <tr>
+            <td rowspan='10' style='width:55px; vertical-align:top; padding-right:4px;'>
+                <img width='50' height='70' src='/opac/extras/ac/jacket/small/[% attrs.isbn_clean || attrs.upc %]'/>
+            </td>
+        </tr>
+        [% IF attrs.title %]<tr><td>Title</td><td>[% attrs.title %]</td></tr>[% END %]
+        [% IF attrs.author %]<tr><td>Author</td><td><a href='results?query=au:[% attrs.author | uri %]'>[% attrs.author %]</a></td></tr>[% END %]
+        [% IF attrs.isbn %]<tr><td>ISBN</td><td>[% attrs.isbn %]</td></tr>[% END %]
+        [% IF attrs.issn %]<tr><td>ISSN</td><td>[% attrs.issn %]</td></tr>[% END %]
+        [% IF attrs.upc %]<tr><td>UPC</td><td>[% attrs.upc %]</td></tr>[% END %]
+        [% IF attrs.pubdate %]<tr><td>Publication Date</td><td>[% attrs.pubdate %]</td></tr>[% END %]
+        [% IF attrs.publisher %]<tr><td>Publishere</td><td>[% attrs.publisher %]</td></tr>[% END %]
+        <tr>
+            <td>Subjects</td>
+            <td>
+            [% FOR node IN marc_xml.findnodes('//*[@tag="650"]') %]
+                [% 
+                    s0 = node.childNodes.0.textContent;
+                    s1 = node.childNodes.1.textContent;
+                %]
+                [% IF s0 %]
+                    <a href='results?query=su:[% s0 | url %]'>[% s0 %]</a>
+                    [% IF s1 %]
+                    <span>--</span>
+                    <a href='results?query=su:[% s1 | url %]'>[% s1 %]</a>
+                    [% END %]
+                    <br/>
+                [% END %]
+            [% END %]
+            </td>
+        </tr>
+    </table>
+    <table id='copy_table'>
+        <thead>
+            <tr>
+                <th>Owning Lib</th>
+                <th>Call Number</th>
+                <th>Barcode</th>
+                <th>Status</th>
+            </tr>
+        </thead>
+        <tbody>
+        [% FOR acn IN record.call_numbers %]
+            [% FOR acp IN acn.copies %]
+                <tr>
+                    <td>[% ctx.find_org_unit(acn.owning_lib).shortname %]</td>
+                    <td>[% acn.label %]</td>
+                    <td>[% acp.barcode %]</td>
+                    <td>[% acp.status %]</td>
+                </tr>
+            [% END %]
+        [% END %]
+        </tbody>
+    </table>
+</div>
+
+
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/records.tt2 b/Open-ILS/web/templates/default/opac/records.tt2
new file mode 100644
index 0000000..7d53268
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/records.tt2
@@ -0,0 +1,31 @@
+[% WRAPPER "default/opac/base.tt2" %]
+[% ctx.page_title = "Results" %]
+[% page = ctx.cgi.param('page') || 0; %]
+<a href='?page=[% page - 1 %]'>Prev</a>  <a href='?page=[% page + 1 %]'>Next</a>
+<br/>
+
+<table>
+[%
+    e = ctx.editor;
+    idx = 0;
+    WHILE idx < 10;
+        id = idx + page * 10;
+        attrs = e.search_acq_lineitem_attr({lineitem => id});
+        isbn = '';
+        FOR attr IN attrs; 
+            IF attr.attr_name == 'isbn';
+                isbn = attr.attr_value;
+                LAST;
+            END;
+        END;
+        idx = idx + 1;
+%]
+
+<tr>
+    <td><img width='65' height='90' src='/opac/extras/ac/jacket/small/[% isbn %]'/></td>
+    <td>[% FOR attr IN attrs; attr.attr_value _ ' / '; END; %]</td>
+</tr>
+
+    [% END %]
+</table>
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2
new file mode 100644
index 0000000..8704eeb
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/results.tt2
@@ -0,0 +1,102 @@
+[% BLOCK html_head %]
+<style>
+    #body_table { width: 100%; margin-top: 20px; }
+    #left_block { width: 15%; vertical-align: top; }
+    #right_block { width: auto; vertical-align: top;}
+    #record_table { border-collapse: collapse; width:100%; }
+    #record_table td { padding: 3px; border-bottom: 1px solid #ddd; }
+    #record_table tr:nth-child(odd) { background-color:#ded; }
+    #form_div { text-align: center; width: 100%; margin-top: 10px;}
+    #links_div { margin-bottom: 10px; padding: 5px;}
+</style>
+[% END %]
+
+[% 
+    USE CGI;
+    USE POSIX;
+    WRAPPER "default/opac/base.tt2"; 
+    PROCESS "default/opac/common.tt2";
+    ctx.page_title = "Results";
+    page = CGI.param('page') || 0; 
+    query = CGI.param('query');
+    page_count = POSIX.ceil(ctx.hit_count / ctx.page_size);
+%]
+
+<div id='form_div'>
+    <form action='./results' method='GET'>
+        <input type='text' name='query' size='50' value='[% query %]'/>
+        <input type='submit'/>
+        <input type='hidden' name='page' value='0'/>
+    </form>
+</div>
+
+<table id='body_table'>
+    <tr>
+        <td id='left_block'>
+                [% IF ctx.user; %]
+                    <div id='links_div'>
+                        <div><a href='home'>Home</a></div>
+                        <div><a href='myopac'>Account</a></div>
+                        <div><a href='logout'>Logout</a></div>
+                    </div>
+                    <hr/>
+                    <table>
+                        <tr><td colspan='2' style='border-bottom:1px solid #9A9'>Signed in as [% ctx.user.usrname %]</td></tr>
+                        <tr><td>Total Holds</td><td>[% ctx.user_stats.holds.total %]</td></tr>
+                        <tr><td>Ready Holds</td><td>[% ctx.user_stats.holds.ready %]</td></tr>
+                        <tr><td>Items Out</td><td>[% ctx.user_stats.checkouts.out %]</td></tr>
+                        <tr><td>Fines</td><td>$[% ctx.user_stats.fines.balance_owed %]</td></tr>
+                    </table>
+                [% ELSE %]
+                    [% 
+                        login = CGI.url("-path" => 1).replace('^http:', 'https:').replace('/results','/login');
+                        origin = CGI.url("-absolute" => 1, "-path" => 1, "-query" => 1) | uri 
+                    %]
+                    <a href='[% login _ '?origin=' _ origin %]'>Login</a>
+                [% END %]
+            </div>
+            <div>
+                [% FOR facet_type IN ctx.search_facets.keys %]
+                    <b>[% facet_type %]</b>
+                    <ul>
+                        [% FOR facet IN ctx.search_facets.$facet_type.keys %]
+                            <li>[% facet %] / [% ctx.search_facets.$facet_type.$facet %]</li>
+                        [% END %]
+                    </ul>
+                [% END %]
+            </div>
+        </td>
+        <td id='right_block'>
+            <div>
+                <span>Hits: [% ctx.hit_count %] / Page [% page + 1 %] of [% page_count %]</span>
+                <a [% IF page > 0 %] href='?page=[% page - 1 %]&query=[% query | uri %]' [% END %]>Prev</a>  
+                <a [% IF (page + 1) < page_count %] href='?page=[% page + 1 %]&query=[% query | uri %]' [% END %]>Next</a>
+            </div>
+            <table id='record_table'>
+                [%
+                FOR rec IN ctx.records;
+                    attrs = {marc_xml => rec.marc_xml};
+                    PROCESS get_marc_attrs args=attrs;
+                %]
+                <tr>
+                    <td style='width:52px;height:72px'>
+                        [% IF attrs.isbn %]
+                        <img width='50' height='70' src='/opac/extras/ac/jacket/small/[% attrs.isbn_clean || attrs.upc %]'/>
+                        [% END %]
+                    </td>
+                    <td width='auto'>
+                        <div>
+                            <a href='rdetail?record=[% rec.bre.id %]'>[% attrs.title %]</a>
+                            <span style='padding-left:10px;'>[% rec.copy_counts.available %] / [% rec.copy_counts.visible %]</span>
+                        </div>
+                        <div>[% attrs.author %]</div>
+                        <div>[% attrs.isbn || attrs.issn || attrs.upc %] [% attrs.publisher %] [% attrs.pubdate %]</div>
+                    </td>
+                </tr>
+                [% END %]
+            </table>
+        </td>
+    </tr>
+
+</table>
+[% END %]
diff --git a/Open-ILS/web/templates/default/opac/welcome.tt2 b/Open-ILS/web/templates/default/opac/welcome.tt2
new file mode 100644
index 0000000..85d19ac
--- /dev/null
+++ b/Open-ILS/web/templates/default/opac/welcome.tt2
@@ -0,0 +1,27 @@
+<div style='position:absolute; top:0px; right:0px; border-left:1px solid #9A9; border-bottom:1px solid #9A9; padding: 10px; background:#ded'>
+    [% IF ctx.user; %]
+        <table>
+            <tr>
+                <td colspan='2' style='border-bottom:1px solid #9A9'>Welcome, [% ctx.user.usrname %]!</td>
+            </tr>
+            <tr>
+                <td>Total Holds</td><td>[% ctx.user_stats.holds.total %]</td>
+            </tr>
+            <tr>
+                <td>Ready Holds</td><td>[% ctx.user_stats.holds.ready %]</td>
+            </tr>
+            <tr>
+                <td>Items Out</td><td>[% ctx.user_stats.checkouts.out %]</td>
+            </tr>
+            <tr>
+                <td>Fines</td><td>$[% ctx.user_stats.fines.balance_owed %]</td>
+            </tr>
+            <tr>
+                <td><a href='logout'>Logout</a></td>
+                <td><a href='myopac'>Account</a></td>
+            </tr>
+        </table>
+    [% ELSE %]
+        <a href='[% ctx.base_url.replace('^http:', 'https:') _ ctx.base_path _ '/opac/login' %]'>Login</a>
+    [% END %]
+</div>

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/examples/apache/eg_vhost.conf             |   90 +-
 Open-ILS/examples/fm_IDL.xml                       |    2 +
 Open-ILS/examples/oils_web.xml.example             |   42 -
 Open-ILS/src/Makefile.am                           |    8 +-
 Open-ILS/src/extras/Makefile.install               |    2 +
 Open-ILS/src/perlmods/MANIFEST                     |    1 +
 .../src/perlmods/lib/OpenILS/Application/Actor.pm  |   50 +-
 .../perlmods/lib/OpenILS/Application/AppUtils.pm   |   56 +
 .../perlmods/lib/OpenILS/Application/Circ/Holds.pm |    6 +-
 .../src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm    |  351 +++++
 .../lib/OpenILS/WWW/EGCatLoader/Account.pm         | 1364 ++++++++++++++++++++
 .../lib/OpenILS/WWW/EGCatLoader/Container.pm       |  156 +++
 .../perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm |  280 ++++
 .../perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm |  375 ++++++
 .../perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm   |  250 ++++
 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm     |  303 +++--
 .../src/perlmods/lib/OpenILS/WWW/EGWeb/CGI_utf8.pm |   44 +
 .../perlmods/lib/OpenILS/WWW/EGWeb/I18NFilter.pm   |   12 +
 Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm  |  131 +-
 .../lib/Template/Plugin/ResolverResolver.pm        |   98 ++
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |   10 +-
 .../0621.data.opac_payment_history_age_limit.sql   |   17 +
 .../support-scripts/test-scripts/unapi_bench.pl    |  336 +++++
 .../templates}/acq/common/claim_dialog.tt2         |    0
 .../templates}/acq/common/final_claim_dialog.tt2   |    0
 .../default => src/templates}/acq/common/info.tt2  |    0
 .../templates}/acq/common/inv_dialog.tt2           |    0
 .../templates}/acq/common/jubgrid.tt2              |    0
 Open-ILS/src/templates/acq/common/li_table.tt2     |  473 +++++++
 .../templates}/acq/common/li_table_pager.tt2       |    0
 .../default => src/templates}/acq/common/notes.tt2 |    0
 Open-ILS/src/templates/acq/currency_type/list.tt2  |   35 +
 .../src/templates/acq/financial/claim_eligible.tt2 |   57 +
 Open-ILS/src/templates/acq/fund/list.tt2           |  162 +++
 Open-ILS/src/templates/acq/fund/view.tt2           |  257 ++++
 Open-ILS/src/templates/acq/funding_source/list.tt2 |   51 +
 Open-ILS/src/templates/acq/funding_source/view.tt2 |  173 +++
 Open-ILS/src/templates/acq/invoice/view.tt2        |  137 ++
 Open-ILS/src/templates/acq/lineitem/findbib.tt2    |   73 ++
 Open-ILS/src/templates/acq/lineitem/history.tt2    |   30 +
 Open-ILS/src/templates/acq/lineitem/related.tt2    |   71 +
 Open-ILS/src/templates/acq/lineitem/search.tt2     |  115 ++
 Open-ILS/src/templates/acq/lineitem/worksheet.tt2  |   11 +
 Open-ILS/src/templates/acq/picklist/bib_search.tt2 |   74 ++
 .../src/templates/acq/picklist/brief_record.tt2    |   35 +
 Open-ILS/src/templates/acq/picklist/from_bib.tt2   |   24 +
 Open-ILS/src/templates/acq/picklist/list.tt2       |  107 ++
 Open-ILS/src/templates/acq/picklist/upload.tt2     |   97 ++
 .../src/templates/acq/picklist/user_request.tt2    |   66 +
 Open-ILS/src/templates/acq/picklist/view.tt2       |   20 +
 Open-ILS/src/templates/acq/po/create.tt2           |    5 +
 Open-ILS/src/templates/acq/po/edi_messages.tt2     |   46 +
 Open-ILS/src/templates/acq/po/events.tt2           |   64 +
 Open-ILS/src/templates/acq/po/history.tt2          |   30 +
 .../templates}/acq/po/item_table.tt2               |    0
 Open-ILS/src/templates/acq/po/search.tt2           |  143 ++
 Open-ILS/src/templates/acq/po/view.tt2             |  138 ++
 Open-ILS/src/templates/acq/receiving/process.tt2   |   38 +
 Open-ILS/src/templates/acq/search/unified.tt2      |  246 ++++
 Open-ILS/src/templates/acq/settings/li_attr.tt2    |   74 ++
 Open-ILS/src/templates/actor/user/register.tt2     |   73 ++
 .../templates}/actor/user/register_table.tt2       |    0
 .../src/templates/actor/user/trigger_events.tt2    |   29 +
 Open-ILS/src/templates/base.tt2                    |   35 +
 Open-ILS/src/templates/booking/capture.tt2         |   21 +
 Open-ILS/src/templates/booking/pickup.tt2          |   78 ++
 Open-ILS/src/templates/booking/pull_list.tt2       |   49 +
 Open-ILS/src/templates/booking/reservation.tt2     |  122 ++
 Open-ILS/src/templates/booking/return.tt2          |   88 ++
 Open-ILS/src/templates/cat/authority/list.tt2      |   82 ++
 .../templates}/circ/selfcheck/audio_config.tt2     |    0
 .../templates}/circ/selfcheck/banner.tt2           |    0
 .../templates}/circ/selfcheck/circ_page.tt2        |    0
 .../templates}/circ/selfcheck/fines.tt2            |    0
 .../templates}/circ/selfcheck/holds_page.tt2       |    0
 Open-ILS/src/templates/circ/selfcheck/main.tt2     |   61 +
 .../templates}/circ/selfcheck/patron_login.tt2     |    0
 .../templates}/circ/selfcheck/payment.tt2          |    0
 .../templates}/circ/selfcheck/summary.tt2          |    0
 .../templates/conify/global/acq/cancel_reason.tt2  |   33 +
 .../conify/global/acq/claim_event_type.tt2         |   42 +
 .../templates/conify/global/acq/claim_policy.tt2   |   42 +
 .../conify/global/acq/claim_policy_action.tt2      |   35 +
 .../src/templates/conify/global/acq/claim_type.tt2 |   42 +
 .../conify/global/acq/distribution_formula.tt2     |  100 ++
 .../templates/conify/global/acq/edi_account.tt2    |   80 ++
 .../templates/conify/global/acq/exchange_rate.tt2  |   33 +
 .../src/templates/conify/global/acq/fund_tag.tt2   |   31 +
 .../conify/global/acq/invoice_item_type.tt2        |   28 +
 .../conify/global/acq/invoice_payment_method.tt2   |   28 +
 .../templates/conify/global/acq/lineitem_alert.tt2 |   32 +
 .../conify/global/acq/lineitem_marc_attr_def.tt2   |   33 +
 .../src/templates/conify/global/acq/provider.tt2   |  219 ++++
 .../src/templates/conify/global/action/survey.tt2  |   96 ++
 .../templates/conify/global/action/survey/edit.tt2 |   23 +
 .../global/action_trigger/event_definition.tt2     |  122 ++
 .../action_trigger/event_definition_data.tt2       |   88 ++
 .../conify/global/asset/copy_location_order.tt2    |   30 +
 .../conify/global/asset/copy_template.tt2          |   52 +
 .../conify/global/biblio/monograph_part.tt2        |   37 +
 .../templates/conify/global/booking/resource.tt2   |   70 +
 .../conify/global/booking/resource_attr.tt2        |   63 +
 .../conify/global/booking/resource_attr_map.tt2    |   63 +
 .../conify/global/booking/resource_attr_value.tt2  |   59 +
 .../conify/global/booking/resource_type.tt2        |   61 +
 .../conify/global/cat/authority/browse_axis.tt2    |   36 +
 .../authority/browse_axis_authority_field_map.tt2  |   71 +
 .../conify/global/cat/authority/control_set.tt2    |   88 ++
 .../cat/authority/control_set_authority_field.tt2  |  132 ++
 .../global/cat/authority/control_set_bib_field.tt2 |   71 +
 .../conify/global/cat/authority/thesaurus.tt2      |  100 ++
 .../templates/conify/global/config/acn_prefix.tt2  |   37 +
 .../templates/conify/global/config/acn_suffix.tt2  |   37 +
 .../conify/global/config/actor_sip_fields.tt2      |   28 +
 .../conify/global/config/asset_sip_fields.tt2      |   28 +
 .../conify/global/config/barcode_completion.tt2    |   26 +
 .../conify/global/config/billing_type.tt2          |   35 +
 .../global/config/circ_matrix_matchpoint.tt2       |   77 ++
 .../conify/global/config/circ_matrix_weights.tt2   |   28 +
 .../conify/global/config/circ_modifier.tt2         |   88 ++
 .../conify/global/config/coded_value_map.tt2       |   63 +
 .../templates/conify/global/config/global_flag.tt2 |   32 +
 .../conify/global/config/hard_due_date.tt2         |   80 ++
 .../conify/global/config/hard_due_date_values.tt2  |   73 ++
 .../global/config/hold_matrix_matchpoint.tt2       |   33 +
 .../conify/global/config/hold_matrix_weights.tt2   |   28 +
 .../conify/global/config/idl_field_doc.tt2         |   32 +
 .../conify/global/config/metabib_field.tt2         |   32 +
 .../conify/global/config/org_unit_setting_type.tt2 |   64 +
 .../global/config/record_attr_definition.tt2       |   35 +
 .../conify/global/config/rule_age_hold_protect.tt2 |   28 +
 .../conify/global/config/rule_circ_duration.tt2    |   28 +
 .../conify/global/config/rule_max_fine.tt2         |   28 +
 .../conify/global/config/rule_recurring_fine.tt2   |   28 +
 .../conify/global/config/standing_penalty.tt2      |   65 +
 .../conify/global/config/usr_setting_type.tt2      |   64 +
 .../conify/global/config/weight_assoc.tt2          |   28 +
 .../conify/global/config/z3950_source.tt2          |   28 +
 .../global/permission/grp_penalty_threshold.tt2    |   41 +
 .../templates/conify/global/vandelay/match_set.tt2 |   94 ++
 .../conify/global/vandelay/match_set_tree.tt2      |  150 +++
 .../templates/default => src/templates}/footer.tt2 |    0
 .../templates/default => src/templates}/header.tt2 |    0
 Open-ILS/{web => src}/templates/login.tt2          |    0
 .../templates/default => src/templates}/menu.tt2   |    0
 Open-ILS/src/templates/opac/advanced.tt2           |   30 +
 Open-ILS/src/templates/opac/cnbrowse.tt2           |   21 +
 Open-ILS/src/templates/opac/home.tt2               |   16 +
 Open-ILS/src/templates/opac/login.tt2              |   27 +
 Open-ILS/src/templates/opac/mylist.tt2             |   20 +
 .../src/templates/opac/myopac/circ_history.tt2     |  101 ++
 Open-ILS/src/templates/opac/myopac/circs.tt2       |  165 +++
 .../src/templates/opac/myopac/hold_history.tt2     |  126 ++
 Open-ILS/src/templates/opac/myopac/holds.tt2       |  228 ++++
 Open-ILS/src/templates/opac/myopac/holds/edit.tt2  |  109 ++
 Open-ILS/src/templates/opac/myopac/lists.tt2       |  197 +++
 Open-ILS/src/templates/opac/myopac/main.tt2        |  169 +++
 Open-ILS/src/templates/opac/myopac/main_pay.tt2    |   47 +
 .../templates/opac/myopac/main_payment_form.tt2    |  187 +++
 .../src/templates/opac/myopac/main_payments.tt2    |   59 +
 Open-ILS/src/templates/opac/myopac/prefs.tt2       |  248 ++++
 .../src/templates/opac/myopac/prefs_notify.tt2     |   39 +
 .../src/templates/opac/myopac/prefs_settings.tt2   |  100 ++
 .../src/templates/opac/myopac/receipt_email.tt2    |   21 +
 .../src/templates/opac/myopac/receipt_print.tt2    |   25 +
 .../src/templates/opac/myopac/update_email.tt2     |   24 +
 .../src/templates/opac/myopac/update_password.tt2  |   33 +
 .../src/templates/opac/myopac/update_username.tt2  |   29 +
 .../src/templates/opac/parts/advanced/expert.tt2   |   31 +
 .../templates/opac/parts/advanced/global_row.tt2   |   44 +
 .../src/templates/opac/parts/advanced/numeric.tt2  |   29 +
 .../src/templates/opac/parts/advanced/search.tt2   |  129 ++
 Open-ILS/src/templates/opac/parts/anon_list.tt2    |   65 +
 Open-ILS/src/templates/opac/parts/base.tt2         |   19 +
 Open-ILS/src/templates/opac/parts/chilifresh.tt2   |   17 +
 .../templates/opac/parts/coded_value_selector.tt2  |   28 +
 Open-ILS/src/templates/opac/parts/config.tt2       |   55 +
 Open-ILS/src/templates/opac/parts/filtersort.tt2   |   16 +
 Open-ILS/src/templates/opac/parts/footer.tt2       |   25 +
 Open-ILS/src/templates/opac/parts/header.tt2       |   69 +
 .../templates/opac/parts/hold_error_messages.tt2   |   38 +
 Open-ILS/src/templates/opac/parts/hold_status.tt2  |   29 +
 Open-ILS/src/templates/opac/parts/homesearch.tt2   |    3 +
 Open-ILS/src/templates/opac/parts/js.tt2           |   32 +
 Open-ILS/src/templates/opac/parts/login/form.tt2   |  156 +++
 Open-ILS/src/templates/opac/parts/login/help.tt2   |   12 +
 .../templates/opac/parts/login/password_hint.tt2   |    5 +
 Open-ILS/src/templates/opac/parts/misc_util.tt2    |  142 ++
 Open-ILS/src/templates/opac/parts/myopac/base.tt2  |   37 +
 .../src/templates/opac/parts/myopac/main_base.tt2  |   99 ++
 .../opac/parts/myopac/main_refund_policy.tt2       |   18 +
 .../src/templates/opac/parts/myopac/prefs_base.tt2 |   56 +
 .../templates/opac/parts/myopac/prefs_hints.tt2    |    5 +
 Open-ILS/src/templates/opac/parts/org_selector.tt2 |   31 +
 Open-ILS/src/templates/opac/parts/place_hold.tt2   |   83 ++
 .../src/templates/opac/parts/place_hold_result.tt2 |   98 ++
 Open-ILS/src/templates/opac/parts/printnav.tt2     |   25 +
 .../src/templates/opac/parts/qtype_selector.tt2    |   16 +
 .../src/templates/opac/parts/record/authors.tt2    |   52 +
 .../src/templates/opac/parts/record/awards.tt2     |   32 +
 Open-ILS/src/templates/opac/parts/record/body.tt2  |   48 +
 .../src/templates/opac/parts/record/cnbrowse.tt2   |   61 +
 .../src/templates/opac/parts/record/extras.tt2     |   64 +
 .../src/templates/opac/parts/record/issues.tt2     |   26 +
 .../src/templates/opac/parts/record/refworks.tt2   |   23 +
 .../src/templates/opac/parts/record/series.tt2     |   16 +
 .../src/templates/opac/parts/record/subjects.tt2   |   70 +
 .../src/templates/opac/parts/record/summary.tt2    |  267 ++++
 .../templates/opac/parts/record/summaryplus.tt2    |   19 +
 .../src/templates/opac/parts/result/lowhits.tt2    |   40 +
 .../opac/parts/result/lowhits_purchase.tt2         |    6 +
 .../src/templates/opac/parts/result/paginate.tt2   |   59 +
 Open-ILS/src/templates/opac/parts/result/table.tt2 |  268 ++++
 Open-ILS/src/templates/opac/parts/searchbar.tt2    |   72 +
 Open-ILS/src/templates/opac/parts/tips.tt2         |   11 +
 Open-ILS/src/templates/opac/parts/topnav.tt2       |   98 ++
 Open-ILS/src/templates/opac/parts/topnav_links.tt2 |   11 +
 Open-ILS/src/templates/opac/parts/topnav_logo.tt2  |    2 +
 Open-ILS/src/templates/opac/place_hold.tt2         |   20 +
 Open-ILS/src/templates/opac/record.tt2             |   16 +
 Open-ILS/src/templates/opac/results.tt2            |   73 ++
 Open-ILS/src/templates/serial/list_item.tt2        |  123 ++
 Open-ILS/src/templates/serial/list_stream.tt2      |  149 +++
 .../src/templates/serial/list_subscription.tt2     |   51 +
 .../templates/serial/print_routing_list_users.tt2  |   38 +
 Open-ILS/src/templates/serial/subscription.tt2     |  189 +++
 .../serial/subscription/caption_and_pattern.tt2    |    0
 .../serial/subscription/distribution.tt2           |    0
 .../templates}/serial/subscription/issuance.tt2    |    0
 Open-ILS/src/templates/strings/ex.ttk              |   53 -
 Open-ILS/src/templates/strings/perm.ttk            |   29 -
 Open-ILS/src/templates/vandelay/inc/attrs.tt2      |   92 ++
 Open-ILS/src/templates/vandelay/inc/export.tt2     |   64 +
 .../src/templates/vandelay/inc/import_errors.tt2   |   81 ++
 .../templates}/vandelay/inc/item_attrs.tt2         |    0
 Open-ILS/src/templates/vandelay/inc/marchtml.tt2   |   13 +
 Open-ILS/src/templates/vandelay/inc/matches.tt2    |   41 +
 .../templates}/vandelay/inc/profiles.tt2           |    0
 Open-ILS/src/templates/vandelay/inc/progress.tt2   |   16 +
 Open-ILS/src/templates/vandelay/inc/queue.tt2      |  253 ++++
 .../src/templates/vandelay/inc/queueselect.tt2     |   25 +
 Open-ILS/src/templates/vandelay/inc/toolbar.tt2    |   16 +
 Open-ILS/src/templates/vandelay/inc/upload.tt2     |  103 ++
 Open-ILS/src/templates/vandelay/vandelay.tt2       |   49 +
 .../web/css/skin/default/opac/contentslider.css    |   39 +
 Open-ILS/web/css/skin/default/opac/semiauto.css    |  181 +++
 Open-ILS/web/css/skin/default/opac/style.css       | 1032 +++++++++++++++
 Open-ILS/web/images/acct_sum_fines_bl.png          |  Bin 0 -> 148 bytes
 Open-ILS/web/images/acct_sum_fines_br.png          |  Bin 0 -> 142 bytes
 Open-ILS/web/images/acct_sum_fines_tl.png          |  Bin 0 -> 142 bytes
 Open-ILS/web/images/acct_sum_fines_tr.png          |  Bin 0 -> 153 bytes
 Open-ILS/web/images/add_mylist.gif                 |  Bin 0 -> 1623 bytes
 Open-ILS/web/images/add_mylist_sel.gif             |  Bin 0 -> 14604 bytes
 Open-ILS/web/images/add_mylist_sel.kcls.gif        |  Bin 0 -> 2267 bytes
 Open-ILS/web/images/adv_row_close_btn.png          |  Bin 0 -> 524 bytes
 Open-ILS/web/images/arrow-down.gif                 |  Bin 0 -> 852 bytes
 Open-ILS/web/images/arrow-right.gif                |  Bin 0 -> 330 bytes
 Open-ILS/web/images/arrow-right.png                |  Bin 0 -> 196 bytes
 Open-ILS/web/images/banner-bg.png                  |  Bin 0 -> 1702 bytes
 Open-ILS/web/images/banner1.jpg                    |  Bin 0 -> 8440 bytes
 Open-ILS/web/images/button-bg.png                  |  Bin 0 -> 614 bytes
 Open-ILS/web/images/cancel_btn.gif                 |  Bin 0 -> 606 bytes
 Open-ILS/web/images/cd-small.png                   |  Bin 0 -> 1582 bytes
 Open-ILS/web/images/clipboard.png                  |  Bin 0 -> 862 bytes
 Open-ILS/web/images/dash-corner-left1.png          |  Bin 0 -> 215 bytes
 Open-ILS/web/images/dash-corner-left2.png          |  Bin 0 -> 276 bytes
 Open-ILS/web/images/dash-corner-mid1.png           |  Bin 0 -> 121 bytes
 Open-ILS/web/images/dash-corner-mid2.png           |  Bin 0 -> 127 bytes
 Open-ILS/web/images/dash-corner-right1.png         |  Bin 0 -> 218 bytes
 Open-ILS/web/images/dash-corner-right2.png         |  Bin 0 -> 289 bytes
 Open-ILS/web/images/dash-divider.jpg               |  Bin 0 -> 515 bytes
 Open-ILS/web/images/dropdown-hover.gif             |  Bin 0 -> 197 bytes
 Open-ILS/web/images/dropdown.gif                   |  Bin 0 -> 197 bytes
 Open-ILS/web/images/faqs-btn.png                   |  Bin 0 -> 1783 bytes
 .../format_icons/item_type/a.png}                  |  Bin 1538 -> 1538 bytes
 Open-ILS/web/images/format_icons/item_type/c.png   |  Bin 0 -> 1112 bytes
 Open-ILS/web/images/format_icons/item_type/d.png   |  Bin 0 -> 1112 bytes
 Open-ILS/web/images/format_icons/item_type/e.png   |  Bin 0 -> 1324 bytes
 Open-ILS/web/images/format_icons/item_type/f.png   |  Bin 0 -> 1324 bytes
 Open-ILS/web/images/format_icons/item_type/g.png   |  Bin 0 -> 1648 bytes
 Open-ILS/web/images/format_icons/item_type/i.png   |  Bin 0 -> 1330 bytes
 Open-ILS/web/images/format_icons/item_type/j.png   |  Bin 0 -> 1726 bytes
 .../format_icons/item_type/k.png}                  |  Bin 891 -> 891 bytes
 .../format_icons/item_type/m.png}                  |  Bin 955 -> 955 bytes
 Open-ILS/web/images/format_icons/item_type/o.png   |  Bin 0 -> 1724 bytes
 Open-ILS/web/images/format_icons/item_type/p.png   |  Bin 0 -> 1724 bytes
 Open-ILS/web/images/format_icons/item_type/r.png   |  Bin 0 -> 1392 bytes
 .../format_icons/item_type/t.png}                  |  Bin 1538 -> 1538 bytes
 Open-ILS/web/images/format_icons/mattype/2.png     |  Bin 0 -> 82685 bytes
 Open-ILS/web/images/format_icons/mattype/5.png     |  Bin 0 -> 82612 bytes
 Open-ILS/web/images/format_icons/mattype/a.png     |  Bin 0 -> 80810 bytes
 Open-ILS/web/images/format_icons/mattype/b.png     |  Bin 0 -> 79800 bytes
 Open-ILS/web/images/format_icons/mattype/c.png     |  Bin 0 -> 84848 bytes
 Open-ILS/web/images/format_icons/mattype/d.png     |  Bin 0 -> 99141 bytes
 Open-ILS/web/images/format_icons/mattype/e.png     |  Bin 0 -> 50980 bytes
 Open-ILS/web/images/format_icons/mattype/f.png     |  Bin 0 -> 87270 bytes
 Open-ILS/web/images/format_icons/mattype/h.png     |  Bin 0 -> 91807 bytes
 Open-ILS/web/images/format_icons/mattype/i.png     |  Bin 0 -> 84438 bytes
 Open-ILS/web/images/format_icons/mattype/j.png     |  Bin 0 -> 83740 bytes
 Open-ILS/web/images/format_icons/mattype/k.png     |  Bin 0 -> 83435 bytes
 Open-ILS/web/images/format_icons/mattype/l.png     |  Bin 0 -> 93166 bytes
 Open-ILS/web/images/format_icons/mattype/m.png     |  Bin 0 -> 57790 bytes
 .../mattype/media_downloadableebook.png            |  Bin 0 -> 83990 bytes
 .../format_icons/mattype/media_electronicgames.png |  Bin 0 -> 87462 bytes
 .../images/format_icons/mattype/media_evideo.png   |  Bin 0 -> 82861 bytes
 .../format_icons/mattype/media_onlinejournal.png   |  Bin 0 -> 85350 bytes
 .../images/format_icons/mattype/media_player.png   |  Bin 0 -> 51027 bytes
 .../images/format_icons/mattype/media_podcasts.png |  Bin 0 -> 81592 bytes
 .../format_icons/mattype/media_streamingaudio.png  |  Bin 0 -> 83117 bytes
 .../format_icons/mattype/media_streamingvideo.png  |  Bin 0 -> 88732 bytes
 .../web/images/format_icons/mattype/media_vhs.png  |  Bin 0 -> 93044 bytes
 Open-ILS/web/images/format_icons/mattype/n.png     |  Bin 0 -> 84642 bytes
 Open-ILS/web/images/format_icons/mattype/o.png     |  Bin 0 -> 89902 bytes
 Open-ILS/web/images/format_icons/mattype/p.png     |  Bin 0 -> 86527 bytes
 Open-ILS/web/images/format_icons/mattype/q.png     |  Bin 0 -> 89088 bytes
 Open-ILS/web/images/format_icons/mattype/r.png     |  Bin 0 -> 84913 bytes
 Open-ILS/web/images/format_icons/mattype/s.png     |  Bin 0 -> 133892 bytes
 Open-ILS/web/images/format_icons/mattype/t.png     |  Bin 0 -> 82855 bytes
 Open-ILS/web/images/format_icons/mattype/v.png     |  Bin 0 -> 81035 bytes
 Open-ILS/web/images/format_icons/mattype/w.png     |  Bin 0 -> 83336 bytes
 Open-ILS/web/images/format_icons/mattype/x.png     |  Bin 0 -> 81422 bytes
 Open-ILS/web/images/format_icons/mattype/y.png     |  Bin 0 -> 83482 bytes
 Open-ILS/web/images/format_icons/mattype/z.png     |  Bin 0 -> 58037 bytes
 Open-ILS/web/images/go_but_long.gif                |  Bin 0 -> 667 bytes
 Open-ILS/web/images/gray-arrow.png                 |  Bin 0 -> 218 bytes
 Open-ILS/web/images/green_check.png                |  Bin 0 -> 743 bytes
 Open-ILS/web/images/header_left.gif                |  Bin 0 -> 115 bytes
 Open-ILS/web/images/header_right.gif               |  Bin 0 -> 107 bytes
 Open-ILS/web/images/hp-links-left.jpg              |  Bin 0 -> 812 bytes
 Open-ILS/web/images/hp-links-mid.jpg               |  Bin 0 -> 563 bytes
 Open-ILS/web/images/hp-links-right.jpg             |  Bin 0 -> 881 bytes
 Open-ILS/web/images/locations.jpg                  |  Bin 0 -> 17425 bytes
 Open-ILS/web/images/login-bg.jpg                   |  Bin 0 -> 778 bytes
 Open-ILS/web/images/login-bg2.jpg                  |  Bin 0 -> 660 bytes
 Open-ILS/web/images/login-box-bg.jpg               |  Bin 0 -> 1099 bytes
 Open-ILS/web/images/minus_sign.png                 |  Bin 0 -> 469 bytes
 Open-ILS/web/images/one_land.gif                   |  Bin 0 -> 4059 bytes
 Open-ILS/web/images/place_hold.gif                 |  Bin 0 -> 1543 bytes
 Open-ILS/web/images/plus_sign.png                  |  Bin 0 -> 559 bytes
 Open-ILS/web/images/projectedmedia.jpg             |  Bin 0 -> 937 bytes
 Open-ILS/web/images/question-mark.png              |  Bin 0 -> 789 bytes
 Open-ILS/web/images/questions.png                  |  Bin 0 -> 5444 bytes
 Open-ILS/web/images/rdetail_arrow.png              |  Bin 0 -> 437 bytes
 Open-ILS/web/images/rdetail_arrow_down.png         |  Bin 0 -> 439 bytes
 Open-ILS/web/images/reset_form_btn.gif             |  Bin 0 -> 655 bytes
 Open-ILS/web/images/reviews.gif                    |  Bin 0 -> 1712 bytes
 Open-ILS/web/images/save-btn.png                   |  Bin 0 -> 1516 bytes
 Open-ILS/web/images/save_btn.gif                   |  Bin 0 -> 814 bytes
 Open-ILS/web/{opac => }/images/small-rss.png       |  Bin 732 -> 732 bytes
 Open-ILS/web/images/starz.png                      |  Bin 0 -> 958 bytes
 Open-ILS/web/images/submit_btn.gif                 |  Bin 0 -> 605 bytes
 Open-ILS/web/images/tool_back.gif                  |  Bin 0 -> 66 bytes
 Open-ILS/web/images/tool_back.png                  |  Bin 0 -> 595 bytes
 Open-ILS/web/images/tool_font.gif                  |  Bin 0 -> 95 bytes
 Open-ILS/web/images/tool_forward.gif               |  Bin 0 -> 65 bytes
 Open-ILS/web/images/tool_forward.png               |  Bin 0 -> 589 bytes
 Open-ILS/web/images/tool_help.gif                  |  Bin 0 -> 66 bytes
 Open-ILS/web/images/tool_help.png                  |  Bin 0 -> 614 bytes
 Open-ILS/web/images/tool_home.gif                  |  Bin 0 -> 162 bytes
 Open-ILS/web/images/tool_home.png                  |  Bin 0 -> 887 bytes
 Open-ILS/web/images/tool_mail.gif                  |  Bin 0 -> 147 bytes
 Open-ILS/web/images/tool_print.gif                 |  Bin 0 -> 178 bytes
 Open-ILS/web/images/tool_print.png                 |  Bin 0 -> 585 bytes
 Open-ILS/web/images/utils-corner-left.png          |  Bin 0 -> 284 bytes
 Open-ILS/web/images/utils-corner-mid.png           |  Bin 0 -> 158 bytes
 Open-ILS/web/images/utils-corner-right.jpg         |  Bin 0 -> 630 bytes
 Open-ILS/web/images/utils-corner-right.png         |  Bin 0 -> 285 bytes
 Open-ILS/web/images/utils-corner.jpg               |  Bin 0 -> 411 bytes
 Open-ILS/web/js/ui/default/opac/simple.js          |   86 ++
 Open-ILS/web/js/ui/default/opac/staff.js           |   26 +
 Open-ILS/web/js/ui/default/vandelay/vandelay.js    |    2 +-
 Open-ILS/web/opac/locale/en-US/vandelay.dtd        |  119 --
 Open-ILS/web/opac/skin/default/xml/footer.xml      |    3 +-
 Open-ILS/web/templates/base.tt2                    |   27 -
 .../web/templates/default/acq/common/li_table.tt2  |  473 -------
 .../default/acq/financial/claim_eligible.tt2       |   57 -
 .../default/acq/financial/list_currency_types.tt2  |   35 -
 .../default/acq/financial/list_funding_sources.tt2 |   51 -
 .../templates/default/acq/financial/list_funds.tt2 |  162 ---
 .../templates/default/acq/financial/view_fund.tt2  |  257 ----
 .../default/acq/financial/view_funding_source.tt2  |  173 ---
 .../default/acq/financial/view_provider.tt2        |  118 --
 .../web/templates/default/acq/invoice/view.tt2     |  137 --
 .../web/templates/default/acq/lineitem/findbib.tt2 |   73 --
 .../web/templates/default/acq/lineitem/history.tt2 |   30 -
 .../web/templates/default/acq/lineitem/related.tt2 |   71 -
 .../web/templates/default/acq/lineitem/search.tt2  |  115 --
 .../templates/default/acq/lineitem/worksheet.tt2   |   11 -
 .../templates/default/acq/picklist/bib_search.tt2  |   74 --
 .../default/acq/picklist/brief_record.tt2          |   35 -
 .../templates/default/acq/picklist/from_bib.tt2    |   24 -
 .../web/templates/default/acq/picklist/list.tt2    |  107 --
 .../web/templates/default/acq/picklist/upload.tt2  |   97 --
 .../default/acq/picklist/user_request.tt2          |   66 -
 .../web/templates/default/acq/picklist/view.tt2    |   20 -
 Open-ILS/web/templates/default/acq/po/create.tt2   |    5 -
 .../web/templates/default/acq/po/edi_messages.tt2  |   46 -
 Open-ILS/web/templates/default/acq/po/events.tt2   |   64 -
 Open-ILS/web/templates/default/acq/po/history.tt2  |   30 -
 Open-ILS/web/templates/default/acq/po/search.tt2   |  143 --
 Open-ILS/web/templates/default/acq/po/view.tt2     |  138 --
 .../templates/default/acq/receiving/process.tt2    |   38 -
 .../web/templates/default/acq/search/unified.tt2   |  246 ----
 .../web/templates/default/acq/settings/li_attr.tt2 |   74 --
 .../web/templates/default/actor/user/register.tt2  |   73 --
 .../default/actor/user/trigger_events.tt2          |   29 -
 Open-ILS/web/templates/default/base.tt2            |   39 -
 Open-ILS/web/templates/default/booking/capture.tt2 |   21 -
 Open-ILS/web/templates/default/booking/pickup.tt2  |   78 --
 .../web/templates/default/booking/pull_list.tt2    |   49 -
 .../web/templates/default/booking/reservation.tt2  |  122 --
 Open-ILS/web/templates/default/booking/return.tt2  |   88 --
 .../web/templates/default/cat/authority/list.tt2   |   82 --
 .../web/templates/default/circ/selfcheck/main.tt2  |   61 -
 .../default/conify/global/acq/cancel_reason.tt2    |   33 -
 .../default/conify/global/acq/claim_event_type.tt2 |   42 -
 .../default/conify/global/acq/claim_policy.tt2     |   42 -
 .../conify/global/acq/claim_policy_action.tt2      |   35 -
 .../default/conify/global/acq/claim_type.tt2       |   42 -
 .../conify/global/acq/distribution_formula.tt2     |  100 --
 .../default/conify/global/acq/edi_account.tt2      |   80 --
 .../default/conify/global/acq/exchange_rate.tt2    |   33 -
 .../default/conify/global/acq/fund_tag.tt2         |   31 -
 .../conify/global/acq/invoice_item_type.tt2        |   28 -
 .../conify/global/acq/invoice_payment_method.tt2   |   28 -
 .../default/conify/global/acq/lineitem_alert.tt2   |   32 -
 .../conify/global/acq/lineitem_marc_attr_def.tt2   |   33 -
 .../default/conify/global/acq/provider.tt2         |  219 ----
 .../default/conify/global/action/survey.tt2        |   96 --
 .../default/conify/global/action/survey/edit.tt2   |   23 -
 .../global/action_trigger/event_definition.tt2     |  122 --
 .../action_trigger/event_definition_data.tt2       |   88 --
 .../conify/global/asset/copy_location_order.tt2    |   30 -
 .../default/conify/global/asset/copy_template.tt2  |   52 -
 .../conify/global/biblio/monograph_part.tt2        |   37 -
 .../default/conify/global/booking/resource.tt2     |   70 -
 .../conify/global/booking/resource_attr.tt2        |   63 -
 .../conify/global/booking/resource_attr_map.tt2    |   63 -
 .../conify/global/booking/resource_attr_value.tt2  |   59 -
 .../conify/global/booking/resource_type.tt2        |   61 -
 .../conify/global/cat/authority/browse_axis.tt2    |   36 -
 .../authority/browse_axis_authority_field_map.tt2  |   71 -
 .../conify/global/cat/authority/control_set.tt2    |   88 --
 .../cat/authority/control_set_authority_field.tt2  |  132 --
 .../global/cat/authority/control_set_bib_field.tt2 |   71 -
 .../conify/global/cat/authority/thesaurus.tt2      |  100 --
 .../default/conify/global/config/acn_prefix.tt2    |   37 -
 .../default/conify/global/config/acn_suffix.tt2    |   37 -
 .../conify/global/config/actor_sip_fields.tt2      |   28 -
 .../conify/global/config/asset_sip_fields.tt2      |   28 -
 .../conify/global/config/barcode_completion.tt2    |   26 -
 .../default/conify/global/config/billing_type.tt2  |   35 -
 .../global/config/circ_matrix_matchpoint.tt2       |   77 --
 .../conify/global/config/circ_matrix_weights.tt2   |   28 -
 .../default/conify/global/config/circ_modifier.tt2 |   88 --
 .../conify/global/config/coded_value_map.tt2       |   63 -
 .../default/conify/global/config/global_flag.tt2   |   32 -
 .../default/conify/global/config/hard_due_date.tt2 |   80 --
 .../conify/global/config/hard_due_date_values.tt2  |   73 --
 .../global/config/hold_matrix_matchpoint.tt2       |   33 -
 .../conify/global/config/hold_matrix_weights.tt2   |   28 -
 .../default/conify/global/config/idl_field_doc.tt2 |   32 -
 .../default/conify/global/config/metabib_field.tt2 |   32 -
 .../conify/global/config/org_unit_setting_type.tt2 |   64 -
 .../global/config/record_attr_definition.tt2       |   35 -
 .../conify/global/config/rule_age_hold_protect.tt2 |   28 -
 .../conify/global/config/rule_circ_duration.tt2    |   28 -
 .../default/conify/global/config/rule_max_fine.tt2 |   28 -
 .../conify/global/config/rule_recurring_fine.tt2   |   28 -
 .../conify/global/config/standing_penalty.tt2      |   65 -
 .../conify/global/config/usr_setting_type.tt2      |   64 -
 .../default/conify/global/config/weight_assoc.tt2  |   28 -
 .../default/conify/global/config/z3950_source.tt2  |   28 -
 .../global/permission/grp_penalty_threshold.tt2    |   41 -
 .../default/conify/global/vandelay/match_set.tt2   |   94 --
 .../conify/global/vandelay/match_set_tree.tt2      |  150 ---
 .../web/templates/default/serial/list_item.tt2     |  123 --
 .../web/templates/default/serial/list_stream.tt2   |  149 ---
 .../templates/default/serial/list_subscription.tt2 |   51 -
 .../default/serial/print_routing_list_users.tt2    |   38 -
 .../web/templates/default/serial/subscription.tt2  |  189 ---
 .../web/templates/default/vandelay/inc/attrs.tt2   |   92 --
 .../web/templates/default/vandelay/inc/export.tt2  |   64 -
 .../default/vandelay/inc/import_errors.tt2         |   81 --
 .../templates/default/vandelay/inc/marchtml.tt2    |   13 -
 .../web/templates/default/vandelay/inc/matches.tt2 |   41 -
 .../templates/default/vandelay/inc/progress.tt2    |   16 -
 .../web/templates/default/vandelay/inc/queue.tt2   |  253 ----
 .../templates/default/vandelay/inc/queueselect.tt2 |   25 -
 .../web/templates/default/vandelay/inc/toolbar.tt2 |   16 -
 .../web/templates/default/vandelay/inc/upload.tt2  |  103 --
 .../web/templates/default/vandelay/vandelay.tt2    |   50 -
 Open-ILS/xul/staff_client/server/patron/holds.js   |    5 +-
 README                                             |   11 -
 495 files changed, 18120 insertions(+), 8931 deletions(-)
 delete mode 100644 Open-ILS/examples/oils_web.xml.example
 create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
 create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
 create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
 create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
 create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
 create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
 create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/CGI_utf8.pm
 create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/I18NFilter.pm
 create mode 100644 Open-ILS/src/perlmods/lib/Template/Plugin/ResolverResolver.pm
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0621.data.opac_payment_history_age_limit.sql
 create mode 100755 Open-ILS/src/support-scripts/test-scripts/unapi_bench.pl
 rename Open-ILS/{web/templates/default => src/templates}/acq/common/claim_dialog.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/acq/common/final_claim_dialog.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/acq/common/info.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/acq/common/inv_dialog.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/acq/common/jubgrid.tt2 (100%)
 create mode 100644 Open-ILS/src/templates/acq/common/li_table.tt2
 rename Open-ILS/{web/templates/default => src/templates}/acq/common/li_table_pager.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/acq/common/notes.tt2 (100%)
 create mode 100644 Open-ILS/src/templates/acq/currency_type/list.tt2
 create mode 100644 Open-ILS/src/templates/acq/financial/claim_eligible.tt2
 create mode 100644 Open-ILS/src/templates/acq/fund/list.tt2
 create mode 100644 Open-ILS/src/templates/acq/fund/view.tt2
 create mode 100644 Open-ILS/src/templates/acq/funding_source/list.tt2
 create mode 100644 Open-ILS/src/templates/acq/funding_source/view.tt2
 create mode 100644 Open-ILS/src/templates/acq/invoice/view.tt2
 create mode 100644 Open-ILS/src/templates/acq/lineitem/findbib.tt2
 create mode 100644 Open-ILS/src/templates/acq/lineitem/history.tt2
 create mode 100644 Open-ILS/src/templates/acq/lineitem/related.tt2
 create mode 100644 Open-ILS/src/templates/acq/lineitem/search.tt2
 create mode 100644 Open-ILS/src/templates/acq/lineitem/worksheet.tt2
 create mode 100644 Open-ILS/src/templates/acq/picklist/bib_search.tt2
 create mode 100644 Open-ILS/src/templates/acq/picklist/brief_record.tt2
 create mode 100644 Open-ILS/src/templates/acq/picklist/from_bib.tt2
 create mode 100644 Open-ILS/src/templates/acq/picklist/list.tt2
 create mode 100644 Open-ILS/src/templates/acq/picklist/upload.tt2
 create mode 100644 Open-ILS/src/templates/acq/picklist/user_request.tt2
 create mode 100644 Open-ILS/src/templates/acq/picklist/view.tt2
 create mode 100644 Open-ILS/src/templates/acq/po/create.tt2
 create mode 100644 Open-ILS/src/templates/acq/po/edi_messages.tt2
 create mode 100644 Open-ILS/src/templates/acq/po/events.tt2
 create mode 100644 Open-ILS/src/templates/acq/po/history.tt2
 rename Open-ILS/{web/templates/default => src/templates}/acq/po/item_table.tt2 (100%)
 create mode 100644 Open-ILS/src/templates/acq/po/search.tt2
 create mode 100644 Open-ILS/src/templates/acq/po/view.tt2
 create mode 100644 Open-ILS/src/templates/acq/receiving/process.tt2
 create mode 100644 Open-ILS/src/templates/acq/search/unified.tt2
 create mode 100644 Open-ILS/src/templates/acq/settings/li_attr.tt2
 create mode 100644 Open-ILS/src/templates/actor/user/register.tt2
 rename Open-ILS/{web/templates/default => src/templates}/actor/user/register_table.tt2 (100%)
 create mode 100644 Open-ILS/src/templates/actor/user/trigger_events.tt2
 create mode 100644 Open-ILS/src/templates/base.tt2
 create mode 100644 Open-ILS/src/templates/booking/capture.tt2
 create mode 100644 Open-ILS/src/templates/booking/pickup.tt2
 create mode 100644 Open-ILS/src/templates/booking/pull_list.tt2
 create mode 100644 Open-ILS/src/templates/booking/reservation.tt2
 create mode 100644 Open-ILS/src/templates/booking/return.tt2
 create mode 100644 Open-ILS/src/templates/cat/authority/list.tt2
 rename Open-ILS/{web/templates/default => src/templates}/circ/selfcheck/audio_config.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/circ/selfcheck/banner.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/circ/selfcheck/circ_page.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/circ/selfcheck/fines.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/circ/selfcheck/holds_page.tt2 (100%)
 create mode 100644 Open-ILS/src/templates/circ/selfcheck/main.tt2
 rename Open-ILS/{web/templates/default => src/templates}/circ/selfcheck/patron_login.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/circ/selfcheck/payment.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/circ/selfcheck/summary.tt2 (100%)
 create mode 100644 Open-ILS/src/templates/conify/global/acq/cancel_reason.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/acq/claim_event_type.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/acq/claim_policy.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/acq/claim_policy_action.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/acq/claim_type.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/acq/distribution_formula.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/acq/edi_account.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/acq/exchange_rate.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/acq/fund_tag.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/acq/invoice_item_type.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/acq/invoice_payment_method.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/acq/lineitem_alert.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/acq/lineitem_marc_attr_def.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/acq/provider.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/action/survey.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/action/survey/edit.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/action_trigger/event_definition.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/action_trigger/event_definition_data.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/asset/copy_location_order.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/asset/copy_template.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/biblio/monograph_part.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/booking/resource.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/booking/resource_attr.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/booking/resource_attr_map.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/booking/resource_attr_value.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/booking/resource_type.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/cat/authority/browse_axis.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/cat/authority/browse_axis_authority_field_map.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/cat/authority/control_set.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/cat/authority/control_set_authority_field.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/cat/authority/control_set_bib_field.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/cat/authority/thesaurus.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/acn_prefix.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/acn_suffix.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/actor_sip_fields.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/asset_sip_fields.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/barcode_completion.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/billing_type.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/circ_matrix_matchpoint.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/circ_matrix_weights.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/circ_modifier.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/coded_value_map.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/global_flag.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/hard_due_date.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/hard_due_date_values.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/hold_matrix_matchpoint.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/hold_matrix_weights.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/idl_field_doc.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/metabib_field.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/org_unit_setting_type.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/record_attr_definition.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/rule_age_hold_protect.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/rule_circ_duration.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/rule_max_fine.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/rule_recurring_fine.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/standing_penalty.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/usr_setting_type.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/weight_assoc.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/config/z3950_source.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/permission/grp_penalty_threshold.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/vandelay/match_set.tt2
 create mode 100644 Open-ILS/src/templates/conify/global/vandelay/match_set_tree.tt2
 rename Open-ILS/{web/templates/default => src/templates}/footer.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/header.tt2 (100%)
 rename Open-ILS/{web => src}/templates/login.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/menu.tt2 (100%)
 create mode 100644 Open-ILS/src/templates/opac/advanced.tt2
 create mode 100644 Open-ILS/src/templates/opac/cnbrowse.tt2
 create mode 100644 Open-ILS/src/templates/opac/home.tt2
 create mode 100644 Open-ILS/src/templates/opac/login.tt2
 create mode 100644 Open-ILS/src/templates/opac/mylist.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/circ_history.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/circs.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/hold_history.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/holds.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/holds/edit.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/lists.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/main.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/main_pay.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/main_payment_form.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/main_payments.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/prefs.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/prefs_settings.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/receipt_email.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/receipt_print.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/update_email.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/update_password.tt2
 create mode 100644 Open-ILS/src/templates/opac/myopac/update_username.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/advanced/expert.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/advanced/global_row.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/advanced/numeric.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/advanced/search.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/anon_list.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/base.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/chilifresh.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/coded_value_selector.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/config.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/filtersort.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/footer.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/header.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/hold_error_messages.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/hold_status.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/homesearch.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/js.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/login/form.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/login/help.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/login/password_hint.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/misc_util.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/myopac/base.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/myopac/main_refund_policy.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/myopac/prefs_hints.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/org_selector.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/place_hold.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/place_hold_result.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/printnav.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/qtype_selector.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/record/authors.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/record/awards.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/record/body.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/record/cnbrowse.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/record/extras.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/record/issues.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/record/refworks.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/record/series.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/record/subjects.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/record/summary.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/record/summaryplus.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/result/lowhits.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/result/lowhits_purchase.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/result/paginate.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/result/table.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/searchbar.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/tips.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/topnav.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/topnav_links.tt2
 create mode 100644 Open-ILS/src/templates/opac/parts/topnav_logo.tt2
 create mode 100644 Open-ILS/src/templates/opac/place_hold.tt2
 create mode 100644 Open-ILS/src/templates/opac/record.tt2
 create mode 100644 Open-ILS/src/templates/opac/results.tt2
 create mode 100644 Open-ILS/src/templates/serial/list_item.tt2
 create mode 100644 Open-ILS/src/templates/serial/list_stream.tt2
 create mode 100644 Open-ILS/src/templates/serial/list_subscription.tt2
 create mode 100644 Open-ILS/src/templates/serial/print_routing_list_users.tt2
 create mode 100644 Open-ILS/src/templates/serial/subscription.tt2
 rename Open-ILS/{web/templates/default => src/templates}/serial/subscription/caption_and_pattern.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/serial/subscription/distribution.tt2 (100%)
 rename Open-ILS/{web/templates/default => src/templates}/serial/subscription/issuance.tt2 (100%)
 delete mode 100644 Open-ILS/src/templates/strings/ex.ttk
 delete mode 100644 Open-ILS/src/templates/strings/perm.ttk
 create mode 100644 Open-ILS/src/templates/vandelay/inc/attrs.tt2
 create mode 100644 Open-ILS/src/templates/vandelay/inc/export.tt2
 create mode 100644 Open-ILS/src/templates/vandelay/inc/import_errors.tt2
 rename Open-ILS/{web/templates/default => src/templates}/vandelay/inc/item_attrs.tt2 (100%)
 create mode 100644 Open-ILS/src/templates/vandelay/inc/marchtml.tt2
 create mode 100644 Open-ILS/src/templates/vandelay/inc/matches.tt2
 rename Open-ILS/{web/templates/default => src/templates}/vandelay/inc/profiles.tt2 (100%)
 create mode 100644 Open-ILS/src/templates/vandelay/inc/progress.tt2
 create mode 100644 Open-ILS/src/templates/vandelay/inc/queue.tt2
 create mode 100644 Open-ILS/src/templates/vandelay/inc/queueselect.tt2
 create mode 100644 Open-ILS/src/templates/vandelay/inc/toolbar.tt2
 create mode 100644 Open-ILS/src/templates/vandelay/inc/upload.tt2
 create mode 100644 Open-ILS/src/templates/vandelay/vandelay.tt2
 create mode 100644 Open-ILS/web/css/skin/default/opac/contentslider.css
 create mode 100644 Open-ILS/web/css/skin/default/opac/semiauto.css
 create mode 100644 Open-ILS/web/css/skin/default/opac/style.css
 create mode 100644 Open-ILS/web/images/acct_sum_fines_bl.png
 create mode 100644 Open-ILS/web/images/acct_sum_fines_br.png
 create mode 100644 Open-ILS/web/images/acct_sum_fines_tl.png
 create mode 100644 Open-ILS/web/images/acct_sum_fines_tr.png
 create mode 100644 Open-ILS/web/images/add_mylist.gif
 create mode 100644 Open-ILS/web/images/add_mylist_sel.gif
 create mode 100644 Open-ILS/web/images/add_mylist_sel.kcls.gif
 create mode 100644 Open-ILS/web/images/adv_row_close_btn.png
 create mode 100644 Open-ILS/web/images/arrow-down.gif
 create mode 100644 Open-ILS/web/images/arrow-right.gif
 create mode 100644 Open-ILS/web/images/arrow-right.png
 create mode 100644 Open-ILS/web/images/banner-bg.png
 create mode 100644 Open-ILS/web/images/banner1.jpg
 create mode 100644 Open-ILS/web/images/button-bg.png
 create mode 100644 Open-ILS/web/images/cancel_btn.gif
 create mode 100644 Open-ILS/web/images/cd-small.png
 create mode 100644 Open-ILS/web/images/clipboard.png
 create mode 100644 Open-ILS/web/images/dash-corner-left1.png
 create mode 100644 Open-ILS/web/images/dash-corner-left2.png
 create mode 100644 Open-ILS/web/images/dash-corner-mid1.png
 create mode 100644 Open-ILS/web/images/dash-corner-mid2.png
 create mode 100644 Open-ILS/web/images/dash-corner-right1.png
 create mode 100644 Open-ILS/web/images/dash-corner-right2.png
 create mode 100644 Open-ILS/web/images/dash-divider.jpg
 create mode 100644 Open-ILS/web/images/dropdown-hover.gif
 create mode 100644 Open-ILS/web/images/dropdown.gif
 create mode 100644 Open-ILS/web/images/faqs-btn.png
 copy Open-ILS/web/{opac/images/book-icon.png => images/format_icons/item_type/a.png} (100%)
 create mode 100644 Open-ILS/web/images/format_icons/item_type/c.png
 create mode 100644 Open-ILS/web/images/format_icons/item_type/d.png
 create mode 100644 Open-ILS/web/images/format_icons/item_type/e.png
 create mode 100644 Open-ILS/web/images/format_icons/item_type/f.png
 create mode 100644 Open-ILS/web/images/format_icons/item_type/g.png
 create mode 100644 Open-ILS/web/images/format_icons/item_type/i.png
 create mode 100644 Open-ILS/web/images/format_icons/item_type/j.png
 copy Open-ILS/web/{opac/images/placeholder-icon.png => images/format_icons/item_type/k.png} (100%)
 copy Open-ILS/web/{opac/images/software-icon.png => images/format_icons/item_type/m.png} (100%)
 create mode 100644 Open-ILS/web/images/format_icons/item_type/o.png
 create mode 100644 Open-ILS/web/images/format_icons/item_type/p.png
 create mode 100644 Open-ILS/web/images/format_icons/item_type/r.png
 copy Open-ILS/web/{opac/images/book-icon.png => images/format_icons/item_type/t.png} (100%)
 create mode 100644 Open-ILS/web/images/format_icons/mattype/2.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/5.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/a.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/b.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/c.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/d.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/e.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/f.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/h.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/i.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/j.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/k.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/l.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/m.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/media_downloadableebook.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/media_electronicgames.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/media_evideo.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/media_onlinejournal.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/media_player.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/media_podcasts.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/media_streamingaudio.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/media_streamingvideo.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/media_vhs.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/n.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/o.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/p.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/q.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/r.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/s.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/t.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/v.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/w.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/x.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/y.png
 create mode 100644 Open-ILS/web/images/format_icons/mattype/z.png
 create mode 100644 Open-ILS/web/images/go_but_long.gif
 create mode 100644 Open-ILS/web/images/gray-arrow.png
 create mode 100644 Open-ILS/web/images/green_check.png
 create mode 100644 Open-ILS/web/images/header_left.gif
 create mode 100644 Open-ILS/web/images/header_right.gif
 create mode 100644 Open-ILS/web/images/hp-links-left.jpg
 create mode 100644 Open-ILS/web/images/hp-links-mid.jpg
 create mode 100644 Open-ILS/web/images/hp-links-right.jpg
 create mode 100644 Open-ILS/web/images/locations.jpg
 create mode 100644 Open-ILS/web/images/login-bg.jpg
 create mode 100644 Open-ILS/web/images/login-bg2.jpg
 create mode 100644 Open-ILS/web/images/login-box-bg.jpg
 create mode 100644 Open-ILS/web/images/minus_sign.png
 create mode 100644 Open-ILS/web/images/one_land.gif
 create mode 100644 Open-ILS/web/images/place_hold.gif
 create mode 100644 Open-ILS/web/images/plus_sign.png
 create mode 100644 Open-ILS/web/images/projectedmedia.jpg
 create mode 100644 Open-ILS/web/images/question-mark.png
 create mode 100644 Open-ILS/web/images/questions.png
 create mode 100644 Open-ILS/web/images/rdetail_arrow.png
 create mode 100644 Open-ILS/web/images/rdetail_arrow_down.png
 create mode 100644 Open-ILS/web/images/reset_form_btn.gif
 create mode 100644 Open-ILS/web/images/reviews.gif
 create mode 100644 Open-ILS/web/images/save-btn.png
 create mode 100644 Open-ILS/web/images/save_btn.gif
 copy Open-ILS/web/{opac => }/images/small-rss.png (100%)
 create mode 100644 Open-ILS/web/images/starz.png
 create mode 100644 Open-ILS/web/images/submit_btn.gif
 create mode 100644 Open-ILS/web/images/tool_back.gif
 create mode 100644 Open-ILS/web/images/tool_back.png
 create mode 100644 Open-ILS/web/images/tool_font.gif
 create mode 100644 Open-ILS/web/images/tool_forward.gif
 create mode 100644 Open-ILS/web/images/tool_forward.png
 create mode 100644 Open-ILS/web/images/tool_help.gif
 create mode 100644 Open-ILS/web/images/tool_help.png
 create mode 100644 Open-ILS/web/images/tool_home.gif
 create mode 100644 Open-ILS/web/images/tool_home.png
 create mode 100644 Open-ILS/web/images/tool_mail.gif
 create mode 100644 Open-ILS/web/images/tool_print.gif
 create mode 100644 Open-ILS/web/images/tool_print.png
 create mode 100644 Open-ILS/web/images/utils-corner-left.png
 create mode 100644 Open-ILS/web/images/utils-corner-mid.png
 create mode 100644 Open-ILS/web/images/utils-corner-right.jpg
 create mode 100644 Open-ILS/web/images/utils-corner-right.png
 create mode 100644 Open-ILS/web/images/utils-corner.jpg
 create mode 100644 Open-ILS/web/js/ui/default/opac/simple.js
 create mode 100644 Open-ILS/web/js/ui/default/opac/staff.js
 delete mode 100644 Open-ILS/web/opac/locale/en-US/vandelay.dtd
 delete mode 100644 Open-ILS/web/templates/base.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/common/li_table.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/financial/claim_eligible.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/financial/list_currency_types.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/financial/list_funding_sources.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/financial/list_funds.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/financial/view_fund.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/financial/view_funding_source.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/financial/view_provider.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/invoice/view.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/lineitem/findbib.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/lineitem/history.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/lineitem/related.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/lineitem/search.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/lineitem/worksheet.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/picklist/bib_search.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/picklist/brief_record.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/picklist/from_bib.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/picklist/list.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/picklist/upload.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/picklist/user_request.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/picklist/view.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/po/create.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/po/edi_messages.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/po/events.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/po/history.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/po/search.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/po/view.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/receiving/process.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/search/unified.tt2
 delete mode 100644 Open-ILS/web/templates/default/acq/settings/li_attr.tt2
 delete mode 100644 Open-ILS/web/templates/default/actor/user/register.tt2
 delete mode 100644 Open-ILS/web/templates/default/actor/user/trigger_events.tt2
 delete mode 100644 Open-ILS/web/templates/default/base.tt2
 delete mode 100644 Open-ILS/web/templates/default/booking/capture.tt2
 delete mode 100644 Open-ILS/web/templates/default/booking/pickup.tt2
 delete mode 100644 Open-ILS/web/templates/default/booking/pull_list.tt2
 delete mode 100644 Open-ILS/web/templates/default/booking/reservation.tt2
 delete mode 100644 Open-ILS/web/templates/default/booking/return.tt2
 delete mode 100644 Open-ILS/web/templates/default/cat/authority/list.tt2
 delete mode 100644 Open-ILS/web/templates/default/circ/selfcheck/main.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/acq/cancel_reason.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/acq/claim_event_type.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/acq/claim_policy.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/acq/claim_policy_action.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/acq/claim_type.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/acq/distribution_formula.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/acq/edi_account.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/acq/fund_tag.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/acq/invoice_item_type.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/acq/invoice_payment_method.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/acq/lineitem_alert.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/acq/lineitem_marc_attr_def.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/acq/provider.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/action/survey.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/action/survey/edit.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/action_trigger/event_definition.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/action_trigger/event_definition_data.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/asset/copy_location_order.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/asset/copy_template.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/biblio/monograph_part.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/booking/resource.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/booking/resource_attr.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/booking/resource_attr_map.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/booking/resource_attr_value.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/booking/resource_type.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/cat/authority/browse_axis.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/cat/authority/browse_axis_authority_field_map.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/cat/authority/control_set.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/cat/authority/control_set_authority_field.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/cat/authority/control_set_bib_field.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/cat/authority/thesaurus.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/acn_prefix.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/acn_suffix.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/actor_sip_fields.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/asset_sip_fields.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/barcode_completion.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/billing_type.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/circ_matrix_matchpoint.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/circ_matrix_weights.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/circ_modifier.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/coded_value_map.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/global_flag.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/hard_due_date.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/hard_due_date_values.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/hold_matrix_matchpoint.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/hold_matrix_weights.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/idl_field_doc.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/metabib_field.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/org_unit_setting_type.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/record_attr_definition.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/rule_age_hold_protect.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/rule_circ_duration.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/rule_max_fine.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/rule_recurring_fine.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/standing_penalty.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/usr_setting_type.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/weight_assoc.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/config/z3950_source.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/permission/grp_penalty_threshold.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/vandelay/match_set.tt2
 delete mode 100644 Open-ILS/web/templates/default/conify/global/vandelay/match_set_tree.tt2
 delete mode 100644 Open-ILS/web/templates/default/serial/list_item.tt2
 delete mode 100644 Open-ILS/web/templates/default/serial/list_stream.tt2
 delete mode 100644 Open-ILS/web/templates/default/serial/list_subscription.tt2
 delete mode 100644 Open-ILS/web/templates/default/serial/print_routing_list_users.tt2
 delete mode 100644 Open-ILS/web/templates/default/serial/subscription.tt2
 delete mode 100644 Open-ILS/web/templates/default/vandelay/inc/attrs.tt2
 delete mode 100644 Open-ILS/web/templates/default/vandelay/inc/export.tt2
 delete mode 100644 Open-ILS/web/templates/default/vandelay/inc/import_errors.tt2
 delete mode 100644 Open-ILS/web/templates/default/vandelay/inc/marchtml.tt2
 delete mode 100644 Open-ILS/web/templates/default/vandelay/inc/matches.tt2
 delete mode 100644 Open-ILS/web/templates/default/vandelay/inc/progress.tt2
 delete mode 100644 Open-ILS/web/templates/default/vandelay/inc/queue.tt2
 delete mode 100644 Open-ILS/web/templates/default/vandelay/inc/queueselect.tt2
 delete mode 100644 Open-ILS/web/templates/default/vandelay/inc/toolbar.tt2
 delete mode 100644 Open-ILS/web/templates/default/vandelay/inc/upload.tt2
 delete mode 100644 Open-ILS/web/templates/default/vandelay/vandelay.tt2


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list