Hi Lucy, the best way to do this would be to change this line
<https://github.com/mradamcox/ead/blob/master/ead/templates/views/reports/sections/EXTERNAL_XREF.E42.htm#L18>
in your report from

{{ EXTERNAL_XREF_E42.EXTERNAL_XREF_E42__value }}

to

<a href="{{ EXTERNAL_XREF_E42.EXTERNAL_XREF_E42__value }}"
target="_blank">{{ EXTERNAL_XREF_E42.EXTERNAL_XREF_E42__value }}</a>

This will turn the url into a link that opens in a new tab when clicked. If
you want the link to open in the same tab, remove target="_blank".

Of course you could get more fancy and add an "open link" icon and put the
<a> tag around that instead, but the above solution should be exceedingly
simple to implement.

Note that this will try to make a hyperlink out of any value that is stored
as an external reference, even if it is not a valid URL. You would have to
add some logic to the template that would test for URL patterns if you
expect to have a lot of external reference that are not links to webpages.

Adam

On Thu, Mar 15, 2018 at 3:41 AM, 'Lucy FJ' via Arches Project <
[email protected]> wrote:

> Hi everyone,
>
> The EAD wishes to add links to external web sites for some of its
> archaeological sites.
>
> This is very easy to do using the external cross reference option. I have
> input the URL  and it clearly shows as a link on the input form.
>
> However when I access the report, it is not at all clear to the user that
> it is a link. You need to right click and select an option to access the
> website.
>
> Is this how it was designed to work? Am I missing something on the input?
> I have uploaded screen shots
>
>
> <https://lh3.googleusercontent.com/-b0_pBBf9Bcw/WqoxhfHrb7I/AAAAAAAAAHU/kI7cHY-KDdAilUzm0Fdm18nJw1fkphi3wCLcBGAs/s1600/externalrefs_Input.JPG>
>
>
>
>
> <https://lh3.googleusercontent.com/-Ixg0pv6NAMY/WqoxU1384RI/AAAAAAAAAHQ/_9xXpWVUH5M7idPGtiL5wvu9HXXUKOaXQCLcBGAs/s1600/externalrefs_report.JPG>
>
>
> Any help would be gratefully received.
>
> Thank you, Lucy
>
> --
> -- To post, send email to [email protected]. To unsubscribe,
> send email to [email protected]. For more
> information, visit https://groups.google.com/d/forum/archesproject?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Arches Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- To post, send email to [email protected]. To unsubscribe, send 
email to [email protected]. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to