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

Evergreen Git git at git.evergreen-ils.org
Mon Oct 17 15:02:55 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  7114a6b284d57814a7937741d3afac97025ab917 (commit)
       via  19bd5bf1e2376d652440946b2f6b2d5f2daa2f24 (commit)
      from  0609edea9c6a0e51c4362a6dcaea601e36f06b62 (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 7114a6b284d57814a7937741d3afac97025ab917
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Oct 17 15:00:33 2011 -0400

    TPac: Describe bookbags mo' semantically
    
    Rather than "big-strong", use a heading (H2, as the previously used H2
    headings got bumped to H1) and wrap the description in a styled DIV
    rather than just dumping it after a <br /> and wrapping it in <em>.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/myopac/lists.tt2 b/Open-ILS/src/templates/opac/myopac/lists.tt2
index a49b654..7665f43 100644
--- a/Open-ILS/src/templates/opac/myopac/lists.tt2
+++ b/Open-ILS/src/templates/opac/myopac/lists.tt2
@@ -79,8 +79,8 @@
                     url = mkurl(baseurl, {}, ['id', 'edit_notes']);
                     ltitle = l("Hide items in list");
                 END %]
-                <a class="big-strong" title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a>
-                [% IF bbag.description %]<br /><em>[% bbag.description | html %]</em>[% END %]
+                <h2 class="bookbag-name"><a title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a></h2>
+                [% IF bbag.description %]<div class="bookbag-description">[% bbag.description | html %]</div>[% END %]
             </div>
             <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
                 <div class="bookbag-share">
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index d7481a6..3af0990 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1153,8 +1153,13 @@ a.opac-button {
 .bookbag-controls-holder:nth-child(odd) { background-color: #d7d7d7; }
 .bookbag-controls-holder:nth-child(even) { background-color: #e3e3e3; }
 .bookbag-controls-holder .most { padding-left: 0; width: 55%; }
+h2.bookbag-name { margin-bottom: 0em; padding-bottom: 0em; }
 .bookbag-share .fixed { min-width: 4em; }
 .bookbag-specific { margin-left: 1em; }
+.bookbag-description {
+    padding-top: 0em;
+    font-style: italic;
+}
 table.bookbag-specific {
     border-right: 1px solid #999;
     border-bottom: 1px solid #666;

commit 19bd5bf1e2376d652440946b2f6b2d5f2daa2f24
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Oct 14 17:53:49 2011 -0400

    TPac: bookbags - stop trying to show everything at once
    
    Go back to displaying one bookbag at a time (not counting the temporary
    list, when that is populated)
    
    This hopefully constitutes a usability improvement.
    
    While it doesn't provide paging of bookbags themselves or of the items
    therein, it should make that easier to do.  Showing all bookbags and all
    their items made it nonobvious how paging would even be expected to
    behave.
    
    This also provides the same sorting for the items in the temporary list
    as in real bookbags.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
index c0dbf7b..0ecf415 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
@@ -1854,6 +1854,28 @@ sub get_bre_attrs {
     return $attrs;
 }
 
+# Shorter version of bib_container_items_via_search() below, only using
+# the queryparser record_list filter instead of the container filter.
+sub bib_record_list_via_search {
+    my ($class, $search_query, $search_args) = @_;
+
+    # First, Use search API to get container items sorted in any way that crad
+    # sorters support.
+    my $search_result = $class->simplereq(
+        "open-ils.search", "open-ils.search.biblio.multiclass.query",
+        $search_args, $search_query
+    );
+
+    unless ($search_result) {
+        # empty result sets won't cause this, but actual errors should.
+        $logger->warn("bib_record_list_via_search() got nothing from search");
+        return;
+    }
+
+    # Throw away other junk from search, keeping only bib IDs.
+    return [ map { pop @$_ } @{$search_result->{ids}} ];
+}
+
 sub bib_container_items_via_search {
     my ($class, $container_id, $search_query, $search_args) = @_;
 
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 9952c8c..a1c2de4 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -245,13 +245,13 @@ sub _load_user_with_prefs {
 }
 
 sub _get_bookbag_sort_params {
-    my ($self) = @_;
+    my ($self, $param_name) = @_;
 
     # The interface that feeds this cgi parameter will provide a single
     # argument for a QP sort filter, and potentially a modifier after a period.
     # In practice this means the "sort" parameter will be something like
     # "titlesort" or "authorsort.descending".
-    my $sorter = $self->cgi->param("sort") || "";
+    my $sorter = $self->cgi->param($param_name) || "";
     my $modifier;
     if ($sorter) {
         $sorter =~ s/^(.*?)\.(.*)/$1/;
@@ -272,6 +272,18 @@ sub _prepare_bookbag_container_query {
     );
 }
 
+sub _prepare_anonlist_sorting_query {
+    my ($self, $list, $sorter, $modifier) = @_;
+
+    return sprintf(
+        "record_list(%s)%s%s",
+        join(",", @$list),
+        ($sorter ? " sort($sorter)" : ""),
+        ($modifier ? "#$modifier" : "")
+    );
+}
+
+
 sub load_myopac_prefs_settings {
     my $self = shift;
 
@@ -1323,7 +1335,7 @@ sub load_myopac_bookbags {
     my $e = $self->editor;
     my $ctx = $self->ctx;
 
-    my ($sorter, $modifier) = $self->_get_bookbag_sort_params;
+    my ($sorter, $modifier) = $self->_get_bookbag_sort_params("sort");
     $e->xact_begin; # replication...
 
     my $rv = $self->load_mylist;
@@ -1348,13 +1360,18 @@ sub load_myopac_bookbags {
         return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
     }
     
-    # Here is the loop that uses search to find the bib records in each
-    # bookbag.  XXX This should be parallelized.  Should this be done
-    # with OpenSRF::MultiSession, or is it enough to use OpenSRF::AppSession
-    # and call ->request() without calling ->gather() on any of those objects
-    # until all the requests have been issued?
+    # If the user wants a specific bookbag's items, load them.
+    # XXX add bookbag item paging support
+
+    if ($self->cgi->param("id")) {
+        my ($bookbag) =
+            grep { $_->id eq $self->cgi->param("id") } @{$ctx->{bookbags}};
+
+        if (!$bookbag) {
+            $e->rollback;
+            return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+        }
 
-    foreach my $bookbag (@{$ctx->{bookbags}}) {
         my $query = $self->_prepare_bookbag_container_query(
             $bookbag->id, $sorter, $modifier
         );
@@ -1491,6 +1508,7 @@ sub load_myopac_bookbag_update {
         }
     } elsif ($action eq 'save_notes') {
         $success = $self->update_bookbag_item_notes;
+        $url .= "&id=" . uri_escape($cgi->param("id")) if $cgi->param("id");
     }
 
     return $self->generic_redirect($url) if $success;
@@ -1591,7 +1609,7 @@ sub load_myopac_bookbag_print {
 
     my $id = int($self->cgi->param("list"));
 
-    my ($sorter, $modifier) = $self->_get_bookbag_sort_params;
+    my ($sorter, $modifier) = $self->_get_bookbag_sort_params("sort");
 
     my $item_search =
         $self->_prepare_bookbag_container_query($id, $sorter, $modifier);
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 b1ebf4a..6cc6796 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
@@ -33,6 +33,15 @@ sub fetch_mylist {
         $marc_xml = $self->fetch_marc_xml_by_id($list);
     }
 
+    # Leverage QueryParser to sort the items by values of config.metabib_fields
+    # from the items' marc records.
+    if (@$list) {
+        my ($sorter, $modifier) = $self->_get_bookbag_sort_params("anonsort");
+        my $query = $self->_prepare_anonlist_sorting_query($list, $sorter, $modifier);
+        $list = $U->bib_record_list_via_search($query) or
+            return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+    }
+
     return ($cache_key, $list, $marc_xml);
 }
 
diff --git a/Open-ILS/src/templates/opac/myopac/lists.tt2 b/Open-ILS/src/templates/opac/myopac/lists.tt2
index 5615fa9..a49b654 100644
--- a/Open-ILS/src/templates/opac/myopac/lists.tt2
+++ b/Open-ILS/src/templates/opac/myopac/lists.tt2
@@ -22,7 +22,7 @@
 
     <!-- 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>
+        <h1>[% l('Create new list') %]</h1><a name="createnewlist"></a>
         <table cellpadding="0" border="0" id="list_create_table">
             <tr>
                 <td>
@@ -64,155 +64,157 @@
         </table>
     </form>
 
-    <h2>[% l("Your existing lists") %]</h2>
-    <p>
-        <form method="GET">
-            <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
-            [% INCLUDE "opac/parts/filtersort.tt2"
-                value=CGI.param('sort') %]
-            <input type="submit" value="[% l('Sort') %]" />
-        </form>
-    </p>
-
+    <h1>[% l("Your existing lists") %]</h1>
     [% INCLUDE "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>
-                <form action="[% ctx.opac_root %]/myopac/list/print" method="POST">
-                    <div class="bookbag-controls">
-                        <input type="hidden" name="list" value="[% bbag.id %]" />
-                        <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
-                        <input type="submit" value="[% l('Download CSV') %]" />
-                    </div>
-                </form>
-                <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 | html %]</a>
+        <div class="bookbag-controls-holder">
+            <div class="bookbag-controls most">
+                [% baseurl = ctx.opac_root _ '/myopac/lists';
+                IF bbag.id != CGI.param("id");
+                    url = mkurl(baseurl, {id => bbag.id}, ['edit_notes']);
+                    ltitle = l("Show items in list");
+                ELSE;
+                    url = mkurl(baseurl, {}, ['id', 'edit_notes']);
+                    ltitle = l("Hide items in list");
+                END %]
+                <a class="big-strong" title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a>
+                [% IF bbag.description %]<br /><em>[% bbag.description | html %]</em>[% 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 class="fixed" type="submit" value="[% l('Share') %]" />
                     [% ELSE %]
-                    [% bbag.name | html %]
+                    <input type="hidden" name="action" value="hide" />
+                    <input class="fixed" type="submit" value="[% l('Hide') %]" />
                     [% END %]
-                    </strong></big>
-                    [% IF bbag.description %]<br /><em>[% bbag.description | html %]</em>[% 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>
+            <form action="[% ctx.opac_root %]/myopac/list/print" method="POST">
                 <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 %]
+                    <input type="hidden" name="list" value="[% bbag.id %]" />
+                    <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
+                    <input type="submit" value="[% l('Download CSV') %]" />
                 </div>
-                <div class="clear-both pad-bottom-five"></div>
+            </form>
+            <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>
-            <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
-            <input type="hidden" name="list" value="[% bbag.id %]" />
-            <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
-            <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 == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %]) 
-                                    inputs[i].checked = this.checked;}"/>
+            <div class="clear-both pad-bottom-five"></div>
+        </div>
+        [% IF CGI.param("id") == bbag.id %]
+        <div class="bookbag-specific">
+            <form method="GET">
+                <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
+                [% INCLUDE "opac/parts/filtersort.tt2"
+                    value=CGI.param('sort') %]
+                <input type="hidden" name="id"
+                    value="[% CGI.param('id') | html %]" />
+                <input type="submit" value="[% l('Sort') %]" />
+            </form>
+        </div>
+        <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
+        <input type="hidden" name="list" value="[% bbag.id %]" />
+        <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
+        <table class="bookbag-specific" 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 == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %]) 
+                                inputs[i].checked = this.checked;}"/>
 
-                        </td>
-                        <td width="32%" style="padding-left: 5px;">
-                            <a href="[% ctx.opac_root %]/myopac/lists?sort=titlesort">[% l('Title') %]</a>
-                        </td>
-                        <td width="33%">
-                            <a href="[% ctx.opac_root %]/myopac/lists?sort=authorsort">[% l('Author(s)') %]</a>
-                        </td>
-                        <td width="32%">
-                            [% l('Notes') %]
-                            [% IF CGI.param("edit_notes") != bbag.id %]
-                            | <a href="[% ctx.opac_root %]/myopac/lists?[% IF CGI.param('sort'); 'sort='; (CGI.param('sort')) | uri; '&amp;'; END %]edit_notes=[% bbag.id %]">[% l('Edit') %]</a>
-                            [% END %]
-                        </td>
-                        <td width="1%" class="nowrap">
-                            <select class="selector_actions_for_list" name="action">
-                                <option>[% l('-- Actions for this list --') %]</option>
-                                <option value="place_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.id;
-                        attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
-                        PROCESS get_marc_attrs args=attrs %]
-                    <tr class="bookbag-item-row">
-                        <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>
-                        [% IF CGI.param("edit_notes") == bbag.id %]
-                        <td class="opac-auto-097b">
-                            [% FOR note IN item.notes %]
-                            <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
-                            [% END %]
-                            <input type="text" name="item-[% item.id %]" />
-                        </td>
-                        [% ELSE %]
-                        <td class="opac-auto-097b">
-                            [% FOR note IN item.notes %]
-                            <div>[% note.note | html %]</div>
-                            [% END %]
-                        </td>
+                    </td>
+                    <td width="32%" style="padding-left: 5px;">
+                        <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>'titlesort'}) %]">[% l('Title') %]</a>
+                    </td>
+                    <td width="33%">
+                        <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>'authorsort'}) %]">[% l('Author(s)') %]</a>
+                    </td>
+                    <td width="32%">
+                        [% l('Notes') %]
+                        [% IF CGI.param("edit_notes") != bbag.id %]
+                        | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
                         [% END %]
