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

(-)a/C4/Suggestions.pm (-2 / +2 lines)
Lines 571-579 sub DelSuggestion { Link Here
571
571
572
=head2 DelSuggestionsOlderThan
572
=head2 DelSuggestionsOlderThan
573
    &DelSuggestionsOlderThan($days)
573
    &DelSuggestionsOlderThan($days)
574
    
574
575
    Delete all suggestions older than TODAY-$days , that have be accepted or rejected.
575
    Delete all suggestions older than TODAY-$days , that have be accepted or rejected.
576
    
576
577
=cut
577
=cut
578
578
579
sub DelSuggestionsOlderThan {
579
sub DelSuggestionsOlderThan {
(-)a/acqui/acqui-home.pl (-1 lines)
Lines 94-100 my $totavail_active = 0; Link Here
94
my @budget_loop;
94
my @budget_loop;
95
foreach my $budget ( @{$budget_arr} ) {
95
foreach my $budget ( @{$budget_arr} ) {
96
    next unless (CanUserUseBudget($loggedinuser, $budget, $userflags));
96
    next unless (CanUserUseBudget($loggedinuser, $budget, $userflags));
97
98
    $budget->{budget_code_indent} =~ s/\ /\&nbsp\;/g;
97
    $budget->{budget_code_indent} =~ s/\ /\&nbsp\;/g;
99
98
100
    $budget->{'budget_branchname'} =
99
    $budget->{'budget_branchname'} =
(-)a/acqui/duplicatesearch.pl (-2 / +2 lines)
Lines 22-28 Link Here
22
22
23
=head1 NAME
23
=head1 NAME
24
24
25
duplicatesearch.pl
25
duplicatefinder.pl
26
26
27
=head1 DESCRIPTION
27
=head1 DESCRIPTION
28
28
Lines 49-55 my $op = $input->param('op'); Link Here
49
# getting the template
49
# getting the template
50
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
50
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
51
    {
51
    {
52
        template_name   => "acqui/duplicatesearch.tmpl",
52
        template_name   => "acqui/duplicatefinder.tt",
53
        query           => $input,
53
        query           => $input,
54
        type            => "intranet",
54
        type            => "intranet",
55
        authnotrequired => 0,
55
        authnotrequired => 0,
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc (-1 / +1 lines)
Lines 5-11 Link Here
5
    [% IF ( CAN_user_acquisition_budget_manage ) %]
5
    [% IF ( CAN_user_acquisition_budget_manage ) %]
6
    <li><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a></li>
6
    <li><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a></li>
7
    <li><a href="/cgi-bin/koha/admin/aqbudgets.pl">Funds</a></li>
7
    <li><a href="/cgi-bin/koha/admin/aqbudgets.pl">Funds</a></li>
8
    <li><a href="/cgi-bin/koha/acqui/duplicatesearch.pl">Duplicate finder</a></li>
8
    <li><a href="/cgi-bin/koha/acqui/duplicatefinder.pl">Duplicate finder</a></li>
9
    [% END %]
9
    [% END %]
10
    [% IF ( CAN_user_parameters ) %]
10
    [% IF ( CAN_user_parameters ) %]
11
     <li><a href="/cgi-bin/koha/admin/currency.pl">Currencies</a></li>
11
     <li><a href="/cgi-bin/koha/admin/currency.pl">Currencies</a></li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicatefinder.tt (+148 lines)
Line 0 Link Here
1
[% USE KohaDates %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Acquisitions &rsaquo; Duplicate finder</title>
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5
[% INCLUDE 'doc-head-close.inc' %]
6
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7
[% INCLUDE 'datatables-strings.inc' %]
8
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
9
<script type="text/javascript">//<![CDATA[
10
    $(document).ready(function(){
11
        $("#order_results, #suggestion_results, #catalogue_results").dataTable($.extend(true, {}, dataTablesDefaults, {
12
            "sPaginationType": "four_button",
13
                "aoColumnDefs": [
14
                    { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
15
                ],
16
        } ) );
17
        $('#alerttabs').tabs();
18
    } );
19
    /**
20
     *  checkDuplicateFinderForm(myForm)
21
     *  This function checks the form to be correctly filled (search terms not empty).
22
     */
23
      function checkDuplicateFinderForm(myForm) {
24
          if( (myForm.title.value.trim() + myForm.author.value.trim() + myForm.isbn.value.trim()).length == 0 ){
25
              alert(_("Please enter a search term for Title, Author and/or ISBN."));
26
              return false;
27
          }
28
          return true;
29
      }
30
//]]>
31
</script>
32
</head>
33
<body id="acq_duplicatefinder" class="acq">
34
[% INCLUDE 'header.inc' %]
35
[% INCLUDE 'acquisitions-search.inc' %]
36
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="duplicatefinder.pl">Duplicate finder</a></div>
37
    <div id="doc3" class="yui-t2">
38
    <div id="bd">
39
    <div id="yui-main">
40
    <div class="yui-b">
41
42
    <h1>Duplicate finder</h1>
43
    <p>Please note that search can be slow on a large database.</p>
44
    <div id="acq_duplicatefinder">
45
    [% IF ( result ) %]
46
        <div id="alerttabs" class="toptabs">
47
        <ul>
48
        <li><a href="#pagerordertable">Order ([% numresults_order %])</a></li>
49
        <li><a href="#pagersuggestiontable">Suggestion ([% numresults_sugg %])</a></li>
50
        <li><a href="#pagercatalogtable">Catalog ([% numresults_bib %])</a></li>
51
        </ul>
52
        <div id="pagerordertable">
53
            [% IF (numresults_order) %]
54
                <table id="order_results">
55
                    <thead>
56
                        <tr>
57
                            <th>Basket name</th>
58
                            <th>Order number</th>
59
                            <th>Summary</th>
60
                            <th>Vendor</th>
61
                        </tr>
62
                    </thead>
63
                    [% FOREACH orders_loo IN orders_loop %]
64
                        <tr>
65
                            <td><a href="basket.pl?basketno=[% orders_loo.basketno %]">[% orders_loo.basketname %]</a></td>
66
                            <td><a href="neworderempty.pl?ordernumber=[% orders_loo.ordernumber %]">[% orders_loo.ordernumber %]</a></td>
67
                            <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% orders_loo.biblionumber %]">[% orders_loo.title |html %]</a><br />[% orders_loo.author %]</td>
68
                            <td><a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% orders_loo.id %]">[% orders_loo.name %]</a></td>
69
                        </tr>
70
                    [% END %]
71
                </table>
72
            [% ELSE %]
73
                No results found.
74
            [% END %]
75
        </div>
76
        <div id="pagersuggestiontable">
77
        <h1>Suggestion search results</h1>
78
        [% IF (numresults_sugg) %]
79
            <table id="suggestion_results">
80
                <thead>
81
                    <tr>
82
                        <th>Title</th>
83
                        <th>Author</th>
84
                        <th>ISBN</th>
85
                        <th>Status</th>
86
                    </tr>
87
                </thead>
88
                [% FOREACH sugg_loo IN sugg_loop %]
89
                    <tr>
90
                        <td><a href ="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% sugg_loo.suggestionid %]&op=edit"/>[% sugg_loo.title %]</a></td>
91
                        <td>[% sugg_loo.author %]</td>
92
                        <td>[% sugg_loo.isbn %]</td>
93
                        <td>[% sugg_loo.STATUS %]</td>
94
                    </tr>
95
                [% END %]
96
                </table>
97
            [% ELSE %]
98
                No results found.
99
            [% END %]
100
       </div>
101
       <div id="pagercatalogtable">
102
       <h1>Catalog search results</h1>
103
       [% IF (numresults_bib) %]
104
            <table id="catalogue_results">
105
                <thead>
106
                     <tr>
107
                         <th>Title</th>
108
                         <th>Author</th>
109
                         <th>ISBN</th>
110
                     </tr>
111
                </thead>
112
                [% FOREACH bib_loo IN bib_loop %]
113
                     <tr>
114
                         <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% bib_loo.biblionumber %]">[% bib_loo.title %]</a></td>
115
                         <td>[% bib_loo.author %]</td>
116
                         <td>[% bib_loo.isbn %]</td>
117
                     </tr>
118
                [% END %]
119
            </table>
120
        [% ELSE %]
121
            No results found.
122
        [% END %]
123
        </div>
124
    </div>
125
[% ELSE %]
126
       <p>Please enter search terms.</p>
127
[% END %]
128
129
</div>
130
</div>
131
</div>
132
<div class="yui-b">
133
<form  name="duplicateFinderForm" onsubmit="return checkDuplicateFinderForm(this);" action="/cgi-bin/koha/acqui/duplicatefinder.pl" method="post">
134
    <input type="hidden" name="op" value="result" />
135
    <fieldset class="brief">
136
        <h4>Find duplicates:</h4>
137
        <ol>
138
            <li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% title %]"  size="20" /></li>
139
            <li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% author %]"  size="20" /></li>
140
            <li><label for="isbn">ISBN: </label> <input type="text" name="isbn" id="isbn" value="[% isbn %]"  size="20" /></li>
141
        </ol>
142
        <input type="submit" value="Search" /> <a href="/cgi-bin/koha/acqui/duplicatefinder.pl">Clear All</a>
143
    </fieldset>
144
</form>
145
[% INCLUDE 'acquisitions-menu.inc' %]
146
</div>
147
</div>
148
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicatesearch.tt (-155 lines)
Lines 1-154 Link Here
1
[% USE KohaDates %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Acquisitions &rsaquo; Duplicate finder</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
6
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
7
<script type="text/javascript">//<![CDATA[
8
    $(document).ready(function(){
9
    $(".sorted").tablesorter({
10
        sortList: [[0,0]],
11
        headers: { 1: { sorter: false}}
12
    }).tablesorterPager({container: $(".pager"),positionFixed: false,size: 10});
13
});//]]>
14
</script>
15
<script type="text/javascript">//<![CDATA[
16
$(function(){
17
    $('#alerttabs > ul').tabs();
18
}); //]]>
19
</script>
20
</head>
21
<body id="acq_duplicatesearch" class="acq">
22
[% INCLUDE 'header.inc' %]
23
[% INCLUDE 'acquisitions-search.inc' %]
24
<script type="text/javascript">
25
// <![CDATA[
26
        /**
27
         *  checkDuplicateFinderForm(myForm)
28
         *  This function checks the form to be correctly filled (search terms not empty).
29
         */
30
          function checkDuplicateFinderForm(myForm) {
31
              if( (myForm.title.value.trim() + myForm.author.value.trim() + myForm.isbn.value.trim()).length == 0 ){
32
                  alert(_("Please enter a search term for Title, Author and/or ISBN."));
33
                  return false;
34
              }
35
              return true;
36
          }
37
     // ]]>
38
</script>
39
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="duplicatesearch.pl">Duplicate finder</a></div>
40
    <div id="doc3" class="yui-t2">
41
    <div id="bd">
42
    <div id="yui-main">
43
    <div class="yui-b">
44
45
    <h1>Duplicate finder</h1>
46
    <p>Please note that search can be slow on a large database.</p>
47
    <div id="acq_duplicatesearch">
48
    [% IF ( result ) %]
49
        <div id="alerttabs" class="toptabs">
50
        <ul>
51
        <li><a href="#pagerordertable">Order ([% numresults_order %])</a></li>
52
        <li><a href="#pagersuggestiontable">Suggestion ([% numresults_sugg %])</a></li>
53
        <li><a href="#pagercatalogtable">Catalog ([% numresults_bib %])</a></li>
54
        </ul>
55
        <div id="pagerordertable">
56
            [% IF (numresults_order) %]
57
                [% INCLUDE 'table-pager.inc' perpage='10' %]
58
                <table id="ordertable" class="sorted">
59
            [% ELSE %]
60
                <table>
61
            [% END %]
62
            <thead>
63
                <tr>
64
                    <th>Basket name</th>
65
                    <th>Order number</th>
66
                    <th>Summary</th>
67
                    <th>Vendor</th>
68
                </tr>
69
            </thead>
70
            [% FOREACH orders_loo IN orders_loop %]
71
                <tr>
72
                    <td><a href="basket.pl?basketno=[% orders_loo.basketno %]">[% orders_loo.basketname %]</a></td>
73
                    <td><a href="neworderempty.pl?ordernumber=[% orders_loo.ordernumber %]">[% orders_loo.ordernumber %]</a></td>
74
                    <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% orders_loo.biblionumber %]">[% orders_loo.title |html %]</a><br />[% orders_loo.author %]</td>
75
                    <td><a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% orders_loo.id %]">[% orders_loo.name %]</a></td>
76
                </tr>
77
            [% END %]
78
            </table>
79
        </div>
80
        <div id="pagersuggestiontable">
81
        <h1>Suggestion search results</h1>
82
        [% IF (numresults_sugg) %]
83
            [% INCLUDE 'table-pager.inc' perpage='10' %]
84
            <table id="suggestiontable" class="sorted">
85
        [% ELSE %]
86
             <table>
87
        [% END %]
88
        <thead>
89
            <tr>
90
                <th>Title</th>
91
                <th>Author</th>
92
                <th>ISBN</th>
93
                <th>Status</th>
94
            </tr>
95
        </thead>
96
        [% FOREACH sugg_loo IN sugg_loop %]
97
            <tr>
98
                <td><a href ="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% sugg_loo.suggestionid %]&op=edit"/>[% sugg_loo.title %]</a></td>
99
                <td>[% sugg_loo.author %]</td>
100
                <td>[% sugg_loo.isbn %]</td>
101
                <td>[% sugg_loo.STATUS %]</td>
102
            </tr>
103
       [% END %]
104
       </table>
105
       </div>
106
       <div id="pagercatalogtable">
107
       <h1>Catalog search results</h1>
108
       [% IF (numresults_bib) %]
109
           [% INCLUDE 'table-pager.inc' perpage='10' %]
110
           <table id="catalogtable" class="sorted">
111
       [% ELSE %]
112
           <table>
113
       [% END %]
114
       <thead>
115
            <tr>
116
                <th>Title</th>
117
                <th>Author</th>
118
                <th>ISBN</th>
119
            </tr>
120
       </thead>
121
       [% FOREACH bib_loo IN bib_loop %]
122
            <tr>
123
                <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% bib_loo.biblionumber %]">[% bib_loo.title %]</a></td>
124
                <td>[% bib_loo.author %]</td>
125
                <td>[% bib_loo.isbn %]</td>
126
            </tr>
127
       [% END %]
128
       </table>
129
       </div>
130
       </div>
131
[% ELSE %]
132
       <p>Please enter search terms.</p>
133
[% END %]
134
135
</div>
136
</div>
137
</div>
138
<div class="yui-b">
139
<form  name="duplicateFinderForm" onsubmit="return checkDuplicateFinderForm(this);" action="/cgi-bin/koha/acqui/duplicatesearch.pl" method="post">
140
    <input type="hidden" name="op" value="result" />
141
    <fieldset class="brief">
142
        <h4>Find duplicates:</h4>
143
        <ol>
144
            <li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% title %]"  size="20" /></li>
145
            <li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% author %]"  size="20" /></li>
146
            <li><label for="isbn">ISBN: </label> <input type="text" name="isbn" id="isbn" value="[% isbn %]"  size="20" /></li>
147
        </ol>
148
        <input type="submit" value="Search" /> <a href="/cgi-bin/koha/acqui/duplicatesearch.pl">Clear All</a>
149
    </fieldset>
150
</form>
151
[% INCLUDE 'acquisitions-menu.inc' %]
152
</div>
153
</div>
154
[% INCLUDE 'intranet-bottom.inc' %]
155
- 

Return to bug 6813