Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add links for Site data #267

Open
kkemp85 opened this issue Sep 22, 2023 · 1 comment
Open

Re-add links for Site data #267

kkemp85 opened this issue Sep 22, 2023 · 1 comment
Labels

Comments

@kkemp85
Copy link
Collaborator

kkemp85 commented Sep 22, 2023

There were originally links for the culture periods and site types so that you could click on them and search for more sites with those same attributes. After a discussion with @mradamcox, we believe these were removed naturally through one of the updates to Arches. If possible, it would be nice to load these links back in, which could add to interesting searches for our scouts. Note: for arch sites, permissions settings should still be in place for these searches.

@mradamcox
Copy link
Contributor

mradamcox commented Mar 23, 2024

Did some research into this. The change would need to made in the widget for concept-select, in arches this template is /arches/app/templates/views/widgets/concept-select.htm. The following works for a generic url (~line 57):

<!-- ko foreach: valueObjects -->
    <dd>
        <a data-bind="attr: {href: 'https://example.com'}, text: name"></a>
    </dd>
<!-- /ko -->

Each valueObject has name and id properties. The id is a Value id, not a Concept id.

The tricky thing is anticipating the search url for a given Value. In the search page, a concept search has a term-filter that looks like:

[{"context"%3A"4a3ad641-116c-4ca0-a001-68bb166a0e1a"%2C"context_label"%3A"Exterior Plan"%2C"id"%3A0%2C"text"%3A"Exterior Plan"%2C"type"%3A"concept"%2C"value"%3A"4a3ad641-116c-4ca0-a001-68bb166a0e1a"%2C"inverted"%3Afalse}]

or, decoded:

[
  {
    "context":"4a3ad641-116c-4ca0-a001-68bb166a0e1a",
    "context_label":"Exterior Plan",
    "id":0,
    "text":"Exterior Plan",
    "type":"concept",
    "value":"4a3ad641-116c-4ca0-a001-68bb166a0e1a",
    "inverted":false
  }
]

As far as I can tell, all of that information would need to be supplied to a url from the report, meaning that it would have to be passed down through the valueObjects in the list. Ultimately, this could get really messy dealing with all these knockout variables, so I'm just going to put this issue on hold for now. Hopefully, upstream changes in Arches will make this easier down the road...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants