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.
33 lines
1.1 KiB
33 lines
1.1 KiB
= javascript_include_tag 'news'
|
|
|
|
.cmd
|
|
= action_icon 'add', 'Adicionar', new_course_news_instance_url
|
|
|
|
%h4.title= h(@course.full_name)
|
|
%h1.title Notícias
|
|
|
|
= auto_discovery_link_tag :rss, course_news_url(@course, :format => :rss)
|
|
|
|
.box.div_news
|
|
- if !@course.news.empty?
|
|
%table
|
|
- @course.news.each do |n|
|
|
|
|
- n.revert_to(params[:version]) if (n.id == params[:id].to_i) and (params[:version])
|
|
|
|
%tr[n]
|
|
%td.top.aright{:width => '1%'}
|
|
= n.timestamp.strftime("%d de %B")
|
|
%td
|
|
.title= link_to h(n.title), course_news_instance_url(@course, n)
|
|
.description
|
|
.cmd
|
|
= action_icon 'edit', 'Editar', edit_course_news_instance_url(@course, n, :version => n.version)
|
|
= action_icon 'trash', 'Excluir', course_news_instance_url(@course, n), :confirm => 'Tem certeza que deseja excluir?', :method => :delete
|
|
= formatted(n.body)
|
|
= "Sem descrição" if n.body.empty?
|
|
- else
|
|
.box
|
|
%ul
|
|
%li.no_itens Nenhuma notícia
|