Bugzilla – Attachment 96093 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) Redindent new CMS page templates
Bug-15326-follow-up-Redindent-new-CMS-page-templat.patch (text/plain), 47.57 KB, created by
Nick Clemens (kidclamp)
on 2019-12-09 12:08:59 UTC
(
hide
)
Description:
Bug 15326: (follow-up) Redindent new CMS page templates
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-12-09 12:08:59 UTC
Size:
47.57 KB
patch
obsolete
>From bf756a6fc5f592b2fdeb492d3f3e5e4eb98e3896 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 8 Apr 2019 16:25:06 +0000 >Subject: [PATCH] Bug 15326: (follow-up) Redindent new CMS page templates > >This patch is an opinionated reindent of new and changed templates >related to the CMS feature. I think it would be nice for these templates >to start out with good indentation. > >To test, apply the patch and test the CMS feature. There should be no >visible change to the way it looks or the way it works. >--- > .../prog/en/modules/tools/cmspages.tt | 700 ++++++++++++--------- > .../prog/en/modules/tools/tools-home.tt | 10 +- > .../opac-tmpl/bootstrap/en/includes/navigation.inc | 24 +- > .../bootstrap/en/modules/opac-cmspages.tt | 39 +- > 4 files changed, 449 insertions(+), 324 deletions(-) > >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 32898d6354..af195e2a04 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cmspages.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cmspages.tt >@@ -11,317 +11,427 @@ > [% Asset.css("css/datatables.css") %] > </head> > <body id="tools_koha-content" class="tools"> >-[% INCLUDE 'header.inc' %] >-[% INCLUDE 'cat-search.inc' %] >-<div id="breadcrumbs"> >- <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> › >- [% IF ( id ) %]Edit page[% ELSE %]Add page[% END %] >- [% ELSIF ( view ) %] >- <a href="[% link_self %]">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 %] >- [% END %] >- [% END %] >- [% cms_page.title_link %] >- [% ELSE %]Pages[% END %] >-</div> >+ [% INCLUDE 'header.inc' %] >+ [% INCLUDE 'cat-search.inc' %] >+ <div id="breadcrumbs"> >+ <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> › >+ [% IF ( id ) %]Edit page[% ELSE %]Add page[% END %] >+ [% ELSIF ( view ) %] >+ <a href="[% link_self %]">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 %] >+ [% END %] >+ [% END %] >+ [% cms_page.title_link %] >+ [% ELSE %] >+ Pages >+ [% END %] >+ </div> > >-[% IF ( form ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %] >- <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> >-[% 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> >-[% 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> >+ [% IF ( form ) %] >+ <div id="doc" class="yui-t7"> > [% ELSE %] >+ <div id="doc3" class="yui-t2"> >+ [% 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 == "" ) %]<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> >+ <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 %] > >- <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 %]" selected="selected">[% br.branchname %]</option> >- [% ELSE %] >- <option value="[% br.branchcode %]">[% br.branchname %]</option> >- [% 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> > [% 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 %]" selected="selected">[% language.native_description %] ([% language.rfc4646_subtag %])</option> >- [% ELSE %] >- <option value="[% language.rfc4646_subtag %]">[% language.native_description %] ([% language.rfc4646_subtag %])</option> >- [% 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> > [% 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 %]"> >- <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 >+ >+ [% 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> >+ >+ [% ELSE # IF view / form %] >+ >+ <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 == "" ) %] >+ <option value="" selected="selected">All</option> >+ [% ELSE %] >+ <option value="">All</option> > [% END %] >- </td> >- <td>[% IF ( page.branchcode == "" ) %]All[% ELSE %][% page.branchcode.branchname %][% 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 %] >+ [% IF ( disp == "1" ) %] >+ <option value="1" selected="selected">Staff interface</option> >+ [% ELSE %] >+ <option value="1">Staff interface</option> > [% END %] >- [% 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> >+ [% 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 %]" selected="selected">[% br.branchname %]</option> >+ [% ELSE %] >+ <option value="[% br.branchcode %]">[% br.branchname %]</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 %]" selected="selected">[% language.native_description %] ([% language.rfc4646_subtag %])</option> >+ [% ELSE %] >+ <option value="[% language.rfc4646_subtag %]">[% language.native_description %] ([% language.rfc4646_subtag %])</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 %]"> >+ <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 %] >+ [% 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 %] >+ </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 --> >+ >+ [% UNLESS ( form ) %] >+ <div class="yui-b noprint"> >+ [% INCLUDE 'tools-menu.inc' %] >+ </div> > [% END %] >- [% END %] >-</div> >-</div> >-[% UNLESS ( form ) %] >- <div class="yui-b noprint"> >- [% INCLUDE 'tools-menu.inc' %] > </div> >-[% END %] >-</div> >+ > [% 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[ >+ [% INCLUDE 'datatables.inc' %] >+ [% Asset.js("js/tools-menu.js") | $raw %] >+ [% Asset.js("lib/tiny_mce/tiny_mce.js") | $raw %] >+ <script type="text/javascript">//<![CDATA[ > >-$(document).ready(function() { >- $("#pages_table").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aoColumnDefs": [ >- { "aTargets": [ 0, -1 ], "bSortable": false, "bSearchable": false }, >- ], >- "sPaginationType": "full_numbers" >- })); >+ $(document).ready(function() { >+ $("#pages_table").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ 0, -1 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "sPaginationType": "full_numbers" >+ })); > >- $("#del_button").on("click",function(){ >- if ($("input[name='ids'][type='checkbox']:checked").length){ >- return confirmDelete(_("Are you sure you want to delete the selected page(s)?")); >- } else { >- alert(_("No pages have been selected.")); >- return false; >- } >- }); >+ $("#del_button").on("click",function(){ >+ if ($("input[name='ids'][type='checkbox']:checked").length){ >+ return confirmDelete(_("Are you sure you want to delete the selected page(s)?")); >+ } else { >+ alert(_("No pages have been selected.")); >+ return false; >+ } >+ }); > >- $(".del_single").on("click", function(){ >- var isParent = $(this).attr('data-isparent'); >- if (isParent == 1){ >- return confirmDelete(_("This page is a parent page. Are you sure you want to delete this page?")); >- } >- return confirmDelete(_("Are you sure you want to delete this page?")); >- }); >+ $(".del_single").on("click", function(){ >+ var isParent = $(this).attr('data-isparent'); >+ if (isParent == 1){ >+ return confirmDelete(_("This page is a parent page. Are you sure you want to delete this page?")); >+ } >+ return confirmDelete(_("Are you sure you want to delete this page?")); >+ }); > >- $(".SelectAll").on("click", function(){ >- $("input[name='ids'][type='checkbox']").prop("checked", true); >- }); >+ $(".SelectAll").on("click", function(){ >+ $("input[name='ids'][type='checkbox']").prop("checked", true); >+ }); > >- $(".ClearAll").on("click", function(){ >- $("input[name='ids'][type='checkbox']").prop("checked", false); >- }); >-}); >+ $(".ClearAll").on("click", function(){ >+ $("input[name='ids'][type='checkbox']").prop("checked", false); >+ }); >+ }); > >-tinyMCE.baseURL = "[% interface %]/lib/tiny_mce"; >-tinyMCE.init({ >- mode : "textareas", >- theme : "advanced", >- convert_urls : false, >- relative_urls : false, >- content_css : "[% interface %]/[% theme %]/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", >- theme_advanced_buttons3 : "", >- theme_advanced_toolbar_location : "top", >- theme_advanced_toolbar_align : "left", >- theme_advanced_path_location : "bottom", >- theme_advanced_resizing : true, >- plugin_insertdate_dateFormat : "%Y-%m-%d", >- plugin_insertdate_timeFormat : "%H:%M:%S", >- apply_source_formatting : true, >- height : "300", >- width : "700" >-}); >-//]]> >-</script> >-[% END %] >+ tinyMCE.baseURL = "[% interface %]/lib/tiny_mce"; >+ tinyMCE.init({ >+ mode : "textareas", >+ theme : "advanced", >+ convert_urls : false, >+ relative_urls : false, >+ content_css : "[% interface %]/[% theme %]/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", >+ theme_advanced_buttons3 : "", >+ theme_advanced_toolbar_location : "top", >+ theme_advanced_toolbar_align : "left", >+ theme_advanced_path_location : "bottom", >+ theme_advanced_resizing : true, >+ plugin_insertdate_dateFormat : "%Y-%m-%d", >+ plugin_insertdate_timeFormat : "%H:%M:%S", >+ apply_source_formatting : true, >+ height : "300", >+ width : "700" >+ }); >+ //]]> >+ </script> >+[% END # jsinclude %] > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >index c524e05828..7225791da1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >@@ -105,11 +105,11 @@ > [% END %] > > [% IF ( CAN_user_tools_edit_pages ) %] >- <dt><a href="/cgi-bin/koha/tools/cmspages.pl">Pages</a></dt> >- <dd>Create and edit additional content pages</dd> >- <ul> >- [% INCLUDE 'cms-pages-nav.inc' %] >- </ul> >+ <dt><a href="/cgi-bin/koha/tools/cmspages.pl">Pages</a></dt> >+ <dd>Create and edit additional content pages</dd> >+ <ul> >+ [% INCLUDE 'cms-pages-nav.inc' %] >+ </ul> > [% END %] > > [% IF ( CAN_user_tools_schedule_tasks ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/navigation.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/navigation.inc >index 5d2d2b4d3f..a72b935b73 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/navigation.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/navigation.inc >@@ -4,21 +4,31 @@ > <ul id="cms_nav"> > [% FOREACH link IN links %] > [% IF ( link.publish == '1' || link.publish == '0' && CAN_user_tools_edit_pages ) %] >- [% IF ( link.location == '' || link.location == '2' ) %] >- [% IF ( link.parent != '' ) %] >- [% FOREACH parent IN parent_list %] >- [% IF ( parent.id == link.parent ) %]<li style="margin-left:20px;"><a href="/cgi-bin/koha/opac-cmspages.pl?id=[% link.parent %]">[% parent.title_link | html %]</a> › <a href="/cgi-bin/koha/opac-cmspages.pl?id=[% link.id %]">[% link.title_link | html %]</a></li>[% END %] >+ [% IF ( link.location == '' || link.location == '2' ) %] >+ [% IF ( link.parent != '' ) %] >+ [% FOREACH parent IN parent_list %] >+ [% IF ( parent.id == link.parent ) %] >+ <li style="margin-left:20px;"> >+ <a href="/cgi-bin/koha/opac-cmspages.pl?id=[% link.parent %]">[% parent.title_link | html %]</a> › >+ <a href="/cgi-bin/koha/opac-cmspages.pl?id=[% link.id %]">[% link.title_link | html %]</a> >+ </li> >+ [% END %] >+ [% END %] >+ [% ELSE %] >+ <li> >+ <a href="/cgi-bin/koha/opac-cmspages.pl?id=[% link.id %]">[% link.title_link | html %]</a> >+ </li> > [% END %] >- [% ELSE %] >- <li><a href="/cgi-bin/koha/opac-cmspages.pl?id=[% link.id %]">[% link.title_link | html %]</a></li> > [% END %] >- [% END %][% END %] >+ [% END %] > [% END %] > </ul> > [% END %] > [% OpacNav | $raw %] > </div> >+ > [% IF IsPatronPage %] > <div id="usermenu">[% INCLUDE usermenu.inc %]</div> > [% END %] >+ > <div id="opacnavbottom">[% OpacNavBottom | $raw %]</div> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-cmspages.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-cmspages.tt >index 2f9393adc1..f26036b666 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-cmspages.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-cmspages.tt >@@ -13,7 +13,12 @@ > <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li> > [% IF ( cms_page.parent ) %] > [% FOREACH parent IN parents %] >- [% IF parent.id == cms_page.parent %]<li><a href="/cgi-bin/koha/opac-cmspages.pl?id=[% cms_page.parent %]">[% parent.title_link %]</a> <span class="divider">›</span></li>[% END %] >+ [% IF parent.id == cms_page.parent %] >+ <li> >+ <a href="/cgi-bin/koha/opac-cmspages.pl?id=[% cms_page.parent %]">[% parent.title_link %]</a> >+ <span class="divider">›</span> >+ </li> >+ [% END %] > [% END %] > [% END %] > <li><a href="#">[% cms_page.title_link %]</a></li> >@@ -30,27 +35,27 @@ > [% END %] > > <div class="row-fluid"> >- [% IF ( OpacNav || OpacNavBottom ) %] >- <div class="span2"> >- <div id="navigation"> >- [% INCLUDE 'navigation.inc' %] >+ [% IF ( OpacNav || OpacNavBottom ) %] >+ <div class="span2"> >+ <div id="navigation"> >+ [% INCLUDE 'navigation.inc' %] >+ </div> > </div> >- </div> >- [% END %] >- >- [% IF ( OpacNav || OpacNavBottom ) %] >- <div class="span7"> >- [% ELSE %] >- <div class="span9"> >- [% END %] >+ [% END %] > >- [% IF ( cms_page.publish == 1 ) || ( cms_page.publish == 0 && CAN_user_tools_edit_pages ) %] >- [% cms_page.content %] >+ [% IF ( OpacNav || OpacNavBottom ) %] >+ <div class="span7"> > [% ELSE %] >- This page has not been published. >+ <div class="span9"> > [% END %] > >- </div> <!-- / .span 7/9 --> >+ [% IF ( cms_page.publish == 1 ) || ( cms_page.publish == 0 && CAN_user_tools_edit_pages ) %] >+ [% cms_page.content %] >+ [% ELSE %] >+ This page has not been published. >+ [% END %] >+ >+ </div> <!-- / .span 7/9 --> > > </div> <!-- /.container-fluid --> > </div> <!-- /.row-fluid --> >-- >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