Salut a tous,
Jái cette page:
http://rdigikam.sitlib.org/calendar/list?month=8&year=2006
qui veut pas safficher avec apache meme si ça marche bien avec webrick.
Cela étant dit jai remarquer quen mettant ça en haut de ma page
çamarche a peu pres:
puts “Content-Type: text/html”
mais ça maffiche un truc tout moche en haut de page genre:
Content-Type: text/html Set-Cookie:
_session_id=d3320665835ddc2f4b28837b8f8ec816; path=/ Status: 200 OK
Cache-Control: no-cache
Voici le code de mon list.rhtml:
<% startdate = Time.local(2006,8,1)
endate = Time.local(2006,8,31)
cal =
CalendarGrid.build(Time.local(@passedyear.to_i,@passedmonth.to_i,1))
puts "Content-Type: text/html"
%>
<% cal.years.each do |y| unless [email protected]_i %>
<%= link_to((“<”), :year => y.year.to_i-1, :month =>
@passedmonthparam) %><%= y.year %><%= link_to((“>”), :year =>
y.year.$
<% y.months.each do |m| if m.strftime(“%m”)==@passedmonth %>
<% unless @passedmonthparam.to_i==1 %> <%= link_to((“<”), :year =>
y.year, :month => @passedmonthparam.to_i-1) %><% end %> $
<%= 'Sunday Monday Tuesday
Wednesday Thursday Friday</$
<% s = m.weeks.collect do |w| %>
<%= w.collect { |day| "#{(day.proxy?) ?
'out'+tag("img" , "src"=> "/images/outofmonth.jpg") : get_image_day$
<% end %><% end %><% end %>
<%= puts %>
<% end
end %>
et voici le code de mon layout:
GNU nano 1.2.4 Fichier:
app/views/layouts/calendar.rhtml
Tags: <%= controller.action_name %>
<%= javascript_include_tag :defaults %>
<%= stylesheet_link_tag 'scaffold' %>
<%= stylesheet_link_tag 'images' %>
<%= flash[:notice] %>
<% newdate = TimeZone.new(0)
currenttime = newdate.now
%>
<%= flash[:notice] %>
<%= link_to(("Albums "),:controller => "images",:action =>
"showimgbyalbum") %><%= link_to(("Tags "),:controller $
<%= @content_for_layout %>
merci davance
Pat
Patrick A. wrote the following on 21.08.2006 02:24 :
Salut a tous,
Jái cette page:
http://rdigikam.sitlib.org/calendar/list?month=8&year=2006
qui veut pas safficher avec apache meme si ça marche bien avec webrick.
Cela étant dit jai remarquer quen mettant ça en haut de ma page ça
marche a peu pres:
puts “Content-Type: text/html”
Dans les headers reçus sans ce puts, y-a-t’il un Content-Type ?
wget -S te montre les headers :
wget -S http://rdigikam.sitlib.org/calendar/list?month=8\&year=2006 -O -
Il est possible qu’Apache se mélange les pinceaux avec les types mime.
Je suis passé à lighttpd + fastcgi pour alléger et simplifier, mais je
n’avais pas rencontré de problème avec Apache + fcgi en reprenant une
configuration Apache par défaut enrichie en suivant les exemples en
ligne.
Au pire poste ta configuration Apache (si possible en mettant en valeur
les modifications que tu y as apporté depuis l’original fourni par ta
distribution) pour qu’on y jette un coup d’oeuil.
Lionel.
Patrick :
<%= link_to(("<"), :year => y.year.to_i-1, :month =>
<% end %><% end %><% end %>
<%= puts %>
<% end
end %>
comment dire… ton code a l’air très dense (et on en voit qu’une
partie si on en juge par les $ en fin de ligne). T’arrives à débugger
sans coloration syntaxique ? Peut-être que tu gagnerais en
clarté en utilisant plus intensivement des helpers ?
– Jean-François (pas trop pour l’utilisation de puts dans les vues)
On 8/27/06, Jean-François [email protected] wrote:
<%= w.collect { |day| "#{(day.proxy?) ?
clarté en utilisant plus intensivement des helpers ?
– Jean-François (pas trop pour l’utilisation de puts dans les vues)
oui ca marche maintenant, en fait jai remplacer <%= puts %> par <%=
‘’ %>