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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-subscription-search-result.inc (+1 lines)
Lines 2-7 Link Here
2
[% USE Koha %]
2
[% USE Koha %]
3
[% USE AuthorisedValues %]
3
[% USE AuthorisedValues %]
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE raw %]
5
[% INCLUDE 'mana.inc' %]
6
[% INCLUDE 'mana.inc' %]
6
<script type="text/javascript">
7
<script type="text/javascript">
7
//<![CDATA[
8
//<![CDATA[
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc (-6 / +12 lines)
Lines 124-135 Link Here
124
                    <h3 id="mana_search_result_label"> Mana Search</h3>
124
                    <h3 id="mana_search_result_label"> Mana Search</h3>
125
                </div>
125
                </div>
126
                <div>
126
                <div>
127
                    <form id="search_form" style="margin-left: 5%">
128
                        Please enter a few key words:
129
                        <input type=text id=mana_search_field>
130
                        <input type=button class="mana_search_button" value="Search">
131
                    </form>
132
                    <div class="modal-body">
127
                    <div class="modal-body">
128
                        <fieldset>
129
                            <form id="mana_search_form" style="margin-left: 5%">
130
                                Please enter a few key words:
131
                                <input type="text" id="mana_search_field">
132
                                <input type="submit" class="mana_search_button" value="Search">
133
                            </form>
134
                        </fieldset>
135
                        <div class="mana_result_content">
136
                        </div>
133
                    </div>
137
                    </div>
134
                </div>
138
                </div>
135
            </div>
139
            </div>
Lines 158-163 Link Here
158
    }
162
    }
159
163
160
    function mana_search( textquery ){
164
    function mana_search( textquery ){
165
        $(document.body).css({'cursor' : 'wait'});
161
        $.ajax({
166
        $.ajax({
162
            type: "POST",
167
            type: "POST",
163
            url: "/cgi-bin/koha/svc/mana/search",
168
            url: "/cgi-bin/koha/svc/mana/search",
Lines 165-171 Link Here
165
            dataType: "html",
170
            dataType: "html",
166
        })
171
        })
167
        .done( function( result ) {
172
        .done( function( result ) {
168
            $("#mana_search_result .modal-body").html(result);
173
            $(document.body).css({'cursor' : 'default'});
174
            $("#mana_search_result .modal-body .mana_result_content").html(result);
169
            $("#mana_search_result_label").text(_("Results from Mana Knowledge Base"));
175
            $("#mana_search_result_label").text(_("Results from Mana Knowledge Base"));
170
            $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults,{
176
            $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults,{
171
                "sPaginationType":"four_button",
177
                "sPaginationType":"four_button",
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc (-1 / +1 lines)
Lines 31-37 Link Here
31
        </a>
31
        </a>
32
    </li>
32
    </li>
33
    <li><a href="/cgi-bin/koha/serials/add_fields.pl">Add subscription fields</a></li>
33
    <li><a href="/cgi-bin/koha/serials/add_fields.pl">Add subscription fields</a></li>
34
    [% IF Koha.Preference('Mana') %]
34
    [% IF Koha.Preference('Mana') == 1 %]
35
        <li><a href="/cgi-bin/koha/serials/serials-search.pl?mana=1">Search on Mana</a></li>
35
        <li><a href="/cgi-bin/koha/serials/serials-search.pl?mana=1">Search on Mana</a></li>
36
    [% END %]
36
    [% END %]
37
</ul>
37
</ul>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc (-1 / +1 lines)
Lines 7-13 Link Here
7
            [% ELSE %]
7
            [% ELSE %]
8
                <div class="btn-group"><a id="newsubscription" class="btn btn-default btn-sm" href="/cgi-bin/koha/serials/subscription-add.pl"><i class="fa fa-plus"></i> New subscription</a></div>
8
                <div class="btn-group"><a id="newsubscription" class="btn btn-default btn-sm" href="/cgi-bin/koha/serials/subscription-add.pl"><i class="fa fa-plus"></i> New subscription</a></div>
9
            [% END %]
9
            [% END %]
10
            [% IF Koha.Preference('Mana') and Koha.Preference('AutoShareWithMana').grep('subscription').size == 0 %]
10
            [% IF Koha.Preference('Mana') == 1 and Koha.Preference('AutoShareWithMana').grep('subscription').size == 0 %]
11
                [% IF one_language_enabled==0 or mana_id %]
11
                [% IF one_language_enabled==0 or mana_id %]
12
                    <div class="btn-group"><a data-toggle="modal" data-toggle="tooltip" title="Share the subscription with other librairies. Your email address will be associated to your sharing." data-target="#mana_share_modal" class="btn btn-default btn-sm"><i class="fa fa-share-alt"></i> Share</a></div>
12
                    <div class="btn-group"><a data-toggle="modal" data-toggle="tooltip" title="Share the subscription with other librairies. Your email address will be associated to your sharing." data-target="#mana_share_modal" class="btn btn-default btn-sm"><i class="fa fa-share-alt"></i> Share</a></div>
13
                [% ELSE %]
13
                [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-2 / +6 lines)
Lines 364-370 canned reports and writing custom SQL reports.</p> Link Here
364
                    <li><span class="label">Notes: </span><div id="shared_notes"></div></li>
364
                    <li><span class="label">Notes: </span><div id="shared_notes"></div></li>
365
                </div>
365
                </div>
366
                <div class="rows">
366
                <div class="rows">
367
                    <form method="post" id="mana_share_form" action="/cgi-bin/koha/reports/guided_reports.pl?phase=Share" class="validated" >
367
                    <form method="post" id="mana_share_form" action="/cgi-bin/koha/reports/guided_reports.pl" class="validated" >
368
                        <input type="hidden" name="phase" value="Share">
368
                        <input type="hidden" name="phase" value="Share">
369
369
370
                        [% IF (languages_loop) %]
370
                        [% IF (languages_loop) %]
Lines 1490-1496 canned reports and writing custom SQL reports.</p> Link Here
1490
            });
1490
            });
1491
1491
1492
            $('div#ManaShareButton').click(function() {
1492
            $('div#ManaShareButton').click(function() {
1493
                window.location="/cgi-bin/koha/reports/guided_reports.pl?phase=Share";
1493
                $("#mana_share_form").submit();
1494
            });
1495
1496
            $("#mana_search_form").submit(function(e){
1497
                e.preventDefault();
1494
            });
1498
            });
1495
        });
1499
        });
