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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cmspages.tt (-8 / +14 lines)
Lines 1-3 Link Here
1
[% USE raw %]
1
[% USE KohaDates %]
2
[% USE KohaDates %]
2
[% USE Koha %]
3
[% USE Koha %]
3
[% USE Asset %]
4
[% USE Asset %]
Lines 8-14 Link Here
8
<title>Koha &rsaquo; Tools &rsaquo; Pages</title>
9
<title>Koha &rsaquo; Tools &rsaquo; Pages</title>
9
[% INCLUDE 'doc-head-close.inc' %]
10
[% INCLUDE 'doc-head-close.inc' %]
10
[% Asset.css("css/datatables.css") %]
11
[% Asset.css("css/datatables.css") %]
11
[% INCLUDE 'datatables.inc' %]
12
</head>
12
</head>
13
<body id="tools_koha-content" class="tools">
13
<body id="tools_koha-content" class="tools">
14
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'header.inc' %]
Lines 98-104 Link Here
98
            <legend>Page</legend>
98
            <legend>Page</legend>
99
            <ol>
99
            <ol>
100
            <li>
100
            <li>
101
                <label for="disp">Display location:</label>
101
                <label for="disp">Interface:</label>
102
                <select id="disp" name="disp">
102
                <select id="disp" name="disp">
103
                    [% IF ( data.location == "" ) %]<option value="" selected="selected">All</option>[% ELSE %]<option value="">All</option>[% END %]
103
                    [% IF ( data.location == "" ) %]<option value="" selected="selected">All</option>[% ELSE %]<option value="">All</option>[% END %]
104
                    [% IF ( data.location == "1" ) %]<option value="1" selected="selected">Staff interface</option>[% ELSE %]<option value="1">Staff interface</option>[% END %]
104
                    [% IF ( data.location == "1" ) %]<option value="1" selected="selected">Staff interface</option>[% ELSE %]<option value="1">Staff interface</option>[% END %]
Lines 201-207 Link Here
201
                        <th>&nbsp;</th>
201
                        <th>&nbsp;</th>
202
                        <th>Published</th>
202
                        <th>Published</th>
203
                        <th>Parent</th>
203
                        <th>Parent</th>
204
                        <th>Location</th>
204
                        <th>Interface</th>
205
                        <th>Library</th>
205
                        <th>Library</th>
206
                        <th>Language</th>
206
                        <th>Language</th>
207
                        <th>Number</th>
207
                        <th>Number</th>
Lines 210-217 Link Here
210
                        <th>&nbsp;</th>
210
                        <th>&nbsp;</th>
211
                    </tr></thead>
211
                    </tr></thead>
212
                    <tbody>[% FOREACH page IN page_list %]
212
                    <tbody>[% FOREACH page IN page_list %]
213
                        <tr>
213
                        <tr id="[% page.id %]">
214
                            <td><input type="checkbox" name="ids" id="ids" value="[% page.id %]" /></td>
214
                            <td><input type="checkbox" name="ids" id="ids" value="[% page.id %]"></td>
215
                            <td>[% IF ( page.publish ) %]Yes[% ELSE %]No[% END %]</td>
215
                            <td>[% IF ( page.publish ) %]Yes[% ELSE %]No[% END %]</td>
216
                            <td>[% page.parent.title_link %]</td>
216
                            <td>[% page.parent.title_link %]</td>
217
                            <td>[% SWITCH page.location %]
217
                            <td>[% SWITCH page.location %]
Lines 238-244 Link Here
238
                                        Actions <b class="caret"></b></a>
238
                                        Actions <b class="caret"></b></a>
239
                                    <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="opencmspageactions[% page.id %]">
239
                                    <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="opencmspageactions[% page.id %]">
240
                                        <li><a href="[% link_self %]?op=form&amp;id=[% page.id %]"><i class="fa fa-pencil"></i> Edit</a></li>
240
                                        <li><a href="[% link_self %]?op=form&amp;id=[% page.id %]"><i class="fa fa-pencil"></i> Edit</a></li>
241
                                        <li><a href="[% link_self %]?op=delSingle&amp;id=[% page.id %]" class="del_single"><i class="fa fa-trash"></i> Delete</a></li>
241
                                        <li><a href="[% link_self %]?op=delSingle&amp;id=[% page.id %]" class="del_single" data-isparent="[% page.isParent %]"><i class="fa fa-trash"></i> Delete</a></li>
