Description:
This is an extension module for Availability Calendars module. It provides a page that shows all the resource states in certain period filtered by different conditions in one calendar.
The purpose of this module:
Availability Calendars does provide a filter for views that allows user to filter the resource based on the start date and end date. But it will filter the resource out if part of the period is fully booked. User won't be able to check this resource's state within a period. Also there is no views formatter to display more than one resources in one calendar view.
This module simply provides a page that displaying all the resource in one calendar. Instead of filtering content out by date, it shows availability states against each date in the calendar.
Project page: https://drupal.org/sandbox/rli/2257653
Git repo link: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/rli/2257653.git ac_show_availability
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | resource-availability-bxslider-issue.jpg | 21.35 KB | pushpinderchauhan |
| #21 | resource-availability-filter-empty-issue2.jpg | 41.98 KB | pushpinderchauhan |
| #21 | resource-availability-filter-empty-issue.jpg | 52.75 KB | pushpinderchauhan |
| #12 | Screenshot from 2014-06-10 14:13:29.png | 27.91 KB | rli |
Comments
Comment #1
keopxHi,
You have a some error on your code.
Please check this: http://pareview.sh/pareview/httpgitdrupalorgsandboxrli2257653git
Comment #2
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
keopxComment #4
rliThanks, I have fixed the warnings and errors against pareview.sh. Please review.
Comment #5
znaeff commentedHi.
Git link in description is incorrect.
Please change
git clone --branch 7.x-1.x rli@git.drupal.org:sandbox/rli/2257653.git
to
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/rli/2257653.git ac_show_availability
Comment #6
znaeff commentedComment #7
rliThanks, repo link changed.
Comment #8
gmaheux commentedHello rli,
I passed coder on your module and I just found one not critical problem :
You just need to add a file description in your javascript file ac_show_availability.js. You can refer you to JavaScript coding standards
I don't know if it's a best way :
Comment #9
rliThanks for your suggestion Jojo-M.
I have added drush and hook_library integration, also added the @file block in the js file.
There is an error in pareview.sh about the hook_library, but I think I was following the correct coding standard in the api page. Not sure if the api example code is in correct coding standard or we need to make an exemption for pareview.sh.
Comment #10
gmaheux commentedHello rli,
In the line 73 you create the PHP array "$info['drupal.ac_show_availability']".
In the line 77 you have the index "js" with two index inside. The first index is "$module_path . '/ac_show_availability.js'" and the second is empty.
Pareview.sh say that you haven't give a name to the second index. You need to give the name 'data' like in the exemple of the hook_library page.
They said : " the key may be skipped, the value must specify 'type' => 'setting', and the actual settings must be contained in a 'data' element of the value." But they also said in the code example : "// JavaScript settings may use the 'data' key."
Comment #11
keopxHi,
You use different array definition in file ac_show_availability.module, in line 78 you defined $key => $value array and in line 82 you use autoasigned $key array.
Please check it.
Comment #12
rliHi Guys,
Regarding to #10 and #11, I double checked hook_library API, I can see that 'To add library-specific (not module-specific) JavaScript settings, the key may be skipped, the value must specify 'type' => 'setting', and the actual settings must be contained in a 'data' element of the value.' in https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_library/7.
Also I have check the code in hook_library(), found the screenshot attached:
I have used the same coding standard in this module.
I also have tried adding key 'settings', 'data', 'setting' to the array, which will all break the function. I'm wondering if this is an exemption in Pareview.
Thanks.
Comment #13
rliComment #14
grimreaperHello,
Before any comment, thanks for this module which makes me discover availability calendar and thanks for your module.
I have just tested the module to see it in actions before reviewing the code.
And I struggle to have a result, I followed the instructions, and there was no result on the page. So I needed to look into the code and found that the start and end date form element didn't showed up.
Because there is a missing dependency to date_popup.
No error, no warning, but no calendar.
Now that I see it in action, I will review the code.
Thanks
Comment #15
grimreaperGeneral :
ac_show_availability.info file :
ac_show_availability.admin.inc :
ac_show_availability.module :
Thanks I did not know that tip.
Why not using a db_select() ?
ac_show_availability.drush.inc :
Thanks I didn't know the dt() function.
Thanks for your module.
Comment #16
keopxComment #17
rliThanks for the great suggestions Grimreaper.
I have modified following:
ac_show_availability.info file :
ac_show_availability.admin.inc :
ac_show_availability.module :
Fixed the problems in pareview, except the one I mentioned in #12.
Cheers
Comment #18
grimreaperHello rli,
I test, its ok, the admin form is functional even changing the content type.
Ok for point in #12.
Pareview.sh still sees 2 other points for comments. And in the .info, the dependencies are not separated from name, description, core, package.
But it is as you want for this coding style points.
Comment #19
pingwin4egActually the query mentioned in comment #15 is very simple, so db_query is OK there (Dynamic queries).
Comment #20
rliComment #21
pushpinderchauhan commented@rli, thank you for your contribution.
Automated Review
Best practice issues identified by pareview.sh / drupalcs / coder. Yes, http://pareview.sh/pareview/httpgitdrupalorgsandboxrli2257653git reported few minor issues that need to be fix.
Manual Review
dependencies[] = availability_calendaris there in .info file.I access

admin/config/content/resource-availabilitypage and choose following option.Once I submit this form, filters values get reset that looks wired.
One more scenario I found in this, as body field exist in both article and page content type, I am saving this configuration for article content type and after submission if I choose page content type then body field get selected by default even it was selected for article content type.
TypeError: $(...).bxSlider is not a functionjs errors come.Even If I installed bxslider library, it still produces
TypeError: $(...).bxSlider is not a function.configure = admin/config/content/resource-availabilityyour setting form link through .info file to make it directly accessible from module page.The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
As I am not a git administrator, so I would recommend you, please help to review other project applications to get a review bonus. This will put you on the high priority list, then git administrators will take a look at your project right away :-)
Thanks Again!
Comment #22
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.