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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-3 / +3 lines)
Lines 234-240 Link Here
234
                    </select>
234
                    </select>
235
                    [% INCLUDE 'html-customization-help.inc' %]
235
                    [% INCLUDE 'html-customization-help.inc' %]
236
                </li>
236
                </li>
237
                [% UNLESS my_branch %]
237
                [% UNLESS my_branch_as_staff %]
238
                <li>
238
                <li>
239
                    <label for="branchcode">Library: </label>
239
                    <label for="branchcode">Library: </label>
240
                    <select id="branchcode" name="branchcode">
240
                    <select id="branchcode" name="branchcode">
Lines 402-408 Link Here
402
                            [% SET default_localization = c.default_localization %]
402
                            [% SET default_localization = c.default_localization %]
403
                            <tr [% IF c.is_expired %]class="expired"[% END %]>
403
                            <tr [% IF c.is_expired %]class="expired"[% END %]>
404
                                <td>
404
                                <td>
405
                                [% UNLESS ( my_branch && my_branch != c.branchcode ) %]
405
                                [% UNLESS ( my_branch_as_staff && my_branch_as_staff != c.branchcode ) %]
406
                                    <input type="checkbox" name="ids" value="[% c.id | html %]" />
406
                                    <input type="checkbox" name="ids" value="[% c.id | html %]" />
407
                                [% END %]
407
                                [% END %]
408
                                </td>
408
                                </td>
Lines 468-474 Link Here
468
                                    </div>
468
                                    </div>
469
                                </td>
469
                                </td>
470
                                <td class="actions">
470
                                <td class="actions">
471
                                [% UNLESS ( my_branch && my_branch != c.branchcode ) %]
471
                                [% UNLESS ( my_branch_as_staff && my_branch_as_staff != c.branchcode ) %]
472
                                    <div class="btn-group dropup">
472
                                    <div class="btn-group dropup">
473
                                        <a href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&amp;id=[% c.id | uri %]&editmode=[% editmode | uri %]" class="btn btn-default btn-xs"> <i class="fa-solid fa-pencil"></i> Edit</a
473
                                        <a href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&amp;id=[% c.id | uri %]&editmode=[% editmode | uri %]" class="btn btn-default btn-xs"> <i class="fa-solid fa-pencil"></i> Edit</a
474
                                        ><button class="btn btn-default btn-xs dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> </button>
474
                                        ><button class="btn btn-default btn-xs dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> </button>
(-)a/tools/additional-contents.pl (-5 / +4 lines)
Lines 63-69 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
63
);
63
);
64
64
65
my @messages;
65
my @messages;
66
my $my_branch =
66
my $my_branch_as_staff =
67
    C4::Context->preference("IndependentBranches")
67
    C4::Context->preference("IndependentBranches")
68
    && !C4::Context->IsSuperLibrarian()
68
    && !C4::Context->IsSuperLibrarian()
69
    ? C4::Context->userenv()->{'branch'}
69
    ? C4::Context->userenv()->{'branch'}
Lines 77-83 if ( $op eq 'add_form' ) { Link Here
77
        $category            = $additional_content->category;
77
        $category            = $additional_content->category;
78
    }
78
    }
79
    $template->param(
79
    $template->param(
80
        my_branch               => $my_branch,
80
        my_branch_as_staff      => $my_branch_as_staff,
81
        additional_content      => $additional_content,
81
        additional_content      => $additional_content,
82
        translated_contents     => $translated_contents,
82
        translated_contents     => $translated_contents,
83
        opac_available_options  => Koha::AdditionalContents::get_html_customizations_options('opac'),
83
        opac_available_options  => Koha::AdditionalContents::get_html_customizations_options('opac'),
Lines 87-93 if ( $op eq 'add_form' ) { Link Here
87
    output_and_exit_if_error( $cgi, $cookie, $template, { check => 'csrf_token' } );
87
    output_and_exit_if_error( $cgi, $cookie, $template, { check => 'csrf_token' } );
88
    my $location   = $cgi->param('location');
88
    my $location   = $cgi->param('location');
89
    my $code       = $cgi->param('code');
89
    my $code       = $cgi->param('code');
90
    my $branchcode = $my_branch ? $my_branch : $cgi->param('branchcode') || undef;
90
    my $branchcode = $my_branch_as_staff ? $my_branch_as_staff : $cgi->param('branchcode') || undef;
91
91
92
    my @lang = $cgi->multi_param('lang');
92
    my @lang = $cgi->multi_param('lang');
93
93
Lines 235-241 if ( $op eq 'list' ) { Link Here
235
        { category => $category,                   'additional_contents_localizations.lang' => 'default' },
235
        { category => $category,                   'additional_contents_localizations.lang' => 'default' },
236
        { order_by => { -desc => 'published_on' }, join => 'additional_contents_localizations' }
236
        { order_by => { -desc => 'published_on' }, join => 'additional_contents_localizations' }
237
    );
237
    );
238
    $template->param( additional_contents => $additional_contents, my_branch => $my_branch );
238
    $template->param( additional_contents => $additional_contents, my_branch_as_staff => $my_branch_as_staff );
239
}
239
}
240
240
241
my $translated_languages = C4::Languages::getTranslatedLanguages();
241
my $translated_languages = C4::Languages::getTranslatedLanguages();
242
- 

Return to bug 34631