Hi Bryan
I got your response just after I resent this! I managed to get it
working using your advice. What I was missing was the magic provided by the
"this" object. Pretty basic error!
To get it to work I used a parameterized version of collection.
In the definition for index-page in application.dryml I used:
<collection param/>
Then I created an index.dryml in the view for my controller:
<index-page>
<collection: replace>
<div>
<table-plus fields= "status, created_date, updated_date" >
<controls:>
<% if this.capture_path =~ /File not available/ %>
No file
<% else %>
<a href="#{*this*.file_path}" >Download file</a>
<% end %>
</controls:>
</table-plus>
</div>
</collection:>
</index-page>
The key to getting all this to work was remembering the "*this*" object!
I hope this helps someone else with a similar problem.
Thanks Bryan for the push in the right direction.
Cheers,
Patrick
On Sat, Nov 21, 2009 at 10:02 PM, Bryan Larsen <[email protected]>wrote:
> Did you not get my response? Cutting and pasting...
>
>
> It should be something like:
>
> <file-path-link-view:>
> <a href="http://127.0.0.1:3000/#{this.to_s}" />
> <file-path-link-view:>
>
> If 127.0.0.1:3000 is the rails server, you should use #{root_path}
> instead of hardcoding in the url.
>
> cheers,
> Bryan
>
> Patrick Fitzgerald wrote:
> > Sorry for posting this under:
> > Prototype v.1.6.1 and Hobo
> >
> > Hi All,
> > Scratching my head over this one. I have created a table using:
> >
> > <table-plus fields="status, created_date, updated_date, file_path_link,
> > user" />
> >
> > Which display everything in a lovely table. The thing is,
> > file_path_link contains text which has the location of a file on the
> > filesystem. I want to make this a hyper link and cannot get it to work.
> >
> > For example, if the text returned by file_path_link is: 1/2/filename.jpg
> >
> > How do I make that a hyper link which points to:
> >
> > http://127.0.0.1:3000/1/2/filename.jpg
> >
> > The idea is that clicking on the text will allow the user to download
> > the file.
> >
> > All help and suggestions welcome!
> >
> > Thanks,
> > Patrick
> >
> > --
> >
> > You received this message because you are subscribed to the Google
> > Groups "Hobo Users" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<hobousers%[email protected]>
> .
> > For more options, visit this group at
> > http://groups.google.com/group/hobousers?hl=.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<hobousers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=.
>
>
>
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=.