Bug 22007: Remove html filters when KohaDates called with a parameter

Bug 13618 took care of the KohaDates output but not if it is called
with a parameter (eg. [% var | $KohaDates with_hours => 1 %]).

We could avoid unnecessary processing by removing the extra html filter.

Patch generated with the following command:
  % perl -p -i -e 's/KohaDates([^%\|]*)\s?\|\s?html\s?/KohaDates $1/g' **/*.inc **/*.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5d49ea039c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2018-12-14 17:20:52 -03:00 committed by Martin Renvoize
parent 25a22f2e63
commit b6cf429827
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
20 changed files with 39 additions and 39 deletions

View File

@ -114,7 +114,7 @@
[% END %]
<tr>
<th scope="row">Date and time: </th>
<td>[% current_date_and_time | $KohaDates with_hours => 1 | html %]</td>
<td>[% current_date_and_time | $KohaDates with_hours => 1 %]</td>
</tr>
<tr>
[% timezone_config_class = (time_zone.config_invalid) ? 'status_warn' : '' %]

View File

@ -31,7 +31,7 @@
[% IF ( batch_details ) %]
<h1>Add orders from [% comments | html %]
([% file_name | html %] staged on [% upload_timestamp | $KohaDates with_hours => 1 | html %])
([% file_name | html %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %])
</h1>
<form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform">
<div id="tabs" class="toptabs">
@ -411,7 +411,7 @@
[% batch_lis.import_status | html %]
[% END %]
</td>
<td><span title="[% batch_lis.staged_date | html %]">[% batch_lis.staged_date | $KohaDates with_hours => 1 | html %]</span></td>
<td><span title="[% batch_lis.staged_date | html %]">[% batch_lis.staged_date | $KohaDates with_hours => 1 %]</span></td>
<td>[% batch_lis.num_records | html %]</td>
<td><a href="[% batch_lis.scriptname | url %]?import_batch_id=[% batch_lis.import_batch_id | uri %]&amp;basketno=[% basketno | uri %]&amp;booksellerid=[% booksellerid | uri %]">Add orders</a></td>
</tr>

View File

@ -81,7 +81,7 @@
</td>
<td>
[% IF ( lateorder.estimateddeliverydate ) %]
<span title="[% lateorder.estimateddeliverydate | html %]">[% lateorder.estimateddeliverydate | $KohaDates | html %]</span>
<span title="[% lateorder.estimateddeliverydate | html %]">[% lateorder.estimateddeliverydate | $KohaDates %]</span>
[% ELSE %]
<span title="0000-00-00"></span>
[% END %]

View File

@ -66,23 +66,23 @@
&nbsp;
[% END %]</td>
<td>[% IF checkout.renewals %]
Yes[% IF checkout.lastreneweddate %], <small>last on: [% checkout.lastreneweddate |$KohaDates with_hours => 1 | html %]</small>
Yes[% IF checkout.lastreneweddate %], <small>last on: [% checkout.lastreneweddate |$KohaDates with_hours => 1 %]</small>
[% END %]
[% ELSE %]
No
[% END %]</td>
<td>[% IF checkout.issuedate %]
<span title="[% checkout.issuedate | html %]">[% checkout.issuedate |$KohaDates with_hours => 1 | html %]</span>
<span title="[% checkout.issuedate | html %]">[% checkout.issuedate |$KohaDates with_hours => 1 %]</span>
[% ELSE %]
<span title="0000-00-00"></span>
[% END %]</td>
<td>[% IF checkout.date_due %]
<span title="[% checkout.date_due | html %]">[% checkout.date_due |$KohaDates with_hours => 1 | html %]</span>
<span title="[% checkout.date_due | html %]">[% checkout.date_due |$KohaDates with_hours => 1 %]</span>
[% ELSE %]
<span title="0000-00-00"></span>
[% END %]</td>
<td>[% IF checkout.returndate %]
<span title="[% checkout.returndate | html %]">[% checkout.returndate |$KohaDates with_hours => 1 | html %]</span>
<span title="[% checkout.returndate | html %]">[% checkout.returndate |$KohaDates with_hours => 1 %]</span>
[% ELSE %]
<span title="Checked out"><small>Checked out</small></span>
[% END %]</td>

