BCStudentSoftwareDevTeam / Ullman_Galleries

Mozilla Public License 2.0
0 stars 1 forks source link

Create Single Gallery Edit Page #2

Closed memo330179 closed 6 years ago

memo330179 commented 6 years ago

This is the page where the Admin can edit the information from galleries. The functionality should be as follows.

gallery_edit

agarwali commented 6 years ago

@memo330179 what is the difference between user and admin on this page (eg. first bullet point) Resolved

memo330179 commented 6 years ago

@agarwali there is no difference. This is an admin only page.

agarwali commented 6 years ago

@Jessonsotoventura @memo330179 need more clarity. Here are some scenarios

  1. Are we reusing this page for both adding and editing a gallery? If so we can have two possibilities a. Do we want two different routes for the add and edit pages? This will be easier because we can pass the gid in the route for the edit page. b. Otherwise, we have to somehow pass the gallery name (possibly through the url, which might not be unique?) to the page and do a get_or_create, leaving the rest of the fields empty by default.

I can implement any case, let me know what you think or if there is a better way.

Jessonsotoventura commented 6 years ago

@agarwali Yes it should do both, and I agree that two routes would be easiest, so please take that approach

memo330179 commented 6 years ago

Pull request open for this. https://github.com/BCStudentSoftwareDevTeam/Ullman_Galleries/pull/15

memo330179 commented 6 years ago

Things to finish

agarwali commented 6 years ago

I was having some dir issues with upload while testing so I have not pushed the upload file for now. Also changed the HTML temporarily so the edit and add functionality can still be tested. Will be looking into the upload issues this evening.

agarwali commented 6 years ago

@Jessonsotoventura I have found the issue that is causing the entire form to become dropzone.

  1. if we follow this approach then the entire forms becomes a drop zone. We have to change a lot of CSS and JS, so no point of using dropzone.
  2. if we make a div into dropzone programmatically, we must provide an upload URL in the javascript. Now we can no longer have the same upload URL in the form action, otherwise, there will be two posts requests to the same URL. There is a way to get around this by not adding a form action URL but adding the form data programmatically to the file upload in the javascript as seen here (post by ccarver). But our front-end code for dropzone will be tied to the form and will not be modular.

Now it is a choice between modularity of front-end (we will have to have separate URL for upload) vs. Keeping the same upload URL for form data and file data (less modular) What do you think?

Jessonsotoventura commented 6 years ago

You are right #1 is not worth doing, #2 is better. This has turned into a nice issue huh, well seeing as you and Kenny have each started an independent implementation. The modularity has not really gone well. Given that go ahead and separate it out.

Jessonsotoventura commented 6 years ago

V1 is live thank you for your commits