Entity URI and Links in header
Closed this issue · 1 comments
In geov-entity
-
Remove the link from the entity label
-
Add a line like the following to the header, in a small font:
- URI: http://geovistory.org/resource/i918611 | Project Link: http://geovistory.org/resource/i918611?p=924033
-
in case we are on community project page, we show only this:
I see a challenge:
Currently, the component geov-entity
is not aware of a project id.
Currently, the project entity pages of the website pass in the URI regex and replace props in order to add ?p=123
to the links. But the URI regex and replace are also used in dev/stag to convert http://geovistory.org/resource/i123
to http://dev.geovistory.org/resource/i123?p=123
.
I propose to add another @prop() to geov-entity:
- projectId?: number
If the projectId is set, the header has both links.
The "Project Link" can be the one generated by URI regex/replace.
The "URI" should be the one generated by URI regex/replace minus ?p={projectId}
.
Example 1
input:
- uriRegex = (http://geovistory.org/)(.*)
- uriReplace = "http://dev.geovistory.org/resource/$2?p=123"
- projectId = 123
output:
URI: http://dev.geovistory.org/resource/i918611 | Project Link: http://dev.geovistory.org/resource/i918611?p=123
Example 2
input:
- projectId = undefined
output:
URI: http://geovistory.org/resource/i918611