View File

@ -56,7 +56,7 @@
[% FOREACH s IN current_biblio_searches %]
<tr>
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 | html %]</span></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
<td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td>
<td>[% s.total | html %]</td>
</tr>
@ -93,7 +93,7 @@
[% FOREACH s IN previous_biblio_searches %]
<tr>
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 | html %]</span></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
<td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td>
<td>[% s.total | html %]</td>
</tr>
@ -136,7 +136,7 @@
[% FOREACH s IN current_authority_searches %]
<tr>
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 | html %]</span></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
<td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td>
<td>[% s.total | html %]</td>
</tr>
@ -173,7 +173,7 @@
[% FOREACH s IN previous_authority_searches %]
<tr>
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 | html %]</span></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
<td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td>
<td>[% s.total | html %]</td>
</tr>

View File

@ -49,7 +49,7 @@
<td>[% library.branchname | html %]</td>
<td>[% library.issues | html %]</td>
<td>[% IF library.seen %]
[% library.seen | $KohaDates with_hours => 1 | html %]
[% library.seen | $KohaDates with_hours => 1 %]
[% ELSE %]
<span>Never</span>
[% END %]

View File

@ -1020,7 +1020,7 @@ No patron matched <span class="ex">[% message | html %]</span>
// On-site checkout
function toggle_onsite_checkout(){
if ( $("#onsite_checkout").prop('checked') ) {
$("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1 | html %]")
$("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1 %]")
[% IF !Koha.Preference('SpecifyDueDate') %]
$("#duedatespec").datetimepicker('destroy');
[% END %]

View File

@ -449,7 +449,7 @@
</li>
<li class="updated">
<label class="updated">Last updated:</label>
[% request.updated | $KohaDates with_hours => 1 | html %]
[% request.updated | $KohaDates with_hours => 1 %]
</li>
<li class="medium">
<label class="medium">Request type:</label>
@ -559,7 +559,7 @@
</li>
<li class="updated">
<span class="label updated">Last updated:</span>
[% request.updated | $KohaDates with_hours => 1 | html %]
[% request.updated | $KohaDates with_hours => 1 %]
</li>
<li class="medium">
<span class="label medium">Request type:</span>

View File

@ -108,13 +108,13 @@
[% IF offset_accountline %]
<tr>
<td>[% offset_accountline.date | $KohaDates %]</td>
<td>[% offset_accountline.timestamp | $KohaDates with_hours => 1 | html %]</td>
<td>[% offset_accountline.timestamp | $KohaDates with_hours => 1 %]</td>
<td>[% offset_accountline.amount | $Price %]</td>
<td>[% offset_accountline.amountoutstanding | $Price %]</td>
<td>[% PROCESS account_type_description account=offset_accountline %]</td>
<td>[% offset_accountline.note | html %]</td>
<td>[% IF offset_accountline.manager_id %]<a href="moremember.pl?borrowernumber=[% offset_accountline.manager_id | uri %]">[% offset_accountline.manager_id | html %]</a>[% END %]</td>
<td>[% ao.created_on | $KohaDates with_hours => 1 | html %]</td>
<td>[% ao.created_on | $KohaDates with_hours => 1 %]</td>
<td>[% ao.amount | $Price %]</td>
<td>[% PROCESS offset_type_description account_offset=ao %]</td>
<td><a href="accountline-details.pl?accountlines_id=[% offset_accountline.id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-list"></i> Details</a></td>

View File

@ -56,7 +56,7 @@
<td>[% issue.author | html %]</td>
<td>[% issue.itemcallnumber | html %]</td>
<td>[% issue.itemtype_description | html %]</td>
<td>[% issue.date_due | $KohaDates as_due_date => 1 | html %]</td>
<td>[% issue.date_due | $KohaDates as_due_date => 1 %]</td>
<td>[% issue.barcode | html %]</td>
<td>[% issue.charge | html %]</td>
<td>[% issue.replacementprice | html %]</td>

View File

@ -73,7 +73,7 @@
</div>
[% END %]
</td>
<td><span title="[% QUEUED_MESSAGE.time_queued | html %]">[% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 | html %]</span></td>
<td><span title="[% QUEUED_MESSAGE.time_queued | html %]">[% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %]</span></td>
</tr>
[% END %]
</tbody>

View File

@ -70,7 +70,7 @@
[% issuetype | html %]
</td>
<td>
<span title="[% issue.issuestimestamp | html %]">[% issue.issuestimestamp | $KohaDates with_hours => 1 | html %]</span>
<span title="[% issue.issuestimestamp | html %]">[% issue.issuestimestamp | $KohaDates with_hours => 1 %]</span>
</td>
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issue.biblionumber | uri %]">[% issue.title | html %]</a></td>
@ -87,19 +87,19 @@
<td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% issue.itemnumber | uri %]&amp;biblionumber=[% issue.biblionumber | uri %]&amp;bi=[% issue.biblioitemnumber | uri %]#item[% issue.itemnumber | uri %]">[% issue.barcode | html %]</a></td>
<td>[% issue.renewals | html %]</td>
<td>
<span title="[% issue.issuedate | html %]">[% issue.issuedate |$KohaDates with_hours => 1 | html %]</span>
<span title="[% issue.issuedate | html %]">[% issue.issuedate |$KohaDates with_hours => 1 %]</span>
</td>
<td>[% Branches.GetName( issue.branchcode ) | html %]</td>
<td>
[% IF issue.date_due %]
<span title="[% issue.date_due | html %]">[% issue.date_due |$KohaDates with_hours => 1 | html %]</span>
<span title="[% issue.date_due | html %]">[% issue.date_due |$KohaDates with_hours => 1 %]</span>
[% ELSE %]
<span title="0000-00-00"></span>
[% END %]
</td>
<td>
[% IF issue.returndate %]
<span title="[% issue.returndate | html %]">[% issue.returndate |$KohaDates with_hours => 1 | html %]</span>
<span title="[% issue.returndate | html %]">[% issue.returndate |$KohaDates with_hours => 1 %]</span>
[% ELSE %]
<span title="Checked out"><small>Checked out</small></span>
[% END %]

