Must make the snapback work with the new watir tests. Then will have a look whether we could remove the state_id from the URL.
Found nothing about breakcrumb/snapback in doc/resources/javascript/*.js. Looking at commits which have snapback in their comment. Must understand VOLATILE in sbsm. Looks like we have volatile and other states, which affect navigation. Puttings some debug info into view/pointersteps to be able to follow the different paths. Some views declare SYMBOL_MAP -> PointerLink. DIRECT_EVENT is initialized to stuff like :home_pharmacies, :home_drugs. To what should we initialize it when we come from /de/gcc and clicking on a link inside Fachinfo-Online?
Discussing with Zeno we agreed, that /home_drugs is the same as /home. /home is also the link we follow when clicking on the logo. "Sie befinden sich in" points to the home of the zone, e.g home_hospitals. If you entered it via it changes to "Suchresultat" and points to /result/
I think the best solution would be to able display snapback (search, then fi, then changes, then details) to display
Sie befinden sich - Home - 65569 - 01 -001 - Fachinformation - Änderungen - 10.11.2015
After having entered a swissmedic# and set the search_type to swissmedic (or the other was round), we should arrive in not in /de/gcc/search/zone/drugs/search_query/58392/search_type/st_registration?#best_result
, nor in http://ch.oddb.org/de/gcc/show/state_id/236092420/reg/58392/seq/01/pack/001
, but in /de/gcc/show/reg/58392/seq/01/pack/001
. This last URL display Sie befinden sich in - MiGeL-Home - 58392 - 01
which is also incorrect.
But first I attack the problem, when we come from a link from the Fachinfo-Online. After clicking on the first one, I arrive at /de/gcc/fachinfo/swissmedicnr/54624
. Here I would prefer the URL to be /de/gcc/show/fachinfo/5462, but this is a cleanup which I will reserve for later. The snapback displays "Sie befinden sich in - Home - Fachinformation zu Cosopt®/Cosopt-S® Monodosis", which should be shortened- It is okay that when clicking on a chapter, I stay with the same Snapback. After clicking on "Änderungen anzeigen" I arrive at /de/gcc/show/fachinfo/54624/diff
. The URL is okay, but the display of "- Home - Liste der Änderungen an der Fachinformation zu Cosopt (Swissmedic-Nr. 54624)". Here I must have 3 elements in the snapback and not only two.
Should we display "Suchresultat" in the snapback or just switch show the content eg. the IKSNR, name, etc.
Defining DIRECT_EVENT = :fachinfo_search
in the class State::Drugs::FachinfoDocumentChangelogs changes make http://oddb-ci2.dyndns.org/de/gcc/show/fachinfo/65569/diff display "Sie befinden sich in - FI erweitert - Liste der Änderungen an der Fachinformation zu Elizette 30 (Swissmedic-Nr. 65569)". Not exactly what intended.
Okay. The solutions lays that I must implement a method backtracking in the class ODDB::View::Drugs::FachinfoDocumentChangelogs and FachinfoDocumentChangelogItem.
Things look better. After selecting a Fachinfo via searching by swissmedic-nr I have in the snapback "Suchresultat", via Fachinfo-Online "Home". Afterwards I have now more elements. See
Will continue tomorrow to make the watir test pass with this example.