agenda suite
This commit is contained in:
parent
6ac6f91d8f
commit
a3d3c6063d
@ -2,6 +2,8 @@ class Event < ActiveRecord::Base
|
||||
date_format = /\A(0[1-9]|[12][0-9]|3[01])[\/](0[1-9]|1[012])[\/](19|20)\d\d\z/i
|
||||
hour_format = /\A([0-1]?[0-9]|2[0-3]):([0-5][0-9])(:[0-5][0-9])?\z/i
|
||||
validates :title, :presence => true
|
||||
|
||||
belongs_to :image_file
|
||||
|
||||
# validates :start_at_date, :presence => true, :format => { :with => date_format }
|
||||
# validates :start_at_time, :presence => true, :format => { :with => hour_format }, :if => :with_time?
|
||||
|
@ -13,7 +13,7 @@
|
||||
= link_to i(:"trash-o"), [:admin, article], :confirm => 'Voulez-vous vraiment supprimer cet article ?', :method => :delete, :remote => true
|
||||
|
||||
= link_to i(:pencil), edit_admin_article_path(article), :style => "padding:0px 0px 0px 0px;", :remote => true
|
||||
= link_to i(:info), edit_admin_article_path(article), :style => "padding:0px 0px 0px 0px;"
|
||||
= link_to i(:plus), edit_admin_article_path(article), :style => "padding:0px 0px 0px 0px;"
|
||||
|
||||
=link_to i(:"level-down"), admin_article_path(:id => article.id, :format => "js"), :class => "set_tag"
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
= form.inputs do
|
||||
= form.input :title, :label => "Titre :"
|
||||
= form.hidden_field :event_id
|
||||
|
||||
=form.input :image_file_id, :as => :qi_image_select
|
||||
.event_date_form
|
||||
-if form.object.errors.messages[:start_at_date] or form.object.errors.messages[:start_at_time] or form.object.errors.messages[:stop_at_date] or form.object.errors.messages[:stop_at_time]
|
||||
%p.errors
|
||||
|
@ -1,60 +1,81 @@
|
||||
|
||||
#toolbar-text
|
||||
|
||||
|
||||
|
||||
|
||||
#event_block_edit{:style => "margin-right:330px;margin-top:45px;"}
|
||||
|
||||
#menu_item_block_edit{:style => "margin-right:330px;margin-top:45px;"}
|
||||
|
||||
=render :partial => "admin/blocks/block", :locals => {:block => @event.block, :sortable => true}
|
||||
|
||||
|
||||
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
#menu_item_inspector_container
|
||||
.accordion#menu_item_informations
|
||||
|
||||
.accordion-group
|
||||
.inspector_handle
|
||||
.accordion-heading.navbar-inner.navbar-inverse
|
||||
%a.accordion-toggle{:href => "#collapseOne",:data => {:toggle => "collapse", :parent => "#menu_item_informations"}}
|
||||
Infos sur l'event
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#menu_item_informations
|
||||
%h4
|
||||
Infos sur l'event
|
||||
|
||||
|
||||
#collapseOne.accordion-body.collapse
|
||||
.accordion-inner
|
||||
=link_to "modifier", edit_admin_event_path(@event), :remote => true,:class => "btn"
|
||||
=render :partial => "show"
|
||||
.panel#collapseOne{:style => "display:none;"}
|
||||
=render :partial => "form"
|
||||
|
||||
|
||||
.accordion-heading.navbar-inner.navbar-inverse
|
||||
%a.accordion-toggle{:href => "#collapse2",:data => {:toggle => "collapse", :parent => "#menu_item_informations"}}
|
||||
éléments
|
||||
%h4 éléments
|
||||
|
||||
|
||||
#collapse2.accordion-body.collapse.in
|
||||
.accordion-inner
|
||||
.block_portlets_sortable#content_types
|
||||
-@event.alloweds_types.each do |slug, name|
|
||||
.panel#collapse2
|
||||
.block_portlets_sortable#content_types
|
||||
-@event.block.alloweds_types.each do |slug, name|
|
||||
|
||||
.content_type{:id => slug, :"data-type" => slug}
|
||||
=#i slug.to_s.constantize.picto
|
||||
=image_tag("admin/content_type/type_"+slug.to_s+".png", :alt => name, :title => name, :class => "handle")
|
||||
|
||||
|
||||
.portlet{:id => slug, :data_type => slug}
|
||||
=image_tag("admin/content_type/type_"+slug.to_s+".png", :alt => name, :class => "handle")
|
||||
|
||||
|
||||
|
||||
.accordion-heading.navbar-inner.navbar-inverse
|
||||
%a.accordion-toggle{:href => "#collapse3",:data => {:toggle => "collapse", :parent => "#menu_item_informations"}}
|
||||
Modifier l'élément
|
||||
#collapse3{:style => "display:none;"}
|
||||
%h4 Modifier l'élément
|
||||
|
||||
|
||||
#collapse3.accordion-body.collapse
|
||||
|
||||
.panel
|
||||
#element_form
|
||||
|
||||
%div#element_form_action
|
||||
%a.move.btn.btn-default.portlet_handle{:href => "#", :data => {:portlet_id => nil}}
|
||||
%span.move_message
|
||||
=ic :arrows
|
||||
|
||||
déplacer
|
||||
%span.cancel_message
|
||||
=ic :ban
|
||||
|
||||
annuler
|
||||
|
||||
=link_to ic(:"trash-o"), "#", :method => :delete, :data => { :confirm => "Etes-vous sûr ?"}, :remote => true, :class => "btn btn-danger trash"
|
||||
|
||||
%button.save.btn.btn-primary
|
||||
=ic(:"floppy-o")
|
||||
|
||||
Sauvegarder
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ role :db, domain, :primary => true
|
||||
|
||||
set :scm, :git
|
||||
|
||||
set :repository, "git@gitlab.bally.me:root/pic_vert_app.git"
|
||||
set :repository, "git@git.nicolasbally.com:root/pic_vert_app.git"
|
||||
|
||||
set :branch, "master"
|
||||
|
||||
|
5
db/migrate/20151021132546_add_image_file_to_events.rb
Normal file
5
db/migrate/20151021132546_add_image_file_to_events.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class AddImageFileToEvents < ActiveRecord::Migration
|
||||
def change
|
||||
add_reference :events, :image_file, index: true
|
||||
end
|
||||
end
|
@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150309094403) do
|
||||
ActiveRecord::Schema.define(version: 20151021132546) do
|
||||
|
||||
create_table "admins", force: true do |t|
|
||||
t.string "email", default: "", null: false
|
||||
@ -212,8 +212,11 @@ ActiveRecord::Schema.define(version: 20150309094403) do
|
||||
t.boolean "many_days"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "image_file_id"
|
||||
end
|
||||
|
||||
add_index "events", ["image_file_id"], name: "index_events_on_image_file_id", using: :btree
|
||||
|
||||
create_table "external_links", force: true do |t|
|
||||
t.string "title"
|
||||
t.text "description"
|
||||
|
Loading…
x
Reference in New Issue
Block a user