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

(-)a/catalogue/ISBDdetail.pl (+8 lines)
Lines 118-123 if($query->cookie("holdfor")){ Link Here
118
    );
118
    );
119
}
119
}
120
120
121
if( $query->cookie("searchToOrder") ){
122
    my ( $basketno, $vendorid ) = split( /\//, $query->cookie("searchToOrder") );
123
    $template->param(
124
        searchtoorder_basketno => $basketno,
125
        searchtoorder_vendorid => $vendorid
126
    );
127
}
128
121
# count of item linked with biblio
129
# count of item linked with biblio
122
my $itemcount = $biblio->items->count;
130
my $itemcount = $biblio->items->count;
123
$template->param( count => $itemcount);
131
$template->param( count => $itemcount);
(-)a/catalogue/MARCdetail.pl (+8 lines)
Lines 113-118 if($query->cookie("holdfor")){ Link Here
113
    );
113
    );
114
}
114
}
115
115
116
if( $query->cookie("searchToOrder") ){
117
    my ( $basketno, $vendorid ) = split( /\//, $query->cookie("searchToOrder") );
118
    $template->param(
119
        searchtoorder_basketno => $basketno,
120
        searchtoorder_vendorid => $vendorid
121
    );
122
}
123
116
$template->param( ocoins => $biblio_object->get_coins );
124
$template->param( ocoins => $biblio_object->get_coins );
117
125
118
#count of item linked
126
#count of item linked
(-)a/catalogue/detail.pl (+8 lines)
Lines 126-131 if($query->cookie("holdfor")){ Link Here
126
    );
126
    );
127
}
127
}
128
128
129
if($query->cookie("searchToOrder")){
130
    my ( $basketno, $vendorid ) = split( /\//, $query->cookie("searchToOrder") );
131
    $template->param(
132
        searchtoorder_basketno => $basketno,
133
        searchtoorder_vendorid => $vendorid
134
    );
135
}
136
129
my $fw           = GetFrameworkCode($biblionumber);
137
my $fw           = GetFrameworkCode($biblionumber);
130
my $showallitems = $query->param('showallitems');
138
my $showallitems = $query->param('showallitems');
131
my $marcflavour  = C4::Context->preference("marcflavour");
139
my $marcflavour  = C4::Context->preference("marcflavour");
(-)a/catalogue/imageviewer.pl (+8 lines)
Lines 67-72 if ( $query->cookie("holdfor") ) { Link Here
67
    );
67
    );
68
}
68
}
69
69
70
if( $query->cookie("searchToOrder") ){
71
    my ( $basketno, $vendorid ) = split( /\//, $query->cookie("searchToOrder") );
72
    $template->param(
73
        searchtoorder_basketno => $basketno,
74
        searchtoorder_vendorid => $vendorid
75
    );
76
}
77
70
if ( C4::Context->preference("LocalCoverImages") ) {
78
if ( C4::Context->preference("LocalCoverImages") ) {
71
    my @images = ListImagesForBiblio($biblionumber);
79
    my @images = ListImagesForBiblio($biblionumber);
72
    $template->{VARS}->{'LocalCoverImages'} = 1;
80
    $template->{VARS}->{'LocalCoverImages'} = 1;
(-)a/catalogue/labeledMARCdetail.pl (+8 lines)
Lines 79-84 if($query->cookie("holdfor")){ Link Here
79
    );
79
    );
80
}
80
}
81
81
82
if( $query->cookie("searchToOrder") ){
83
    my ( $basketno, $vendorid ) = split( /\//, $query->cookie("searchToOrder") );
84
    $template->param(
85
        searchtoorder_basketno => $basketno,
86
        searchtoorder_vendorid => $vendorid
87
    );
88
}
89
82
#count of item linked
90
#count of item linked
83
my $itemcount = $biblio_object->items->count;
91
my $itemcount = $biblio_object->items->count;
84
$template->param( count => $itemcount,
92
$template->param( count => $itemcount,
(-)a/catalogue/moredetail.pl (+8 lines)
Lines 60-65 if($query->cookie("holdfor")){ Link Here
60
    );
60
    );
61
}
61
}
62
62
63
if( $query->cookie("searchToOrder") ){
64
    my ( $basketno, $vendorid ) = split( /\//, $query->cookie("searchToOrder") );
65
    $template->param(
66
        searchtoorder_basketno => $basketno,
67
        searchtoorder_vendorid => $vendorid
68
    );
69
}
70
63
# get variables
71
# get variables
64
72
65
my $biblionumber=$query->param('biblionumber');
73
my $biblionumber=$query->param('biblionumber');
(-)a/catalogue/search.pl (+8 lines)
Lines 211-216 if($cgi->cookie("holdforclub")){ Link Here
211
    );
211
    );
