This repository has been archived on 2022-08-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
wikiufc/app/views/users/dashboard.html.haml
2013-07-14 11:11:18 -04:00

57 lines
1.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
%h4.title Dashboard
%h1.title= "Bem vindo, #{h(@current_user.display_name)}"
= auto_discovery_link_tag :rss, 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_instance_url(n.course, n))
- unless n.body.empty?
%p= truncate(h(n.body), :length => 300)
.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))