View | Details | Raw Unified | Return to bug 7261
Collapse All | Expand All

(-)a/C4/Auth.pm (+2 lines)
Lines 369-374 sub get_template_and_user { Link Here
369
            AmazonSimilarItems          => C4::Context->preference("AmazonSimilarItems"),
369
            AmazonSimilarItems          => C4::Context->preference("AmazonSimilarItems"),
370
            AutoLocation                => C4::Context->preference("AutoLocation"),
370
            AutoLocation                => C4::Context->preference("AutoLocation"),
371
            "BiblioDefaultView".C4::Context->preference("IntranetBiblioDefaultView") => 1,
371
            "BiblioDefaultView".C4::Context->preference("IntranetBiblioDefaultView") => 1,
372
            CalendarFirstDayOfWeek      => (C4::Context->preference("CalendarFirstDayOfWeek") eq "Sunday")?0:1,
372
            CircAutocompl               => C4::Context->preference("CircAutocompl"),
373
            CircAutocompl               => C4::Context->preference("CircAutocompl"),
373
            FRBRizeEditions             => C4::Context->preference("FRBRizeEditions"),
374
            FRBRizeEditions             => C4::Context->preference("FRBRizeEditions"),
374
            IndependantBranches         => C4::Context->preference("IndependantBranches"),
375
            IndependantBranches         => C4::Context->preference("IndependantBranches"),
Lines 426-431 sub get_template_and_user { Link Here
426
            AnonSuggestions           => "" . C4::Context->preference("AnonSuggestions"),
427
            AnonSuggestions           => "" . C4::Context->preference("AnonSuggestions"),
427
            AuthorisedValueImages     => C4::Context->preference("AuthorisedValueImages"),
428
            AuthorisedValueImages     => C4::Context->preference("AuthorisedValueImages"),
428
            BranchesLoop              => GetBranchesLoop($opac_name),
429
            BranchesLoop              => GetBranchesLoop($opac_name),
430
            CalendarFirstDayOfWeek    => (C4::Context->preference("CalendarFirstDayOfWeek") eq "Monday")?1:0,
429
            LibraryName               => "" . C4::Context->preference("LibraryName"),
431
            LibraryName               => "" . C4::Context->preference("LibraryName"),
430
            LibraryNameTitle          => "" . $LibraryNameTitle,
432
            LibraryNameTitle          => "" . $LibraryNameTitle,
431
            LoginBranchname           => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"",
433
            LoginBranchname           => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"",
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 328-331 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
328
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL);
328
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL);
329
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');
329
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');
330
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');
330
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');
331
331
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CalendarFirstDayOfWeek','Sunday','Select the first day of week to use in the calendar.','Sunday|Monday','Choice');
(-)a/installer/data/mysql/updatedatabase.pl (+6 lines)
Lines 4571-4576 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
4571
    SetVersion($DBversion);
4571
    SetVersion($DBversion);
4572
}
4572
}
4573
4573
4574
$DBversion = "3.06.00.XXX";
4575
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4576
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CalendarFirstDayOfWeek','Sunday','Select the first day of week to use in the calendar.','Sunday|Monday','Choice');");
4577
    print "Upgrade to $DBversion done (Add syspref CalendarFirstDayOfWeek used to select the first day of week to use in the calendar. )\n";
4578
    SetVersion($DBversion);