212
}
212
}
213
213
214
if($cgi->cookie("searchToOrder")){
215
    my ( $basketno, $vendorid ) = split( /\//, $cgi->cookie("searchToOrder") );
216
    $template->param(
217
        searchtoorder_basketno => $basketno,
218
        searchtoorder_vendorid => $vendorid
219
    );
220
}
221
214
# get biblionumbers stored in the cart
222
# get biblionumbers stored in the cart
215
my @cart_list;
223
my @cart_list;
216
224
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-add-to-basket.inc (-8 / +6 lines)
Lines 3-16 Link Here
3
    [% IF has_budgets %]
3
    [% IF has_budgets %]
4
      <ul>
4
      <ul>
5
        <li>
5
        <li>
6
          <form action="/cgi-bin/koha/acqui/neworderbiblio.pl" method="post">
6
            <form action="/cgi-bin/koha/catalogue/search.pl" method="get">
7
            <label>From an existing record:
7
                <label>From an existing record:
8
                <input type="text"  size="25" name="q" required="required"/>
8
                    <input type="text" name="q" size="25" />
9
            </label>
9
                </label>
10
            <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
10
                <input type="submit" class="submit" id="searchtoorder" data-booksellerid="[% booksellerid | html %]" data-basketno="[% basketno | html %]" value="Submit" />
11
            <input type="hidden" name="basketno" value="[% basketno | html %]" />
11
            </form>
12
            <input type="submit" class="submit" value="Search" />
13
          </form>
14
        </li>
12
        </li>
15
        <li><a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">From a suggestion</a></li>
13
        <li><a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">From a suggestion</a></li>
16
        <li><a href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">From a subscription</a></li>
14
        <li><a href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">From a subscription</a></li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc (+8 lines)
Lines 139-144 CAN_user_serials_create_subscription ) %] Link Here
139
    <div class="btn-group"><a id="placehold" class="btn btn-default" href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% biblionumber | html %]"><i class="fa fa-file-text-o"></i> Request article</a></div>
139
    <div class="btn-group"><a id="placehold" class="btn btn-default" href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% biblionumber | html %]"><i class="fa fa-file-text-o"></i> Request article</a></div>
140
[% END %]
140
[% END %]
141
141
142
[% IF ( CAN_user_acquisition_order_manage ) %]
143
    [% IF ( searchtoorder_basketno && searchtoorder_vendorid ) %]
144
        <div class="btn-group">
145
            <a class="btn btn-default" href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% searchtoorder_vendorid | uri %]&amp;basketno=[% searchtoorder_basketno | uri %]&amp;biblionumber=[% biblionumber | uri %]"><i class="fa fa-shopping-basket"></i> Add order</a>
146
        </div>
147
    [% END %]
148
[% END %]
149
142
[% FOREACH p IN plugins %]
150
[% FOREACH p IN plugins %]
143
    [% p.intranet_catalog_biblio_enhancements_toolbar_button | $raw %]
151
    [% p.intranet_catalog_biblio_enhancements_toolbar_button | $raw %]
144
[% END %]
152
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (+1 lines)
Lines 783-788 Link Here
783
    [% INCLUDE 'datatables.inc' %]
