View | Details | Raw Unified | Return to bug 19039
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-1 / +8 lines)
Lines 182-188 Link Here
182
                       <img src="[% interface %]/[% theme %]/img/ascdesc.gif" alt="" />
182
                       <img src="[% interface %]/[% theme %]/img/ascdesc.gif" alt="" />
183
                   [% END %]
183
                   [% END %]
184
                 </th>
184
                 </th>
185
                <th>Date added</th>
185
                <th>
186
                    <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber %]&amp;sortfield=dateadded&amp;direction=[% IF sortfield != 'dateadded' %]asc[% ELSE %][% new_direction %][% END %]">Date added</a>
187
                    [% IF sortfield == 'dateadded' %]
188
                        <img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" />
189
                    [% ELSE %]
190
                        <img src="[% interface %]/[% theme %]/img/ascdesc.gif" alt="" />
191
                    [% END %]
192
                </th>
186
                <th>
193
                <th>
187
                    <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber %]&amp;sortfield=itemcallnumber&amp;direction=[% IF sortfield != 'itemcallnumber' %]asc[% ELSE %][% new_direction %][% END %]">Call number</a>
194
                    <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber %]&amp;sortfield=itemcallnumber&amp;direction=[% IF sortfield != 'itemcallnumber' %]asc[% ELSE %][% new_direction %][% END %]">Call number</a>
188
                   [% IF sortfield == 'itemcallnumber' %]
195
                   [% IF sortfield == 'itemcallnumber' %]
(-)a/virtualshelves/shelves.pl (-2 / +1 lines)
Lines 233-239 if ( $op eq 'view' ) { Link Here
233
    if ( $shelf ) {
233
    if ( $shelf ) {
234
        if ( $shelf->can_be_viewed( $loggedinuser ) ) {
234
        if ( $shelf->can_be_viewed( $loggedinuser ) ) {
235
            my $sortfield = $query->param('sortfield') || $shelf->sortfield || 'title';    # Passed in sorting overrides default sorting
235
            my $sortfield = $query->param('sortfield') || $shelf->sortfield || 'title';    # Passed in sorting overrides default sorting
236
            $sortfield = 'title' unless grep {/^$sortfield$/}qw( title author copyrightdate itemcallnumber );
236
            $sortfield = 'title' unless grep {/^$sortfield$/}qw( title author copyrightdate itemcallnumber dateadded );
237
            my $direction = $query->param('direction') || 'asc';
237
            my $direction = $query->param('direction') || 'asc';
238
            $direction = 'asc' if $direction ne 'asc' and $direction ne 'desc';
238
            $direction = 'asc' if $direction ne 'asc' and $direction ne 'desc';
239
            my ( $rows, $page );
239
            my ( $rows, $page );
240
- 

Return to bug 19039