parent
0d00ee07db
commit
a10b4fda9b
@ -0,0 +1,15 @@
|
|||||||
|
.cmd
|
||||||
|
= action_icon 'add', 'Adicionar', new_course_attachment_url(@course)
|
||||||
|
|
||||||
|
%h4.title= h(@course.full_name)
|
||||||
|
%h1.title Repositório de Arquivos
|
||||||
|
|
||||||
|
.box.repositorio
|
||||||
|
- if !@course.attachments.empty?
|
||||||
|
%ul
|
||||||
|
= nested_attachments_to_html(attachments_to_nested_hash(@course.attachments))
|
||||||
|
|
||||||
|
- else
|
||||||
|
.box
|
||||||
|
%ul
|
||||||
|
%li.no_itens Nenhum arquivo
|
@ -0,0 +1,16 @@
|
|||||||
|
.cmd
|
||||||
|
= action_icon 'add', 'Adicionar', new_course_wiki_instance_url(@course)
|
||||||
|
|
||||||
|
%h4.title= h(@course.full_name)
|
||||||
|
%h1.title Páginas Wiki
|
||||||
|
|
||||||
|
.box.div_news
|
||||||
|
- if !@course.wiki_pages.empty?
|
||||||
|
%ul
|
||||||
|
- @course.wiki_pages.find(:all, :order => 'title').each do |w|
|
||||||
|
%li= link_to(w.title, course_wiki_instance_url(@course, w))
|
||||||
|
|
||||||
|
- else
|
||||||
|
.box
|
||||||
|
%ul
|
||||||
|
%li.no_itens Nenhuma página wiki
|
@ -0,0 +1,13 @@
|
|||||||
|
class Hidden < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
add_column :courses, :hidden, :boolean, :null => false, :default => false
|
||||||
|
add_column :wiki_pages, :front_page, :boolean, :null => false, :default => true
|
||||||
|
add_column :attachments, :front_page, :boolean, :null => false, :default => true
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
remove_column :courses, :hidden
|
||||||
|
remove_column :wiki_pages, :front_page
|
||||||
|
remove_column :attachments, :front_page
|
||||||
|
end
|
||||||
|
end
|
Reference in new issue