suite
This commit is contained in:
parent
f24eba09ce
commit
c11ad4fbac
@ -4,8 +4,8 @@ $orange: #FF931E;
|
|||||||
|
|
||||||
$blue: #2BAADA;
|
$blue: #2BAADA;
|
||||||
$dark_orange: #E94F25;
|
$dark_orange: #E94F25;
|
||||||
$title_font : "Lato", sans-serif;
|
$title_font : "Oswald", sans-serif;
|
||||||
$sans_serif_font:"Lato", Arial, sans-serif;
|
$sans_serif_font:"caviar_dreams", Arial, sans-serif;
|
||||||
$serif_font : "Roboto Slab", serif;
|
$serif_font : "Roboto Slab", serif;
|
||||||
$cursive_font : 'Galada', cursive;
|
$cursive_font : 'Galada', cursive;
|
||||||
|
|
||||||
@ -28,9 +28,11 @@ $cursive_font : 'Galada', cursive;
|
|||||||
|
|
||||||
body{
|
body{
|
||||||
padding:0;
|
padding:0;
|
||||||
font-family:lato;
|
font-family:$sans_serif_font;
|
||||||
width:100%;
|
width:100%;
|
||||||
margin:0;
|
margin:0;
|
||||||
|
background:#c5c6e4;
|
||||||
|
background:#deddec;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slide_home_wrapper{
|
.slide_home_wrapper{
|
||||||
@ -131,18 +133,23 @@ body{
|
|||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
}
|
}
|
||||||
|
h1,h2,h3,h4,h5{
|
||||||
|
font-family:$title_font;
|
||||||
|
text-transform:uppercase;
|
||||||
|
font-weight:700;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
h1{
|
h1{
|
||||||
background:no-repeat bottom center;
|
background:no-repeat bottom center;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
background-image:url('/bottom-lines.png');
|
|
||||||
background-size: 225px;
|
background-size: 225px;
|
||||||
padding-top:20px;
|
padding-top:20px;
|
||||||
padding-bottom:10px;
|
padding-bottom:10px;
|
||||||
margin-bottom:30px;
|
margin-bottom:30px;
|
||||||
margin-top:0;
|
margin-top:0;
|
||||||
text-transform:uppercase;
|
|
||||||
font-weight:500;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -220,42 +227,6 @@ h1{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#sub_footer{
|
|
||||||
padding: 0 30px;
|
|
||||||
padding-right:20px;
|
|
||||||
a{
|
|
||||||
text-decoration:none;
|
|
||||||
color:inherit;
|
|
||||||
}
|
|
||||||
i{
|
|
||||||
width:17px;
|
|
||||||
display:inline-block;
|
|
||||||
}
|
|
||||||
p{
|
|
||||||
padding:0;
|
|
||||||
margin:0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#place,#contacts{
|
|
||||||
display:inline-block;
|
|
||||||
padding:25px 0;
|
|
||||||
font-size:14px;
|
|
||||||
color:rgba(0,0,0,0.6);
|
|
||||||
line-height:19px;
|
|
||||||
}
|
|
||||||
#place{
|
|
||||||
padding-right:25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#logos{
|
|
||||||
padding:15px 0;
|
|
||||||
float:right;
|
|
||||||
img{
|
|
||||||
height:90px;
|
|
||||||
margin:0 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#actus{
|
#actus{
|
||||||
padding:20px 0;
|
padding:20px 0;
|
||||||
padding-bottom:50px;
|
padding-bottom:50px;
|
||||||
@ -310,11 +281,11 @@ h2{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#logo_fond{
|
#logo{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:0;
|
top:20px;
|
||||||
left:0;
|
left:25px;
|
||||||
height:190px;
|
height:60px;
|
||||||
z-index:3;
|
z-index:3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,7 +300,9 @@ h2{
|
|||||||
padding-right:20px;
|
padding-right:20px;
|
||||||
padding-top:30px;
|
padding-top:30px;
|
||||||
|
|
||||||
|
font-family:$title_font;
|
||||||
|
text-transform:uppercase;
|
||||||
|
font-weight:700;
|
||||||
|
|
||||||
background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
|
background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
|
||||||
|
|
||||||
@ -343,19 +316,14 @@ h2{
|
|||||||
color:white;
|
color:white;
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
}
|
}
|
||||||
.sub_menu{
|
|
||||||
font-size:0.8em;
|
|
||||||
opacity:0.7;
|
|
||||||
padding-right:10px;
|
|
||||||
|
|
||||||
}
|
|
||||||
.menu{
|
.menu{
|
||||||
padding:10px 0;
|
padding:10px 0;
|
||||||
a{
|
a{
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
padding:0 10px;
|
padding:0 10px;
|
||||||
font-weight:500;
|
font-weight:500;
|
||||||
font-size:1.2em;
|
font-size:1.4em;
|
||||||
text-transform:uppercase;
|
text-transform:uppercase;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -499,4 +467,163 @@ a{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.partners{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
text-align:center;
|
||||||
|
.inner{
|
||||||
|
max-width:1000px;
|
||||||
|
padding:30px 20px;
|
||||||
|
margin:auto;
|
||||||
|
|
||||||
|
}
|
||||||
|
.partner{
|
||||||
|
|
||||||
|
background:white;
|
||||||
|
|
||||||
|
margin:5px;
|
||||||
|
|
||||||
|
display:inline-block;
|
||||||
|
//border:1px solid rgba(white,0.6);
|
||||||
|
padding:15px 10px;
|
||||||
|
&:hover{
|
||||||
|
|
||||||
|
cursor:pointer;
|
||||||
|
|
||||||
|
}
|
||||||
|
.p_inner{
|
||||||
|
width:150px;
|
||||||
|
background:no-repeat center center;
|
||||||
|
background-size:100%;
|
||||||
|
background-size:contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#sub_footer{
|
||||||
|
background:rgba(#20102d, 1);
|
||||||
|
text-align:center;
|
||||||
|
color:white;
|
||||||
|
|
||||||
|
#contacts{
|
||||||
|
padding:0px;
|
||||||
|
padding-top:20px;
|
||||||
|
padding-bottom:140px;
|
||||||
|
text-align:center;
|
||||||
|
font-weight:bold;
|
||||||
|
a{
|
||||||
|
padding:0 10px;
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
h3{
|
||||||
|
color:rgba(white,0.9);
|
||||||
|
text-align:center;
|
||||||
|
font-size:1.7em;
|
||||||
|
padding-top:40px;
|
||||||
|
margin:0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.partners{
|
||||||
|
.inner{max-width:100%;
|
||||||
|
padding-right:5px;
|
||||||
|
padding-left:5px;}
|
||||||
|
|
||||||
|
|
||||||
|
.partner{
|
||||||
|
-webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
|
||||||
|
filter: grayscale(100%);
|
||||||
|
opacity:0.5;
|
||||||
|
|
||||||
|
&:hover{
|
||||||
|
opacity:1;
|
||||||
|
|
||||||
|
-webkit-filter: grayscale(0%); /* Safari 6.0 - 9.0 */
|
||||||
|
filter: grayscale(0%);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#top_band{
|
||||||
|
position:relative;
|
||||||
|
.h1_inner{
|
||||||
|
position:absolute;
|
||||||
|
bottom:0;
|
||||||
|
right:0;
|
||||||
|
left:0;
|
||||||
|
text-align:center;
|
||||||
|
padding:30px 20px;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
h1{
|
||||||
|
display:inline-block;
|
||||||
|
border-bottom:5px solid white;
|
||||||
|
font-size:3em;
|
||||||
|
color:white;
|
||||||
|
padding:0;
|
||||||
|
padding-bottom:0px;
|
||||||
|
margin:0;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.events{
|
||||||
|
text-align:center;
|
||||||
|
vertical-align:top;
|
||||||
|
.event{
|
||||||
|
vertical-align:top;
|
||||||
|
background:white;
|
||||||
|
max-width:700px;
|
||||||
|
margin:60px auto;
|
||||||
|
margin-top:0;
|
||||||
|
box-shadow:0 0 20px rgba(black,0.4);
|
||||||
|
h2{
|
||||||
|
margin:0;
|
||||||
|
padding:25px 20px;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
.img{
|
||||||
|
|
||||||
|
background:no-repeat center center;
|
||||||
|
background-size:100%;
|
||||||
|
background-size:cover;
|
||||||
|
margin:auto;
|
||||||
|
max-width:600px;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.desc{
|
||||||
|
max-width:470px;
|
||||||
|
padding:10px 30px;
|
||||||
|
margin:auto;
|
||||||
|
padding-bottom:30px;
|
||||||
|
text-align:left;
|
||||||
|
min-height:150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,89 +1,83 @@
|
|||||||
# -*- encoding : utf-8 -*-
|
# -*- encoding : utf-8 -*-
|
||||||
|
|
||||||
class Admin::EventsController < ApplicationController
|
class Admin::EventsController < ApplicationController
|
||||||
|
before_filter :auth_admin
|
||||||
|
|
||||||
before_filter :auth_admin
|
|
||||||
|
layout "admin"
|
||||||
|
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
before_filter :find_events
|
before_filter :find_events
|
||||||
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def cible
|
def cible
|
||||||
|
@events = Event.all
|
||||||
|
|
||||||
render :layout => false
|
render :layout => false
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
if params[:event_id] and Event.find(params[:event_id])
|
||||||
@event = Event.new()
|
@event = Event.find(params[:event_id]).dup
|
||||||
|
@event.event_id = params[:event_id]
|
||||||
|
else
|
||||||
|
@event = Event.new(:start_at_date =>[ Date.today.day, Date.today.month, Date.today.year].join("/"), :start_at_time => "20:00")
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
|
||||||
@event = Event.find(params[:id])
|
@event = Event.find(params[:id])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
@event = Event.new(params.require(:event).permit!)
|
||||||
@event = Event.new(event_params)
|
|
||||||
|
|
||||||
|
|
||||||
if @event.save
|
if @event.save
|
||||||
flash[:notice] = "L'event à été ajouté avec succès."
|
|
||||||
self.find_events
|
|
||||||
|
|
||||||
|
|
||||||
|
flash[:notice] = "L'événement à été ajouté avec succès."
|
||||||
|
|
||||||
|
self.find_events #reload events to show new events in the list sort by date.
|
||||||
|
|
||||||
else
|
else
|
||||||
render :action => "new"
|
render :action => "new"
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def update
|
||||||
|
@event = Event.find(params[:id])
|
||||||
|
|
||||||
|
if @event.update_attributes(params.require(:event).permit!)
|
||||||
|
flash[:notice] = "L'événement à été modifié avec succès."
|
||||||
|
else
|
||||||
|
render :action => "edit"
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def update
|
|
||||||
|
|
||||||
@event = Event.find(params[:id])
|
|
||||||
|
|
||||||
|
|
||||||
if params[:event]
|
|
||||||
if @event.update_attributes(event_params)
|
|
||||||
flash[:notice] = "L'event à été modifié avec succès."
|
|
||||||
else
|
|
||||||
render :action => "edit"
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
elsif params[:tag_id]
|
|
||||||
@event.tag_by_tag_ids(params[:tag_id])
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
|
|
||||||
@event = Event.find(params[:id])
|
@event = Event.find(params[:id])
|
||||||
@event.destroy
|
@event.destroy
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def find_events
|
def find_events
|
||||||
@ -92,33 +86,29 @@ class Admin::EventsController < ApplicationController
|
|||||||
start = Date.parse(params[:start]).beginning_of_day
|
start = Date.parse(params[:start]).beginning_of_day
|
||||||
params[:start]= start.strftime('%d/%m/%Y')
|
params[:start]= start.strftime('%d/%m/%Y')
|
||||||
else
|
else
|
||||||
params[:start] = ""
|
params[:start] = "Début"
|
||||||
end
|
end
|
||||||
if params[:stop] and params[:stop] =~ date_regex
|
if params[:stop] and params[:stop] =~ date_regex
|
||||||
stop = Date.parse(params[:stop]).end_of_day
|
stop = Date.parse(params[:stop]).end_of_day
|
||||||
params[:stop]= stop.strftime('%d/%m/%Y')
|
params[:stop]= stop.strftime('%d/%m/%Y')
|
||||||
else
|
else
|
||||||
params[:stop] = ""
|
params[:stop] = "Fin"
|
||||||
end
|
end
|
||||||
|
|
||||||
@events = Event.order('start_at DESC')
|
@events = Event.order('start_at, stop_at')
|
||||||
@events = @events.after(start) if start
|
@events = @events.after(start) if start
|
||||||
@events = @events.before(stop) if stop
|
@events = @events.before(stop) if stop
|
||||||
per_page = (params[:per_page] and params[:per_page] != "") ? params[:per_page] : 5000
|
per_page = (params[:per_page] and params[:per_page] != "") ? params[:per_page] : 20
|
||||||
page = (params[:page] and params[:page] != "") ? params[:page] : 1
|
page = (params[:page] and params[:page] != "") ? params[:page] : 1
|
||||||
@events = @events.page(page).per(per_page)
|
#@events = Event.all.page(page).per(per_page)
|
||||||
|
|
||||||
#@events = Event.order('start_at, stop_at').after(start).before(stop)
|
@events = Event.order('start_at DESC, stop_at DESC')
|
||||||
|
@events = @events.after(start) if start
|
||||||
|
@events = @events.before(stop) if stop
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@events = @events.page(page).per(per_page)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
def event_params
|
|
||||||
params.require(:event).permit(:start_at, :title, :slug, :description, :image_file_id)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
54
app/controllers/admin/partners_controller.rb
Normal file
54
app/controllers/admin/partners_controller.rb
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
# -*- encoding : utf-8 -*-
|
||||||
|
|
||||||
|
class Admin::PartnersController < ApplicationController
|
||||||
|
layout "admin"
|
||||||
|
before_filter :auth_admin
|
||||||
|
|
||||||
|
def index
|
||||||
|
@partners = Partner.all
|
||||||
|
end
|
||||||
|
|
||||||
|
def new
|
||||||
|
@partner = Partner.new
|
||||||
|
end
|
||||||
|
|
||||||
|
def edit
|
||||||
|
@partner = Partner.find(params[:id])
|
||||||
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
@partner = Partner.new(params.require(:partner).permit!)
|
||||||
|
|
||||||
|
|
||||||
|
if @partner.save
|
||||||
|
redirect_to admin_partners_url, notice: 'Url courte crée.'
|
||||||
|
|
||||||
|
else
|
||||||
|
render action: "new"
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def update
|
||||||
|
@partner = Partner.find(params[:id])
|
||||||
|
|
||||||
|
|
||||||
|
if @partner.update_attributes(params.require(:partner).permit!)
|
||||||
|
redirect_to admin_partners_url, notice: 'Url courte modifiée.'
|
||||||
|
|
||||||
|
else
|
||||||
|
render action: "edit"
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
@partner = Partner.find(params[:id])
|
||||||
|
@partner.destroy
|
||||||
|
|
||||||
|
redirect_to admin_partners_url, :notice => "Url courte supprimée."
|
||||||
|
end
|
||||||
|
end
|
27
app/helpers/events_helper.rb
Normal file
27
app/helpers/events_helper.rb
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
module EventsHelper
|
||||||
|
def event_human_date(event, date_format = "%A %e %B %Y", time_format = "%kh%M")
|
||||||
|
|
||||||
|
if event.entire_day?
|
||||||
|
if event.stop_date?
|
||||||
|
if event.start_at.strftime('%d/%m/%Y') == event.stop_at.strftime('%d/%m/%Y')
|
||||||
|
"le <strong>#{l(event.start_at, :format => date_format)}</strong>"
|
||||||
|
else
|
||||||
|
"du <strong>#{l(event.start_at, :format => date_format)}</strong> au <strong>#{l(event.stop_at, :format => date_format)}</strong>"
|
||||||
|
end
|
||||||
|
else
|
||||||
|
"le <strong>#{l(event.start_at, :format => date_format)}</strong>"
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if event.stop_date?
|
||||||
|
if event.start_at.strftime('%d/%m/%Y') == event.stop_at.strftime('%d/%m/%Y')
|
||||||
|
"le <strong>#{l(event.start_at, :format => date_format)}</strong> de <strong>#{l(event.start_at, :format => time_format)}</strong> à <strong>#{l(event.stop_at, :format => time_format)}</strong> "
|
||||||
|
else
|
||||||
|
"du <strong>#{l(event.start_at, :format => date_format)}</strong> à <strong>#{l(event.start_at, :format => time_format)}</strong> au <strong>#{l(event.stop_at, :format => date_format)}</strong> à <strong>#{l(event.stop_at, :format => time_format)}</strong> "
|
||||||
|
end
|
||||||
|
else
|
||||||
|
"le <strong>#{l(event.start_at, :format => date_format)}</strong> à <strong>#{l(event.start_at, :format => time_format)}</strong>"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
@ -5,16 +5,8 @@ class DynamicContent < ActiveRecord::Base
|
|||||||
belongs_to :item
|
belongs_to :item
|
||||||
|
|
||||||
NAMES = {
|
NAMES = {
|
||||||
"militer" => "Index militer",
|
"partners" => "Partenaires",
|
||||||
"detenus" => "Index détenus",
|
"prog" => "Programation",
|
||||||
"index_label" => "Index Label",
|
|
||||||
"index_petitions" => "Index Pétitions",
|
|
||||||
"index_sponsorship" => "Index Parrainages",
|
|
||||||
"contact" => "Formulaire contact",
|
|
||||||
"contact_leg" => "Formulaire contact leg",
|
|
||||||
"contact_militer" => "Formulaire contact militer",
|
|
||||||
"plan" => "Plan du site",
|
|
||||||
"newsletter" => "Formulaire newsletter",
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,54 +1,118 @@
|
|||||||
class Event < ActiveRecord::Base
|
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
|
belongs_to :image_file
|
||||||
|
|
||||||
validates :title, :presence => true
|
|
||||||
validates :slug, :presence => true, :uniqueness => true
|
|
||||||
has_one :block, :as => :blockable
|
|
||||||
|
|
||||||
after_create :after_creation
|
|
||||||
|
|
||||||
before_validation do
|
|
||||||
self.slug = self.title.to_slug
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
after_initialize do
|
# validates :start_at_date, :presence => true, :format => { :with => date_format }
|
||||||
if self.start_at
|
# validates :start_at_time, :presence => true, :format => { :with => hour_format }, :if => :with_time?
|
||||||
self.start_at = self.start_at.strftime('%d/%m/%Y')
|
# validates :stop_at_date, :presence => true, :format => { :with => date_format }, :if => :stop_date
|
||||||
end
|
# validates :stop_at_time, :presence => true, :format => { :with => hour_format }, :if => [:with_time?,:stop_date]
|
||||||
|
|
||||||
end
|
attr_accessor :start_at_date, :start_at_time, :stop_at_date, :stop_at_time, :event_id, :skip_date
|
||||||
|
|
||||||
|
has_one :block, :as => :blockable
|
||||||
|
|
||||||
|
|
||||||
def after_creation
|
|
||||||
@block = Block.new(:block_name => "Contenu")
|
|
||||||
@block.blockable = self
|
|
||||||
@block.save
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
def alloweds_types
|
|
||||||
self.block.allow_types :TitleContent, :TextContent, :ImageContent, :LinkContent, :GalleryContent, :HtmlContent
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
#where("enabled = ?",true ).
|
|
||||||
scope :recents, -> {order("start_at DESC, created_at DESC")}
|
|
||||||
|
|
||||||
scope :between, lambda { |start, stop|
|
scope :between, lambda { |start, stop|
|
||||||
after(start).before(stop)
|
after(start).before(stop)
|
||||||
}
|
}
|
||||||
|
|
||||||
scope :after, lambda { |date|
|
scope :after, lambda { |date|
|
||||||
where("(start_at >= ?)", date )
|
where("(start_at >= ? or stop_at >= ?)", date, date )
|
||||||
}
|
}
|
||||||
scope :before, lambda { |date|
|
scope :before, lambda { |date|
|
||||||
where("(start_at <= ?)", date )
|
where("(stop_at <= ?) or (start_at <= ?)", date, date )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def alloweds_types
|
||||||
|
self.block.allow_types :TitleContent, :TextContent, :ImageContent, :LinkContent, :GalleryContent, :HtmlContent
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
after_create do
|
||||||
|
if self.event_id and Event.where(:id => self.event_id).exists?
|
||||||
|
|
||||||
|
event = Event.find(self.event_id)
|
||||||
|
|
||||||
|
@block = event.block.dup
|
||||||
|
@block.blockable = self
|
||||||
|
@block.save
|
||||||
|
|
||||||
|
else
|
||||||
|
@block = Block.new(:block_name => "general")
|
||||||
|
@block.blockable = self
|
||||||
|
@block.save
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def create_block(event_id=nil)
|
||||||
|
if event_id
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
before_validation do
|
||||||
|
|
||||||
|
if !self.skip_date
|
||||||
|
self.stop_at_date, self.stop_at_time = nil, nil if !self.stop_date
|
||||||
|
self.start_at_time, self.stop_at_time = nil, nil if self.entire_day
|
||||||
|
|
||||||
|
if self.entire_day
|
||||||
|
self.start_at = self.start_at_date.to_s
|
||||||
|
self.stop_at = self.stop_at_date.to_s
|
||||||
|
else
|
||||||
|
self.start_at = self.start_at_date.to_s+" "+self.start_at_time.to_s
|
||||||
|
self.stop_at = self.stop_at_date.to_s+" "+self.stop_at_time.to_s
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.stop_date and self.start_at and (self.stop_at.beginning_of_day != self.start_at.beginning_of_day)
|
||||||
|
self.many_days = true
|
||||||
|
else
|
||||||
|
self.many_days = false
|
||||||
|
end
|
||||||
|
|
||||||
|
true
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def with_time?
|
||||||
|
true if !self.entire_day
|
||||||
|
end
|
||||||
|
|
||||||
|
after_initialize do
|
||||||
|
if self.start_at
|
||||||
|
if self.entire_day
|
||||||
|
self.start_at_date = self.start_at.strftime('%d/%m/%Y')
|
||||||
|
else
|
||||||
|
self.start_at_date = self.start_at.strftime('%d/%m/%Y')
|
||||||
|
self.start_at_time = self.start_at.strftime('%H:%M')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.stop_at
|
||||||
|
if self.entire_day
|
||||||
|
self.stop_at_date = self.stop_at.strftime('%d/%m/%Y')
|
||||||
|
else
|
||||||
|
self.stop_at_date = self.stop_at.strftime('%d/%m/%Y')
|
||||||
|
self.stop_at_time = self.stop_at.strftime('%H:%M')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def human_date
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
7
app/models/partner.rb
Normal file
7
app/models/partner.rb
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
class Partner < ActiveRecord::Base
|
||||||
|
belongs_to :image_file
|
||||||
|
belongs_to :second_image_file, :class_name => "ImageFile"
|
||||||
|
|
||||||
|
validates :name, :presence => true
|
||||||
|
|
||||||
|
end
|
13
app/views/admin/events/_event.html.haml
Normal file
13
app/views/admin/events/_event.html.haml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
%tr#event_row.event_row{:id => event.id}
|
||||||
|
|
||||||
|
%td{:style => "width:400px"}=raw event_human_date(event)
|
||||||
|
%td=event.title
|
||||||
|
|
||||||
|
|
||||||
|
%td.actions{:style => "width:200px;text-align:right;"}
|
||||||
|
= link_to i(:copy), new_admin_event_path(:event_id => event), :remote => true, :style => "padding-right:5px;"
|
||||||
|
= link_to i(:trash), [:admin, event], :confirm => 'Voulez-vous vraiment supprimer cet événement ?', :method => :delete, :remote => true
|
||||||
|
= link_to i(:pencil), edit_admin_event_path(event), :remote => true
|
||||||
|
= link_to i(:plus), edit_admin_event_path(event), :style => "padding:5px;", :class => "show_details"
|
||||||
|
|
||||||
|
|
50
app/views/admin/events/_form.html.haml
Normal file
50
app/views/admin/events/_form.html.haml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
= semantic_form_for [:admin,@event], :remote => true do |form|
|
||||||
|
.content
|
||||||
|
= 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
|
||||||
|
Tout les champs doivent être remplis. Les dates doivent être au format jj/mm/yyyy et les heures au format hh:mm.
|
||||||
|
.div
|
||||||
|
=form.label :start_at_date, "Début :", :style=>"display:inline-block;width:50px"
|
||||||
|
=form.text_field :start_at_date, :id => "event_start_at_date", :class => "datepicker"
|
||||||
|
.event_time{:style => "display:inline;"}
|
||||||
|
=form.label :start_at_time, "heure :"
|
||||||
|
.input-append.bootstrap-timepicke{:style => "display:inline-block;"}
|
||||||
|
=form.text_field :start_at_time, :id => "event_start_at_time", :class => "timepicker input-small", :style => "width:50px"
|
||||||
|
%span.add-on
|
||||||
|
%i.icon-time
|
||||||
|
|
||||||
|
|
||||||
|
=form.check_box :entire_day, :id => "event_entire_day"
|
||||||
|
=form.label :entire_day, "jour entier ?"
|
||||||
|
.div
|
||||||
|
%span.stop_at
|
||||||
|
=form.label :stop_at_date, "Fin :", :style=>"display:inline-block;width:50px"
|
||||||
|
=form.text_field :stop_at_date, :id => "event_stop_at_date", :class => "datepicker"
|
||||||
|
.event_time{:style => "display:inline;"}
|
||||||
|
=form.label :stop_at_time, "heure :"
|
||||||
|
.input-append.bootstrap-timepicke{:style => "display:inline-block;"}
|
||||||
|
=form.text_field :stop_at_time, :id => "event_stop_at_time", :class => "timepicker input-small", :style => "width:50px"
|
||||||
|
%span.add-on
|
||||||
|
%i.icon-time
|
||||||
|
|
||||||
|
|
||||||
|
=form.check_box :stop_date, :id => "event_stop_date"
|
||||||
|
=form.label :stop_date, "fin précisée ?"
|
||||||
|
|
||||||
|
|
||||||
|
= form.inputs do
|
||||||
|
= form.input :description, :label => "Description courte :", :as => :text
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.actions
|
||||||
|
= form.submit "Sauvegarder", :class => "btn"
|
||||||
|
|
||||||
|
:javascript
|
||||||
|
update_event_form();
|
28
app/views/admin/events/_index_block.html.haml
Normal file
28
app/views/admin/events/_index_block.html.haml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
.search_pannel
|
||||||
|
|
||||||
|
=form_tag "", :method => "get", :remote => true do
|
||||||
|
.input-append
|
||||||
|
=text_field_tag :start, params[:start],:class => "datepicker", :placeholder => "Début"
|
||||||
|
%button.btn{:onclick => "$(this).prev('input').val('');"}
|
||||||
|
=i(:remove, :icon => false)
|
||||||
|
|
||||||
|
.input-append
|
||||||
|
=text_field_tag :stop, params[:stop],:class => "datepicker", :placeholder => "Fin"
|
||||||
|
%button.btn
|
||||||
|
=i(:remove, :icon => false)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
=submit_tag "filtrer", :class => "btn", :style => "margin-bottom: 10px;"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%table#events.table.table-hover
|
||||||
|
=render @events
|
||||||
|
#pagination
|
||||||
|
= paginate @events, :remote => true
|
||||||
|
|
||||||
|
|
6
app/views/admin/events/_show.html.haml
Normal file
6
app/views/admin/events/_show.html.haml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#event_show
|
||||||
|
%h1
|
||||||
|
=@event.title
|
||||||
|
%em=event_human_date(@event)
|
||||||
|
|
||||||
|
.desc=simple_format @event.description
|
6
app/views/admin/events/cible.html.haml
Normal file
6
app/views/admin/events/cible.html.haml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
-Event.all.each do |actuality|
|
||||||
|
|
||||||
|
%h4
|
||||||
|
=actuality.title
|
||||||
|
= link_to i(:check_alt, :gray_light,12), "#",:onclick => "manager_send_cible("+actuality.id.to_s+", 'Folder', '#{escape_javascript(actuality.cible_name)}');return false;" if params[:manager]
|
4
app/views/admin/events/create.js.erb
Normal file
4
app/views/admin/events/create.js.erb
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
close_pane_hover();
|
||||||
|
|
||||||
|
$('#events').html("<%= escape_javascript(render(@events))%>");
|
||||||
|
$('#event_row_<%= @event.id %>').effect("highlight", {}, 3000);
|
1
app/views/admin/events/destroy.js.erb
Normal file
1
app/views/admin/events/destroy.js.erb
Normal file
@ -0,0 +1 @@
|
|||||||
|
$('#event_row_<%=@event.id%>').remove();
|
81
app/views/admin/events/edit.html.haml
Normal file
81
app/views/admin/events/edit.html.haml
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
#toolbar-text
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#menu_item_informations
|
||||||
|
%h4
|
||||||
|
Infos sur l'event
|
||||||
|
|
||||||
|
|
||||||
|
.panel#collapseOne{:style => "display:none;"}
|
||||||
|
=render :partial => "form"
|
||||||
|
|
||||||
|
%h4 éléments
|
||||||
|
|
||||||
|
.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")
|
||||||
|
|
||||||
|
|
||||||
|
#collapse3{:style => "display:none;"}
|
||||||
|
%h4 Modifier l'élément
|
||||||
|
|
||||||
|
|
||||||
|
.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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
1
app/views/admin/events/edit.js.erb
Normal file
1
app/views/admin/events/edit.js.erb
Normal file
@ -0,0 +1 @@
|
|||||||
|
show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",850,600);
|
8
app/views/admin/events/index.html.haml
Normal file
8
app/views/admin/events/index.html.haml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
.header
|
||||||
|
.right= link_to 'Ajouter un événement', new_admin_event_path, :class => "btn", :remote => true
|
||||||
|
%h1 Agenda
|
||||||
|
|
||||||
|
#events_index=render :partial => "index_block"
|
||||||
|
|
||||||
|
#event_detail
|
||||||
|
|
1
app/views/admin/events/index.js.erb
Normal file
1
app/views/admin/events/index.js.erb
Normal file
@ -0,0 +1 @@
|
|||||||
|
$('#events_index').html("<%= escape_javascript(render(:partial => "index_block"))%>");
|
2
app/views/admin/events/new.js.erb
Normal file
2
app/views/admin/events/new.js.erb
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",850,600);
|
||||||
|
|
5
app/views/admin/events/update.js.erb
Normal file
5
app/views/admin/events/update.js.erb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
close_pane_hover();
|
||||||
|
|
||||||
|
$('#event_show').replaceWith("<%= escape_javascript(render(:partial => "show"))%>");
|
||||||
|
$('#events').html("<%= escape_javascript(render(@events))%>");
|
||||||
|
$('#event_row_<%= @event.id %>').effect("highlight", {}, 3000);
|
9
app/views/admin/partners/_form.html.haml
Normal file
9
app/views/admin/partners/_form.html.haml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
= semantic_form_for([:admin, @partner]) do |f|
|
||||||
|
=f.inputs do
|
||||||
|
= f.input :image_file_id, :label => "Image générale :" , :as => :qi_image_select
|
||||||
|
= f.input :name, :label => "Nom :"
|
||||||
|
= f.input :description, :label => "Description:"
|
||||||
|
= f.input :url, :label => "Url :"
|
||||||
|
|
||||||
|
= f.submit "Sauvegarder", :class => "btn btn-primary"
|
||||||
|
|
14
app/views/admin/partners/edit.html.haml
Normal file
14
app/views/admin/partners/edit.html.haml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
.qi_header
|
||||||
|
%h1
|
||||||
|
|
||||||
|
Url courtes
|
||||||
|
%span
|
||||||
|
modifier une url
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.qi_row
|
||||||
|
.qi_pannel.qi_plain.padding
|
||||||
|
= render 'form'
|
||||||
|
|
||||||
|
|
28
app/views/admin/partners/index.html.haml
Normal file
28
app/views/admin/partners/index.html.haml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
.qi_header
|
||||||
|
.right= link_to ic(:plus)+' Ajouter un partenaire', new_admin_partner_path, :class => "btn btn-primary"
|
||||||
|
%h1
|
||||||
|
|
||||||
|
Partenaires
|
||||||
|
|
||||||
|
|
||||||
|
.qi_row
|
||||||
|
.qi_pannel.qi_plain.padding
|
||||||
|
%h1 Liste des urls courtes
|
||||||
|
|
||||||
|
%table.stat_table.table.table-striped.table-hover
|
||||||
|
%tr
|
||||||
|
%th
|
||||||
|
%th Nom / desc
|
||||||
|
%th
|
||||||
|
|
||||||
|
|
||||||
|
- @partners.each do |partner|
|
||||||
|
%tr
|
||||||
|
%td= image_tag partner.image_file.file.large.medium.small
|
||||||
|
%td
|
||||||
|
= partner.name
|
||||||
|
= simple_format partner.description
|
||||||
|
%td.actions
|
||||||
|
= link_to i(:"trash-o"), [:admin, partner], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer ce partenaire ?' }
|
||||||
|
= link_to i(:pencil), edit_admin_partner_path(partner)
|
||||||
|
|
14
app/views/admin/partners/new.html.haml
Normal file
14
app/views/admin/partners/new.html.haml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
.qi_header
|
||||||
|
%h1
|
||||||
|
|
||||||
|
Url courtes
|
||||||
|
%span
|
||||||
|
ajouter une url
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.qi_row
|
||||||
|
.qi_pannel.qi_plain.padding
|
||||||
|
= render 'form'
|
||||||
|
|
||||||
|
|
@ -70,7 +70,11 @@
|
|||||||
%li.divider
|
%li.divider
|
||||||
%li= link_to "Sliders", admin_home_slider_path(1)
|
%li= link_to "Sliders", admin_home_slider_path(1)
|
||||||
|
|
||||||
%li= link_to "Contacts", admin_contacts_path
|
|
||||||
|
%li= link_to "Partenaires", admin_partners_path
|
||||||
|
%li= link_to "Evénements", admin_events_path
|
||||||
|
|
||||||
|
%li=# link_to "Contacts", admin_contacts_path
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,8 +69,8 @@
|
|||||||
|
|
||||||
= stylesheet_link_tag 'public', :media => :all
|
= stylesheet_link_tag 'public', :media => :all
|
||||||
|
|
||||||
<link href="https://fonts.googleapis.com/css?family=Galada|Lato:400,900|Roboto+Slab:400,700" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Oswald:700" rel="stylesheet">
|
||||||
<script src="https://f.vimeocdn.com/js/froogaloop2.min.js"></script>
|
= stylesheet_link_tag '/fonts/caviar_dreams/stylesheet.css'
|
||||||
=javascript_include_tag "https://maps.googleapis.com/maps/api/js?libraries=places,geometry&sensor=false"
|
=javascript_include_tag "https://maps.googleapis.com/maps/api/js?libraries=places,geometry&sensor=false"
|
||||||
|
|
||||||
|
|
||||||
@ -157,7 +157,7 @@
|
|||||||
|
|
||||||
|
|
||||||
-else
|
-else
|
||||||
.slide_home_wrapper.with_ratio{:style => "background-image:url('#{@img_url}');", :data => {:ratio => 0.35}}
|
#top_band.slide_home_wrapper.with_ratio{:style => "background-image:url('#{@img_url}');", :data => {:ratio => 0.35}}
|
||||||
|
|
||||||
|
|
||||||
#menu_top
|
#menu_top
|
||||||
@ -165,8 +165,10 @@
|
|||||||
=render :partial => "public/shared/second_menu"
|
=render :partial => "public/shared/second_menu"
|
||||||
.menu
|
.menu
|
||||||
=render :partial => "public/shared/first_menu"
|
=render :partial => "public/shared/first_menu"
|
||||||
|
=link_to image_tag("/logo.png", :id => "logo"), "/"
|
||||||
|
-if @title and (!@menu_item or @menu_item.id != 1)
|
||||||
|
.h1_inner
|
||||||
|
%h1=@title
|
||||||
|
|
||||||
-if @menu_item and @menu_item.id == 1
|
-if @menu_item and @menu_item.id == 1
|
||||||
#main=yield
|
#main=yield
|
||||||
@ -185,7 +187,10 @@
|
|||||||
.contact_form.contact_militer#form
|
.contact_form.contact_militer#form
|
||||||
=render :partial => "public/contacts/form"
|
=render :partial => "public/contacts/form"
|
||||||
#sub_footer
|
#sub_footer
|
||||||
|
%h3 Nos partenaires
|
||||||
|
|
||||||
|
=render :partial => "public/partners/partners"
|
||||||
|
|
||||||
#logos
|
#logos
|
||||||
|
|
||||||
|
|
||||||
@ -197,7 +202,8 @@
|
|||||||
#contacts
|
#contacts
|
||||||
|
|
||||||
%p
|
%p
|
||||||
|
=link_to "Menstions légales", "/fr/mentions-legales.html", :target => "_blank"
|
||||||
|
=link_to "Contactez-nous", "mailto:fraternelle-rugby-moirans@orange.fr"
|
||||||
|
|
||||||
.clear
|
.clear
|
||||||
|
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
-@contact = @contact || Contact.new(:raison_id => 1, :survey_set_id => params[:id])
|
|
||||||
|
|
||||||
.contact_form.contact_militer#form
|
|
||||||
=render :partial => "public/contacts/form"
|
|
@ -1,4 +0,0 @@
|
|||||||
-@contact = @contact || Contact.new(:raison_id => 2, :survey_set_id => params[:id])
|
|
||||||
|
|
||||||
.contact_form.contact_militer#form
|
|
||||||
=render :partial => "public/contacts/form"
|
|
@ -1,4 +0,0 @@
|
|||||||
-@contact = @contact || Contact.new(:raison_id => 4, :survey_set_id => params[:id])
|
|
||||||
|
|
||||||
.contact_form.contact_militer#form
|
|
||||||
=render :partial => "public/contacts/form"
|
|
@ -1,39 +0,0 @@
|
|||||||
.detenus_container
|
|
||||||
.detenus
|
|
||||||
-DetenuGroup.order("name").each do |detenu_group|
|
|
||||||
.detenu_group
|
|
||||||
%h4=detenu_group.name
|
|
||||||
|
|
||||||
-if detenu_group.detenus.count > 0
|
|
||||||
-detenu_group.detenus.order("name").each do |detenu|
|
|
||||||
.detenu
|
|
||||||
=detenu.name
|
|
||||||
-if detenu.sexe == 1
|
|
||||||
=ic :mars
|
|
||||||
|
|
||||||
-if detenu.sexe == 2
|
|
||||||
=ic :venus
|
|
||||||
|
|
||||||
-if detenu.link?
|
|
||||||
=link_to "(+ d'infos)", detenu.link, :target => "_blank", :style => "font-size:0.85em"
|
|
||||||
|
|
||||||
.desc
|
|
||||||
-if detenu.age_text?
|
|
||||||
=detenu.age_text
|
|
||||||
-if detenu.age_text? and detenu.free_text?
|
|
||||||
= "-"
|
|
||||||
-if detenu.free_text?
|
|
||||||
%span.free_text
|
|
||||||
=ic :"chain-broken"
|
|
||||||
=detenu.free_text
|
|
||||||
|
|
||||||
-if detenu.provisoire
|
|
||||||
%span.ident
|
|
||||||
|
|
||||||
en cours d'identification
|
|
||||||
|
|
||||||
|
|
||||||
-else
|
|
||||||
.none
|
|
||||||
Enquête en cours
|
|
||||||
|
|
@ -1,105 +0,0 @@
|
|||||||
-if @admin
|
|
||||||
.dynamic
|
|
||||||
Label
|
|
||||||
|
|
||||||
|
|
||||||
.index_label
|
|
||||||
%h3 Découvrez les marques 100% labélisées
|
|
||||||
|
|
||||||
-NewLabelEntreprise.order("name").all.each do |new_label_entreprise|
|
|
||||||
=link_to new_label_entreprise.website, :target => "_blank" do
|
|
||||||
.label_marque_img
|
|
||||||
.inner_logo{:style => "background-image:url('#{new_label_entreprise.image_file.file.large.medium.url if new_label_entreprise.image_file}');"}
|
|
||||||
-if !new_label_entreprise.image_file
|
|
||||||
.inner_title
|
|
||||||
=new_label_entreprise.name
|
|
||||||
|
|
||||||
%h3 Découvrez les produits labellisés des marques suivantes
|
|
||||||
|
|
||||||
-LabelMarque.order("name").all.each do |label_marque|
|
|
||||||
=link_to "/public/label_produits?search=true&q=&label_marque_id=#{label_marque.id}", :target => "_blank" do
|
|
||||||
.label_marque_img
|
|
||||||
.inner_logo{:style => "background-image:url('#{label_marque.image_file.file.large.medium.url if label_marque.image_file}');"}
|
|
||||||
-if !label_marque.image_file
|
|
||||||
.inner_title
|
|
||||||
=label_marque.name
|
|
||||||
|
|
||||||
:scss
|
|
||||||
.index_label{
|
|
||||||
text-align:center;
|
|
||||||
h3{
|
|
||||||
text-align:center;
|
|
||||||
margin-top:30px;
|
|
||||||
margin-bottom:20px;
|
|
||||||
}
|
|
||||||
.label_marque_img{
|
|
||||||
|
|
||||||
height:140px;
|
|
||||||
width:140px;
|
|
||||||
margin:2px;
|
|
||||||
padding:5px;
|
|
||||||
|
|
||||||
display:inline-block;
|
|
||||||
|
|
||||||
position:relative;
|
|
||||||
border:1px solid rgba(0,0,0,0.1);
|
|
||||||
.inner_logo{
|
|
||||||
position:absolute;
|
|
||||||
left:12px;
|
|
||||||
right:12px;
|
|
||||||
top:12px;
|
|
||||||
bottom:12px;
|
|
||||||
background:center center no-repeat;
|
|
||||||
background-size:100%;
|
|
||||||
background-size:contain;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
.inner_title{
|
|
||||||
position:absolute;
|
|
||||||
left:0;
|
|
||||||
right:0;
|
|
||||||
top:60px;
|
|
||||||
text-align:center;
|
|
||||||
color:black;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.bottom_subpages
|
|
||||||
-@menu_item.children.order(:position).each do |menu_item|
|
|
||||||
|
|
||||||
-menu_item_lang = menu_item.menu_item_langs.find_by_lang_site_id(@lang.id)
|
|
||||||
|
|
||||||
|
|
||||||
-name = menu_item_lang.name
|
|
||||||
-if menu_item_lang.enabled == true and menu_item_lang.visible == true
|
|
||||||
-if menu_item.image_file
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-img_url = menu_item.image_file.file.large.medium.url
|
|
||||||
|
|
||||||
-if menu_item.image_file and menu_item.image_file.photograph
|
|
||||||
-@page_images_credits << menu_item.image_file.photograph
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-css_style = "background-image:url('#{img_url}');background-size:100%;background-size:cover;background-position:center center;display:block;min-height:50px;"
|
|
||||||
|
|
||||||
|
|
||||||
.subpage_link
|
|
||||||
=link_to @one_voice_host.to_s+menu_item_path(:url => menu_item_lang.url, :lang => @lang.slug) , :class => "with_ratio" do
|
|
||||||
.with_ratio{:style => css_style, :data => {:ratio => 0.62}}
|
|
||||||
|
|
||||||
|
|
||||||
.overlay
|
|
||||||
|
|
||||||
|
|
||||||
%h4.title
|
|
||||||
=menu_item.menu_item_langs.find_by_lang_site_id(@lang.id).name
|
|
@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
-@petitions = Petition.joins(:petition_langs).where(:petition_langs => {:lang_site_id => @lang.id, :enabled => true}).order("position ASC")
|
|
||||||
|
|
||||||
.petitions_index
|
|
||||||
.petition_first_page
|
|
||||||
=render :collection => @petitions[0..8], :partial => "public/petitions/petition"
|
|
||||||
.cta{:style => "text-align:center;margin:20px 0;"}
|
|
||||||
=link_to qit("Voir plus de pétitions >"), "#", :onclick => "$(this).closest('.petitions_index').find('.petition_more').show();$(this).closest('.cta').hide();return false;", :class => "btn"
|
|
||||||
.petition_more{:style => "display:none;"}
|
|
||||||
=render :collection => @petitions[9..@petitions.size], :partial => "public/petitions/petition"
|
|
@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
-@sponsorship_animals = SponsorshipAnimal.where(:enabled => true).order(:position).all
|
|
||||||
|
|
||||||
|
|
||||||
.sponsorship_index
|
|
||||||
=render :collection => @sponsorship_animals, :partial => "public/sponsorship_animals/sponsorship_animal"
|
|
@ -1,71 +0,0 @@
|
|||||||
|
|
||||||
-begin
|
|
||||||
-params[:cat] = params[:cat] || 3
|
|
||||||
-@militer_cat = MiliterCat.find(params[:cat])
|
|
||||||
|
|
||||||
%a{:id => "documents"}
|
|
||||||
.militer_index
|
|
||||||
.main_container
|
|
||||||
%h3 Documents
|
|
||||||
|
|
||||||
-MiliterCat.where(:parent_id => nil).order("position").all.each do |militer_cat|
|
|
||||||
-if I18n.locale == :fr
|
|
||||||
-name =militer_cat.name
|
|
||||||
-else
|
|
||||||
-name = militer_cat.english_name
|
|
||||||
|
|
||||||
=link_to raw(name), "?cat=#{militer_cat.id}#documents", :class => ("active" if @militer_cat and militer_cat.id == @militer_cat.id), :data => {:id => militer_cat.id}
|
|
||||||
|
|
||||||
.militer
|
|
||||||
|
|
||||||
|
|
||||||
-ig = 0
|
|
||||||
-@militer_cat.children.order("position").each do |militer_cat|
|
|
||||||
-ig += 1
|
|
||||||
|
|
||||||
%h3
|
|
||||||
.right
|
|
||||||
%span.plus{:style => ("display:none;" if ig == 1)} +
|
|
||||||
%span.moins{:style => ("display:block;" if ig == 1)}= "-"
|
|
||||||
=militer_cat.name
|
|
||||||
.militer_content{:style => ("display:block;" if ig == 1)}
|
|
||||||
-i = 0
|
|
||||||
.row
|
|
||||||
-militer_cat.data_files.where(:lang_site_id => @lang.id).order("militer_position DESC, created_at DESC").each do |data_file|
|
|
||||||
-i += 1
|
|
||||||
|
|
||||||
=render data_file
|
|
||||||
|
|
||||||
-if i== 2
|
|
||||||
-i = 0
|
|
||||||
=raw "</div><div class='clear'></div><div class='row'>"
|
|
||||||
.clear
|
|
||||||
|
|
||||||
.clear
|
|
||||||
|
|
||||||
-i = 0
|
|
||||||
.row
|
|
||||||
-@militer_cat.data_files.where(:lang_site_id => @lang.id).order("militer_position DESC, created_at DESC").each do |data_file|
|
|
||||||
-i += 1
|
|
||||||
|
|
||||||
=render data_file
|
|
||||||
|
|
||||||
-if i== 2
|
|
||||||
-i = 0
|
|
||||||
=raw "</div><div class='clear'></div><div class='row'>"
|
|
||||||
.clear
|
|
||||||
|
|
||||||
|
|
||||||
%br
|
|
||||||
%br
|
|
||||||
%br
|
|
||||||
|
|
||||||
:coffeescript
|
|
||||||
$(".militer h3").click ->
|
|
||||||
$(this).next(".militer_content").toggle()
|
|
||||||
$(this).find(".plus").toggle()
|
|
||||||
$(this).find(".moins").toggle()
|
|
||||||
|
|
||||||
-rescue
|
|
||||||
=""
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
-if @admin
|
|
||||||
plan du site
|
|
||||||
-else
|
|
||||||
#newsletter_form
|
|
||||||
-@registrant = @registrant || Registrant.new
|
|
||||||
=semantic_form_for [:public, @registrant], :remote => true do |f|
|
|
||||||
=hidden_field_tag :popup, true
|
|
||||||
%table{:style => "width:100%;max-width:450px;margin:20px auto;"}
|
|
||||||
%tr
|
|
||||||
%td.email=f.input :email, :placeholder => qit("newsletter-home_place_holder-3","Mon email"), :label => false
|
|
||||||
%td{:style => "width:120px;vertical-align:top"}
|
|
||||||
=link_to qit("newsletter-submit-3","S'abonner >"), "#", :class => "btn orange", :onclick => "$(this).closest('form').submit();return false;"
|
|
4
app/views/portlets/dynamic_contents/_partners.html.haml
Normal file
4
app/views/portlets/dynamic_contents/_partners.html.haml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
-if @admin
|
||||||
|
Partenaires
|
||||||
|
-else
|
||||||
|
=render :partial => "public/partners/partners"
|
@ -1,66 +0,0 @@
|
|||||||
-if @admin
|
|
||||||
plan du site
|
|
||||||
-else
|
|
||||||
=raw "</div>"
|
|
||||||
.plan_sub
|
|
||||||
.inner
|
|
||||||
=link_to qit("Médiathèque"), search_path(:media => true)
|
|
||||||
=link_to qit("Presse"), search_path(:press => true)
|
|
||||||
=link_to qit("Documentation"), search_path(:doc => true)
|
|
||||||
=link_to qit("Boutique"), "/fr/boutique.html"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
=raw "<div class='main row-fluid'>"
|
|
||||||
|
|
||||||
.plan_body
|
|
||||||
|
|
||||||
|
|
||||||
-MenuItem.where(:parent_id => nil, :menu_id => 2).order(:position).each do |menu_item|
|
|
||||||
-description = ""
|
|
||||||
-description = menu_item.menu_content.description if menu_item.menu_content and menu_item.menu_content_type == "Page"
|
|
||||||
-if menu_item_link(menu_item) and menu_item_link(menu_item) != ""
|
|
||||||
|
|
||||||
%h3
|
|
||||||
=menu_item_link(menu_item)
|
|
||||||
|
|
||||||
-MenuItem.where(:id => menu_item.id).each do |menu_item|
|
|
||||||
.plan_sub_menu{:class => "plan_sub_"+menu_item.id.to_s }
|
|
||||||
|
|
||||||
|
|
||||||
.inner
|
|
||||||
|
|
||||||
|
|
||||||
%ul
|
|
||||||
-MenuItem.where(:parent_id => menu_item.id).order(:position).each do |menu_item|
|
|
||||||
|
|
||||||
-menu_item_lang = menu_item.menu_item_langs.find_by_lang_site_id(@lang.id)
|
|
||||||
|
|
||||||
|
|
||||||
-name = menu_item_lang.name
|
|
||||||
-if menu_item_lang.enabled == true and menu_item_lang.visible == true #and menu_item.menu_content.page_type_id == 4
|
|
||||||
|
|
||||||
%li
|
|
||||||
=link_to @one_voice_host.to_s+menu_item_path(:url => menu_item_lang.url, :lang => @lang.slug) , :class => "chapitre_link "+("active" if @menu_item and menu_item.id == @menu_item.id).to_s do
|
|
||||||
=menu_item.menu_item_langs.find_by_lang_site_id(@lang.id).name
|
|
||||||
=">"
|
|
||||||
|
|
||||||
|
|
||||||
%ul
|
|
||||||
-MenuItem.where(:parent_id => menu_item.id).order(:position).each do |menu_item|
|
|
||||||
|
|
||||||
-menu_item_lang = menu_item.menu_item_langs.find_by_lang_site_id(@lang.id)
|
|
||||||
|
|
||||||
|
|
||||||
-name = menu_item_lang.name
|
|
||||||
-if menu_item_lang.enabled == true and menu_item_lang.visible == true and menu_item.menu_content.page_type_id == 2
|
|
||||||
|
|
||||||
%li
|
|
||||||
=link_to @one_voice_host.to_s+menu_item_path(:url => menu_item_lang.url, :lang => @lang.slug) , :class => "chapitre_link "+("active" if @menu_item and menu_item.id == @menu_item.id).to_s do
|
|
||||||
=menu_item.menu_item_langs.find_by_lang_site_id(@lang.id).name
|
|
||||||
=">"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%h3=link_to "blog", articles_path(:lang => @lang.slug)
|
|
4
app/views/portlets/dynamic_contents/_prog.html.haml
Normal file
4
app/views/portlets/dynamic_contents/_prog.html.haml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
-if @admin
|
||||||
|
Programmation
|
||||||
|
-else
|
||||||
|
=render :partial => "public/events/events"
|
5
app/views/public/events/_event.html.haml
Normal file
5
app/views/public/events/_event.html.haml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.event.with_ratio
|
||||||
|
%h2=event.title
|
||||||
|
.img.with_ratio{:style => "background-image:url('#{event.image_file.file}');", :data => {:ratio => 0.5}}
|
||||||
|
.desc
|
||||||
|
=simple_format event.description
|
7
app/views/public/events/_events.html.haml
Normal file
7
app/views/public/events/_events.html.haml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
.events
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
=render Event.all
|
||||||
|
|
||||||
|
.clear
|
11
app/views/public/partners/_partners.html.haml
Normal file
11
app/views/public/partners/_partners.html.haml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
.partners
|
||||||
|
.inner
|
||||||
|
-Partner.order("RAND()").all.each do |partner|
|
||||||
|
-if partner.url?
|
||||||
|
=link_to partner.url, :target => "_blank" do
|
||||||
|
.partner
|
||||||
|
.p_inner.with_ratio{:style => "background-image:url('#{partner.image_file.file.large.medium.small}');", :data => {:ratio => 0.7}}
|
||||||
|
-else
|
||||||
|
.partner
|
||||||
|
.p_inner.with_ratio{:style => "background-image:url('#{partner.image_file.file.large.medium.small}');", :data => {:ratio => 0.7}}
|
||||||
|
|
@ -111,7 +111,8 @@ Rails.application.routes.draw do
|
|||||||
end
|
end
|
||||||
|
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
|
resources :partners
|
||||||
|
resources :events
|
||||||
|
|
||||||
resources :mail_contents
|
resources :mail_contents
|
||||||
resources :mail_templates
|
resources :mail_templates
|
||||||
|
18
db/migrate/20150309094403_create_events.rb
Normal file
18
db/migrate/20150309094403_create_events.rb
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
class CreateEvents < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :events do |t|
|
||||||
|
t.string :title
|
||||||
|
t.text :description
|
||||||
|
t.text :long_desc
|
||||||
|
t.datetime :start_at
|
||||||
|
t.boolean :entire_day
|
||||||
|
t.boolean :stop_date
|
||||||
|
t.datetime :stop_at
|
||||||
|
t.boolean :many_days
|
||||||
|
t.integer :image_file_id
|
||||||
|
t.string :video
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
15
db/migrate/20190302142600_create_partners.rb
Normal file
15
db/migrate/20190302142600_create_partners.rb
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
class CreatePartners < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :partners do |t|
|
||||||
|
t.string :name
|
||||||
|
t.string :url
|
||||||
|
t.text :description
|
||||||
|
t.integer :image_file_id
|
||||||
|
t.integer :second_image_file_id
|
||||||
|
t.integer :position
|
||||||
|
t.boolean :princip, :default => false
|
||||||
|
|
||||||
|
t.timestamps null: false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
29
db/schema.rb
29
db/schema.rb
@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20181108173915) do
|
ActiveRecord::Schema.define(version: 20190302142600) do
|
||||||
|
|
||||||
create_table "admin_admin_roles", force: :cascade do |t|
|
create_table "admin_admin_roles", force: :cascade do |t|
|
||||||
t.integer "admin_id", limit: 4
|
t.integer "admin_id", limit: 4
|
||||||
@ -349,6 +349,21 @@ ActiveRecord::Schema.define(version: 20181108173915) do
|
|||||||
|
|
||||||
add_index "edit_watchers", ["admin_id"], name: "index_edit_watchers_on_admin_id", using: :btree
|
add_index "edit_watchers", ["admin_id"], name: "index_edit_watchers_on_admin_id", using: :btree
|
||||||
|
|
||||||
|
create_table "events", force: :cascade do |t|
|
||||||
|
t.string "title", limit: 255
|
||||||
|
t.text "description", limit: 65535
|
||||||
|
t.text "long_desc", limit: 65535
|
||||||
|
t.datetime "start_at"
|
||||||
|
t.boolean "entire_day"
|
||||||
|
t.boolean "stop_date"
|
||||||
|
t.datetime "stop_at"
|
||||||
|
t.boolean "many_days"
|
||||||
|
t.integer "image_file_id", limit: 4
|
||||||
|
t.string "video", limit: 255
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "external_links", force: :cascade do |t|
|
create_table "external_links", force: :cascade do |t|
|
||||||
t.string "title", limit: 255
|
t.string "title", limit: 255
|
||||||
t.text "description", limit: 65535
|
t.text "description", limit: 65535
|
||||||
@ -774,6 +789,18 @@ ActiveRecord::Schema.define(version: 20181108173915) do
|
|||||||
t.string "civilite", limit: 255
|
t.string "civilite", limit: 255
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "partners", force: :cascade do |t|
|
||||||
|
t.string "name", limit: 255
|
||||||
|
t.string "url", limit: 255
|
||||||
|
t.text "description", limit: 65535
|
||||||
|
t.integer "image_file_id", limit: 4
|
||||||
|
t.integer "second_image_file_id", limit: 4
|
||||||
|
t.integer "position", limit: 4
|
||||||
|
t.boolean "princip", default: false
|
||||||
|
t.datetime "created_at", null: false
|
||||||
|
t.datetime "updated_at", null: false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "popup_popupables", force: :cascade do |t|
|
create_table "popup_popupables", force: :cascade do |t|
|
||||||
t.integer "popup_id", limit: 4
|
t.integer "popup_id", limit: 4
|
||||||
t.integer "popupable_id", limit: 4
|
t.integer "popupable_id", limit: 4
|
||||||
|
BIN
public/fonts/caviar_dreams/CaviarDreams-webfont.woff
Executable file
BIN
public/fonts/caviar_dreams/CaviarDreams-webfont.woff
Executable file
Binary file not shown.
BIN
public/fonts/caviar_dreams/CaviarDreams_BoldItalic-webfont.woff
Executable file
BIN
public/fonts/caviar_dreams/CaviarDreams_BoldItalic-webfont.woff
Executable file
Binary file not shown.
BIN
public/fonts/caviar_dreams/CaviarDreams_Italic-webfont.woff
Executable file
BIN
public/fonts/caviar_dreams/CaviarDreams_Italic-webfont.woff
Executable file
Binary file not shown.
BIN
public/fonts/caviar_dreams/Caviar_Dreams_Bold-webfont.woff
Executable file
BIN
public/fonts/caviar_dreams/Caviar_Dreams_Bold-webfont.woff
Executable file
Binary file not shown.
56
public/fonts/caviar_dreams/stylesheet.css
Executable file
56
public/fonts/caviar_dreams/stylesheet.css
Executable file
@ -0,0 +1,56 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: 'caviar_dreams';
|
||||||
|
src: url('CaviarDreams-webfont.eot');
|
||||||
|
src: url('CaviarDreams-webfont.eot?#iefix') format('embedded-opentype'),
|
||||||
|
url('CaviarDreams-webfont.woff2') format('woff2'),
|
||||||
|
url('CaviarDreams-webfont.woff') format('woff'),
|
||||||
|
url('CaviarDreams-webfont.ttf') format('truetype'),
|
||||||
|
url('CaviarDreams-webfont.svg#caviar_dreamsregular') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'caviar_dreams';
|
||||||
|
src: url('CaviarDreams_Italic-webfont.eot');
|
||||||
|
src: url('CaviarDreams_Italic-webfont.eot?#iefix') format('embedded-opentype'),
|
||||||
|
url('CaviarDreams_Italic-webfont.woff2') format('woff2'),
|
||||||
|
url('CaviarDreams_Italic-webfont.woff') format('woff'),
|
||||||
|
url('CaviarDreams_Italic-webfont.ttf') format('truetype'),
|
||||||
|
url('CaviarDreams_Italic-webfont.svg#caviar_dreamsitalic') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: italic;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'caviar_dreams';
|
||||||
|
src: url('Caviar_Dreams_Bold-webfont.eot');
|
||||||
|
src: url('Caviar_Dreams_Bold-webfont.eot?#iefix') format('embedded-opentype'),
|
||||||
|
url('Caviar_Dreams_Bold-webfont.woff2') format('woff2'),
|
||||||
|
url('Caviar_Dreams_Bold-webfont.woff') format('woff'),
|
||||||
|
url('Caviar_Dreams_Bold-webfont.ttf') format('truetype'),
|
||||||
|
url('Caviar_Dreams_Bold-webfont.svg#caviar_dreamsbold') format('svg');
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: normal;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'caviar_dreams';
|
||||||
|
src: url('CaviarDreams_BoldItalic-webfont.eot');
|
||||||
|
src: url('CaviarDreams_BoldItalic-webfont.eot?#iefix') format('embedded-opentype'),
|
||||||
|
url('CaviarDreams_BoldItalic-webfont.woff2') format('woff2'),
|
||||||
|
url('CaviarDreams_BoldItalic-webfont.woff') format('woff'),
|
||||||
|
url('CaviarDreams_BoldItalic-webfont.ttf') format('truetype'),
|
||||||
|
url('CaviarDreams_BoldItalic-webfont.svg#caviar_dreamsbold_italic') format('svg');
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: italic;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
BIN
public/logo.png
Normal file
BIN
public/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
19
test/fixtures/partners.yml
vendored
Normal file
19
test/fixtures/partners.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||||
|
|
||||||
|
one:
|
||||||
|
name: MyString
|
||||||
|
url: MyString
|
||||||
|
description: MyText
|
||||||
|
image_file_id: 1
|
||||||
|
second_image_file_id: 1
|
||||||
|
position: 1
|
||||||
|
princip: false
|
||||||
|
|
||||||
|
two:
|
||||||
|
name: MyString
|
||||||
|
url: MyString
|
||||||
|
description: MyText
|
||||||
|
image_file_id: 1
|
||||||
|
second_image_file_id: 1
|
||||||
|
position: 1
|
||||||
|
princip: false
|
7
test/models/partner_test.rb
Normal file
7
test/models/partner_test.rb
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class PartnerTest < ActiveSupport::TestCase
|
||||||
|
# test "the truth" do
|
||||||
|
# assert true
|
||||||
|
# end
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user