Bugzilla – Attachment 123672 Details for
Bug 28149
Improve internationalization and formatting on background jobs page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28149: Improve internationalization and formatting on background jobs page
Bug-28149-Improve-internationalization-and-formatt.patch (text/plain), 7.89 KB, created by
Owen Leonard
on 2021-08-10 11:11:39 UTC
(
hide
)
Description:
Bug 28149: Improve internationalization and formatting on background jobs page
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-08-10 11:11:39 UTC
Size:
7.89 KB
patch
obsolete
>From 17e7416410e405a18145328813ca75fbac134ca2 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 14 Apr 2021 17:43:38 +0000 >Subject: [PATCH] Bug 28149: Improve internationalization and formatting on > background jobs page > >This patch adds some logic to the background jobs template in order to >make job status and job type translatable. Output of dates has been >changed to use the KohaDates plugin, using the "with_hours" flag. > >This patch also modifies the page title and breadcrumbs so that if one >is viewing the details of a background job the page title and >breadcrumbs reflect this. > >I've also added inclusion of the preferences search form in the header, >the default for administration pages which don't have their own search. > >To test, apply the patch and go to Administration -> Background jobs. > > - If there are no background jobs listed, submit at least one batch of > bibliograhpic records and at least one batch of authorty records for > modification (Tools -> Batch record modification). > - In the table of background jobs, the status should be shown > correctly. If you see it capitalized ("Finished") you're seeing the > new string in the template which will be used for translation. > - In the "Type" column, you should see either "Batch authority record > modification" or "Batch bibliographic record modification" > - In the "Queued," "Started," and "Ended" columns the date should be > formatted according to your system's dateformat system preference, > including the time. > - View the details of a background job. The same changes to status and > type should be seen on this page, as well as the date formatting of > the date fields. > - In the breadcrumbs, confirm that it shows a link to the > background jobs page followed by "Details if job #X". >--- > .../prog/en/modules/admin/background_jobs.tt | 95 +++++++++++++++---- > 1 file changed, 74 insertions(+), 21 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt >index 64f2278c20..40a0abe6c7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt >@@ -1,21 +1,46 @@ > [% USE raw %] > [% USE Asset %] >+[% USE KohaDates %] > [% SET footerjs = 1 %] >+[% BLOCK show_job_status %] >+ [% SWITCH job.status %] >+ [% CASE "cancelled" %] >+ Cancelled >+ [% CASE "finished" %] >+ Finished >+ [% CASE "started" %] >+ Started >+ [% CASE "running" %] >+ Running >+ [% CASE # Default case %] >+ [% job.status | html %] >+ [% END -%] >+[% END %] >+[% BLOCK show_job_type %] >+ [% SWITCH job.type %] >+ [% CASE "batch_biblio_record_modification" %] >+ Batch bibliographic record modification >+ [% CASE "batch_authority_record_modification" %] >+ Batch authority record modification >+ [% CASE # Default case %] >+ [% job.type | html %] >+ [% END %] >+[% END %] > [% INCLUDE 'doc-head-open.inc' %] > <title> >-[% IF op =='add_form' %] >- [% IF job %] >- View background job >- [% ELSE %] >- Background jobs >- [% END %] › Background jobs › [% END %] >-Administration › Koha >+ [% IF op == 'view' %] >+ Details of job #[% job.id | html %] › >+ [% END %] >+ Background jobs › >+ Administration › Koha > </title> >+ > [% INCLUDE 'doc-head-close.inc' %] > </head> > > <body id="admin_background_jobs" class="admin"> > [% INCLUDE 'header.inc' %] >+[% INCLUDE 'prefs-admin-search.inc' %] > > <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb"> > <ol> >@@ -27,9 +52,18 @@ Administration › Koha > <li> > <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> > </li> >- <li> >- <a href="#" aria-current="page">Background jobs</a> >- </li> >+ [% IF op == 'view' %] >+ <li> >+ <a href="/cgi-bin/koha/admin/background_jobs.pl">Background jobs</a> >+ </li> >+ <li> >+ <a href="#" aria-current="page">Details of job #[% job.id | html %]</a> >+ </li> >+ [% ELSE %] >+ <li> >+ <a href="#" aria-current="page">Background jobs</a> >+ </li> >+ [% END %] > [% ELSE %] > <li> > <a href="#" aria-current="page">Administration</a> >@@ -55,17 +89,32 @@ Administration › Koha > [% END %] > > [% IF op == 'view' %] >- <h1>Detail of job #[% job.id | html %]</h1> >+ <h1>Details of job #[% job.id | html %]</h1> > > <fieldset class="rows"> > <ol> > <li><span class="label">Job ID: </span>[% job.id | html %]</li> >- <li><label for="job_status">Status: </label>[% job.status | html %]</li> >+ <li> >+ <label for="job_status">Status: </label> >+ [% PROCESS show_job_status %] >+ </li> > <li><label for="job_progress">Progress: </label>[% job.progress || 0 | html %] / [% job.size | html %]</li> >- <li><label for="job_type">Type: </label>[% job.type | html %]</li> >- <li><label for="job_enqueued_on">Queued: </label>[% job.enqueued_on | html %]</li> >- <li><label for="job_started_on">Started: </label>[% job.started_on | html %]</li> >- <li><label for="job_ended_on">Ended: </label>[% job.ended_on | html %]</li> >+ <li> >+ <label for="job_type">Type: </label> >+ [% PROCESS show_job_type %] >+ </li> >+ <li> >+ <label for="job_enqueued_on">Queued: </label> >+ [% job.enqueued_on | $KohaDates with_hours = 1 %] >+ </li> >+ <li> >+ <label for="job_started_on">Started: </label> >+ [% job.started_on | $KohaDates with_hours = 1 %] >+ </li> >+ <li> >+ <label for="job_ended_on">Ended: </label> >+ [% job.ended_on | $KohaDates with_hours = 1 %] >+ </li> > <li><label for="job_data">Report: </label> > [% SWITCH job.type %] > [% CASE 'batch_biblio_record_modification' %] >@@ -156,7 +205,9 @@ Administration › Koha > </fieldset> > > [% IF CAN_user_parameters_manage_background_jobs %] >- <a href="/cgi-bin/koha/admin/background_jobs.pl">Return to the job list</a> >+ <fieldset class="action"> >+ <a href="/cgi-bin/koha/admin/background_jobs.pl">Return to the job list</a> >+ </fieldset> > [% END %] > [% END %] > >@@ -182,7 +233,9 @@ Administration › Koha > [% FOREACH job IN jobs %] > <tr> > <td>[% job.id | html %]</td> >- <td>[% job.status | html %]</td> >+ <td> >+ [% PROCESS show_job_status %] >+ </td> > <td>[% job.progress || 0 | html %] / [% job.size | html %]</td> > <td> > [% SWITCH job.type %] >@@ -191,9 +244,9 @@ Administration › Koha > [% CASE %][% job.type | html %] > [% END %] > </td> >- <td>[% job.enqueued_on | html %]</td> >- <td>[% job.started_on| html %]</td> >- <td>[% job.ended_on| html %]</td> >+ <td>[% job.enqueued_on | $KohaDates with_hours = 1 %]</td> >+ <td>[% job.started_on| $KohaDates with_hours = 1 %]</td> >+ <td>[% job.ended_on| $KohaDates with_hours = 1 %]</td> > <td class="actions"> > <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/background_jobs.pl?op=view&id=[% job.id | html %]"><i class="fa fa-eye"></i> View</a> > [% IF job.status == 'new' || job.status == 'started' %] >-- >2.20.1
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 28149
:
119597
|
123672
|
123870
|
123983
|
123984
|
124517
|
124518