It would be nice to have a "add text line" button for each day, next to "add more hours". This can be used in the following cases:
- When closed on mondays, the formatter shows all days, with 'monday: closed'
- When only open on the last sunday of the month, the formatter shows 'sunday: 11:00-17:00, every last sunday of the month'.

Comments

johnv’s picture

Some more thoughts:
- the field might be text field, or a term. A term field might be better: admin can allow/prohibit adding new texts.
- what about translatability of the text?

Ozeuss’s picture

User-entered text should not be translatable- there's no way to know in what language the text was entered.

johnv’s picture

One can assume that the text is in the same language as the Entity-language, if languages are enabled.
If locale-module is not enabled, then translation is not an issue.

How would a text per line be implemented?

johnv’s picture

Another use case in #555054: Allow for custom "day" and "hour" name schemes, IE "Mon-Fri", "Appointment Only", which needs the following options for an Opening Day:
Closed
Appointment Only
etc..

johnv’s picture

Marked #665082: Assigning a "Room Number" when an hour is specified as a duplicate:

I am using this module to create a university's school schedule as follows:

Each class has two Office Hours cck: one for the course, and one for its tutorial.
Both content types include "class name", "class room number", and "class days/hours".

Any idea how I would go about adding an option to specify a "room number" next to the specified hours of this model?

johnv’s picture

Marked #349746: Nonstop checkbox as a duplicate:

Please add Nonstop checkbox. Thank you.

Anonymous’s picture

+1 subscribing to this.

suggestion:

in the CCK field settings, maybe having a box where one could type the list of options that they would like to see in their selection boxes would be the best idea. Much like creating a list style text field.

i was thinking perhaps an admin page where one could assign new selections to the Office Hours fields, but if I have two Office Hours fields per node, I would then see selections in both that I may not want to appear within both field options.

so adding extra options to the actual field settings page itself would be ideal.

tommer’s picture

I also need the possibility to add nonstop. My temporary solution is this modification in office_hours.theme.inc (marked by ++ in code below) somewhere around line 190 (in 6.x-1.x-dev):

        else {
          // Override endhours of morning with endhours of evening.
          $endhrs1 = $hours[1]['endhrs'];
        }
      }
      $regular = $strhrs1 . $settings['separator_hours_hours'] . $endhrs1;
++      if ($strhrs1==0 && $endhrs1==0) {$regular = t('Nonstop');};
    }

    $output_hours = $closed . $regular . $additional;

It works when the opening hours are set from: 00:00, until: 00:00

johnv’s picture

Title: "add text line" feature » Add a "description" feature

Marked as duplicate: #1905128: Hours description

Eg.
Lun 9:00-12:00 CUSTOMERS ATTENDANCE
14:00-16:00 SUPPLIERS ATTENDANCE
16:00-20:00 TECHNICAL SERVICE

johnv’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Issue summary: View changes
Status: Active » Fixed
Related issues: +#2860038: Add a comment field to each time slot (D8), +#2553935: Add a comment field to each time slot (D7)

See both linked issues for D7 and D8. It adds a 'comment' column to each time slot.
Perhaps, we can build upon that.

For D8 this is fixed:
OP: When only open on the last sunday of the month, the formatter shows 'sunday: 11:00-17:00, every last sunday of the month'. --> #2860038: Add a comment field to each time slot (D8)
OP: When closed on mondays, the formatter shows all days, with 'monday: closed' --> #2860041: Cannot add comment when day is closed.
#2: User-entered text should not be translatable- there's no way to know in what language the text was entered. --> #2860044: Make Comment line translatable via Field setting
#7: We stick to a common textfield.
#8: non-stop is possible now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.