View File

@ -223,8 +223,8 @@ canned reports and writing custom SQL reports.</p>
<td>[% savedreport.notes | html %]</td>
<td>[% savedreport.borrowersurname | html %][% IF ( savedreport.borrowerfirstname ) %], [% savedreport.borrowerfirstname | html %][% END %] ([% savedreport.borrowernumber | html %])</td>
<td><span title="[% savedreport.date_created | html %]">[% savedreport.date_created | $KohaDates %]</span></td>
<td><span title="[% savedreport.last_modified | html %]">[% savedreport.last_modified | $KohaDates with_hours => 1 | html %]</span></td>
<td><span title="[% savedreport.last_run | html %]">[% savedreport.last_run | $KohaDates with_hours => 1 | html %]</span></td>
<td><span title="[% savedreport.last_modified | html %]">[% savedreport.last_modified | $KohaDates with_hours => 1 %]</span></td>
<td><span title="[% savedreport.last_run | html %]">[% savedreport.last_run | $KohaDates with_hours => 1 %]</span></td>
<td class="report_public">
[% IF (savedreport.public) %]
Yes

View File

@ -383,7 +383,7 @@
[% END %]
<td>
[% IF ( itemloo.onloan ) %]
<span title="[% itemloo.date_due | html %]" class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 | html %]</span>
<span title="[% itemloo.date_due | html %]" class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span>
[% ELSE %]
<span title="0000-00-00">
[% IF ( itemloo.transfertwhen ) %]

View File

@ -76,7 +76,7 @@
<td>[% cr.item.itemcallnumber | html %]</td>
<td>[% cr.item.copynumber | html %]</td>
<td>[% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %]</td>
<td><span title="[% cr.issue.date_due | html %]">[% cr.issue.date_due | $KohaDates as_due_date => 1 | html %]</span></td>
<td><span title="[% cr.issue.date_due | html %]">[% cr.issue.date_due | $KohaDates as_due_date => 1 %]</span></td>
<td>[% IF ( cr.public_note ) %]
[% cr.public_note | html %]
[% ELSIF ( cr.item.itemnotes ) %]