4579
}
4574
4580
4575
=head1 FUNCTIONS
4581
=head1 FUNCTIONS
4576
4582
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (-1 / +1 lines)
Lines 7-13 Calendar._DN = new Array(_("Sunday"),_("Monday"),_("Tuesday"),_("Wednesday"),_(" Link Here
7
Calendar._SDN = new Array(_("Sun"),_("Mon"),_("Tue"),_("Wed"),_("Thu"),_("Fri"),_("Sat"),_("Sun"));
7
Calendar._SDN = new Array(_("Sun"),_("Mon"),_("Tue"),_("Wed"),_("Thu"),_("Fri"),_("Sat"),_("Sun"));
8
// First day of the week. "0" means display Sunday first, "1" means display
8
// First day of the week. "0" means display Sunday first, "1" means display
9
// Monday first, etc.
9
// Monday first, etc.
10
Calendar._FD = 1;
10
Calendar._FD = [% CalendarFirstDayOfWeek %];
11
// full month names
11
// full month names
12
Calendar._MN = new Array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December"));
12
Calendar._MN = new Array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December"));
13
// short month names
13
// short month names
(-)a/koha-tmpl/intranet-tmpl/prog/en/lib/calendar/calendar-setup.js (-1 / +4 lines)
Lines 69-75 Calendar.setup = function (params) { Link Here
69
	param_default("singleClick",    true);
69
	param_default("singleClick",    true);
70
	param_default("disableFunc",    'dateStatusHandler');
70
	param_default("disableFunc",    'dateStatusHandler');
71
	param_default("dateStatusFunc", params["disableFunc"]);	// takes precedence if both are defined
71
	param_default("dateStatusFunc", params["disableFunc"]);	// takes precedence if both are defined
72
	param_default("firstDay",       0); // defaults to "Sunday" first
72
	if (Calendar._FD)
73
		param_default("firstDay",       Calendar._FD);
74
	else
75
		param_default("firstDay",       0); // defaults to "Sunday" first
73
	param_default("align",          "Br");
76
	param_default("align",          "Br");
74
	param_default("range",          [1900, 2999]);
77
	param_default("range",          [1900, 2999]);
75
	param_default("weekNumbers",    true);
78
	param_default("weekNumbers",    true);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref (+8 lines)
Lines 40-45 Administration: Link Here
40
                  yes: Allow
40
                  yes: Allow
41
                  no: "Don't allow"
41
                  no: "Don't allow"
42
            - staff and patrons to create and view saved lists of books.
42
            - staff and patrons to create and view saved lists of books.
43
        -
44
            - Use 
45
            - pref: CalendarFirstDayOfWeek
46
              default: Sunday
47
              choices:
48
                  Sunday: Sunday
49
                  Monday: Monday
50
            - as the first day of week in the calendar.
43
    Login options:
51
    Login options:
44
        -
52
        -
45
            - pref: insecure
53
            - pref: insecure
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt (-3 / +4 lines)
Lines 338-344 Link Here
338
                ifFormat : "[% DHTMLcalendar_dateformat %]",
338
                ifFormat : "[% DHTMLcalendar_dateformat %]",
339
                button : "CalendarReserveDate[% bibitemloo.biblionumber %]",
339
                button : "CalendarReserveDate[% bibitemloo.biblionumber %]",
340
                disableFunc : validate[% bibitemloo.biblionumber %],
340
                disableFunc : validate[% bibitemloo.biblionumber %],
341
                dateStatusFunc : validate[% bibitemloo.biblionumber %]
341
                dateStatusFunc : validate[% bibitemloo.biblionumber %],
342
                firstDay : [% CalendarFirstDayOfWeek %]
342
              }
343
              }
343
              );
344
              );
344
              //]]>
345
              //]]>
Lines 370-376 Link Here
370
          ifFormat : "[% DHTMLcalendar_dateformat %]",
371
          ifFormat : "[% DHTMLcalendar_dateformat %]",
371
          button : "CalendarExpirationDate_[% bibitemloo.biblionumber %]",
372
          button : "CalendarExpirationDate_[% bibitemloo.biblionumber %]",
372
          disableFunc : validate1,
373
          disableFunc : validate1,
373
          dateStatusFunc : validate1
374
          dateStatusFunc : validate1,
375
          firstDay : [% CalendarFirstDayOfWeek %]
374
        }
376
        }
375
      );
377
      );
376
      //]]>
378
      //]]>
377
- 

Return to bug 7261