Hey all,
My site is working ok except for a page that displays as text instead of html.
I tried to use this:
puts "Content-Type: text/html"
then it display the page as html normally but I still get that ugly
part on top of my page:
Content-Type: text/html
Set-Cookie: _session_id=6356b18a24d56a0da01bfab791fa911d; path=/
Status: 200 OK
Cache-Control: no-cache
here is the url:
http://rdigikam.sitlib.org/calendar/list?month=8&year=2006
the rest of the page that works:
http://rdigikam.sitlib.org/tags
any idea how I could get rid of this?
This is the code of my list.rhtml:
<center>
<br><br>
<% 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 y.year.to_i!=@passedyear.to_i %>
<br>
<%= 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 %> $
<%= ''<span>Sunday</span> <span>Monday</span>
<span>Tuesday</span>
<span>Wednesday</span> <span>Thursday</span>
<span>Friday</$
<% s = m.weeks.collect do |w| %>
<div id="datediv"><%= w.collect { |day| "#{(day.proxy?)
?
''out''+tag("img" , "src"=>
"/images/outofmonth.jpg") : get_image_day$
<% end %><% end %><% end %>
<%= puts %>
<% end
end %>
</center>
and this is the code of my layout:
app/views/layouts/calendar.rhtml
<html>
<head>
<title>Tags: <%= controller.action_name %></title>
<%= javascript_include_tag :defaults %>
<%= stylesheet_link_tag ''scaffold'' %>
<%= stylesheet_link_tag ''images'' %>
</head>
<body>
<p style="color: green"><%= flash[:notice] %></p>
<% newdate = TimeZone.new(0)
currenttime = newdate.now
%>
<p style="color: green"><%= flash[:notice] %></p>
<center><h1><%= link_to(("Albums "),:controller =>
"images",:action =>
"showimgbyalbum") %><%= link_to(("Tags "),:controller
$
<%= @content_for_layout %>
</body>
</html>
thanx in advance
Pat