-                    </tr>
-                    [% END %]
+                    </td>
+                    <td width="1%" class="nowrap">
+                        <select name="action">
+                            <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
+                            <option value="place_hold">[% l('Place hold') %]</option>
+                            <option value="del_item">[% l('Remove from list') %]</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.id;
+                    attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
+                    PROCESS get_marc_attrs args=attrs %]
+                <tr class="bookbag-item-row">
+                    <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, {}, ['edit_notes', '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', 'id', 'edit_notes'])
+                            -%]">[% attrs.author | html %]</a>
                     [% IF CGI.param("edit_notes") == bbag.id %]
-                    <tr>
-                        <td colspan="3"><!-- All space left of notes column --></td>
-                        <td>
-                            <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
-                        </td>
-                    </tr>
+                    <td class="opac-auto-097b">
+                        [% FOR note IN item.notes %]
+                        <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
+                        [% END %]
+                        <input type="text" name="item-[% item.id %]" />
+                    </td>
+                    [% ELSE %]
+                    <td class="opac-auto-097b">
+                        [% FOR note IN item.notes %]
+                        <div>[% note.note | html %]</div>
+                        [% END %]
+                    </td>
                     [% END %]
-                </tbody>
-            </table>
-            </form>
-            <hr /><br />
-        </div>
+                </tr>
+                [% END %]
+                [% IF CGI.param("edit_notes") == bbag.id %]
+                <tr>
+                    <td colspan="3"><!-- All space left of notes column --></td>
+                    <td class="save-notes">
+                        <input type="hidden" name="id" value="[% CGI.param('id') | html %]" />
+                        <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
+                    </td>
+                </tr>
+                [% END %]
+            </tbody>
+        </table>
+        </form>
+        [% END %]
         [% END %]
     </div>
     [% END %]
