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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-34 / +36 lines)
Lines 247-263 Link Here
247
                    [% INCLUDE 'html-customization-help.inc' %]
247
                    [% INCLUDE 'html-customization-help.inc' %]
248
                </li>
248
                </li>
249
                [% UNLESS my_branch_as_staff %]
249
                [% UNLESS my_branch_as_staff %]
250
                <li>
250
                    <li>
251
                    <label for="branchcode">Library: </label>
251
                        <label for="branchcode">Library: </label>
252
                    <select id="branchcode" name="branchcode">
252
                        <select id="branchcode" name="branchcode">
253
                        [% IF additional_content.branchcode == '' %]
253
                            [% IF additional_content.branchcode == '' %]
254
                            <option value="" selected="selected">All libraries</option>
254
                                <option value="" selected="selected">All libraries</option>
255
                        [% ELSE %]
255
                            [% ELSE %]
256
                            <option value="">All libraries</option>
256
                                <option value="">All libraries</option>
257
                        [% END %]
257
                            [% END %]
258
                        [% PROCESS options_for_libraries libraries => Branches.all( selected => additional_content.branchcode, unfiltered => 1, ) %]
258
                            [% PROCESS options_for_libraries libraries => Branches.all( selected => additional_content.branchcode, unfiltered => 1, ) %]
259
                    </select>
259
                        </select>
260
                </li>
260
                    </li>
261
                [% END %]
261
                [% END %]
262
                [% UNLESS languages.size %]
262
                [% UNLESS languages.size %]
263
                    <li>
263
                    <li>
Lines 417-425 Link Here
417
                            [% SET default_localization = c.default_localization %]
417
                            [% SET default_localization = c.default_localization %]
418
                            <tr [% IF c.is_expired %]class="expired"[% END %]>
418
                            <tr [% IF c.is_expired %]class="expired"[% END %]>
419
                                <td>
419
                                <td>
420
                                [% UNLESS ( my_branch_as_staff && my_branch_as_staff != c.branchcode ) %]
420
                                    [% UNLESS ( my_branch_as_staff && my_branch_as_staff != c.branchcode ) %]
421
                                    <input type="checkbox" name="ids" value="[% c.id | html %]" />
421
                                        <input type="checkbox" name="ids" value="[% c.id | html %]" />
422
                                [% END %]
422
                                    [% END %]
423
                                </td>
423
                                </td>
424
                                <td>
424
                                <td>
425
                                    [% IF c.category == 'news' || c.category == 'pages' %]
425
                                    [% IF c.category == 'news' || c.category == 'pages' %]
Lines 487-512 Link Here
487
                                    </div>
487
                                    </div>
488
                                </td>
488
                                </td>
489
                                <td class="actions">
489
                                <td class="actions">
490
                                [% UNLESS ( my_branch_as_staff && my_branch_as_staff != c.branchcode ) %]
490
                                    [% UNLESS ( my_branch_as_staff && my_branch_as_staff != c.branchcode ) %]
491
                                    <div class="btn-group dropup">
491
                                        <div class="btn-group dropup">
492
                                        <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
492
                                            <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
493
                                        ><button class="btn btn-default btn-xs dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> </button>
493
                                            ><button class="btn btn-default btn-xs dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> </button>
494
                                        <ul class="dropdown-menu">
494
                                            <ul class="dropdown-menu">
495
                                            <li>
495
                                                <li>
496
                                                [% IF ( wysiwyg || category == 'record_display' ) %]
496
                                                    [% IF ( wysiwyg || category == 'record_display' ) %]
497
                                                    <a class="dropdown-item" href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&amp;id=[% c.id | uri %]&editmode=text"><i class="fa-solid fa-pencil"></i> Edit with text editor</a>
497
                                                        <a class="dropdown-item" href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&amp;id=[% c.id | uri %]&editmode=text"
498
                                                [% ELSE %]
498
                                                            ><i class="fa-solid fa-pencil"></i> Edit with text editor</a
499
                                                    <a class="dropdown-item" href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&amp;id=[% c.id | uri %]&editmode=wysiwyg"
499
                                                        >
500
                                                        ><i class="fa-solid fa-pencil"></i> Edit with WYSIWYG editor</a
500
                                                    [% ELSE %]
501
                                                    >
501
                                                        <a class="dropdown-item" href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&amp;id=[% c.id | uri %]&editmode=wysiwyg"
502
                                                [% END %]
502
                                                            ><i class="fa-solid fa-pencil"></i> Edit with WYSIWYG editor</a
503
                                            </li>
503
                                                        >
504
                                        </ul>
504
                                                    [% END %]
505
                                    </div>
505
                                                </li>
506
                                    <div class="btn-group">
506
                                            </ul>
507
                                        <a href="#" class="delete_news btn btn-default btn-xs" data-id="[% c.id | html %]"><i class="fa fa-trash-can"></i> Delete</a>
507
                                        </div>
508
                                    </div>
508
                                        <div class="btn-group">
509
                                [% END %]
509
                                            <a href="#" class="delete_news btn btn-default btn-xs" data-id="[% c.id | html %]"><i class="fa fa-trash-can"></i> Delete</a>
510
                                        </div>
511
                                    [% END %]
510
                                </td>
512
                                </td>
511
                            </tr>
513
                            </tr>
512
                        [% END %]
514
                        [% END %]
(-)a/tools/additional-contents.pl (-5 / +4 lines)
Lines 26-37 use Modern::Perl; Link Here
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use Try::Tiny;
27
use Try::Tiny;
28
use Array::Utils qw( array_minus );
28
use Array::Utils qw( array_minus );
29
use C4::Auth qw(get_template_and_user);
29
use C4::Auth     qw(get_template_and_user);
30
use C4::Koha;
30
use C4::Koha;
31
use C4::Context;
31
use C4::Context;
32
use C4::Log qw( logaction );
32
use C4::Log         qw( logaction );
33
use C4::Output qw(output_html_with_http_headers output_and_exit_if_error);
33
use C4::Output      qw(output_html_with_http_headers output_and_exit_if_error);
34
use C4::Languages qw(getTranslatedLanguages);
34
use C4::Languages   qw(getTranslatedLanguages);
35
use Koha::DateUtils qw( dt_from_string output_pref );
35
use Koha::DateUtils qw( dt_from_string output_pref );
36
36
37
use Koha::AdditionalContents;
37
use Koha::AdditionalContents;
38
- 

Return to bug 34631