Bugzilla – Attachment 96094 Details for
Bug 15326
Add CMS feature
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15326: (follow-up) Corrections to staff client templates
Bug-15326-follow-up-Corrections-to-staff-client-te.patch (text/plain), 47.03 KB, created by
Nick Clemens (kidclamp)
on 2019-12-09 12:09:04 UTC
(
hide
)
Description:
Bug 15326: (follow-up) Corrections to staff client templates
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-12-09 12:09:04 UTC
Size:
47.03 KB
patch
obsolete
>From 5735aa6a353cb812edfda4eb624895961b6492b0 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 8 Apr 2019 18:34:56 +0000 >Subject: [PATCH] Bug 15326: (follow-up) Corrections to staff client templates > >This patch makes some corrections to the staff client's CMS-related >templates: > > - Add missing Template Toolkit filters. > - Remove JavaScript from tools-menu.inc. This must have crept in during > a rebase. > - Add navigation link highlighting to tools-menu.js instead. > - Convert tools/cmspages.tt to Bootstrap grid. > - Correct toolbar button class. > - Move some column sorting configuration out of JS and into table > markup. > - Move "Select all" / "Clear all" links to the top of the table to > match similar interfaces. > - Change the Action menu's "Intranet" and "OPAC" links to be "View" and > "View in OPAC." The OPAC view now opens a new window. > >To test, apply the patches and test the Pages feature in the staff >client: Adding, editing, deleting, viewing. For each view, test that the >page layout adjusts to various browser widths. >--- > .../prog/en/includes/cms-pages-nav.inc | 6 +- > .../intranet-tmpl/prog/en/includes/tools-menu.inc | 19 - > .../prog/en/modules/tools/cmspages.tt | 613 +++++++++++---------- > koha-tmpl/intranet-tmpl/prog/js/tools-menu.js | 2 + > 4 files changed, 314 insertions(+), 326 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cms-pages-nav.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cms-pages-nav.inc >index 0abbfcb36d..c4787fdb5d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cms-pages-nav.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cms-pages-nav.inc >@@ -2,13 +2,13 @@ > <ul id="cms_nav"> > [% FOREACH page IN pages %] > [% IF page.parentObj %] >- <li><a href="/cgi-bin/koha/tools/cmspages.pl?op=view&id=[% page.parentObj.id %]">[% page.parentObj.title | html %]</a></li> >+ <li><a href="/cgi-bin/koha/tools/cmspages.pl?op=view&id=[% page.parentObj.id | uri %]">[% page.parentObj.title | html %]</a></li> > <ul> >- <li><a href="/cgi-bin/koha/tools/cmspages.pl?op=view&id=[% page.id %]">[% page.title | html %]</a></li> >+ <li><a href="/cgi-bin/koha/tools/cmspages.pl?op=view&id=[% page.id | uri %]">[% page.title | html %]</a></li> > </ul> > [% ELSE %] > [% UNLESS page.isaParent %] >- <li><a href="/cgi-bin/koha/tools/cmspages.pl?op=view&id=[% page.id %]">[% page.title | html %]</a></li> >+ <li><a href="/cgi-bin/koha/tools/cmspages.pl?op=view&id=[% page.id | uri %]">[% page.title | html %]</a></li> > [% END %] > [% END %] > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >index 73ee01db7e..3edd499dc6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >@@ -1,23 +1,4 @@ > [% USE Koha %] >-<script type="text/javascript">//<![CDATA[ >- $(document).ready(function() { >- var path = location.pathname.substring(1); >- if (path.indexOf("labels") >= 0 && path.indexOf("spine") < 0 ) { >- $('#navmenulist a[href$="/cgi-bin/koha/labels/label-home.pl"]').css('font-weight','bold'); >- } else if (path.indexOf("patroncards") >= 0 ) { >- $('#navmenulist a[href$="/cgi-bin/koha/patroncards/home.pl"]').css('font-weight','bold'); >- } else if (path.indexOf("patron_lists") >= 0 ) { >- $('#navmenulist a[href$="/cgi-bin/koha/patron_lists/lists.pl"]').css('font-weight','bold'); >- } else if ((path+location.search).indexOf("batchMod.pl?del=1") >= 0 ) { >- $('#navmenulist a[href$="/cgi-bin/koha/tools/batchMod.pl?del=1"]').css('font-weight','bold'); >- } else if (path.indexOf("cmspages") >= 0 ) { >- $('#navmenulist a[href$="/cgi-bin/koha/tools/cmspages.pl"]').css('font-weight','bold'); >- } else { >- $('#navmenulist a[href$="/' + path + '"]').css('font-weight','bold'); >- } >- }); >-//]]> >-</script> > > <div id="navmenu"> > <div id="navmenulist"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cmspages.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cmspages.tt >index af195e2a04..2594ea15e7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cmspages.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cmspages.tt >@@ -8,7 +8,7 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › Pages</title> > [% INCLUDE 'doc-head-close.inc' %] >-[% Asset.css("css/datatables.css") %] >+[% Asset.css("css/datatables.css") | $raw %] > </head> > <body id="tools_koha-content" class="tools"> > [% INCLUDE 'header.inc' %] >@@ -17,369 +17,373 @@ > <a href="/cgi-bin/koha/mainpage.pl">Home</a> › > <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › > [% IF ( form ) %] >- <a href="[% link_self %]">Pages</a> › >+ <a href="[% link_self | uri %]">Pages</a> › > [% IF ( id ) %]Edit page[% ELSE %]Add page[% END %] > [% ELSIF ( view ) %] >- <a href="[% link_self %]">Pages</a> › >+ <a href="[% link_self | uri %]">Pages</a> › > [% IF ( cms_page.parent ) %] > [% FOREACH parent IN parent_list %] >- [% IF parent.id == cms_page.parent %]<a href="[% link_self %]?op=view&id=[% cms_page.parent %]">[% parent.title_link %]</a> ›[% END %] >+ [% IF parent.id == cms_page.parent %]<a href="[% link_self | uri %]?op=view&id=[% cms_page.parent | uri %]">[% parent.title_link | uri %]</a> ›[% END %] > [% END %] > [% END %] >- [% cms_page.title_link %] >+ [% cms_page.title_link | html %] > [% ELSE %] > Pages > [% END %] > </div> > > [% IF ( form ) %] >- <div id="doc" class="yui-t7"> >+ <div class="main container-fluid"> >+ <div class="row"> >+ <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2"> > [% ELSE %] >- <div id="doc3" class="yui-t2"> >+ <div class="main container-fluid"> >+ <div class="row"> >+ <div class="col-sm-10 col-sm-push-2"> > [% END %] >+ <main> > >- <div id="bd"> >- <div id="yui-main"> >- <div class="yui-b"> >- [% UNLESS ( link_opac_base && link_self) %] >- <div class="dialog alert"> >- [% UNLESS ( link_opac_base ) %] >- Warning: Preference <em>OPACBaseURL</em> not set, some links might not work!</div> >- [% END %] >- [% UNLESS ( link_self ) %] >- Warning: Variable <em>link_self</em> not set, some links might not work!</div> >- [% END %] >- [% END %] >- >- [% UNLESS ( form || view ) %] >- <div id="toolbar" class="btn-toolbar"> >- <a class="btn btn-default btn-sm" id="newentry" href="[% link_self %]?op=form"><i class="fa fa-plus"></i> New page</a> >- </div> >+ [% UNLESS ( link_opac_base && link_self) %] >+ <div class="dialog alert"> >+ [% UNLESS ( link_opac_base ) %] >+ Warning: Preference <em>OPACBaseURL</em> not set, some links might not work!</div> > [% END %] >- >- [% IF ( failed_add ) %] >- <div class="dialog alert"> >- Failed to add page. Check that: >- <ul> >- <li>Your link title is unique</li> >- <li>If specifying a parent page, the location is the same as your new page</li> >- </ul> >- </div> >+ [% UNLESS ( link_self ) %] >+ Warning: Variable <em>link_self</em> not set, some links might not work!</div> > [% END %] >+ [% END %] > >- [% IF ( view ) %] >- <div class="yui-ge"> >- <div id="pagesnav" class="yui-u"> >- [% IF ( pages ) %] >- <fieldset> >- <ul> >- <li><a href="[% link_self %]">Pages home</a></li> >- </ul> >- <h4>Pages</h4> >- [% INCLUDE 'cms-pages-nav.inc' %] >- </fieldset> >- [% END %] >- </div> >- <div class="yui-u first"> >- <h1>Pages: [% cms_page.title %]</h1> >- [% IF ( cms_page.publish == 1 ) %] >- [% cms_page.content %] >- [% ELSE %] >- <div class="dialog message">This page has not been published.</div> >- [% cms_page.content %] >- [% END %] >- </div> >- </div> >- [% ELSIF ( form ) %] >- <form name="form" method="post" enctype="multipart/form-data" action="[% link_self %]" > >- <input type="hidden" name="op" value="[% op %]" /> >- <input type="hidden" name="id" value="[% id %]" /> >- <fieldset class="rows"> >- <legend>Page</legend> >- <ol> >- <li> >- <label for="disp">Interface:</label> >- <select id="disp" name="disp"> >- [% IF ( data.location == "" ) %] >- <option value="" selected="selected">All</option> >- [% ELSE %] >- <option value="">All</option> >- [% END %] >- [% IF ( data.location == "1" ) %] >- <option value="1" selected="selected">Staff interface</option> >- [% ELSE %] >- <option value="1">Staff interface</option> >- [% END %] >- [% IF ( data.location == "2" ) %] >- <option value="2" selected="selected">OPAC</option> >- [% ELSE %] >- <option value="2">OPAC</option> >- [% END %] >- </select> >- </li> >- <li> >- <label for="branch">Library:</label> >- <select id="branch" name="branch"> >- [% IF ( data.branchcode.branchcode == "" ) %] >- <option value="" selected="selected">All libraries</option> >- [% ELSE %] >- <option value="">All libraries</option> >- [% END %] >- [% FOREACH branch IN branch_list %] >- [% IF ( branch.branchcode == data.branchcode.branchcode ) %] >- <option value="[% branch.branchcode %]" selected="selected">[% branch.branchname %]</option> >- [% ELSE %] >- <option value="[% branch.branchcode %]">[% branch.branchname %]</option> >- [% END %] >- [% END %] >- </select> >- </li> >- <li> >- <label for="lang">Language:</label> >- <select id="lang" name="lang"> >- [% IF ( data.lang == "" ) %] >- <option value="" selected="selected">All</option> >- [% ELSE %] >- <option value="">All</option> >- [% END %] >- [% FOREACH lang IN lang_list %] >- [% IF ( lang.rfc4646_subtag == data.lang ) %] >- <option value="[% lang.rfc4646_subtag %]" selected="selected">[% lang.native_description %] ([% lang.rfc4646_subtag %])</option> >- [% ELSE %] >- <option value="[% lang.rfc4646_subtag %]">[% lang.native_description %] ([% lang.rfc4646_subtag %])</option> >- [% END %] >- [% END %] >- </select> >- </li> >- <li> >- <label for="parent">Parent page: </label> >- <select id="parent" name="parent"> >- [% IF ( data.id == "" ) %] >- <option value="" selected="selected">No parent</option> >- [% ELSE %] >- <option value="">No parent</option> >- [% END %] >- [% FOREACH parent IN parent_list %] >- [% IF ( data.parent.id == parent.id ) %] >- <option value="[% parent.id %]" selected="selected">[% parent.title_link %]</option> >- [% ELSE %] >- <option value="[% parent.id %]">[% parent.title_link %]</option> >- [% END %] >- [% END %] >- </select> >- </li> >- <li> >- <label for="title_link" class="required">Link title: </label> >- <input id="title_link" size="30" type="text" name="title_link" value="[% data.title_link %]" required="required" class="required" /> >- <span class="required">Required</span> >- </li> >- <li> >- <label for="title">Page title: </label> >- <input id="title" size="30" type="text" name="title" value="[% data.title %]" /> >- </li> >- <li> >- <label for="number">Appear in position: </label> >- [% IF ( data.sortorder ) %] >- <input id="number" size="3" name="number" type="text" value="[% data.sortorder %]" /> >- [% ELSE %] >- <input id="number" size="3" name="number" type="text" value="0" /> >- [% END %] >- </li> >- <li> >- <label for="publish">Publish: </label> >- [% IF ( data.publish ) %] >- <input type="checkbox" id="publish" name="publish" checked="checked" /> >- [% ELSE %] >- <input type="checkbox" id="publish" name="publish" /> >- [% END %] >- </li> >- <li> >- <label for="new">Content: </label> >- <textarea name="content" id="content" cols="75" rows="10">[% data.content %]</textarea> >- </li> >- </ol> >- </fieldset> >- <fieldset class="action"> >- <input class="button" type="submit" value="Save" /> >- <a class="cancel" href="[% link_self %]">Cancel</a> >- </fieldset> >- </form> >+ [% UNLESS ( form || view ) %] >+ <div id="toolbar" class="btn-toolbar"> >+ <a class="btn btn-default" id="newentry" href="[% link_self | uri %]?op=form"><i class="fa fa-plus"></i> New page</a> >+ </div> >+ [% END %] > >- [% ELSE # IF view / form %] >+ [% IF ( failed_add ) %] >+ <div class="dialog alert"> >+ Failed to add page. Check that: >+ <ul> >+ <li>Your link title is unique</li> >+ <li>If specifying a parent page, the location is the same as your new page</li> >+ </ul> >+ </div> >+ [% END %] > >- <h1>Pages</h1> >- <div style="margin-bottom:5px;"> >- <form name="filter" method="post" action="[% link_self %]"> >- <label for="disp">Display location:</label> >- <select name="disp" id="disp"> >- [% IF ( disp == "" ) %] >+ [% IF ( view ) %] >+ <div class="row"> >+ <div id="cms-page" class="col-sm-8"> >+ <h1>Pages: [% cms_page.title | html %]</h1> >+ [% IF ( cms_page.publish == 1 ) %] >+ [% cms_page.content | $raw %] >+ [% ELSE %] >+ <div class="dialog message">This page has not been published.</div> >+ [% cms_page.content | $raw %] >+ [% END %] >+ </div> >+ <div id="cms-nav" class="col-sm-4"> >+ [% IF ( pages ) %] >+ <fieldset> >+ <ul> >+ <li><a href="[% link_self | uri %]">Pages home</a></li> >+ </ul> >+ <h4>Pages</h4> >+ [% INCLUDE 'cms-pages-nav.inc' %] >+ </fieldset> >+ [% END %] >+ </div> >+ </div> >+ [% ELSIF ( form ) %] >+ <form name="form" method="post" enctype="multipart/form-data" action="[% link_self | html%]" > >+ <input type="hidden" name="op" value="[% op | html%]" /> >+ <input type="hidden" name="id" value="[% id | html %]" /> >+ <fieldset class="rows"> >+ <legend>Page</legend> >+ <ol> >+ <li> >+ <label for="disp">Interface:</label> >+ <select id="disp" name="disp"> >+ [% IF ( data.location == "" ) %] > <option value="" selected="selected">All</option> > [% ELSE %] > <option value="">All</option> > [% END %] >- [% IF ( disp == "1" ) %] >+ [% IF ( data.location == "1" ) %] > <option value="1" selected="selected">Staff interface</option> > [% ELSE %] > <option value="1">Staff interface</option> > [% END %] >- [% IF ( disp == "2" ) %] >+ [% IF ( data.location == "2" ) %] > <option value="2" selected="selected">OPAC</option> > [% ELSE %] > <option value="2">OPAC</option> > [% END %] > </select> >- >+ </li> >+ <li> > <label for="branch">Library:</label> > <select id="branch" name="branch"> >- [% IF ( branch == "" ) %] >+ [% IF ( data.branchcode.branchcode == "" ) %] > <option value="" selected="selected">All libraries</option> > [% ELSE %] > <option value="">All libraries</option> > [% END %] >- [% FOREACH br IN branch_list %] >- [% IF ( br.branchcode == branch ) %] >- <option value="[% br.branchcode %]" selected="selected">[% br.branchname %]</option> >+ [% FOREACH branch IN branch_list %] >+ [% IF ( branch.branchcode == data.branchcode.branchcode ) %] >+ <option value="[% branch.branchcode | html %]" selected="selected">[% branch.branchname | html %]</option> > [% ELSE %] >- <option value="[% br.branchcode %]">[% br.branchname %]</option> >+ <option value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> > [% END %] > [% END %] > </select> >- >+ </li> >+ <li> > <label for="lang">Language:</label> >- <select name="lang" id="lang"> >- [% IF ( lang == "" ) %] >+ <select id="lang" name="lang"> >+ [% IF ( data.lang == "" ) %] > <option value="" selected="selected">All</option> > [% ELSE %] > <option value="">All</option> > [% END %] >- [% FOREACH language IN lang_list %] >- [% IF ( language.rfc4646_subtag == lang ) %] >- <option value="[% language.rfc4646_subtag %]" selected="selected">[% language.native_description %] ([% language.rfc4646_subtag %])</option> >+ [% FOREACH lang IN lang_list %] >+ [% IF ( lang.rfc4646_subtag == data.lang ) %] >+ <option value="[% lang.rfc4646_subtag | html %]" selected="selected">[% lang.native_description | html %] ([% lang.rfc4646_subtag | html %])</option> > [% ELSE %] >- <option value="[% language.rfc4646_subtag %]">[% language.native_description %] ([% language.rfc4646_subtag %])</option> >+ <option value="[% lang.rfc4646_subtag | html %]">[% lang.native_description | html %] ([% lang.rfc4646_subtag | html %])</option> > [% END %] > [% END %] > </select> >- <input type="hidden" name="op" value="filter" /> >- <input type="submit" class="button" value="Filter" /> >- </form> >- </div> >+ </li> >+ <li> >+ <label for="parent">Parent page: </label> >+ <select id="parent" name="parent"> >+ [% IF ( data.id == "" ) %] >+ <option value="" selected="selected">No parent</option> >+ [% ELSE %] >+ <option value="">No parent</option> >+ [% END %] >+ [% FOREACH parent IN parent_list %] >+ [% IF ( data.parent.id == parent.id ) %] >+ <option value="[% parent.id | html %]" selected="selected">[% parent.title_link | html %]</option> >+ [% ELSE %] >+ <option value="[% parent.id | html %]">[% parent.title_link | html %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ </li> >+ <li> >+ <label for="title_link" class="required">Link title: </label> >+ <input id="title_link" size="30" type="text" name="title_link" value="[% data.title_link | html %]" required="required" class="required" /> >+ <span class="required">Required</span> >+ </li> >+ <li> >+ <label for="title">Page title: </label> >+ <input id="title" size="30" type="text" name="title" value="[% data.title | html %]" /> >+ </li> >+ <li> >+ <label for="number">Appear in position: </label> >+ [% IF ( data.sortorder ) %] >+ <input id="number" size="3" name="number" type="text" value="[% data.sortorder | html %]" /> >+ [% ELSE %] >+ <input id="number" size="3" name="number" type="text" value="0" /> >+ [% END %] >+ </li> >+ <li> >+ <label for="publish">Publish: </label> >+ [% IF ( data.publish ) %] >+ <input type="checkbox" id="publish" name="publish" checked="checked" /> >+ [% ELSE %] >+ <input type="checkbox" id="publish" name="publish" /> >+ [% END %] >+ </li> >+ <li> >+ <label for="content">Content: </label> >+ <textarea name="content" id="content" cols="75" rows="10">[% data.content | $raw %]</textarea> >+ </li> >+ </ol> >+ </fieldset> >+ <fieldset class="action"> >+ <input class="button" type="submit" value="Save" /> >+ <a class="cancel" href="[% link_self | uri %]">Cancel</a> >+ </fieldset> >+ </form> > >- [% IF ( page_list.size ) %] >- <form name="del_form" method="post" action="[% link_self %]"> >- <table id="pages_table"> >- <thead> >- <tr> >- <th> </th> >- <th>Published</th> >- <th>Parent</th> >- <th>Interface</th> >- <th>Library</th> >- <th>Language</th> >- <th>Number</th> >- <th>Link title</th> >- <th>Page title</th> >- <th> </th> >- </tr> >- </thead> >- <tbody> >- [% FOREACH page IN page_list %] >- <tr id="[% page.id %]"> >- <td><input type="checkbox" name="ids" id="ids" value="[% page.id %]"></td> >- <td> >- [% IF ( page.publish ) %] >- Yes >- [% ELSE %] >- No >- [% END %] >- </td> >- <td>[% page.parent.title_link %]</td> >- <td> >- [% SWITCH page.location %] >- [% CASE "" %] >- All >- [% CASE "1" %] >- Staff interface >- [% CASE "2" %] >- OPAC >- [% END %] >- </td> >- <td> >- [% IF ( page.branchcode == "" ) %] >- All >- [% ELSE %] >- [% page.branchcode.branchname %] >+ [% ELSE # IF view / form %] >+ >+ <h1>Pages</h1> >+ <div style="margin-bottom:5px;"> >+ <form name="filter" method="post" action="[% link_self | uri %]"> >+ <label for="disp">Display location:</label> >+ <select name="disp" id="disp"> >+ [% IF ( disp == "" ) %] >+ <option value="" selected="selected">All</option> >+ [% ELSE %] >+ <option value="">All</option> >+ [% END %] >+ [% IF ( disp == "1" ) %] >+ <option value="1" selected="selected">Staff interface</option> >+ [% ELSE %] >+ <option value="1">Staff interface</option> >+ [% END %] >+ [% IF ( disp == "2" ) %] >+ <option value="2" selected="selected">OPAC</option> >+ [% ELSE %] >+ <option value="2">OPAC</option> >+ [% END %] >+ </select> >+ >+ <label for="branch">Library:</label> >+ <select id="branch" name="branch"> >+ [% IF ( branch == "" ) %] >+ <option value="" selected="selected">All libraries</option> >+ [% ELSE %] >+ <option value="">All libraries</option> >+ [% END %] >+ [% FOREACH br IN branch_list %] >+ [% IF ( br.branchcode == branch ) %] >+ <option value="[% br.branchcode | html %]" selected="selected">[% br.branchname | html %]</option> >+ [% ELSE %] >+ <option value="[% br.branchcode | html %]">[% br.branchname | html %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ >+ <label for="lang">Language:</label> >+ <select name="lang" id="lang"> >+ [% IF ( lang == "" ) %] >+ <option value="" selected="selected">All</option> >+ [% ELSE %] >+ <option value="">All</option> >+ [% END %] >+ [% FOREACH language IN lang_list %] >+ [% IF ( language.rfc4646_subtag == lang ) %] >+ <option value="[% language.rfc4646_subtag | html %]" selected="selected">[% language.native_description | html %] ([% language.rfc4646_subtag | html %])</option> >+ [% ELSE %] >+ <option value="[% language.rfc4646_subtag | html %]">[% language.native_description | html %] ([% language.rfc4646_subtag | html %])</option> >+ [% END %] >+ [% END %] >+ </select> >+ <input type="hidden" name="op" value="filter" /> >+ <input type="submit" class="button" value="Filter" /> >+ </form> >+ </div> >+ >+ [% IF ( page_list.size ) %] >+ <form name="del_form" method="post" action="[% link_self | uri %]"> >+ <p><a href="#" class="SelectAll"><i class="fa fa-check"></i> Select all</a> | <a href="#" class="ClearAll"><i class="fa fa-remove"></i> Clear all</a></p> >+ <table id="pages_table"> >+ <thead> >+ <tr> >+ <th class="NoSort"> </th> >+ <th>Published</th> >+ <th>Parent</th> >+ <th>Interface</th> >+ <th>Library</th> >+ <th>Language</th> >+ <th>Number</th> >+ <th>Link title</th> >+ <th>Page title</th> >+ <th class="NoSort"> </th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH page IN page_list %] >+ <tr id="[% page.id | html %]"> >+ <td><input type="checkbox" name="ids" id="ids" value="[% page.id | html %]"></td> >+ <td> >+ [% IF ( page.publish ) %] >+ Yes >+ [% ELSE %] >+ No >+ [% END %] >+ </td> >+ <td>[% page.parent.title_link | html %]</td> >+ <td> >+ [% SWITCH page.location %] >+ [% CASE "" %] >+ All >+ [% CASE "1" %] >+ Staff interface >+ [% CASE "2" %] >+ OPAC >+ [% END %] >+ </td> >+ <td> >+ [% IF ( page.branchcode == "" ) %] >+ All >+ [% ELSE %] >+ [% page.branchcode.branchname | html %] >+ [% END %] >+ </td> >+ <td> >+ [% IF ( page.lang == "" ) %] >+ All >+ [% ELSE %] >+ [% FOREACH lang IN lang_list %] >+ [% IF ( lang.rfc4646_subtag == page.lang ) %] >+ [% lang.native_description | html %] ([% lang.rfc4646_subtag | html %]) > [% END %] >- </td> >- <td> >- [% IF ( page.lang == "" ) %] >- All >- [% ELSE %] >- [% FOREACH lang IN lang_list %] >- [% IF ( lang.rfc4646_subtag == page.lang ) %] >- [% lang.native_description %] ([% lang.rfc4646_subtag %]) >- [% END %] >- [% END %] >+ [% END %] >+ [% END %] >+ </td> >+ <td>[% page.sortorder | html %]</td> >+ <td><a href="[% link_self | uri %]?op=form&id=[% page.id | uri %]">[% page.title_link | html %]</a></td> >+ <td>[% page.title | html %]</td> >+ <td class="actions"> >+ <div class="btn-group"> >+ <a class="btn btn-default btn-xs dropdown-toggle" id="opencmspageactions[% page.id | html %]" role="button" data-toggle="dropdown" href="#"> >+ Actions <b class="caret"></b> >+ </a> >+ <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="opencmspageactions[% page.id | html %]"> >+ <li><a href="[% link_self | uri %]?op=form&id=[% page.id | uri %]"><i class="fa fa-pencil"></i> Edit</a></li> >+ <li><a href="[% link_self | uri %]?op=delSingle&id=[% page.id | uri %]" class="del_single" data-isparent="[% page.isParent | html %]"><i class="fa fa-trash"></i> Delete</a></li> >+ [% IF ( page.location == "" ) %] >+ <li><a href="[% link_self | uri %]?op=view&id=[% page.id | uri %]"><i class="fa fa-eye"></i> View</a></li> >+ <li><a target="_blank" href="[% link_opac | uri %]?id=[% page.id | uri %]"><i class="fa fa-eye"></i> View in OPAC</a></li> >+ [% ELSIF ( page.location == "1" ) %] >+ <li><a href="[% link_self | uri %]?op=view&id=[% page.id | uri %]"><i class="fa fa-eye"></i> View</a></li> >+ [% ELSIF ( page.location == "2" ) %] >+ <li><a target="_blank" href="[% link_opac | uri %]?id=[% page.id | uri %]"><i class="fa fa-eye"></i> View in OPAC</a></li> > [% END %] >- </td> >- <td>[% page.sortorder %]</td> >- <td><a href="[% link_self %]?op=form&id=[% page.id %]">[% page.title_link %]</a></td> >- <td>[% page.title %]</td> >- <td class="actions"> >- <div class="btn-group"> >- <a class="btn btn-default btn-xs dropdown-toggle" id="opencmspageactions[% page.id %]" role="button" data-toggle="dropdown" href="#"> >- Actions <b class="caret"></b> >- </a> >- <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="opencmspageactions[% page.id %]"> >- <li><a href="[% link_self %]?op=form&id=[% page.id %]"><i class="fa fa-pencil"></i> Edit</a></li> >- <li><a href="[% link_self %]?op=delSingle&id=[% page.id %]" class="del_single" data-isparent="[% page.isParent %]"><i class="fa fa-trash"></i> Delete</a></li> >- [% IF ( page.location == "" ) %] >- <li><a href="[% link_opac %]?id=[% page.id %]"><i class="fa fa-eye"></i> OPAC</a></li> >- <li><a href="[% link_self %]?op=view&id=[% page.id %]"><i class="fa fa-eye"></i> Intranet</a></li> >- [% ELSIF ( page.location == "1" ) %] >- <li><a href="[% link_self %]?op=view&id=[% page.id %]"><i class="fa fa-eye"></i> Intranet</a></li> >- [% ELSIF ( page.location == "2" ) %] >- <li><a href="[% link_opac %]?id=[% page.id %]"><i class="fa fa-eye"></i> OPAC</a></li> >- [% END %] >- </ul> >- </div> >- </td> >- </tr> >- [% END %] >- </tbody> >- </table> >- <input type="hidden" name="op" value="del" /> >- <fieldset class="action"> >- <a class="SelectAll"><i class="fa fa-check"></i> Select all</a> | <a class="ClearAll"><i class="fa fa-remove"></i> Clear all</a> >- <input type="submit" class="button" id="del_button" value="Delete selected" /> >- </fieldset> >- </form> >- [% ELSE %] >- <div class="dialog message"> >- No pages exist. <a href="[% link_self %]?op=form">Create a new page?</a> >- </div> >- [% END # IF page_list.size %] >- [% END # IF view / form %] >- </div> <!-- /#pagesnav --> >- </div> <!-- /.yui-ge --> >+ </ul> >+ </div> >+ </td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ <input type="hidden" name="op" value="del" /> >+ <fieldset class="action"> >+ <input type="submit" class="button" id="del_button" value="Delete selected" /> >+ </fieldset> >+ </form> >+ [% ELSE %] >+ <div class="dialog message"> >+ No pages exist. <a href="[% link_self | uri %]?op=form">Create a new page?</a> >+ </div> >+ [% END # IF page_list.size %] >+ [% END # IF view / form %] >+ >+ </main> >+ [% UNLESS ( form ) %] >+ </div> <!-- /.col-sm-10.col-sm-push-2 --> > >- [% UNLESS ( form ) %] >- <div class="yui-b noprint"> >+ <div class="col-sm-2 col-sm-pull-10"> >+ <aside> > [% INCLUDE 'tools-menu.inc' %] >- </div> >- [% END %] >- </div> >+ </aside> >+ </div> <!-- /.col-sm-2.col-sm-pull-10 --> >+ [% END %] >+</div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] > [% Asset.js("js/tools-menu.js") | $raw %] > [% Asset.js("lib/tiny_mce/tiny_mce.js") | $raw %] >- <script type="text/javascript">//<![CDATA[ >- >+ <script> > $(document).ready(function() { > $("#pages_table").dataTable($.extend(true, {}, dataTablesDefaults, { > "aoColumnDefs": [ >- { "aTargets": [ 0, -1 ], "bSortable": false, "bSearchable": false }, >+ { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, > ], > "sPaginationType": "full_numbers" > })); >@@ -401,22 +405,24 @@ > return confirmDelete(_("Are you sure you want to delete this page?")); > }); > >- $(".SelectAll").on("click", function(){ >+ $(".SelectAll").on("click", function(e){ >+ e.preventDefault(); > $("input[name='ids'][type='checkbox']").prop("checked", true); > }); > >- $(".ClearAll").on("click", function(){ >+ $(".ClearAll").on("click", function(e){ >+ e.preventDefault(); > $("input[name='ids'][type='checkbox']").prop("checked", false); > }); > }); > >- tinyMCE.baseURL = "[% interface %]/lib/tiny_mce"; >+ tinyMCE.baseURL = "[% interface | html %]/lib/tiny_mce"; > tinyMCE.init({ > mode : "textareas", > theme : "advanced", > convert_urls : false, > relative_urls : false, >- content_css : "[% interface %]/[% theme %]/css/tinymce.css", >+ content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css", > plugins : "table,save,advhr,advlink,searchreplace,print,contextmenu", > theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,search,replace,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,|,print", > theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap", >@@ -431,7 +437,6 @@ > height : "300", > width : "700" > }); >- //]]> > </script> > [% END # jsinclude %] > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js b/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js >index 14325b6f9d..a8ff9fd693 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js >@@ -18,5 +18,7 @@ > $('#navmenulist a[href$="/cgi-bin/koha/tools/stockrotation.pl"]').addClass("current"); > } else if (path.indexOf("plugins") >= 0 ) { > $('#navmenulist a[href$="/cgi-bin/koha/plugins/plugins-home.pl?method=tool"]').addClass("current"); >+ } else if (path.indexOf("cmspages") >= 0 ) { >+ $('#navmenulist a[href$="/cgi-bin/koha/tools/cmspages.pl"]').addClass("current"); > } > }); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15326
:
45621
|
58272
|
58607
|
58608
|
58609
|
58787
|
63904
|
63905
|
64241
|
64941
|
64942
|
66255
|
70866
|
70867
|
70868
|
70869
|
70870
|
70871
|
76387
|
76388
|
76389
|
76390
|
76391
|
76392
|
78232
|
78233
|
78234
|
78235
|
78236
|
78237
|
78238
|
78240
|
79269
|
83318
|
83319
|
83320
|
83321
|
83322
|
83323
|
83324
|
83325
|
83326
|
83404
|
83405
|
83406
|
83407
|
83408
|
83409
|
83410
|
83411
|
83412
|
84682
|
84683
|
84684
|
84685
|
84686
|
84687
|
84688
|
84689
|
84690
|
84691
|
87494
|
87495
|
87496
|
87497
|
87498
|
87499
|
87500
|
87501
|
87502
|
87503
|
87608
|
87609
|
87610
|
87617
|
96084
|
96085
|
96086
|
96087
|
96088
|
96089
|
96090
|
96091
|
96092
|
96093
|
96094
|
96095
|
96096
|
96097
|
96098
|
97237
|
101565
|
101566
|
101567
|
101568
|
101569
|
101570
|
101571
|
101572
|
101573
|
101574
|
101575
|
101576
|
101577
|
101578
|
101579
|
101580
|
128341
|
128342
|
128343
|
128344
|
128345
|
128346
|
128347
|
128348
|
128349
|
128350
|
128351
|
128352
|
128353
|
128354
|
128355
|
128356
|
128357
|
128585
|
128642
|
136432
|
136757
|
136768
|
138489
|
138493
|
139028
|
139029
|
139030
|
139031
|
139111
|
139123
|
139124
|
139125
|
139172
|
139173
|
139174