You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

57 lines
1.7 KiB

%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
- if @news.empty?
%ul
%li.no_itens Nenhum notícia recente
%table
- @news.each do |n|
%tr
%td.top.aright
= n.timestamp.strftime("%d de %B")
%td
= link_to(h(n.course.full_name), course_url(n.course)) + " ›"
= link_to(h(n.title), course_news_url(n.course, n))
- unless n.body.empty?
%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
- if @events.empty?
%ul
%li.no_itens Nenhum evento próximo
%table
- @events.each do |n|
%tr
%td.aright.top
= n.time.strftime("%d de %B") #unless n.time == last_time
- last_time = n.time
%td.top
= n.time.strftime("%H:%M")
%td.top
= link_to(h(n.course.full_name), course_url(n.course)) + " ›"
= link_to(h(n.title), course_event_url(n.course, n))
.box
%h3 Disciplinas Matriculadas
%ul
- if @current_user.courses.empty?
%li.no_itens Nenhuma disciplina matriculada
- @current_user.courses.each do |course|
%li= link_to(h(course.full_name), course_url(course))