assets & diaporama accueil

This commit is contained in:
Nicolas Bally 2012-02-12 16:03:16 +01:00
parent 4ccc167ef9
commit 19cc3c6765
97 changed files with 323 additions and 52 deletions

View File

@ -62,6 +62,7 @@ GEM
json (1.6.3)
kaminari (0.12.4)
rails (>= 3.0.0)
kgio (2.7.2)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
@ -95,6 +96,7 @@ GEM
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
raindrops (0.8.0)
rake (0.9.2.2)
rdoc (3.11)
json (~> 1.4)
@ -120,6 +122,10 @@ GEM
uglifier (1.1.0)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
unicorn (4.2.0)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
warden (1.1.0)
rack (>= 1.0)
@ -142,3 +148,4 @@ DEPENDENCIES
sass-rails (~> 3.1.5)
turn (= 0.8.2)
uglifier (>= 1.0.3)
unicorn

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

View File

@ -8,6 +8,7 @@
*= require_tree ./qi_cms
*= require_tree ./events
*= require_tree ./actualities
*= require_tree ./articles
*/

View File

@ -0,0 +1,146 @@
#articles_index{
position:fixed;
top:85px;
right:0px;
bottom:0px;
left:0px;
overflow:auto;
padding-top:50px;
width:100%;
padding-bottom:60px;
#pagination{
position:fixed;
bottom:0px;
left:0px;
right:0px;
padding:10px;
background:rgba(0,0,0,0.8);
a, .current{
background:white;
display:inline-block;
padding:5px 10px 5px 10px;
font-weight:bold;
border-radius:20px;
font-size:14px;
color:rgba(0,0,0,0.8);
&:hover{
box-shadow: 0 0px 8px rgba(0,0,0,0.5);
background-image: -webkit-linear-gradient(#FCEDA7,#FADB4E);
background-image: -webkit-linear-gradient(#FCEDA7,#FADB4E);
color:white;
text-shadow: rgba(0,0,0,0.8) 0px 0px 3px;
}
}
.current{
background:transparent;
color:white;
text-shadow: rgba(0,0,0,0.8) 0px 0px 3px;
border:1px solid white;
&:hover{
@extend .current
}
}
}
.search_pannel{
height:35px;
position:fixed;
top:85px;
right:0px;
left:0px;
background:rgba(143,193,46,0.9);
padding:10px;
text-align:right;
box-shadow: inset 0 8px 8px -8px rgba(0,0,0,0.4), inset 0 -8px 8px -8px rgba(0,0,0,0.4);
}
table{
td{
padding:10px;
}
.active{
td{
box-shadow: inset 0 8px 8px -8px rgba(0,0,0,0.4), inset 0 -8px 8px -8px rgba(0,0,0,0.4);
}
}
tr{
td:first-of-type{
padding-left:20px;
}
td:last-of-type{
padding-right:20px;
}
&:hover{
td{
box-shadow: inset 0 8px 8px -8px rgba(0,0,0,0.4), inset 0 -8px 8px -8px rgba(0,0,0,0.4);
}
}
}
}
}
#article_detail{
position:fixed;
top:45px;
right:0px;
background:url('/assets/bg-brown.jpg') white;
bottom:70px;
width:99.8%;
display:none;
margin-right:-110%;
box-shadow: 0 0 30px rgba(0,0,0,1);
border-radius: 10px 0px 0px 10px;
.header{
background:transparent;
h1{
font-family:'Gill Sans' ;
text-shadow: rgba(0,0,0,0.8) 1px 1px 0px;
font-size:24px;
font-weight:normal;
em{
font-size:13px;
padding-left:10px;
}
}
.desc{
color:white !important;
position:absolute;
top:50px;
left:10px;
bottom:10px;
width:370px;
overflow:auto;
text-align:justify;
padding-right:10px;
}
}
#article_block_edit{
position: absolute;
top:50px;
border:1px solid black;
bottom:10px;
left:400px;
right:10px;
overflow:auto;
background:url('/assets/bg-white.jpg');
}
}

View File

@ -419,32 +419,39 @@ body{
}
.pagination {
margin:10px auto 0;
width:100px;
margin:10px auto 0;
li {
float:left;
margin:0 1px;
list-style:none;
text-align:center;
a {
display:block;
width:12px;
height:0;
padding-top:12px;
background-image:url(/assets/pagination.png);
background-position:0 0;
float:left;
overflow:hidden;
}
padding:0px;
li {
display:inline;
margin:0 1px;
list-style:none;
a {
display:inline-block;
width:12px;
height:0;
padding-top:12px;
background-image:url(/assets/pagination.png);
background-position:0 0;
overflow:hidden;
margin-right:2px;
}
&.current a {
background-position:0 -12px;
}
&.current a {
background-position:0 -12px;
}
}
}
}