783
    [% INCLUDE 'datatables.inc' %]
784
    [% INCLUDE 'columns_settings.inc' %]
784
    [% INCLUDE 'columns_settings.inc' %]
785
    [% Asset.js("lib/hc-sticky.js") | $raw %]
785
    [% Asset.js("lib/hc-sticky.js") | $raw %]
786
    [% Asset.js("js/acq.js") | $raw %]
786
    <script>
787
    <script>
787
        function updateColumnsVisibility(visible) {
788
        function updateColumnsVisibility(visible) {
788
            if ( visible ) {
789
            if ( visible ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt (+1 lines)
Lines 201-206 Link Here
201
[% MACRO jsinclude BLOCK %]
201
[% MACRO jsinclude BLOCK %]
202
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
202
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
203
    [% INCLUDE 'datatables.inc' %]
203
    [% INCLUDE 'datatables.inc' %]
204
    [% Asset.js("js/acq.js") | $raw %]
204
    <script>
205
    <script>
205
        $(document).ready(function() {
206
        $(document).ready(function() {
206
            $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, {
207
            $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt (+1 lines)
Lines 109-114 Link Here
109
[% MACRO jsinclude BLOCK %]
109
[% MACRO jsinclude BLOCK %]
110
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
110
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
111
    [% INCLUDE 'datatables.inc' %]
111
    [% INCLUDE 'datatables.inc' %]
112
    [% Asset.js("js/acq.js") | $raw %]
112
    <script>
113
    <script>
113
         $(document).ready(function() {
114
         $(document).ready(function() {
114
            var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
115
            var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (+6 lines)
Lines 473-478 Link Here
473
                                                        | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">Edit items</a>
473
                                                        | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">Edit items</a>
474
                                                    [% END %]
474
                                                    [% END %]
475
475
476
                                                    [% IF ( CAN_user_acquisition_order_manage ) %]
477
                                                        [% IF ( searchtoorder_basketno && searchtoorder_vendorid ) %]
478
                                                            | <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% searchtoorder_vendorid | uri %]&amp;basketno=[% searchtoorder_basketno | uri %]&amp;biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">Add order</a>
479
                                                        [% END %]
480
                                                    [% END %]
481
476
                                                    [% IF ( OPACBaseURL ) %]
482
                                                    [% IF ( OPACBaseURL ) %]
477
                                                        <span class="view-in-opac">
483
                                                        <span class="view-in-opac">
478
                                                            | <a href="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]" target="_blank">OPAC view</a>
484
                                                            | <a href="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]" target="_blank">OPAC view</a>
(-)a/koha-tmpl/intranet-tmpl/prog/js/acquisitions-menu.js (-1 / +14 lines)
Lines 1-6 Link Here
1
function searchToOrder( basketno, vendorid ){
2
    var date = new Date();
3
    var cookieData = "";
4
    date.setTime(date.getTime() + (10 * 60 * 1000));
5
    cookieData += basketno + "/" + vendorid;
6
    Cookies.set("searchToOrder", cookieData, { path: "/", expires: date });
7
}
8
1
$(document).ready(function() {
9
$(document).ready(function() {
2
    var path = location.pathname.substring(1);
10
    var path = location.pathname.substring(1);
3
    if (path.indexOf("invoice") >= 0) {
11
    if (path.indexOf("invoice") >= 0) {
4
        $('#navmenulist a[href$="/cgi-bin/koha/acqui/invoices.pl"]').addClass("current");
12
        $('#navmenulist a[href$="/cgi-bin/koha/acqui/invoices.pl"]').addClass("current");
5
    }
13
    }
14
15
    $("body").on("click", "#searchtoorder", function(){
16
        var vendorid = $(this).data("booksellerid");
17
        var basketno = $(this).data("basketno");
18
        searchToOrder( basketno, vendorid );
19
    });
6
});
20
});
7
- 

Return to bug 24347