diff --git a/app/views/admin/events/_form.html.haml b/app/views/admin/events/_form.html.haml index 868b69f..663b998 100644 --- a/app/views/admin/events/_form.html.haml +++ b/app/views/admin/events/_form.html.haml @@ -1,6 +1,7 @@ = semantic_form_for [:admin,@event], :remote => true do |form| .content = form.inputs do + = form.input :image_file_id, :label => "Image :", :as => :qi_image_select = form.input :title, :label => "Titre :" = form.hidden_field :event_id diff --git a/app/views/public/events/_event.html.haml b/app/views/public/events/_event.html.haml index b8f444f..d601e6f 100644 --- a/app/views/public/events/_event.html.haml +++ b/app/views/public/events/_event.html.haml @@ -2,5 +2,8 @@ .event %h3=event.title %p.date= event_human_date(event) + + %p + =image_tag(event.image_file.file.large.medium.small.thumb.url, :alt => "Jean François Noblet - Blog écologie") %p.desc =simple_format(event.description) \ No newline at end of file diff --git a/app/views/public/shared/_footer.html.haml b/app/views/public/shared/_footer.html.haml index 12854c3..bea95ca 100644 --- a/app/views/public/shared/_footer.html.haml +++ b/app/views/public/shared/_footer.html.haml @@ -20,9 +20,9 @@ %p{:style => "text-align:right;"} =link_to "en savoir +", "/pages/presentation/profitez-de-mon-experience.html" %br - %h3 Banque de donnée + %h3 Banque de données %p - 30 000 observations naturalistes récoltées depuis 1970 par Jean-François NOBLET en Isère, Ardèche, Corse, Drôme, Gard, Alpes de Haute-Provence sont stockées dans la banque de données naturalistes de l'association Nature et Humanisme et gérées sur un ordinateur PC avec la logiciel File Maker Pro. + 35 000 observations naturalistes récoltées depuis 1970 par Jean-François NOBLET en Isère, Ardèche, Corse, Drôme, Gard, Alpes de Haute-Provence sont stockées dans la banque de données naturalistes de l'association Nature et Humanisme et gérées sur un ordinateur PC avec la logiciel File Maker Pro. %p Pour y avoir accès contactez =link_to "jf@noblet.me", "mailto:jf@noblet.me" diff --git a/db/migrate/20131209165939_add_image_to_events.rb b/db/migrate/20131209165939_add_image_to_events.rb new file mode 100644 index 0000000..e55b27c --- /dev/null +++ b/db/migrate/20131209165939_add_image_to_events.rb @@ -0,0 +1,5 @@ +class AddImageToEvents < ActiveRecord::Migration + def change + add_column :events, :image_file, :references + end +end