View File

@ -1339,7 +1339,7 @@
[% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber | html %]</td>[% END %]
<td class="status">[% INCLUDE 'item-status-schema-org.inc' item = ITEM_RESULT %][% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td>
[% IF ( itemdata_itemnotes ) %]<td class="notes" property="description">[% ITEM_RESULT.itemnotes | html %]</td>[% END %]
<td class="date_due"><span title="[% ITEM_RESULT.datedue | html %]">[% ITEM_RESULT.datedue | $KohaDates as_due_date => 1 | html %]</span></td>
<td class="date_due"><span title="[% ITEM_RESULT.datedue | html %]">[% ITEM_RESULT.datedue | $KohaDates as_due_date => 1 %]</span></td>
<td class="barcode" property="serialNumber">[% ITEM_RESULT.barcode | html %]</td>
[% IF holds_count.defined || show_priority %]
<td class="holds_count">

View File

@ -171,7 +171,7 @@
[% UNLESS hidden.defined('dateexpiry') %]
<li>
<label>Expiration date:</label>
[% borrower.dateexpiry | $KohaDates | html %]
[% borrower.dateexpiry | $KohaDates %]
</li>
[% END %]

View File

@ -70,7 +70,7 @@
[% FOREACH s IN current_biblio_searches %]
<tr>
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 | html %]</span></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
<td><a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;[% s.query_cgi | $raw %]&amp;count=[% countrss | uri %]&amp;sort_by=acqdate_dsc&amp;format=rss2" class="rsssearchlink"><img src="[% interface | html %]/[% theme | html %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" class="rsssearchicon"/></a> <a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td>
<td>[% s.total | html %]</td>
</tr>
@ -110,7 +110,7 @@
[% FOREACH s IN previous_biblio_searches %]
<tr>
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 | html %]</span></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
<td><a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;[% s.query_cgi | $raw %]&amp;count=[% countrss | uri %]&amp;sort_by=acqdate_dsc&amp;format=rss2" class="rsssearchlink"><img src="[% interface | html %]/[% theme | html %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" class="rsssearchicon"/></a> <a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td>
<td>[% s.total | html %]</td>
</tr>
@ -155,7 +155,7 @@
[% FOREACH s IN current_authority_searches %]
<tr>
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 | html %]</span></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
<td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td>
<td>[% s.total | html %]</td>
</tr>
@ -192,7 +192,7 @@
[% FOREACH s IN previous_authority_searches %]
<tr>
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 | html %]</span></td>
<td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
<td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td>
<td>[% s.total | html %]</td>
</tr>

View File

@ -258,14 +258,14 @@
<td class="date_due overdue">
<span title="[% ISSUE.date_due | html %]">
<span class="tdlabel">Date due:</span>
[% ISSUE.date_due | $KohaDates as_due_date => 1 | html %]
[% ISSUE.date_due | $KohaDates as_due_date => 1 %]
</span>
</td>
[% ELSE %]
<td class="date_due">
<span title="[% ISSUE.date_due | html %]">
<span class="tdlabel">Date due:</span>
[% ISSUE.date_due | $KohaDates as_due_date => 1 | html %]
[% ISSUE.date_due | $KohaDates as_due_date => 1 %]
</span>
</td>
[% END %]
@ -553,7 +553,7 @@
<td>
<span title="[% OVERDUE.date_due | html %]">
<span class="tdlabel">Date due:</span>
[% OVERDUE.date_due | $KohaDates as_due_date => 1 | html %]
[% OVERDUE.date_due | $KohaDates as_due_date => 1 %]
</span>
</td>
[% IF ( OpacRenewalAllowed ) %]

View File

@ -248,9 +248,9 @@
</td>
<td>[% ISSUE.itemcallnumber | html %]</td>
[% IF ( ISSUE.overdue ) %]
<td class="overdue"><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 | html %]</span></td>
<td class="overdue"><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
[% ELSE %]
<td><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 | html %]</span></td>
<td><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
[% END %]
<td>
<form action="/cgi-bin/koha/sco/sco-main.pl" method="post">