Dashboard agora com rss e ical

This commit is contained in:
2008-03-05 06:52:52 -03:00
parent ba4a6a20fe
commit e5bc6024ba
15 changed files with 101 additions and 35 deletions

View File

@@ -47,5 +47,5 @@
.content= @content
%br{'style' => 'clear:both'}
#footer
#footer

View File

@@ -1,6 +1,8 @@
%h4.title= h(@course.full_name)
%h1.title Mudanças recentes
= auto_discovery_link_tag :rss, formatted_course_log_url(@course, :rss)
.box
%table
%tr
@@ -11,9 +13,4 @@
%tr
%td= entry.created_at.strftime("%d/%m/%y %H:%M:%S")
%td= link_to truncate(h(entry.user.display_name), 20), user_path(entry.user)
%td
= render(:partial => 'log/attachment_log_entry', :locals => { :entry => entry }) if entry.kind_of?(AttachmentLogEntry)
= render(:partial => 'log/event_log_entry', :locals => { :entry => entry }) if entry.kind_of?(EventLogEntry)
= render(:partial => 'log/news_log_entry', :locals => { :entry => entry }) if entry.kind_of?(NewsLogEntry)
= render(:partial => 'log/wiki_log_entry', :locals => { :entry => entry }) if entry.kind_of?(WikiLogEntry)
= "(" + link_to("undo", undo_course_log_url(@course, entry)) + ")" if entry.reversible?
%td= render(:partial => 'log/log_entry', :locals => { :entry => entry })

View File

@@ -28,11 +28,6 @@ h1, h2, h3, h4, h5, th {
background-color: <%= color[0] %>;
}
#footer {
background-color: <%= color[3] %>;
border-top: 5px solid <%= color[3] %>;
}
.icon img:hover {
background-color: <%= color[1] %>;
}

View File

@@ -120,13 +120,15 @@ body {
font-weight: normal;
min-width: 780px;
background-image: url(<%= App.base_path %>/images/bg_body.png);
background-repeat: repeat-x;
background-color: #f4f4f4;
background-color: #fff;
}
#wrapper {
margin: 0em auto;
margin: 0em -9px;
padding: 0px 9px;
background-image: url(<%= App.base_path %>/images/bg_body.png);
background-repeat: repeat-x;
background-color: #f4f4f4;
}
#header {
@@ -194,16 +196,14 @@ body {
#site {
padding: 0px;
margin-top: 18px;
border-bottom: 30px solid #eee;
}
#footer {
display: none;
background-image: url(<%= App.base_path %>/images/footer_bg.png);
background-position: top;
background-repeat: repeat-x;
margin: 0em;
height: 10em;
border-top: 3px solid #f0f0f0;
margin: 0px -9px;
padding: 18px 0px;
text-align: center;
color: #aaa;
}
.float_panel_left {

View File

@@ -1,15 +1,18 @@
%h4.title Dashboard
%h1.title= "Bem vindo, #{h(@current_user.display_name)}"
= auto_discovery_link_tag :rss, formatted_dashboard_url(:secret => @current_user.secret, :format => 'rss')
.dashboard
.box
.cmd
=link_to "rss", formatted_dashboard_url(:secret => @current_user.secret, :format => 'rss')
- last_time = nil
%h3 Notícias Recentes
%h3 Notícias Recentes
- if @news.empty?
%ul
%li.no_itens Nenhum notícia recente
%table
- @news.each do |n|
%tr
@@ -22,13 +25,14 @@
%p= h(n.body)
.box
.cmd
=link_to "ical", formatted_dashboard_url(:secret => @current_user.secret, :format => 'ics')
- last_time = nil
%h3 Próximos Eventos
%h3 Próximos Eventos
- if @events.empty?
%ul
%li.no_itens Nenhum evento próximo
%table
- @events.each do |n|
%tr
@@ -49,3 +53,4 @@
- @current_user.courses.each do |course|
%li= link_to(h(course.full_name), course_url(course))

View File

@@ -0,0 +1,18 @@
xml.instruct! :xml, :version=>"1.0"
xml.rss(:version=>"2.0") do
xml.channel do
xml.title("#{App.title} - " + "News"[].titleize)
xml.link(dashboard_url)
xml.language(App.language)
xml.description("{app} news"[:news_about, App.title])
for news_item in @news
xml.item do
xml.title(news_item.course.short_name + ": " + news_item.title)
xml.description(news_item.body)
xml.pubDate(news_item.timestamp.rfc2822)
xml.link(course_news_url(news_item.course, news_item))
xml.guid(course_news_url(news_item.course, news_item))
end
end
end
end