Thank you, Adam, that is very helpful, as usual!
Lucy

Sent from my iPad

> On 16 Mar 2018, at 16:23, Adam Cox <[email protected]> wrote:
> 
> Hi Lucy, the logic that Arches uses to identify a url in the data entry forms 
> is unfortunately not available to the report templates. However, you can just 
> test that the reference type is "External website".
> 
> Instead of putting code in this reply, I just made a pull request on your 
> repo: https://github.com/mradamcox/ead/pull/24 which you can inspect and 
> merge if you like.
> 
> Adam
> 
>> On Thu, Mar 15, 2018 at 2:55 PM, Lucy Fletcher-Jones <[email protected]> 
>> wrote:
>> Thank you very much for your reply, Adam. 
>> 
>> Yes, some logic will need to be added because most of our values will not be 
>> websites.
>> 
>> What is Arches using to identify the value as a link on input?
>> 
>> Lucy
>> 
>> Sent from my iPad
>> 
>>> On 15 Mar 2018, at 18:51, Adam Cox <[email protected]> wrote:
>>> 
>>> Hi Lucy, the best way to do this would be to change this line 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
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 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