parent
9461dcaf66
commit
11473aa23a
@ -1,18 +1,19 @@
|
||||
%h4.title= h(@course.full_name)
|
||||
%h1.title Mudanças recentes
|
||||
|
||||
%table.log
|
||||
%tr
|
||||
%th Data
|
||||
%th Usuário
|
||||
%th Descrição
|
||||
- @log_entries.each do |entry|
|
||||
.box
|
||||
%table
|
||||
%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?
|
||||
%th Data
|
||||
%th Usuário
|
||||
%th Descrição
|
||||
- @log_entries.each do |entry|
|
||||
%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?
|
||||
|
@ -1,49 +0,0 @@
|
||||
<% last_event = nil %>
|
||||
|
||||
<h4 class="title">Dashboard</h4>
|
||||
<h1 class="title">Bem vindo, <%= h(@current_user.display_name) %></h1>
|
||||
|
||||
<!-- Noticias -->
|
||||
<div class="news box">
|
||||
<h3>Notícias recentes</h3>
|
||||
<% @news.each do |n| %>
|
||||
<div class="line">
|
||||
<h4 class="left"><%= n.timestamp.strftime("%d de %B") %></h4>
|
||||
<h4><%= link_to h(n.course.full_name) , course_url(n.course) %> ›
|
||||
<%= link_to h(n.title), course_news_url(n.course, n) %></h4>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!-- Calendario -->
|
||||
<div class="box div_calendario">
|
||||
<h3>Próximos eventos</h3>
|
||||
|
||||
<% @events.each do |event| %>
|
||||
<% if last_event != event.date %>
|
||||
<% if last_event %></ul></div><% end %>
|
||||
<div class="date"><%= event.date.strftime("%d de %B") %></div>
|
||||
<div><ul>
|
||||
<% end %>
|
||||
<li>
|
||||
<div class="time"><%= event.time.strftime("%H:%M") %></div>
|
||||
<%= link_to h(event.course.full_name), course_url(event.course) %> ›
|
||||
<%= link_to h(event.title), course_event_url(event.course, event) %>
|
||||
</li>
|
||||
<% last_event = event.date %>
|
||||
<% end %>
|
||||
<%= "</ul></div>" if !@events.empty? %>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Disciplinas Matriculadas -->
|
||||
<div class="box">
|
||||
<h3>Disciplinas Matriculadas</h3>
|
||||
<ul class="wiki">
|
||||
<% @current_user.courses.each do |course| %>
|
||||
<li><%= link_to h(course.full_name), course_url(course) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h4><%#= link_to 'Descadastrar usuário', :action => 'destroy'%></h4>
|
Reference in new issue