Bugzilla – Attachment 111124 Details for
Bug 26595
Add SMTP server column to libraries table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26595: Add SMTP server column to libraries table
Bug-26595-Add-SMTP-server-column-to-libraries-tabl.patch (text/plain), 3.37 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-10-02 11:19:13 UTC
(
hide
)
Description:
Bug 26595: Add SMTP server column to libraries table
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-10-02 11:19:13 UTC
Size:
3.37 KB
patch
obsolete
>From 24c02c907da9cc19a77e70f2aeb3a0ef666c8910 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 1 Oct 2020 12:10:39 -0300 >Subject: [PATCH] Bug 26595: Add SMTP server column to libraries table > >This patch makes the libraries datatable render the assigned SMTP server >on each row. 'Default' will be rendered when the system default is >detected. A link to the SMTP server config will be rendered when a real >SMTP server is assigned. > >To test: >1. Apply this patches, reload al the things >2. Visit the libraries table >=> SUCCESS: There's an SMTP server column displaying the right thing >3. Assign an SMTP server to a library >=> SUCCESS: The table displays the server name as a link >=> SUCCESS: The link correctly points to the SMTP server config page >4. Sign off >--- > .../prog/en/modules/admin/branches.tt | 20 +++++++++++++++++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt >index 2d5d59ca91..64c53b89bf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt >@@ -209,6 +209,7 @@ > <th>MARC organization code</th> > <th>IP</th> > <th>Pickup location</th> >+ <th>SMTP server</th> > <th data-class-name="actions">Actions</th> > </tr> > </thead> >@@ -243,9 +244,10 @@ > "ajax": { > "url": libraries_url > }, >+ 'embed': [ 'smtp_server_info' ], > 'emptyTable': '<div class="dialog message">'+_("There are no libraries defined.")+' <a href="/cgi-bin/koha/admin/branches.pl?op=add_form">'+_("Start defining libraries")+'</a>.</div>', > "columnDefs": [ { >- "targets": [0,1,3,4,7,8,9,10,11,12,13,14,15], >+ "targets": [0,1,3,4,6,8,9,10,11,12,13,14,15], > "render": function (data, type, row, meta) { > if ( type == 'display' ) { > if ( data != null ) { >@@ -316,6 +318,20 @@ > return (data) ? _("Yes") : _("No"); > } > }, >+ { >+ "data": "smtp_server_info", >+ "render": function( data, type, row, meta ) { >+ if ( data.name == 'system_default' ) { >+ return _("Default"); >+ } >+ else { >+ return '<a href="/cgi-bin/koha/admin/smtp_servers.pl?op=edit_form&smtp_server_id='+encodeURIComponent(data.smtp_server_id)+'">'+data.name.escapeHtml()+'</a>'; >+ } >+ }, >+ "searchable": false, >+ "visible": true, >+ "orderable": false >+ }, > { > "data": function( row, type, val, meta ) { > >@@ -384,7 +400,7 @@ > "searchable": true, > "visible": false, > "orderable": false >- }, >+ } > ] > }, columns_settings); > >-- >2.28.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 26595
:
111122
|
111123
|
111124
|
111125
|
111155
|
111156
|
111157
|
111158
|
111550
|
111551
|
111552
|
111553
|
111606
|
111621
|
111622