BNHM / ecoreader

Publish, visualize, and query field notebook data from source collections
http://ecoreader.berkeley.edu
Other
3 stars 3 forks source link

stateful URL? #10

Closed mkoo closed 8 years ago

mkoo commented 8 years ago

One of the useful features of the old bscit site was allowing the query to be exposed in the URL so links could be sent and embedded in external pages. Implement some similar solution?

jdeck88 commented 8 years ago

If you search for Annie Alexander between years 1910 and 1920 that is already a static URL like:

http://ecoreader.berkeley.edu/rest/volumes/Alexander,%20Annie%20Montague?begin_date=1920&end_date=1930&section_title=&volume_id=

which will give you a JSON response.

So, i imagine that you don't actually want to look at the JSON, but want to see HTML.

I'm also assuming that you just want to see the results and not statically link to images.

If this is all true, then i think i just need to pop in some Javascript that parses an incoming URL sends the AJAX request automatically with the incoming URL like:

http://ecoreader.berkeley.edu/?author=Alexander,%20Annie%20Montague&begin_date=1920&end_date=1930&section_title=&volume_id=

Is it necessary to coordinate this with already saved queries from the old field notebook site? that could be tricky.

John

mkoo commented 8 years ago

Not necessary to coordinate with the old site (although that means more work for Archives team to update on OAC etc so perhaps I am speaking out of turn here!). However I'm not seeing the static URL when I am getting search results or cruising through pages.

I only see ecoreader.berkeley.edu/# So updateQueryString (something something...)?

jdeck88 commented 8 years ago

I was thinking a "Share" Link so users can copy the correct URL. The parameters are not instantly reflected in the URL since the javascript is calling the various services directly and doing the rendering. This is different than the old perl site which had the server rendering everything.

John

On Tue, Oct 20, 2015 at 8:28 AM, Michelle Koo notifications@github.com wrote:

Not necessary to coordinate with the old site (although that means more work for Archives team to update on OAC etc so perhaps I am speaking out of turn here!). However I'm not seeing the static URL when I am getting search results or cruising through pages.

I only see ecoreader.berkeley.edu/# So updateQueryString (something something...)?

— Reply to this email directly or view it on GitHub https://github.com/BNHM/ecoreader/issues/10#issuecomment-149602412.

John Deck (541) 914-4739

mkoo commented 8 years ago

Share link is perfect solution

jdeck88 commented 8 years ago

This is now added and working, e.g. see:

http://ecoreader.berkeley.edu/?authors=Alexander%2C%20Annie%20Montague&begin_date=1920&end_date=1928&scanned_only=true

mkoo commented 8 years ago

Awesome!

On Mon, Apr 18, 2016 at 1:14 PM, John Deck notifications@github.com wrote:

This is now added and working, e.g. see:

http://ecoreader.berkeley.edu/?authors=Alexander%2C%20Annie%20Montague&begin_date=1920&end_date=1928&scanned_only=true

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/BNHM/ecoreader/issues/10#issuecomment-211556152