diff --git a/Open-ILS/src/templates/opac/parts/anon_list.tt2 b/Open-ILS/src/templates/opac/parts/anon_list.tt2
index 5101117..3c32f99 100644
--- a/Open-ILS/src/templates/opac/parts/anon_list.tt2
+++ b/Open-ILS/src/templates/opac/parts/anon_list.tt2
@@ -1,22 +1,20 @@
         [% IF ctx.mylist.size %]
+        <div class="bookbag-specific">
+            <form method="GET">
+                <label for="anonsort">[% l("Sort list items by: ") %]</label>
+                [% INCLUDE "opac/parts/filtersort.tt2"
+                    id="anonsort" name="anonsort" value=CGI.param("anonsort") %]
+                <input type="hidden" name="id"
+                    value="[% CGI.param('id') | html %]" />
+                <!-- just preserve this --><input type="hidden" name="sort"
+                    value="[% CGI.param('sort') | html %]" />
+                <input type="submit" value="[% l('Sort') %]" />
+            </form>
+        </div>
+
         <form action="[% ctx.opac_root %]/mylist/move" method="POST">
         <div>
-            <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>
+            <p class="big-strong">[% l('Temporary List') %]</p>
             <table cellpadding='0' cellspacing='0' border='0'>
                 <thead id="acct_list_header_anon">
                     <tr>
