saurabhd / hk_realestate

GNU General Public License v2.0
1 stars 0 forks source link

Add a possibility to choose one or more apartments fom the list #5

Closed arpita-addweb closed 7 years ago

arpita-addweb commented 8 years ago

Site Area _: /favorites , _Priority : Low

Description : Optimally, the user should be able to keep all his favorites on the list, but be able to select one or more to send as inquiry. Inquired favorites should then be marked as such (ribbon/tag on the card).

darshi-shah commented 8 years ago

Hi Rainer,

Can you please explain about this in more details ?

Inquiry can be sent from apartment page. From favorites page, currently, we are not sending inquiry.

Thanks Darshi

heliogabal commented 8 years ago

Hi Darshi,

6 belongs to this as well. So if it is not too complicated, ideally the user should be able to select just some of his favorites (#5) and send them as inquiry (#6). If that takes too much time to implement, please discard this and implement #6 first, so the user can inquire all apartments in his favorites list. Then we can eventually come back to this later to refine the selection. Hope this is clear now? Otherwise, just ask again.

I haven't tested this, but I would have tried to implement this with a views bulk operation view, and possibly something like rules_link to provide the button that sends the list. Not entirely sure if that would work.

darshi-shah commented 8 years ago

Hi Rainer,

To summarize, we need to allow users to send inquiry to multiple apartments at the same time. From favorites page, user should be allowed to select one or more apartments and send them an inquiry.

Currently, when user clicks on inquiry button on apartment page, they see inquiry form and inquiry is sent on form submission. Let me know if this form should still be shown if user selects multiple apartments.

Thanks Darshi

heliogabal commented 8 years ago

Hi Darshi,

thanks for summarizing, I think that helps to make sure we're on the same page. And you got it exactly right.

It should be basically the same process as on the apartment page, opening the inquiry form, but instead of just the apartment that is looked at, this time the apartments inquired upon should be made up of the selected apartments on the favorite page.

Once in the future, when we built a logged-in user section, the known fields of the logged in user should be prepopulated in the form as well, but the user would still have to have the possibility to check the entries and add a custom note, so the form should still be shown. But that will be another set of issues, just to let you know what the future plans are for this...

darshi-shah commented 8 years ago

Hi Rainer,

Code for this is pushed on git . Please follow below steps :

1 - take pull

2 - go to admin/structure/crm-core/activity-types/manage/anfrage/fields/field_angefragte_wohnung and select "unlimited" in number of values.

3 - in favorites view, in footer, add global text and add this code in it <div style="display:inline-block;">

Inquiry
`

4 - clear cache

5 - go to favorites page and check inquiry feature there.

Let me know any questions on this. Thanks Darshi

heliogabal commented 8 years ago

Hi Darshi, I think there is something wrong with the github code markup, there must be some more code?

darshi-shah commented 8 years ago

Hi Rainer,

You are right. The code got stripped somehow.

<div style="display:inline-block;"><div class="Inquiry-button">Inquiry</div></div>

This is code. Rest in module so once you have pull , it will be there.

Thanks Darshi

heliogabal commented 8 years ago

Hi Darshi, I tested it with <div style="display:inline-block;"><div class="Inquiry-button">Inquiry</div></div>, but it doesn't seem completely right yet: The popup that is opened includes the Footer, and the "Inquiry for" field to see which apartments are concerned is missing as well. It might be another issue, but on Firefox, I also get multiple "unresponsive script" errors. It seems like the whole site is loaded multiple times in the popup.

A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.

Script: http://fast.fonts.net/jsapi/69…20f5106e17e.js?_=1463145475374:34

selection_003

heliogabal commented 8 years ago

Hi Darshi,

you should use ng-lightbox instead of colorbox, because this is only still there for legacy reasons until I find the time to change all uses on the site and then colorbox should be uninstalled. That way, it's also not the whole site that is loaded into the lightbox, so it's faster and we don't get a script error.

Thanks, Rainer

darshi-shah commented 8 years ago

Hi Rainer,

NG-lightbox loads content on page load and hides it, we need to add class on button to open popup on it. so the link and popup are already generated on page load and they are made visible on button click. we are generating link based on checkboxes selection. NG-lightbox fails in this scenario. That is why we used colorbox.

Let me know if you inputs on this please.

Thanks

heliogabal commented 8 years ago

I struggled a lot with colorbox on this project, and we probably would need colorbox-node to be able to load just the node without the rest of the template into it, and with ng-lightbox, that wasn't a problem. Plus, if the ng-box is already loaded on page load, it will be quicker to show, which gives a better UX. So if there isn't an important reason to use colorbox, I would prefer to use ng. It's more lightweight and we can get rid of an additional module once the transition is finished.

As I can't see any checkboxes yet, I can't really test this at the moment?

darshi-shah commented 8 years ago

Hi Rainer,

The code is pushed on git. Please check and let me know any issues.

Thanks Darshi

heliogabal commented 8 years ago

Hi Darshi,

ng-lightbox is opening now with the content of "test". Is that what it's supposed to be at the moment? Also, still dont see any checkboxes.

selection_014

selection_015

darshi-shah commented 8 years ago

Hi Rainer,

Can you please take pull once again? Make sure that "sites/all/themes/hk_theme/templates/views-view-unformatted--merkliste--page.tpl.php" is present. This file adds checkbox to apartments.

I am online on skype.

Thanks Darshi

heliogabal commented 8 years ago

ok, merkliste tempate has not been there half an hour ago. Will test once it's pulled.

heliogabal commented 8 years ago

ok, now I have the checkboxes. And ng-lightbox. Only loading the form missing now.

darshi-shah commented 8 years ago

Hi Rainer,

Its seems that "Inquiry" on http://addweb.dev.drupalforgood.eu is calling CRM activity "Anfrage". OUr code calls "Phone call" instead. This is the reason form id is different and JS can not pick it.

To make this work for you , please change line 23 in sites/all/modules/custom/hk_site_alter/hk_site_alter.js and replace "#crm-core-profile-entry-form-call" with "#crm-core-profile-entry-form-anfrage"

Let me know any questions.

Thanks Darshi

heliogabal commented 8 years ago

Hi Darshi,

this has been the problem as mentioned before stemming from the cloning of anfrage to call, where call kept the same machine_name "anfrage" and therefore got called. So on addweb.dev I exported call, changed the machine name and imported it again, so I could use anfrage as before.

Now that I changed the ID to anfrage, I get the form filled with the apartments, but one is somehow missing from the list. It's possible that this is because of the CSS I used to style the multi-form...

heliogabal commented 8 years ago

I just pushed some more css to style the muti-value form inputs.

darshi-shah commented 8 years ago

CSS pushed for this. Please check

heliogabal commented 8 years ago

The selection and opening in ng-lightbox is working now. I still get the headline Inquiry and the field Inquiry for in English and the rest in German, but as you tested it and it works on your side, I would say this can be closed.

However, I realized that the normal inquiry form on the apartment pages doesn't open any longer. Could you check if this has something to do with the changes from this issue? Then we would have to postpone closing until both forms work.

Thanks!

darshi-shah commented 8 years ago

Please take pull. This is fixed.

heliogabal commented 8 years ago

what exactly is supposed to be fixed by that push? I can't seem to find the difference.

darshi-shah commented 8 years ago

normal inquiry form on the apartment pages should open now with this fix.

heliogabal commented 8 years ago

yeah, that's what I thought. I can see the new code, so the pull went fine, but even after cache-clear, the form is still not opening on http://addweb.dev.drupalforgood.eu/aug09/2-zimmer-wohnung-vh-eg-links

Any ideas what else that might be? I don't see any JS errors, when I click the button, it only says please wait, but nothing else happens...

darshi-shah commented 8 years ago

I will check this and let you know.

heliogabal commented 7 years ago

Hi Darshi, what's the status on this one? I tried uncommenting

Inquiry
in the view footer, but I still don't get a clickable button that does anything with it. Did the necessary HTML change?

If you're running out of things to do, you can check that and hopefully, this can be finished soon.