Are you already planning for a D7 port?

Comments

supportPIC’s picture

Issue tags: +office hours
StatusFileSize
new21.14 KB

Hi,

I have tried to do it but I am new to drupal module dev and so it is not working normally. Sorry not to use cvs things but I am too unexperienced.

What is ok (but I suppose not perfect):
- make the module accessible
- have the field and widget available
- have options accessible for this field.
- set the main theme function (but with a hack in ..._alter function : I pass the field name to set 'office_hours_multiple_values' value to #theme. Sorry).

What I miss:
- I can't manage to display the form in the node creation page. It seems to be related to drupal_display fonction that is not call with right arguments I think.
- display of the value in the node visualisation not tested.

I hope it can be usefull to someone, I am kind of stuck here and I need to do other stuff, so any help and advice welcomed...

mxh’s picture

I also need this module for D7. Is there an alternative or should wo go developing on ourselves?

johnv’s picture

Would be nice to use this for D7. In 2 weeks I'll try to help with supportPIC's port.

supportPIC’s picture

StatusFileSize
new30.29 KB

Here is my last shot. Since I did not took time for cleaning sorry, but it is fonctional.

A good would be to defines fours as true hours in order to make time calculations (is it open now ?)

rzgairin’s picture

Category: feature » bug

Hello,

Good joob ! Add and edit control works fine for me but nothing is showed in node view.

Errors reported when I create content type are:
Notice: Undefined index: granularity en office_hours_field_settings_form() (línea 174 ).
Notice: Undefined index: hoursformat en office_hours_field_settings_form() (línea 175 /modules/office_hours/office_hours.module).
Notice: Undefined index: granularity en office_hours_field_settings_form() (línea 182 /modules/office_hours/office_hours.module).
Notice: Undefined index: hoursformat en office_hours_field_settings_form() (línea 183 de /modules/office_hours/office_hours.module).

but content type was created and I can add nodes.

No hidden fields in presentation fields, no errors reported, by nothing is showed in node view

johnv’s picture

Hi supportPIC, I have roughly the same results as rzgairin.
- no data is shown in node view
- at some point, the second columns 'more hours' was shown completely, although none were entered. I need to test again for reproducable data.

klonos’s picture

Category: bug » task
Issue tags: +D7 porting

This is a task and not a bug... subscribing + adding a proper tag to the issue so it's easier to locate.

xmacex’s picture

Subscribing.

supportPIC’s picture

Hi all,

Sorry for the bugs, I just saw that nothing is shown in the node view, I am looking for it.

klonos’s picture

Issue tags: +port to d7, +d7 ports

...updating tags.

supportPIC’s picture

StatusFileSize
new21.91 KB

Here is a displayed version (for info, no views integration is done, the rest should be ok, excepet for the code cleaning)

Jerome F’s picture

Thank you supportPIC for all the efforts you put into that porting. I really need this field and that's much appreciated. Of course, there is still the views integration missing, that's the next step I imagine.
I've got no skills in module coding at all, but I can test and review.

johnv’s picture

@supportPIC, Thanks for the new version #11. The hours now display nicely, but with empty field, I get the following error:
Notice: Undefined offset: 0 in theme_office_hours_formatter_default() (line 43 of office_hours.theme.inc).
I changed it as follows:

-  if ($keys[0] != $days[$first] && in_array(t($days[$first]), $items) ) {
+  if ((!empty($keys)) && $keys[0] != $days[$first] && in_array(t($days[$first]), $items) ) {
Ozeuss’s picture

Hi guys,
Thanks for the help put in.
I took supportPIC's changes and johnv's addition, and cleaned up code a bit- on first look, it looks good. Thanks!

I've created a new 7.x-1.x branch (which is supposed to be available sometime later today), you're more than welcome to submit patches against it.

johnv’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Needs work
StatusFileSize
new2.62 KB

Ozeuss, thanks for creating the branch, it's a real help.
I tested the release and - before closing this issue - I have the following remarks:
- Something has happened with office_hours_theme.inc: it generates an error for a lost '}' and indents are strange. See applied patch.
- When I edit a node, I can also edit the ofice-hours form. Handles are shown to move the lines up and down. (I use field_group, which give strange results in other cases too)
- Can you publish the release on the project page?

klonos’s picture

Status: Needs work » Active

...great news! Proper version too ;)

- edit: cross-post. Had this tab open for some time before I reply -

klonos’s picture

Status: Active » Needs review

...and sorry for changing status by mistake, but since there is a patch available here it should be set to NR anyways.

Jerome F’s picture

Status: Needs review » Reviewed & tested by the community

patch in #15 removes the error for a lost '}' for me.

xmacex’s picture

Seems to work for me, with the [[http://drupal.org/node/991410#comment-4285936|#15]] patch. I haven't done any proper testing yet, but the module installs, can be added to a content type, data can be inserted to nodes and extracted with Views. Cheers people, drinks on me if we ever meet :)

Jerome F’s picture

I created a new issue for the notices I get on the field creation form, (similar to #5) http://drupal.org/node/1116610

Jerome F’s picture

Status: Reviewed & tested by the community » Needs work
johnv’s picture

I have added some separate d7-errors, too. It seems the new D7-api causes some problems.

johnv’s picture

Status: Needs work » Fixed

Since, a D7-branch is published since april 10th, this issue can be closed. New errors in new issues!

Status: Fixed » Closed (fixed)
Issue tags: -D7 porting, -office hours, -port to d7, -d7 ports

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