EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #07945
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] ScreenProcessor.pm and Admin Screen Messages
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>, "James Kerwin" <jkerwin2101@gmail.com>
- Subject: Re: [EP-tech] ScreenProcessor.pm and Admin Screen Messages
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Tue, 13 Aug 2019 07:15:48 +0000
Hi James,
I think you've got all the right parts - you just need to join them all together:
- create the link
- create the text
- append the text to the link
- append the link to the message
Cheers,
John
From: eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of James Kerwin via Eprints-tech <eprints-tech@ecs.soton.ac.uk>
Sent: 12 August 2019 14:57:39
To: eprints-tech@ecs.soton.ac.uk <eprints-tech@ecs.soton.ac.uk>
Subject: [EP-tech] ScreenProcessor.pm and Admin Screen Messages
Sent: 12 August 2019 14:57:39
To: eprints-tech@ecs.soton.ac.uk <eprints-tech@ecs.soton.ac.uk>
Subject: [EP-tech] ScreenProcessor.pm and Admin Screen Messages
Hi All,
I have a button on the admin screen that does something when clicked. Then at the top of the screen a message appears upon completion to provide a url for the user to follow (or that is the plan). It usually present a plain text message, but I want a clickable
link. At the moment users would need to copy the message text and paste it into the address bar.
At the moment I can have either text or a link that can't be seen or clicked, but shows up when you inspect the page.
Here is my code that I've adapted (only the bit in bold is really relevant):
sub add_result_message{my( $self, $ok ) = @_;
if( $ok ){#$self->{processor}->add_message( "message",#$self->html_phrase( "aam_link" ) );#$self->{processor}->add_message(#"message",#$self->{repository}->make_text( "Please go to www.google.co.uk to access the AAM Updates.")#);#my $messagelink =my $uri = "www.google.co.uk";$self->{processor}->add_message( "message",$self->{repository}->make_text($self->{session}->render_link( $uri )));}
Is there a way that I can alter this to show a clickable text link or am I going to need to go further down the EPrints Rabbit Hole? My alternative approach is to alter render_messages in ScreenProcessor.pm, but I don't really want to do that and I also
don't know how to make a local archive copy of this file either as it's a few levels up from the plugins directory.
Any suggestions or alternative approaches are very welcome.
Thanks,
James
- Follow-Ups:
- Re: [EP-tech] ScreenProcessor.pm and Admin Screen Messages
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] ScreenProcessor.pm and Admin Screen Messages
- References:
- [EP-tech] ScreenProcessor.pm and Admin Screen Messages
- From: James Kerwin <jkerwin2101@gmail.com>
- Re: [EP-tech] ScreenProcessor.pm and Admin Screen Messages
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] ScreenProcessor.pm and Admin Screen Messages
- Prev by Date: [EP-tech] ScreenProcessor.pm and Admin Screen Messages
- Next by Date: Re: [EP-tech] how to display total number publications in eprints reporsitory
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):