Drupal:创建一个员工工作时间的节点 [英] Drupal: create a node with employee working hours
问题描述
我有一个复杂的任务。
1。我需要创建一个员工工作时间的节点(它将被创建为所有角色为employee的用户),如下所示:
星期一:从__:__到__:__
星期二:从__:__到__:__
星期三:从__:__到__:__
等
所以,我必须创建大约14个CCK字段(monday_from,monday_to,tuesday_from ...)或更多来存储一周中的日期和工作时间(小时和分钟)
2。我需要添加一个公开过滤器的视图,访问者可以在一周中的工作时间过滤员工。 / p>
我应该在工作时间使用什么样的字段?如何实现上述视图过滤?
非常感谢任何建议。
谢谢! p>
你为什么不看看办公时间模块。我不知道你是否可以使用暴露的过滤器,但它应该让你的方式最好。
I have a bit complicated task.
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.
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. 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?
Any suggestions are greatly appreciated.
Thank you!
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屋!