Bugzilla – Attachment 113905 Details for
Bug 17015
New Koha Calendar
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17015: Add filters and use bootstrap grid in tools/discrete_calendar.tt
Bug-17015-Add-filters-and-use-bootstrap-grid-in-to.patch (text/plain), 11.00 KB, created by
Maryse Simard
on 2020-11-21 04:28:53 UTC
(
hide
)
Description:
Bug 17015: Add filters and use bootstrap grid in tools/discrete_calendar.tt
Filename:
MIME Type:
Creator:
Maryse Simard
Created:
2020-11-21 04:28:53 UTC
Size:
11.00 KB
patch
obsolete
>From 0faf670dcc1812290d3450a163de4c266e6c39ff Mon Sep 17 00:00:00 2001 >From: Maryse Simard <maryse.simard@inlibro.com> >Date: Fri, 20 Nov 2020 23:22:01 -0500 >Subject: [PATCH] Bug 17015: Add filters and use bootstrap grid in > tools/discrete_calendar.tt > >--- > .../prog/css/discretecalendar.css | 8 +- > .../en/modules/tools/discrete_calendar.tt | 109 +++++++++--------- > 2 files changed, 60 insertions(+), 57 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/discretecalendar.css b/koha-tmpl/intranet-tmpl/prog/css/discretecalendar.css >index 3b7625e1dd..71f8277d8b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/discretecalendar.css >+++ b/koha-tmpl/intranet-tmpl/prog/css/discretecalendar.css >@@ -159,19 +159,19 @@ td.repeatableyearly a.ui-state-default { > > fieldset.brief { > border:0; >- margin-top:0; >+ margin:0; > } > > h1 select { > width:20em; > } > >-div.yui-b fieldset.brief ol { >+fieldset.brief ol { > font-size:100%; > } > >-div.yui-b fieldset.brief li, >-div.yui-b fieldset.brief li.radio { >+fieldset.brief li, >+fieldset.brief li.radio { > padding:.2em 0; > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/discrete_calendar.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/discrete_calendar.tt >index 8ddc32ca49..1601eb8c4d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/discrete_calendar.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/discrete_calendar.tt >@@ -1,27 +1,29 @@ >+[% USE raw %] > [% USE Asset %] > [% USE Branches %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › Tools › [% Branches.GetName( branch ) %] calendar</title> >+<title>Koha › Tools › [% Branches.GetName( branch ) | html %] calendar</title> > [% INCLUDE 'doc-head-close.inc' %] >-[% Asset.css("css/datatables.css") %] >-[% Asset.css("css/discretecalendar.css") %] >+[% Asset.css("css/datatables.css") | $raw %] >+[% Asset.css("css/discretecalendar.css") | $raw %] > </head> > > <body id="tools_holidays" class="tools"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cat-search.inc' %] > >-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% Branches.GetName( branch ) %] calendar</div> >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% Branches.GetName( branch ) | html %] calendar</div> > >-<div id="doc3" class="yui-t1"> >+<div id="main" class="main container-fluid"> >+ <div class="row"> >+ <div class="col-sm-10 col-sm-push-2"> >+ <main> > >- <div id="bd"> >- <div id="yui-main"> >- <div class="yui-b"> >- <h2>[% Branches.GetName( branch ) %] calendar</h2> >- <div class="yui-g"> >- <div class="yui-u first" style="width:60%"> >+ <h2>[% Branches.GetName( branch ) | html %] calendar</h2> >+ >+ <div class="row"> >+ <div class="col-sm-8"> > <label for="branch">Define the holidays for:</label> > <form method="post" onsubmit="return validateForm('CopyCalendar')"> > <select id="branch" name="branch"> >@@ -32,7 +34,7 @@ > <option value=""></option> > [% FOREACH l IN Branches.all() %] > [% UNLESS branch == l.branchcode %] >- <option value="[% l.branchcode %]">[% l.branchname %]</option> >+ <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> > [% END %] > [% END %] > </select> >@@ -77,7 +79,7 @@ > <input type="hidden" id="Year" name="Year" /> > </li> > <li class="dateinsert"> >- <b>To date: </b> >+ <strong>To date: </strong> > <input type="text" id="from_copyToDatePicker" name="toDate" size="20" class="datepicker" /> > </li> > <li> >@@ -154,7 +156,7 @@ > <!-- ************************************************************************************** --> > > </div> >-<div class="yui-u" style="width : 40%"> >+<div class="col-sm-4"> > <div class="help"> > <h4>Hints</h4> > <ul> >@@ -171,7 +173,7 @@ > </ul> > <h4>Key</h4> > <p> >- <span class="key normalday">Working day </span> >+ <span class="key normalday">Working day</span> > <span class="key holiday">Unique holiday</span> > <span class="key repeatableweekly">Holiday repeating weekly</span> > <span class="key repeatableyearly">Holiday repeating yearly</span> >@@ -193,8 +195,8 @@ > <tbody> > [% FOREACH need_validation_holiday IN NEED_VALIDATION_HOLIDAYS %] > <tr> >- <td><a href="#doc3" onclick="go_to_date('[% need_validation_holiday.date %]')"><span title="[% need_validation_holiday.DATE_SORT %]">[% need_validation_holiday.outputdate %]</span></a></td> >- <td>[% need_validation_holiday.note %]</td> >+ <td><a href="#main" onclick="go_to_date('[% need_validation_holiday.date | html %]')"><span title="[% need_validation_holiday.DATE_SORT | html %]">[% need_validation_holiday.outputdate | html %]</span></a></td> >+ <td>[% need_validation_holiday.note | html %]</td> > </tr> > [% END %] > </tbody> >@@ -213,14 +215,13 @@ > <tbody> > [% FOREACH WEEK_DAYS_LOO IN WEEKLY_HOLIDAYS %] > <tr> >- <td>[% WEEK_DAYS_LOO.weekday %]</td> >- </td> >- <td>[% WEEK_DAYS_LOO.note %]</td> >- </tr> >- [% END %] >- </tbody> >-</table> >-[% END %] >+ <td>[% WEEK_DAYS_LOO.weekday | html %]</td> >+ <td>[% WEEK_DAYS_LOO.note | html %]</td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ [% END %] > > [% IF ( REPEATABLE_HOLIDAYS ) %] > <h3>Yearly - Repeatable holidays</h3> >@@ -239,11 +240,11 @@ > [% FOREACH DAY_MONTH_HOLIDAYS_LOO IN REPEATABLE_HOLIDAYS %] > <tr> > [% IF ( dateformat == "metric" ) %] >- <td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT %]">[% DAY_MONTH_HOLIDAYS_LOO.day %]/[% DAY_MONTH_HOLIDAYS_LOO.month %]</span></td> >+ <td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT | html %]">[% DAY_MONTH_HOLIDAYS_LOO.day | html %]/[% DAY_MONTH_HOLIDAYS_LOO.month | html %]</span></td> > [% ELSE %] >- <td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT %]">[% DAY_MONTH_HOLIDAYS_LOO.month %]/[% DAY_MONTH_HOLIDAYS_LOO.day %]</span></td> >+ <td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT | html %]">[% DAY_MONTH_HOLIDAYS_LOO.month | html %]/[% DAY_MONTH_HOLIDAYS_LOO.day | html %]</span></td> > [% END %] >- <td>[% DAY_MONTH_HOLIDAYS_LOO.note %]</td> >+ <td>[% DAY_MONTH_HOLIDAYS_LOO.note | html %]</td> > </tr> > [% END %] > </tbody> >@@ -262,8 +263,8 @@ > <tbody> > [% FOREACH HOLIDAYS_LOO IN UNIQUE_HOLIDAYS %] > <tr> >- <td><a href="#doc3" onclick="go_to_date('[% HOLIDAYS_LOO.date %]')"><span title="[% HOLIDAYS_LOO.DATE_SORT %]">[% HOLIDAYS_LOO.outputdate %]</span></a></td> >- <td>[% HOLIDAYS_LOO.note %]</td> >+ <td><a href="#main" onclick="go_to_date('[% HOLIDAYS_LOO.date | html %]')"><span title="[% HOLIDAYS_LOO.DATE_SORT | html %]">[% HOLIDAYS_LOO.outputdate | html %]</span></a></td> >+ <td>[% HOLIDAYS_LOO.note | html %]</td> > </tr> > [% END %] > </tbody> >@@ -282,8 +283,8 @@ > <tbody> > [% FOREACH float_holiday IN FLOAT_HOLIDAYS %] > <tr> >- <td><a href="#doc3" onclick="go_to_date('[% float_holiday.date %]')"><span title="[% float_holiday.DATE_SORT %]">[% float_holiday.outputdate %]</span></a></td> >- <td>[% float_holiday.note %]</td> >+ <td><a href="#main" onclick="go_to_date('[% float_holiday.date | html %]')"><span title="[% float_holiday.DATE_SORT | html %]">[% float_holiday.outputdate | html %]</span></a></td> >+ <td>[% float_holiday.note | html %]</td> > </tr> > [% END %] > </tbody> >@@ -292,29 +293,32 @@ > </div> > </div> > </div> >-</div> >-</div> > >-<div class="yui-b noprint"> >-[% INCLUDE 'tools-menu.inc' %] >-</div> >-</div> >+ </main> >+ </div> <!-- /.col-sm-10.col-sm-push-2 --> >+ >+ <div class="col-sm-2 col-sm-pull-10"> >+ <aside> >+ [% INCLUDE 'tools-menu.inc' %] >+ </aside> >+ </div> <!-- .col-sm-2.col-sm-pull-10 --> >+ </div> <!-- /.row --> >+ > [% MACRO jsinclude BLOCK %] >-[% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") %] >+[% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >-<script type="text/javascript"> >- //<![CDATA[ >+<script> > var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays")); > // Array containing all the information about each date in the calendar. > var datesInfos = new Array(); > [% FOREACH date IN datesInfos %] >- datesInfos["[% date.date %]"] = { >- title : "[% date.note %]", >- outputdate : "[% date.outputdate %]", >- holiday_type:"[% date.holiday_type %]", >- open_hour: "[% date.open_hour %]", >- close_hour: "[% date.close_hour %]" >+ datesInfos["[% date.date | html %]"] = { >+ title : "[% date.note | html %]", >+ outputdate : "[% date.outputdate | html %]", >+ holiday_type:"[% date.holiday_type | html %]", >+ open_hour: "[% date.open_hour | html %]", >+ close_hour: "[% date.close_hour | html %]" > }; > [% END %] > >@@ -397,7 +401,7 @@ > > function changeBranch () { > var branch = $("#branch option:selected").val(); >- location.href='/cgi-bin/koha/tools/discrete_calendar.pl?branch=' + branch + '&calendardate=' + "[% calendardate %]"; >+ location.href='/cgi-bin/koha/tools/discrete_calendar.pl?branch=' + branch + '&calendardate=' + "[% calendardate | html %]"; > } > > function Help() { >@@ -597,10 +601,10 @@ > beforeShowDay: function(thedate) { > return dateStatusHandler(thedate); > }, >- defaultDate: new Date("[% keydate %]"), >- minDate: new Date("[% minDate %]"), >- maxDate: new Date("[% maxDate %]"), >- dateFormat: "[% datepickerformat %]" >+ defaultDate: new Date("[% keydate | html %]"), >+ minDate: new Date("[% minDate | html %]"), >+ maxDate: new Date("[% maxDate | html %]"), >+ dateFormat: "[% datepickerformat | html %]" > }); > //Main datepicker > $("#jcalendar-container").datepicker({ >@@ -677,7 +681,6 @@ > } > }); > }); >- //]]> > </script> > [% END %] > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.17.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 17015
:
53859
|
54318
|
54419
|
59166
|
59167
|
59168
|
59169
|
59170
|
59171
|
59267
|
59268
|
59269
|
59270
|
59271
|
59463
|
59516
|
59517
|
59518
|
59519
|
59520
|
59561
|
59562
|
59586
|
59587
|
59888
|
59889
|
60902
|
60903
|
60904
|
60905
|
60906
|
60986
|
61737
|
62375
|
62376
|
62380
|
63257
|
63282
|
63362
|
63363
|
63364
|
63365
|
63366
|
63367
|
64235
|
65073
|
65074
|
65075
|
65076
|
65077
|
67721
|
67722
|
67723
|
67724
|
67725
|
67879
|
67929
|
67930
|
67931
|
67932
|
67933
|
67934
|
68392
|
68393
|
68394
|
68395
|
68396
|
68397
|
71634
|
71635
|
71636
|
71637
|
71638
|
72890
|
73145
|
74859
|
74860
|
74861
|
74862
|
74863
|
74864
|
74865
|
74866
|
75444
|
75479
|
76594
|
77249
|
77250
|
77607
|
77608
|
77609
|
77610
|
77611
|
77612
|
77613
|
77770
|
77771
|
77772
|
77773
|
77774
|
79035
|
80523
|
80524
|
80525
|
80526
|
80527
|
80528
|
80529
|
80530
|
80531
|
80532
|
80533
|
80534
|
80535
|
83547
|
85394
|
85677
|
85678
|
85679
|
85680
|
85681
|
85682
|
85683
|
85684
|
85685
|
85686
|
85687
|
85688
|
85689
|
85690
|
85691
|
92595
|
92596
|
92597
|
92598
|
100079
|
110383
|
110384
|
110386
|
110387
|
110388
|
110389
|
113541
|
113905
|
115501
|
115502
|
115503
|
115504
|
115505
|
115506
|
115507
|
115508
|
115509
|
115510
|
115511
|
118554
|
118555
|
118556
|
118557
|
118558
|
118559
|
119095
|
119097
|
119099
|
119100
|
119101
|
119102
|
131619
|
131620
|
131621
|
131622
|
131623
|
131624
|
131625
|
131626
|
131634
|
131635
|
131636
|
131637
|
131638
|
131639
|
131640
|
131641
|
131667
|
132199
|
133596
|
133597
|
133598
|
133599
|
133600
|
133601
|
133602
|
133603
|
133604
|
133605
|
133678
|
137219
|
137220
|
137221
|
137222
|
137223
|
137224
|
137225
|
137226
|
137227
|
137228
|
137229
|
139378
|
139379
|
139380
|
139381
|
139382
|
139599
|
139600
|
139601
|
139602
|
139603
|
139851
|
140150
|
141176
|
144257
|
144258
|
144259
|
144260
|
144261
|
144262
|
144264
|
144268
|
144269
|
144270
|
144271
|
144272
|
144273
|
151438
|
151439
|
151440
|
151441
|
151442
|
151443
|
151444
|
151445
|
151446
|
151447
|
151448
|
151449
|
151450
|
156340
|
156341
|
156342
|
156343
|
156344
|
156345
|
156346
|
156347
|
156348
|
156349
|
156350
|
156351
|
156352
|
156353
|
156354
|
156355
|
157656
|
157657
|
157658
|
157659
|
157660
|
157661
|
157662
|
157663
|
157664
|
157665
|
157666
|
157667
|
157668
|
157669
|
157670
|
157671
|
157672
|
167805
|
167806
|
167807
|
167808
|
167809