242
                                        [% IF ( page.location == "" ) %]
242
                                        [% IF ( page.location == "" ) %]
243
                                            <li><a href="[% link_opac %]?id=[% page.id %]"><i class="fa fa-eye"></i> OPAC</a></li>
243
                                            <li><a href="[% link_opac %]?id=[% page.id %]"><i class="fa fa-eye"></i> OPAC</a></li>
244
                                            <li><a href="[% link_self %]?op=view&amp;id=[% page.id %]"><i class="fa fa-eye"></i> Intranet</a></li>
244
                                            <li><a href="[% link_self %]?op=view&amp;id=[% page.id %]"><i class="fa fa-eye"></i> Intranet</a></li>
Lines 272-280 Link Here
272
[% END %]
272
[% END %]
273
</div>
273
</div>
274
[% MACRO jsinclude BLOCK %]
274
[% MACRO jsinclude BLOCK %]
275
[% Asset.js("js/tools-menu.js") %]
275
[% INCLUDE 'datatables.inc' %]
276
[% Asset.js("lib/tiny_mce/tiny_mce.js") %]
276
[% Asset.js("js/tools-menu.js") | $raw %]
277
[% Asset.js("lib/tiny_mce/tiny_mce.js") | $raw %]
277
<script type="text/javascript">//<![CDATA[
278
<script type="text/javascript">//<![CDATA[
279
278
$(document).ready(function() {
280
$(document).ready(function() {
279
    $("#pages_table").dataTable($.extend(true, {}, dataTablesDefaults, {
281
    $("#pages_table").dataTable($.extend(true, {}, dataTablesDefaults, {
280
        "aoColumnDefs": [
282
        "aoColumnDefs": [
Lines 293-298 $(document).ready(function() { Link Here
293
    });
295
    });
294
296
295
    $(".del_single").on("click", function(){
297
    $(".del_single").on("click", function(){
298
        var isParent = $(this).attr('data-isparent');
299
        if (isParent == 1){
300
            return confirmDelete(_("This page is a parent page. Are you sure you want to delete this page?"));
301
        }
296
        return confirmDelete(_("Are you sure you want to delete this page?"));
302
        return confirmDelete(_("Are you sure you want to delete this page?"));
297
    });
303
    });
298
304
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/navigation.inc (-1 lines)
Lines 1-7 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
<div id="opacnav">
2
<div id="opacnav">
3
    [% IF ( links ) %]
3
    [% IF ( links ) %]
4
        <h4>Pages</h4>
5
        <ul id="cms_nav">
4
        <ul id="cms_nav">
6
            [% FOREACH link IN links %]
5
            [% FOREACH link IN links %]
7
                [% IF ( link.publish == '1' || link.publish == '0' && CAN_user_tools_edit_pages ) %]
6
                [% IF ( link.publish == '1' || link.publish == '0' && CAN_user_tools_edit_pages ) %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-cmspages.tt (-1 lines)
Lines 50-56 Link Here
50
            This page has not been published.
50
            This page has not been published.
51
        [% END %]
51
        [% END %]
52
52
53
        [% IF ( OpacMainUserBlock ) %]<div id="opacmainuserblock">[% OpacMainUserBlock %]</div>[% END %]
54
        </div> <!-- / .span 7/9 -->
53
        </div> <!-- / .span 7/9 -->
55
54
56
        </div> <!-- /.container-fluid -->
55
        </div> <!-- /.container-fluid -->
(-)a/tools/cmspages.pl (-1 / +4 lines)
Lines 57-62 my $branches = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); Link Here
57
# List all pages, if id is set generate parent page list and data.
57
# List all pages, if id is set generate parent page list and data.
58
my ( $page_list, $parent_list, $page_data ) = Koha::CmsPages->list( $id );
58
my ( $page_list, $parent_list, $page_data ) = Koha::CmsPages->list( $id );
59
59
60
foreach my $p ( @$page_list ){
61
    $p->{isParent} = Koha::CmsPages->search({ parent => $p->{id} })->count ? 1 : 0;
62
}
63
60
$template->param(
64
$template->param(
61
    branch_list     => $branches,
65
    branch_list     => $branches,
62
    page_list       => $page_list,
66
    page_list       => $page_list,
63
- 

Return to bug 15326