Drupal:创建一个带有员工工作时间的节点 [英] Drupal: create a node with employee working hours
问题描述
我的任务有点复杂.
1. 我需要创建一个包含员工工作时间的节点(它将为所有角色为employee"的用户创建),如下所示:
1. I need to create a node with employee working hours (it's gonna be created for all users with role "employee"), which looks like this:
Monday: From __ : __ To __ : __
Tuesday: From __ : __ To __ : __
Wednesday: From __ : __ To __ : __
etc.
因此,我将不得不创建大约 14 个 CCK 字段(monday_from、monday_to、tuesday_from...)或更多来存储星期几和工作时间(小时和分钟).
So, I'll have to create probably 14 CCK fields (monday_from, monday_to, tuesday_from...) or more to store the day of the week and workging hours (hours and minutes).
2.我需要添加一个带有公开过滤器的视图,访问者可以在其中按星期几和工作时间过滤员工.
2. I need to add a view with exposed filters, where visitors can filter employees by day of the week and working hours.
我应该在工作时间使用什么样的字段?如何实现上述视图过滤?
What kind of field should I use for working hours? How could views filtering described above be achieved?
非常感谢任何建议.
谢谢!
推荐答案
为什么不看看 办公时间模块.我不知道您是否可以在其上使用暴露的过滤器,但它应该可以帮助您完成大部分工作.
Why don't you take a look at the Office hours module. I don't know if you can use exposed filters on it, but it should get you most of the way.
这篇关于Drupal:创建一个带有员工工作时间的节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!