@@ -26,13 +24,13 @@
                                 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>
+                        <td width="49%" class="opac-auto-108"><a href="[% mkurl('', {anonsort=>'titlesort'}) %]">[% l('Title') %]</a></td>
+                        <td width="49%" class="opac-auto-108"><a href="[% mkurl('', {anonsort=>'authorsort'}) %]">[% l('Author(s)') %]</a% l('Author(s)') %]</td>
                         <td width="1%" class="nowrap">
-                            <select class="selector_actions_for_list" name="action">
-                                <option>[% l('-- Actions for this list --') %]</option>
-                                <option value="place_hold">[% l('Place Hold') %]</option>
-                                <option value="delete">[% l('Remove Items') %]</option>
+                            <select name="action">
+                                <option>[% l('-- Actions for these items --') %]</option>
+                                <option value="place_hold">[% l('Place hold') %]</option>
+                                <option value="delete">[% l('Remove from list') %]</option>
                                 [% IF ctx.user AND ctx.bookbags.size %]
                                 <optgroup label="Move selected items to">
                                     [% FOR bbag IN ctx.bookbags %]]
@@ -53,8 +51,15 @@
                         <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 | html %]</td>
-                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.author | html %]</td>
+                        <td class="item_list_padding" style="padding-left: 5px;"><a href="[% mkurl(ctx.opac_root _ '/record/' _ item, {}, ['edit_notes', 'id']) %]">[% attrs.title | html %]</a></td>
+                        <td class="item_list_padding" style="padding-left: 5px;"><a href="[%- 
+                            authorquery = attrs.author | replace('[,\.:;]', '');
+                            mkurl(
+                                ctx.opac_root _ '/results',
+                                {qtype => 'author', query => authorquery},
+                                ['page', 'id', 'edit_notes']
+                            )
+                        -%]">[% attrs.author | html %]</a></td>
                     </tr>
                     [% END %]
                 </tbody>
