Template:Open hours: Difference between revisions

From MoHA Wiki
No edit summary
No edit summary
Line 37: Line 37:
     <div>{{#ifeq: {{{Record type|}}}|Day off|'''Day off'''|{{#var:whours}}}}</div>
     <div>{{#ifeq: {{{Record type|}}}|Day off|'''Day off'''|{{#var:whours}}}}</div>
   </li></includeonly>
   </li></includeonly>
<noinclude>
<templatedata>
{
"params": {
"Slot type": {
"description": "Defines the type of time slot",
"type": "string",
"suggestedvalues": [
"Single day",
"Range of days",
"Exact date"
],
"default": "Exact date",
"required": true,
"suggested": true
},
"Single day": {
"description": "Name of a day of the week",
"example": "Monday",
"type": "string"
},
"Range day from": {
"description": "Name of the first day of the week in a range",
"example": "Monday",
"type": "string"
},
"Range day to": {
"description": "Name of the last day of the week in a range"
},
"Exact date": {
"description": "Date with a special schedule or meaning",
"type": "date"
},
"Hour open from": {},
"Minutes open from": {},
"Hour open to": {},
"Minutes open to": {},
"Hour break from": {},
"Minutes break from": {},
"Hour break to": {},
"Minutes break to": {},
"Schedule type": {
"description": "Defines whether the schedule has a break",
"suggestedvalues": [
"Without a break",
"With a break"
],
"default": "Without a break"
},
"Record type": {
"description": "Defines a special meaning of the record",
"type": "string",
"suggestedvalues": [
"Opening",
"Closing",
"Day off",
"Working day"
],
"default": "Working day"
}
},
"paramOrder": [
"Slot type",
"Single day",
"Range day from",
"Range day to",
"Exact date",
"Schedule type",
"Record type",
"Hour open from",
"Minutes open from",
"Hour open to",
"Minutes open to",
"Hour break from",
"Minutes break from",
"Hour break to",
"Minutes break to"
],
"description": "The template tries to explain the event schedule. \n\nYou can set hours:\n* for the exact date (e.g., 05.10.2024, etc)\n* for the day of the week (e.g., Monday, etc)\n* for the range of days of the week (e.g., Monday-Friday, etc)\n\nYou can set any record as an Opening, Closing, or Day off. All other records are treated as Regular.\n\nIf there is a break in open hours, you can specify it, too.\n"
}
</templatedata>
</noinclude>

Revision as of 20:10, May 18, 2024


The template tries to explain the event schedule. You can set hours:

  • for the exact date (e.g., 05.10.2024, etc)
  • for the day of the week (e.g., Monday, etc)
  • for the range of days of the week (e.g., Monday-Friday, etc)
You can set any record as an Opening, Closing, or Day off. All other records are treated as Regular. If there is a break in open hours, you can specify it, too.

Template parameters

ParameterDescriptionTypeStatus
Slot typeSlot type

Defines the type of time slot

Suggested values
Single day Range of days Exact date
Default
Exact date
Stringrequired
Single daySingle day

Name of a day of the week

Example
Monday
Stringoptional
Range day fromRange day from

Name of the first day of the week in a range

Example
Monday
Stringoptional
Range day toRange day to

Name of the last day of the week in a range

Unknownoptional
Exact dateExact date

Date with a special schedule or meaning

Dateoptional
Schedule typeSchedule type

Defines whether the schedule has a break

Suggested values
Without a break With a break
Default
Without a break
Unknownoptional
Record typeRecord type

Defines a special meaning of the record

Suggested values
Opening Closing Day off Working day
Default
Working day
Stringoptional
Hour open fromHour open from

no description

Unknownoptional
Minutes open fromMinutes open from

no description

Unknownoptional
Hour open toHour open to

no description

Unknownoptional
Minutes open toMinutes open to

no description

Unknownoptional
Hour break fromHour break from

no description

Unknownoptional
Minutes break fromMinutes break from

no description

Unknownoptional
Hour break toHour break to

no description

Unknownoptional
Minutes break toMinutes break to

no description

Unknownoptional