View File

@ -75,9 +75,28 @@ class Admin::ArticlesController < ApplicationController
protected
def find_articles
date_regex = /^(0[1-9]|[12][0-9]|3[01])[\/](0[1-9]|1[012])[\/](19|20)\d\d$/i
if params[:start] and params[:start] =~ date_regex
start = Date.parse(params[:start]).beginning_of_day
params[:start]= start.strftime('%d/%m/%Y')
else
params[:start] = "Début"
end
if params[:stop] and params[:stop] =~ date_regex
stop = Date.parse(params[:stop]).end_of_day
params[:stop]= stop.strftime('%d/%m/%Y')
else
params[:stop] = "Fin"
end
@articles = Article.all
@articles = Article.order('published_at DESC')
@articles = @articles.after(start) if start
@articles = @articles.before(stop) if stop
per_page = (params[:per_page] and params[:per_page] != "") ? params[:per_page] : 6
page = (params[:page] and params[:page] != "") ? params[:page] : 1
@articles = @articles.page(page).per(per_page)
#@articles = Event.order('start_at, stop_at').after(start).before(stop)
end
end

View File

@ -58,4 +58,25 @@ class Article < ActiveRecord::Base
scope :recents, where("enabled = ?",true ).order("published_at DESC")
scope :between, lambda { |start, stop|
after(start).before(stop)
}
scope :after, lambda { |date|
where("(published_at >= ?)", date )
}
scope :before, lambda { |date|
where("(published_at <= ?)", date )
}
after_initialize do
if self.published_at
self.published_at = self.published_at.strftime('%d/%m/%Y')
end
end
end

View File

@ -1,10 +1,24 @@
%tr#article_row.article_row{:id => article.id}
%td{:style => "width:130px;"}
.QI_background_resize{:style => "width:120px;height:120px;"+("background-image: url('#{article.image_file.file.large.medium.small.thumb.url}');"if article.image_file).to_s }
%td{:style => "width:200px"}= l(article.published_at, :format => :date) if article.published_at?
%td=article.title
%td=l article.published_at, :format => :date
%td= "oui" if article.enabled
%td.actions
= link_to i(:trash_stroke, :blue), [:admin, article], :confirm => 'Voulez-vous vraiment supprimer cet article ?', :method => :delete, :remote => true
= link_to i(:pen_alt_fill, :blue), edit_admin_article_path(article)
= #link_to i(:trash_stroke, :blue), [:admin, article], :confirm => 'Voulez-vous vraiment supprimer cette actualité ?', :method => :delete, :remote => true
= #link_to i(:plus_alt, :blue), edit_admin_article_path(article), :style => "padding:5px;", :class => "show_details"
=# link_to i(:pen_alt_fill, :blue), edit_admin_article_path(article), :remote => true

View File

@ -3,7 +3,7 @@
= form.inputs do
=form.input :category_id, :as => :select, :collection => Category.order(:name)
= form.input :enabled,:as => :boolean , :label => "Actif"
= form.input :published_at, :lable => "Date de publication : ", :as => :datetime
= form.input :published_at, :label => "Date de publication : ",:as => :qi_date_picker
= form.input :title, :label => "Titre :"
= form.input :slug, :label => "Slug :"
= form.input :tags_cache, :label => "Tags :"

View File

@ -0,0 +1,22 @@
.search_pannel
=form_tag "", :method => "get", :remote => true, :onsubmit => "set_busy();" do
.field_with_suppr
=text_field_tag :start, params[:start],:class => "datepicker"
.suppr
=i(:x_alt, :gray_light)
.field_with_suppr
=text_field_tag :stop, params[:stop], :class => "datepicker"
.suppr
=i(:x_alt, :gray_light)
=submit_tag "filtrer"
%table#articles.QI_table_alternate_alt1
=render @articles
#pagination
= paginate @articles, :remote => true

View File

@ -1,14 +1,10 @@
.header
.right= link_to 'Ajouter un article', new_admin_article_path(), :class => "button", :remote => true
%h1 Liste des articles
#article_index
.header
.right= link_to 'Ajouter un article', new_admin_article_path(), :class => "button", :remote => true
%h1 Liste des articles
#articles_index=render :partial => "index_block"
.grid_12
%table#articles.QI_table_alternate_alt1
%tr
%th Titre de l'article
%th Date de publication
%th Publié ?
%th
=render @articles
#article_detail

View File

@ -0,0 +1,2 @@
$('#articles_index').html("<%= escape_javascript(render(:partial => "index_block"))%>");
unset_busy();

View File

