Bugzilla – Attachment 111552 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.70 KB, created by
Katrin Fischer
on 2020-10-13 12:52:11 UTC
(
hide
)
Description:
Bug 26595: Add SMTP server column to libraries table
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-10-13 12:52:11 UTC
Size:
3.70 KB
patch
obsolete
>From 1fcb426e0a87f2eaa9d38518f01b5c6c6f7a58a7 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 > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../intranet-tmpl/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 ) { >@@ -317,6 +319,20 @@ > } > }, > { >+ "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 ) { > > var result = '<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/branches.pl?op=add_form&branchcode='+encodeURIComponent(row.library_id)+'" role="button"><i class="fa fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>'; >@@ -384,7 +400,7 @@ > "searchable": true, > "visible": false, > "orderable": false >- }, >+ } > ] > }, columns_settings); > >-- >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 26595
:
111122
|
111123
|
111124
|
111125
|
111155
|
111156
|
111157
|
111158
|
111550
|
111551
| 111552 |
111553
|
111606
|
111621
|
111622