Hello,

I am thinking about a page for my co-workers, where they can set that they are ill.
It must be a simple list, with predefined all the names of the workers, and besides a 'ill' checkbox.

I want to handle every worker as a content type, so I can create a nice block that displays the current illness of the colleagues.

Are there tips how to create this 'simple' page?

Comments

adam_b’s picture

The CCK module will let you create a content type with a checkbox field.

Cornell Jake’s picture

Thank you for your comment. But that is not what I want I think, can I list those content types on one page, with a save button?

adam_b’s picture

You could probably do this with some combination of Views and Views Bulk Operations - but it's not a very Drupal-ish way to do it. If these users have logins, it might be easier to have the checkbox on their profile, and then make views of who's in/out based on that information.

Cornell Jake’s picture

Thank you very much! I have now a page with the users with a checkbox in front. (Using View Bulk Operations)
But I see no way to get those checkboxes as an "illness" or "absent" checkbox that can be stored in a simple block that lists the absent colleagues.

The challenge for me is now to get that 'checkbox' in front of the name on that page in another View, namely a block.
I am now looking at an "Execute arbitrary PHP script", think that I must do something with it.

Thanks

Edit: I cannot use the user profile, if a colleague is absent, another colleague checks if he is set to absent, if not, he does it. Not the colleague that is absent himself.

Edit2: Maybe you mean: in the VBO list that I have create I can show an 'absent' checkbox that is added to the user profile, after the name of the user?

So I think I have two challenges:

1) How to perform an action with VBO, so that another user can set that checkbox of the profile from an user to absent
2) How to get that absent 'checkbox' on that page in another View, namely a block. (think this is a node if I add this to the user profile, User: Absent)

Have you any comments about my thoughts?

adam_b’s picture

Okay, if you want other people to be able to alter their colleagues' status, then maybe you need a node to represent each user, with a checkbox in the node which anybody can tick.

Making a block would be easy enough - it's just another presentation of the same view, filtering by user + checkbox = 1.

But a couple of questions to complicate matters:
- What happens when the user returns to work? does s/he have to untick the checkbox to signify that s/he's back? Or do you need to have some sort of action that resets the checkbox to 0 every night?
- Is there any interest in keeping records of the days when a person was absent? or is this just for daily display purposes?

Cornell Jake’s picture

Hi adam_b,

What you are saying here is okay, possible to create, and a nice solution.
But is it not possible in a way to have one page, with those checkboxes? So the user only have to tick, tick, tick -- save and its done.
Now, they must
- go to that page,
- select the user they want to set absent
- click "Edit"
- click "Save" and its done, 2 steps to much for users, because users notting know about how its working, and I have to teach them before they know how to set one colleague absent.

Anyway, thanks for your help! Its working in one way, but not in the way I want.

Have you suggestions to do it in one page?

adam_b’s picture

Again, I'd look at using Views to display multiple nodes at once, and Views Bulk Operations to expose the checkboxes.