@ -29,15 +29,31 @@
.slider
.slides
.slides_container
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('1.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('2.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('3.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('4.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('5.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/01.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/02.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/03.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/04.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/05.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/06.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/07.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/08.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/09.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/10.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/11.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/12.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/13.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/14.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/15.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/16.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/17.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/18.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/19.jpg', :style => "width:1000px;height:460px;"), ""
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/20.jpg', :style => "width:1000px;height:460px;"), ""
.photos_link.hover
=link_to "Actuellement 23 182 photos visibles dans ma photothèque", ""
=link_to "Actuellement plus de 24 000 photos visibles dans ma photothèque", "http://www.photo-nature-environnement.com", :target => "_blank"
%a.prev.hover{:href => "#"}
=image_tag('arrow-prev.png')

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

View File

@ -33,6 +33,26 @@ dashboard/icones_data_files.png: dashboard/icones_data_files-ccaa14fd8dca147c6bf
dashboard/icones_folders.png: dashboard/icones_folders-6f33da25241b7ece06710c81e7a0acf3.png
dashboard/icones_image_files.png: dashboard/icones_image_files-174540620317081cd470659bf3e5536e.png
dashboard/icones_menu_items.png: dashboard/icones_menu_items-028e7c5987aa9b7dc794f40eade111ae.png
diaporama/01.jpg: diaporama/01-a1bdafcfb6bbbaa2e0a4d79373613b21.jpg
diaporama/02.jpg: diaporama/02-1cfb2f5ebc1fd20a749e5a37180bf532.jpg
diaporama/03.jpg: diaporama/03-06090865f57d28b3000588acf4106a2a.jpg
diaporama/04.jpg: diaporama/04-7ae034f24e46e4179bc6a1f4705ffc76.jpg
diaporama/05.jpg: diaporama/05-303b79f940a8a6977dc3fbc276cfb249.jpg
diaporama/06.jpg: diaporama/06-5e0ffdb468cb14283f6bbe8e2606d3fb.jpg
diaporama/07.jpg: diaporama/07-17bb4abb9b7b20c1e5378df1ff332ede.jpg
diaporama/08.jpg: diaporama/08-ad63f8ca70ebcfb021753cea6f879fe0.jpg
diaporama/09.jpg: diaporama/09-e4c099426137705bb9028e27bf8c1c61.jpg
diaporama/10.jpg: diaporama/10-6a305aa13a50b9c723f3722b19bb6800.jpg
diaporama/11.jpg: diaporama/11-76d40f32b11ae23bfb4f7b66c73b930b.jpg
diaporama/12.jpg: diaporama/12-a462061ec8db4039d2b8175337829747.jpg
diaporama/13.jpg: diaporama/13-88fa491536125f0eb5be14e1e31775d3.jpg
diaporama/14.jpg: diaporama/14-c2477f3c0a269b19602399d26609ebdf.jpg
diaporama/15.jpg: diaporama/15-49169e878fef532aa9721ead0cb07b0a.jpg
diaporama/16.jpg: diaporama/16-012d675731f51d75cbb8f78f8368bce2.jpg
diaporama/17.jpg: diaporama/17-5570ac7c6e53249118193b79afe1c690.jpg
diaporama/18.jpg: diaporama/18-dcde67cb2902e813e15623bd7cc60704.jpg
diaporama/19.jpg: diaporama/19-a795fc82ac86fcaf0093f5420e2d597e.jpg
diaporama/20.jpg: diaporama/20-dfd169254d5d14b198e6c4b739ff1188.jpg
events.jpg: events-74a36abdbe42b0ee2631526479b1ac76.jpg
events_shadow.png: events_shadow-f90c7ecb8948b3b92adaad48a1428f30.png
facebook.png: facebook-8e105fb6bccd70a177d73ea17211f27a.png
@ -9625,7 +9645,7 @@ admin.js: admin-36017c2b324d657e63b9e647fdf1fcd3.js
application.js: application-0c1533d31e842d3d57b9c52615f79d0b.js
connexion.js: connexion-264e7b9104d644b896bea4e1331bd6c5.js
public.js: public-75161a89899d91410fb6801e7c792979.js
admin.css: admin-29921c0f88b67a8c21d37b6d19afaabb.css
application.css: application-874537ae4b914d22d6942b30775d7c11.css
admin.css: admin-7278b92f489f3817f3468e4039ccb8bd.css
application.css: application-199ca4f5ac0ee13ac59b2d107ea1f2c1.css
connexion.css: connexion-85812ad8b277c166651802c5f8a2ab8d.css
public.css: public-1872f0cf72b61f1b18dbfd7deda6631a.css
public.css: public-d599cd43dd47b5409b5e3a24a4beaaa0.css

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.