diff --git a/Open-ILS/src/templates/opac/parts/filtersort.tt2 b/Open-ILS/src/templates/opac/parts/filtersort.tt2
index 74d9c8a..a1b1fd4 100644
--- a/Open-ILS/src/templates/opac/parts/filtersort.tt2
+++ b/Open-ILS/src/templates/opac/parts/filtersort.tt2
@@ -1,4 +1,4 @@
-<select [% class ? ('class="' _ class _ '"') : '' %] id='opac.result.sort' name="[% name || 'sort' %]" [% IF submit_on_change %]onchange='this.form.submit()'[% END %]>
+<select [% class ? ('class="' _ class _ '"') : '' %] id='[% id || "opac.result.sort" %]' name="[% 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/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 449a4b2..d7481a6 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1149,3 +1149,15 @@ a.opac-button {
     margin-left: 1em;
     padding-left: 1em;
 }
+.bookbag-controls-holder { width: 100%; }
+.bookbag-controls-holder:nth-child(odd) { background-color: #d7d7d7; }
+.bookbag-controls-holder:nth-child(even) { background-color: #e3e3e3; }
+.bookbag-controls-holder .most { padding-left: 0; width: 55%; }
+.bookbag-share .fixed { min-width: 4em; }
+.bookbag-specific { margin-left: 1em; }
+table.bookbag-specific {
+    border-right: 1px solid #999;
+    border-bottom: 1px solid #666;
+    margin-bottom: 2ex;
+}
+.save-notes { padding-bottom: 1.5ex; }

-----------------------------------------------------------------------

Summary of changes:
 .../perlmods/lib/OpenILS/Application/AppUtils.pm   |   22 ++
 .../lib/OpenILS/WWW/EGCatLoader/Account.pm         |   38 ++-
 .../lib/OpenILS/WWW/EGCatLoader/Container.pm       |    9 +
 Open-ILS/src/templates/opac/myopac/lists.tt2       |  274 ++++++++++----------
 Open-ILS/src/templates/opac/parts/anon_list.tt2    |   53 ++--
 Open-ILS/src/templates/opac/parts/filtersort.tt2   |    2 +-
 Open-ILS/web/css/skin/default/opac/style.css       |   17 ++
 7 files changed, 244 insertions(+), 171 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list