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

(-)a/acqui/newordersuggestion.pl (-7 / +9 lines)
Lines 128-146 if ( $op eq 'connectDuplicate' ) { Link Here
128
}
128
}
129
129
130
# getting all suggestions.
130
# getting all suggestions.
131
my $suggestions_loop =
131
my $suggestions_loop = SearchSuggestion(
132
        &SearchSuggestion( 
132
    {
133
                { managedby 	=> $borrowernumber, 
133
        author        => $author,
134
                author		  	=> $author, 
134
        title         => $title,
135
                title			=> $title, 
135
        publishercode => $publishercode,
136
                publishercode	=> $publishercode,
136
        STATUS        => 'ACCEPTED'
137
                STATUS        => 'ACCEPTED'});
137
    }
138
);
138
my $vendor = GetBookSellerFromId($booksellerid);
139
my $vendor = GetBookSellerFromId($booksellerid);
139
$template->param(
140
$template->param(
140
    suggestions_loop        => $suggestions_loop,
141
    suggestions_loop        => $suggestions_loop,
141
    basketno                => $basketno,
142
    basketno                => $basketno,
142
    booksellerid              => $booksellerid,
143
    booksellerid              => $booksellerid,
143
    name					=> $vendor->{'name'},
144
    name					=> $vendor->{'name'},
145
    loggedinuser            => $borrowernumber,
144
    "op_$op"                => 1,
146
    "op_$op"                => 1,
145
);
147
);
146
148
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt (-1 / +10 lines)
Lines 8-17 Link Here
8
 $(document).ready(function() {
8
 $(document).ready(function() {
9
    var suggestionst = $("#suggestionst").dataTable($.extend(true, {}, dataTablesDefaults, {
9
    var suggestionst = $("#suggestionst").dataTable($.extend(true, {}, dataTablesDefaults, {
10
        "aoColumnDefs": [
10
        "aoColumnDefs": [
11
            { "aTargets": [ 0 ],  "bVisible": false, "bSearchable": false },
11
            { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
12
            { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
12
        ],
13
        ],
13
        "sPaginationType": "four_button"
14
        "sPaginationType": "four_button"
14
    } ) );
15
    } ) );
16
    $("#show_only_mine").on('click', function(){
17
        suggestionst.fnFilter('^[% loggedinuser %]$', 0, true);
18
    });
19
    $("#show_all").on('click', function(){
20
        suggestionst.fnFilter('', 0 );
21
    });
15
 });
22
 });
16
 //]]>
23
 //]]>
17
</script>
24
</script>
Lines 30-38 Link Here
30
	
37
	
31
<h1>Suggestions</h1>
38
<h1>Suggestions</h1>
32
    [% IF ( suggestions_loop ) %]
39
    [% IF ( suggestions_loop ) %]
40
    <a href="#" id="show_only_mine">Show only mine</a> | <a href="#" id="show_all">Show all suggestions</a>
33
    <table id="suggestionst">
41
    <table id="suggestionst">
34
        <thead>
42
        <thead>
35
        <tr>
43
        <tr>
44
            <th>Mine</th>
36
            <th>Suggestion</th>
45
            <th>Suggestion</th>
37
            <th>Suggested by</th>
46
            <th>Suggested by</th>
38
            <th>Accepted by</th>
47
            <th>Accepted by</th>
Lines 42-47 Link Here
42
        <tbody>
51
        <tbody>
43
        [% FOREACH suggestions_loo IN suggestions_loop %]
52
        [% FOREACH suggestions_loo IN suggestions_loop %]
44
            <tr>
53
            <tr>
54
                <td>[% suggestions_loo.managedby %]</td>
45
                <td>
55
                <td>
46
                    <p>[% suggestions_loo.title |html %] - [% suggestions_loo.author %]</p>
56
                    <p>[% suggestions_loo.title |html %] - [% suggestions_loo.author %]</p>
47
                    <p>
57
                    <p>
48
- 

Return to bug 12775