started opac details page..
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 25 Aug 2005 22:18:31 +0000 (22:18 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 25 Aug 2005 22:18:31 +0000 (22:18 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1750 dcc99617-32d9-48b4-a31d-7c20da2025e4

12 files changed:
Open-ILS/src/extras/fieldmapper.pl
Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
Open-ILS/web/opac/common/js/config.js
Open-ILS/web/opac/common/js/init.js
Open-ILS/web/opac/common/js/utils.js
Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/web/opac/skin/default/css/layout.css
Open-ILS/web/opac/skin/default/js/config.js
Open-ILS/web/opac/skin/default/js/result_common.js
Open-ILS/web/opac/skin/default/xml/rdetail.xml
Open-ILS/web/opac/theme/default/css/colors.css

index d6cc5b3..2ad8680 100755 (executable)
@@ -14,7 +14,7 @@ my @web_hints = qw/asv asva asvr asvq
                circ acp acpl acn ccs ahn ahr aua ac 
                actscecm crcd crmf crrf mus mbts aoc aus/;
 
-my @web_core = qw/ aou au perm_ex ex aout mvr /;
+my @web_core = qw/ aou au perm_ex ex aout mvr ccs /;
 
 
 print "var _c = {};\n";
index 358d4c0..0553d4c 100644 (file)
@@ -454,6 +454,10 @@ sub _add_address {
        my($session, $address) = @_;
        $address->clear_id();
 
+       use Data::Dumper;
+       warn "Adding Address:\n";
+       warn Dumper($address);
+
        # put the address into the database
        my $req = $session->request(
                "open-ils.storage.direct.actor.user_address.create",
index 21873c4..89ffd80 100644 (file)
@@ -1005,6 +1005,27 @@ sub copy_counts_per_org {
 }
 
 
+__PACKAGE__->register_method(
+       method          => "copy_count_summary",
+       api_name        => "open-ils.search.biblio.copy_counts.summary.retrieve",
+       notes           => <<"  NOTES");
+       returns an array of these:
+               [ org_id, callnumber_label, <status1_count>, <status2_cout>,...]
+               where statusx is a copy status name.  the statuses are sorted
+               by id.
+       NOTES
+
+sub copy_count_summary {
+       my( $self, $client, $rid ) = @_;
+       my $method = "open-ils.storage.biblio.record_entry.status_copy_count.atomic";
+       return $apputils->simple_scalar_request( "open-ils.storage", $method, $rid );
+}
+
+
+
+
+
+
 
 
 1;
index 8fc5f10..00a053a 100644 (file)
@@ -167,25 +167,26 @@ config.ids.altcanvas = {};
        have a staff counterpart and should have ".staff" appended to the method 
        before the method is called when in XUL mode */
 
-var FETCH_MRCOUNT                              = "open-ils.search:open-ils.search.biblio.class.count:1";
-var FETCH_MRIDS                                = "open-ils.search:open-ils.search.biblio.class:1";
-var FETCH_MRIDS_FULL                   = "open-ils.search:open-ils.search.biblio.class.full:1";
-var FETCH_MRMODS                               = "open-ils.search:open-ils.search.biblio.metarecord.mods_slim.retrieve";
-var FETCH_MR_COPY_COUNTS       = "open-ils.search:open-ils.search.biblio.metarecord.copy_count:1";
-var FETCH_RIDS                                 = "open-ils.search:open-ils.search.biblio.metarecord_to_records:1";
-var FETCH_RMODS                                = "open-ils.search:open-ils.search.biblio.record.mods_slim.retrieve";
-var FETCH_R_COPY_COUNTS                = "open-ils.search:open-ils.search.biblio.record.copy_count";
-var FETCH_FLESHED_USER         = "open-ils.actor:open-ils.actor.user.fleshed.retrieve";
-var FETCH_SESSION                              = "open-ils.auth:open-ils.auth.session.retrieve";
-var LOGIN_INIT                                 = "open-ils.auth:open-ils.auth.authenticate.init";
-var LOGIN_COMPLETE                     = "open-ils.auth:open-ils.auth.authenticate.complete";
-var LOGIN_DELETE                               = "open-ils.auth:open-ils.auth.session.delete";
-var FETCH_USER_PREFS                   = "open-ils.actor:open-ils.actor.patron.settings.retrieve"; 
-var UPDATE_USER_PREFS          = "open-ils.actor:open-ils.actor.patron.settings.update"; 
+var FETCH_MRCOUNT                                      = "open-ils.search:open-ils.search.biblio.class.count:1";
+var FETCH_MRIDS                                        = "open-ils.search:open-ils.search.biblio.class:1";
+var FETCH_MRIDS_FULL                           = "open-ils.search:open-ils.search.biblio.class.full:1";
+var FETCH_MRMODS                                       = "open-ils.search:open-ils.search.biblio.metarecord.mods_slim.retrieve";
+var FETCH_MR_COPY_COUNTS               = "open-ils.search:open-ils.search.biblio.metarecord.copy_count:1";
+var FETCH_RIDS                                         = "open-ils.search:open-ils.search.biblio.metarecord_to_records:1";
+var FETCH_RMODS                                        = "open-ils.search:open-ils.search.biblio.record.mods_slim.retrieve";
+var FETCH_R_COPY_COUNTS                        = "open-ils.search:open-ils.search.biblio.record.copy_count";
+var FETCH_FLESHED_USER                 = "open-ils.actor:open-ils.actor.user.fleshed.retrieve";
+var FETCH_SESSION                                      = "open-ils.auth:open-ils.auth.session.retrieve";
+var LOGIN_INIT                                         = "open-ils.auth:open-ils.auth.authenticate.init";
+var LOGIN_COMPLETE                             = "open-ils.auth:open-ils.auth.authenticate.complete";
+var LOGIN_DELETE                                       = "open-ils.auth:open-ils.auth.session.delete";
+var FETCH_USER_PREFS                           = "open-ils.actor:open-ils.actor.patron.settings.retrieve"; 
+var UPDATE_USER_PREFS                  = "open-ils.actor:open-ils.actor.patron.settings.update"; 
+var FETCH_COPY_STATUSES                        = "open-ils.search:open-ils.search.config.copy_status.retrieve.all";
+var FETCH_COPY_COUNTS_SUMMARY  = "open-ils.search:open-ils.search.biblio.copy_counts.summary.retrieve";
 /* ---------------------------------------------------------------------------- */
 
 
-
 /* ---------------------------------------------------------------------------- */
 /* event callback functions. Other functions may be appended to these vars to
        for added functionality.  */
index 57418d0..3fb2642 100644 (file)
@@ -8,9 +8,9 @@ attachEvt("common", "init", initParams);
 attachEvt("common", "init", initCookies);
 attachEvt("common", "init", drawOrgTree); 
 
-//attachEvt("common", "unload", _tree_killer);
+attachEvt("common", "unload", _tree_killer);
 //attachEvt("common", "unload", clearUIObjects);
-//attachEvt("common", "unload", cleanRemoteRequests);
+attachEvt("common", "unload", cleanRemoteRequests);
 
 function init() {
        runEvt('common','init');
index 0956d7e..f5f9ab6 100644 (file)
@@ -268,6 +268,13 @@ function scaleFonts(type) {
 }
 
 
+function sortWordsIgnoreCase(a, b) {
+       a = a.toLowerCase();
+       b = b.toLowerCase();
+       if(a>b) return 1;
+       if(a<b) return -1;
+       return 0;
+}
 
 
 
index 8f7c5f4..af97cfa 100644 (file)
 <!ENTITY sidebar.relevantAuthors.headerLabel "Relevant Authors">
 <!ENTITY sidebar.relevantSeries.headerLabel "Relevant Series">
 
+
+<!-- Record Details -->
+<!ENTITY rdetail.detailMain.headerLabel "Record Details">
+<!ENTITY rdetail.detailMain.title "Title">
+<!ENTITY rdetail.detailMain.author "Author">
+<!ENTITY rdetail.detailMain.isbn "ISBN">
+<!ENTITY rdetail.detailMain.edition "Edition">
+<!ENTITY rdetail.detailMain.pubdate "Publication Date">
+<!ENTITY rdetail.detailMain.publisher "Publisher">
+<!ENTITY rdetail.detailMain.tor "Type of Resource">
+<!ENTITY rdetail.detailMain.subjects "Subjects">
+<!ENTITY rdetail.detailMain.abstract "Abstract">
+<!ENTITY rdetail.copyInfo.headerLabel "Copy Information">
+<!ENTITY rdetail.copyInfo.library "Library">
+<!ENTITY rdetail.copyInfo.callnumber "Callnumber">
index c27c6ef..f742da5 100644 (file)
 
 /* ---------------------------------------------------------------------- */
 
+#rdetail_detail_main { width 100%; }
+#rdetail_details_table { padding-top: 10px; width: 100%; padding: 30px; border-collapse: collapse;}
+.rdetail_header { padding: 3px; padding-left: 10px; font-weight: 600; }
+.rdetail_desc { padding-left: 5px; }
+.rdetail_item { width: 75%; padding-left: 10px; }
+#rdetail_image { padding-right: 10px; }
+#rdetail_copy_info_table { padding: 4px; width: 100%; border-collapse: collapse; }
+
+
 
index 1e347ee..669cc15 100644 (file)
@@ -94,11 +94,23 @@ config.ids.sidebar.advanced_link    = 'advanced_link'
 config.ids.sidebar.myopac_link = 'myopac_link'
 
 config.names.sidebar.subject_item      = 'subject_item';
-config.names.sidebar.author_item       = 'author_item';
-config.names.sidebar.series_item       = 'series_item';
+config.names.sidebar.author_item               = 'author_item';
+config.names.sidebar.series_item               = 'series_item';
 
 /* record detail */
+/*
 config.ids.rdetail = {};
+config.ids.rdetail.details_body        = 'rdetail_details_body'; 
+config.ids.rdetail.title                       = 'rdetail_title';
+config.ids.rdetail.author                      = 'rdetail_author';
+config.ids.rdetail.isbn                                = 'rdetail_isbn';
+config.ids.rdetail.edition                     = 'rdetail_edition';
+config.ids.rdetail.pubdate                     = 'rdetail_pubdate';
+config.ids.rdetail.publisher           = 'rdetail_publisher';
+config.ids.rdetail.tor                         = 'rdetail_tor';
+config.ids.rdetail.abstr                       = 'rdetail_abstract';
+config.ids.rdetail.image                       = 'rdetail_image';
+*/
 
 
 /* XUL */
index bb7724e..1197f91 100644 (file)
@@ -1,6 +1,3 @@
-var subjectCache = {};
-var authorCache = {};
-var seriesCache = {};
 
 var recordsHandled = 0;
 var recordsCache = [];
@@ -180,6 +177,11 @@ function resultDisplayCopyCounts(rec, pagePosition, copy_counts) {
 
 
 /* captures extraneous info from each record */
+
+var subjectCache = {};
+var authorCache = {};
+var seriesCache = {};
+
 function resultBuildCaches(records) {
        for( var r in records ) {
                var rec = records[r];
@@ -190,7 +192,6 @@ function resultBuildCaches(records) {
        }
 }
 
-
 function resultSortSubjects(a, b) { return -(a.count - b.count); } /* sort in reverse */
 function resultDrawSubjects() {
 
index 91f45d4..f8acbaa 100644 (file)
                        <xi:include href="altcanvas.xml"/>
 
                        <div id='canvas_main'>
-                       </div>
 
+                               <div>
+                                       <div class='rdetail_header color_1'>
+                                               <span>&rdetail.detailMain.headerLabel;</span>
+                                       </div>
+
+                                       <!-- This holds the basic user friendly record information, e.g. title, author, etc. -->
+                                       <div>
+                                               <table id='rdetail_details_table'>
+                                                       <tbody id='rdetail_details_tbody'>
+
+                                                               <tr>
+                                                                       <td id='rdetail_image_cell' rowspan='8'><img id='rdetail_image'> </img></td>
+                                                                       <td class='rdetail_desc'>&rdetail.detailMain.title;</td>                
+                                                                       <td class='rdetail_item' id='rdetail_title'> </td>
+                                                               </tr>
+
+                                                               <tr>
+                                                                       <td class='rdetail_desc'>&rdetail.detailMain.author;</td>               
+                                                                       <td class='rdetail_item' id='rdetail_author'> </td>
+                                                               </tr>
+
+                                                               <tr>
+                                                                       <td class='rdetail_desc'>&rdetail.detailMain.isbn;</td>                 
+                                                                       <td class='rdetail_item' id='rdetail_isbn'> </td>
+                                                               </tr>
+
+                                                               <tr>
+                                                                       <td class='rdetail_desc'>&rdetail.detailMain.edition;</td>              
+                                                                       <td class='rdetail_item' id='rdetail_edition'> </td>
+                                                               </tr>
+
+                                                               <tr>
+                                                                       <td class='rdetail_desc'>&rdetail.detailMain.pubdate;</td>              
+                                                                       <td class='rdetail_item' id='rdetail_pubdate'> </td>
+                                                               </tr>
+
+                                                               <tr>
+                                                                       <td class='rdetail_desc'>&rdetail.detailMain.publisher;</td>            
+                                                                       <td class='rdetail_item' id='rdetail_publisher'> </td>
+                                                               </tr>
+
+                                                               <tr>
+                                                                       <td class='rdetail_desc'>&rdetail.detailMain.tor;</td>                  
+                                                                       <td class='rdetail_item' id='rdetail_tor'> </td>
+                                                               </tr>
+
+                                                               <tr>
+                                                                       <td class='rdetail_desc'>&rdetail.detailMain.abstract;</td>     
+                                                                       <td class='rdetail_item' id='rdetail_abstract'> </td>
+                                                               </tr>
+
+                                                       </tbody>
+                                               </table>
+                                       </div> <!-- details_body -->
+                               </div> <!-- details_main -->
+
+                               <br/><br/>
+
+                               <!-- This holds information for copies attached to this record -->
+                               <div>
+
+                                       <div class='color_1 rdetail_header'>
+                                               <span>&rdetail.copyInfo.headerLabel;</span>
+                                       </div>
+
+                                       <table id='rdetail_copy_info_table'>
+                                               <tbody>
+
+                                                       <tr>
+                                                               <td  nowrap='nowrap' class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.library;</td>
+                                                               <td  nowrap='nowrap' class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.callnumber;</td>
+                                                               <td  nowrap='nowrap' class='rdetail_copy_info_header_cell' id='rdetail_copy_info_status'> </td>
+                                                       </tr>
+
+                                                       <tr id='rdetail_copy_info_row'>
+                                                               <td name='rdetail_library_cell'> </td>
+                                                               <td name='rdetail_callnumber_cell'> </td>
+                                                               <td name='rdetail_copy_count_cell' align='center'> </td>
+                                                       </tr>
+
+                                                       <tr id='rdetail_copy_info_loading'>
+                                                               <td>Loading copy information...</td>
+                                                       </tr>
+
+                                               </tbody>
+                                       </table>
+                               </div> <!-- copy info -->
+
+                       </div>
                </div>
        </body>
-
 </html>
+
+
+
index 0bff262..e152b9d 100644 (file)
@@ -17,6 +17,13 @@ body a:hover { color: red; text-decoration: underline;}
 .search_link { text-decoration: none; }
 .result_table_subtable { border-top: 1px solid #E0E0E0; }
 .copy_count_cell_even { border: 1px solid #E0E0E0; }
+.rdetail_desc { border: 1px solid #A7EA9D; }
+.rdetail_item { border: 1px solid #A7EA9D; }
+#rdetail_details_table { border: 1px solid #A7EA9D; }
+#rdetail_image_cell { border: 1px solid white; border-right: 1px solid #A7EA9D;}
+.rdetail_header { border: 1px solid #FCC; }
+.rdetail_copy_info_header_cell { padding-left: 3px; border: 1px solid #A7EA9D; }
+.rdetail_copy_info_alt { background: #A7EA9D; }
 /* ---------------------------------------------------------------------- */