Adding titles and descriptions to images in Refinerycms-Portfolio
- by John Deely
I'm using the Refinery content management system with a the Portfolio plugin
see http://github.com/resolve/refinerycms
I wanted to create a title and description for images uploaded to
Refinery using Refinerycms-Portfolio
so far I have done the following;
added the columns to the images table
$script/generate migration AddTitleToImages title:string
$script/generate migration AddBodyToImages body:text
$rake db:migrate
modified the field div in this file, * highlighted
vendor/plugins/images/app/views/admin/images/_form.html.erb
Use current image
or, replace it with this one...
*****
*****
*****
***** "wymeditor", :rows = 7 %
Added these lines to the main image partial in
vendor/plugins/refinerycms-portolio/app/views/portfolio/
_main_image.html.erb
<%= @image.body %
This works in the back-end except for a few visual bugs.
The problem with this is when i click through the thumbnails in the
front-end the titles and descriptions keep stacking on top of the
previous titles and descriptions. The main image changes fine, but
instead of refreshing the title and description, it adds the new one
above the previous titles and descriptions.
How can i stop this repetition so that only one title and description
will show at a time?
I'm new to Rails and I am using Rails-2.3.5 and I suspect this can be solved using Java Script
thanks in advance,
John