parent
11473aa23a
commit
99d5e2fd67
@ -0,0 +1,51 @@
|
|||||||
|
%h4.title Dashboard
|
||||||
|
%h1.title= "Bem vindo, #{h(@current_user.display_name)}"
|
||||||
|
|
||||||
|
.dashboard
|
||||||
|
.box
|
||||||
|
- last_time = nil
|
||||||
|
%h3 Notícias Recentes
|
||||||
|
|
||||||
|
- if @events.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
|
||||||
|
- 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))
|
@ -0,0 +1,8 @@
|
|||||||
|
class EventTime < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
change_column :events, :date, :date, :null => true
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,4 @@
|
|||||||
|
events['.div_calendario .title a:click'] = function(element, e) {
|
||||||
|
Effect.toggle(element.up().next(), 'blind');
|
||||||
|
Event.stop(e);
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
events['.div_news .title a:click'] = function(element, e) {
|
||||||
|
Effect.toggle(element.up().next(), 'blind');
|
||||||
|
Event.stop(e);
|
||||||
|
}
|
Reference in new issue