1496
1500
(-)a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js (-2 / +4 lines)
Lines 507-513 function mana_use(mana_id){ Link Here
507
}
507
}
508
508
509
$(document).ready(function() {
509
$(document).ready(function() {
510
    mana_search();
510
    if ( mana_enabled == 1 ) {
511
        mana_search();
512
    }
511
    $("#displayexample").hide();
513
    $("#displayexample").hide();
512
    $("#mana_search_result").modal("hide");
514
    $("#mana_search_result").modal("hide");
513
    $("#aqbooksellerid").on('keypress', function(e) {
515
    $("#aqbooksellerid").on('keypress', function(e) {
Lines 617-623 $(document).ready(function() { Link Here
617
    });
619
    });
618
    $("#subscription_add_next").on("click",function(){
620
    $("#subscription_add_next").on("click",function(){
619
        if ( Check_page1() ){
621
        if ( Check_page1() ){
620
            if ( mana_enabled ) {
622
            if ( mana_enabled == 1 ) {
621
                mana_search();
623
                mana_search();
622
            }
624
            }
623
            show_page_2();
625
            show_page_2();
(-)a/reports/guided_reports.pl (-1 / +3 lines)
Lines 678-684 elsif ( $phase eq 'Save Report' ) { Link Here
678
}
678
}
679
679
680
elsif ($phase eq 'Share'){
680
elsif ($phase eq 'Share'){
681
    my $result = Koha::SharedContent::send_entity($input->param('mana_language'), $borrowernumber, scalar $input->param('reportid'), 'report');
681
    my $lang = $input->param('mana_language') || '';
682
    my $reportid = $input->param('reportid');
683
    my $result = Koha::SharedContent::send_entity($lang, $borrowernumber, $reportid, 'report');
682
    if ( $result ) {
684
    if ( $result ) {
683
        print $input->redirect("/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved&manamsg=".$result->{msg});
685
        print $input->redirect("/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved&manamsg=".$result->{msg});
684
    }else{
686
    }else{
(-)a/serials/subscription-add.pl (-2 / +1 lines)
Lines 52-58 my $sub_length; Link Here
52
my $permission =
52
my $permission =
53
  ( $op eq 'modify' || $op eq 'modsubscription' ) ? "edit_subscription" : "create_subscription";
53
  ( $op eq 'modify' || $op eq 'modsubscription' ) ? "edit_subscription" : "create_subscription";
54
54
55
my ($template, $loggedinuser, $cookie)
55
our ($template, $loggedinuser, $cookie)
56
= get_template_and_user({template_name => "serials/subscription-add.tt",
56
= get_template_and_user({template_name => "serials/subscription-add.tt",
57
				query => $query,
57
				query => $query,
58
				type => "intranet",
58
				type => "intranet",
59
- 

Return to bug 17047