OpenBrewComp Demo Entry Forms
If this was an actual competition, you would find links to the forms needed to enter the competition on this page.
By default, any forms should be stored under the public/docs
directory and links to them created with
<%= link_to_with_icon('form name', doc_path('form_name.pdf'), :popup => true) %>
If you have any document formats other than PDF, you will need to modify
app/helpers/application_helper.rb and provide an icon to match.
Or you could dispense with the icon and use the link_to helper
method instead of the link_to_with_icon helper method.
For example, we’ll assume for this example that your forms are saved as FOO
files which just happen to have, unsurprisingly, the .foo file extension.
If you want to include a small icon next to the link to indicate the file type,
like so
,
except with an image appropriate for the FOO format, edit
app/helpers/application_helper.rb and add the following public method:
def foo_icon
# Set the file name and size to match the actual icon you use
image_tag('foo_icon.gif', :class => 'icon', :alt => '(FOO Format)',
:size => '17x17', :title => 'FOO File')
end
Put the icon in the public/images directory and your
link_to_with_icon references to .foo files will place the
appropriate icon next to the link.