Bugzilla – Attachment 12887 Details for
Bug 8935
transport cost matrix could be prettier
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8935 - transport cost matrix could be prettier
Bug-8935---transport-cost-matrix-could-be-prettier.patch (text/plain), 4.46 KB, created by
Owen Leonard
on 2012-10-17 16:58:00 UTC
(
hide
)
Description:
Bug 8935 - transport cost matrix could be prettier
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2012-10-17 16:58:00 UTC
Size:
4.46 KB
patch
obsolete
>From 52f14b70d45651ff5a4a6777c16be09e463ee7d8 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 17 Oct 2012 12:35:28 -0400 >Subject: [PATCH] Bug 8935 - transport cost matrix could be prettier >Content-Type: text/plain; charset="utf-8" > >Correcting the template so that it follows established >interface patterns and coding guidelines: > >- Form contents in a fieldset >- Submit button in a fieldset with class "action" and > with a "Cancel" link. >- Errors displayed in a <div class="dialog alert"> > (no custom error classes necessary). >- Valid markup. >- No JavaScript errors (to that end, the patch removes a > call to a non-existent function, show_transport_cost_matrix) > >http://bugs.koha-community.org/show_bug.cgi?id=8936 >--- > .../prog/en/modules/admin/transport-cost-matrix.tt | 44 ++++++++++---------- > 1 file changed, 21 insertions(+), 23 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt >index 8d12419..42d6323 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt >@@ -38,18 +38,11 @@ function form_submit (f) { > $(f).find('input:disabled').removeAttr("disabled"); > return true; > } >- >-$(document).ready(function() { >- show_transport_cost_matrix([% IF UseTransportCostMatrix %]true[% ELSE %]false[% END %]); >-}); > //]]> > </script> > <style type="text/css"> > .disabled-transfer { >- background-color: red; >-} >-.errors { >- color: red; >+ background-color: #FF8888; > } > </style> > >@@ -69,30 +62,34 @@ $(document).ready(function() { > Defining transport costs between libraries > </h1> > [% IF ( WARNING_transport_cost_matrix_off ) %] >-<div class="dialog message">Because the "UseTransportCostMatrix" system preference is currently not enabled, Transport Cost Matrix is not being used. Go <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=UseTransportCostMatrix">here</a> if you wish to enable this feature.</div> >+<div class="dialog message">Because the "UseTransportCostMatrix" system preference is currently not enabled, the transport cost matrix is not being used. Go <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=UseTransportCostMatrix">here</a> if you wish to enable this feature.</div> > [% END %] > >- <div class="container"> >- <form method="post" action="?" onSubmit="return form_submit(this);"> >+ [% IF ( errors ) %]<div class="dialog alert"> >+ <h4>There were problems with your submission</h4> >+ <ul> >+ [% FOR e IN errors %] >+ <li>[% e %]</li> >+ [% END %] >+ </ul> >+ </div>[% END %] >+ >+ <form method="post" action="?" onsubmit="return form_submit(this);"> > <input type="hidden" name="op" value="set-cost-matrix" /> >- <div id="transport-cost-matrix"> >+ <fieldset id="transport-cost-matrix"> > <div class="help"> > <p>Costs are decimal values 0 to some arbitrarymax value (1 or 100), 0 being minimum (no) cost.</p> > <p>Red cells signify no transfer allowed</p> > <p>Click on the cell to edit</p> > </div> >- <ul class="errors" %]> >- [% FOR e IN errors %] >- <li>[% e %]</li> >- [% END %] >- </ul> >+ > <table> > <tr> > <th>From \ To</th> >- [% FOR b IN branchloop %] >+ [% FOR b IN branchloop %] > <th>[% b.name %]</th> >- [% END %] >- <tr> >+ [% END %] >+ </tr> > [% FOR bf IN branchfromloop %] > <tr> > <th>[% bf.name %]</th> >@@ -118,12 +115,13 @@ $(document).ready(function() { > </tr> > [% END %] > </table> >- </div> >- <input type="submit" value="Save" class="submit" /> >+ </fieldset> >+ <fieldset class="action"> >+ <input type="submit" value="Save" class="submit" /> <a href="/cgi-bin/koha/admin/transport-cost-matrix.pl" class="cancel">Cancel</a> >+ </fieldset> > </form> > </div> > </div> >- </div> > <div class="yui-b"> > [% INCLUDE 'admin-menu.inc' %] > </div> >-- >1.7.9.5
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 8935
:
12887
|
12888