Paginas wiki, arquivos e disciplinas ocultas

This commit is contained in:
2009-09-08 18:38:47 -03:00
parent 0d00ee07db
commit a10b4fda9b
22 changed files with 144 additions and 35 deletions

View File

@@ -13,4 +13,6 @@
%dt
%label{:for => "attachment_description"} Descrição
%dd= preserve(text_area 'attachment', 'description')
%dd= preserve(text_area 'attachment', 'description', {:rows => 10})
%dt= check_box('attachment', 'front_page') + " Exibir arquivo na página inicial do curso"

View File

@@ -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

View File

@@ -3,7 +3,7 @@
= action_icon 'trash', 'Excluir', course_attachment_url, :confirm => 'Tem certeza que deseja excluir o arquivo?', :method => :delete
%h4.title= h(@attachment.course.full_name)
%h1.title Repositório
%h1.title Repositório de Arquivos
%p
%dl

View File

@@ -21,6 +21,10 @@
%label{:for => "course_period"} Data
%dd= text_field 'course', 'period'
%dt
%label{:for => "course_hidden"} Ocultar
%dd= check_box 'course', 'hidden'
%dt
%label{:for => "course_description"} Descrição
%dd= preserve(text_area('course', 'description', :cols => 60, :rows => 10))

View File

@@ -10,13 +10,32 @@
%p= @course.description.format_wiki
-#.box
-# .cmd
-# = action_icon 'add', 'Adicionar notícia', new_course_news_instance_url(@course)
-#
-# %h3 Notícias Recentes
-# %ul.news
-# - @course.recent_news.each do |news|
-# %li{highlight(news.id)}
-# .cmd{:style => 'margin-top: -9px;'}
-# = action_icon 'edit', 'Editar', edit_course_news_instance_url(@course, news, :version => news.version)
-# = action_icon 'trash', 'Excluir', course_news_instance_url(@course, news), :confirm => 'Tem certeza que deseja excluir?', :method => :delete
-# = link_to h(news.title), course_news_instance_url(@course, news)
-# = formatted(news.body)
-# = "Enviada por %s há %s." % [link_to(news.user.display_name, user_url(news.user)), distance_of_time_in_words(Time.now, news.timestamp)]
-# - if @course.news.empty?
-# %li.no_itens Nenhuma notícia recente
-# - else
-# %li.see_all= link_to "Ver todas as noticias", course_news_url(@course)
.box
.cmd
= action_icon 'add', 'Adicionar página wiki', new_course_wiki_instance_url(@course)
%h3 Páginas Wiki
%ul.wiki
- @course.wiki_pages.each do |wiki|
- @course.wiki_pages.find_front_page.each do |wiki|
%li{highlight(wiki.id)}
.cmd{:style => 'margin-bottom: -27px; margin-top: -9px;'}
=action_icon 'arrow2_n', 'Mover para cima', move_up_course_wiki_instance_url(@course, wiki) unless wiki.first?
@@ -26,14 +45,18 @@
=link_to h(wiki.title), course_wiki_instance_url(@course, wiki)
- if @course.wiki_pages.empty?
%li.no_itens Nenhuma página wiki
- else
%li.show_all= link_to "Ver todas as páginas wiki", course_wiki_url(@course)
.box
.cmd= action_icon 'add', 'Adicionar anexo', new_course_attachment_url(@course)
%h3 Repositório de Arquivos
.repositorio
= nested_attachments_to_html(attachments_to_nested_hash(@course.attachments))
= nested_attachments_to_html(attachments_to_nested_hash(@course.attachments.find_front_page))
- if @course.attachments.empty?
%ul.wiki
%li.no_itens Nenhum arquivo
- else
%li.show_all= link_to "Ver todos os arquivos", course_attachments_url(@course)

View File

@@ -3,7 +3,7 @@
= link_to(App.title, index_url) + "›"
= link_to("Disciplinas", courses_url) + "›"
= link_to(h(@course.full_name), course_url(@course)) + "›"
= link_to("Arquivos", course_url(@course))
= link_to("Arquivos", course_attachments_url(@course))
- if @attachment.id
= "›" + link_to(truncate(h(@attachment.file_name)), course_attachment_url)
- @title = @title + " - #{truncate(h(@attachment.file_name))}"

View File

@@ -3,7 +3,7 @@
= link_to(App.title, index_url) + "›"
= link_to("Disciplinas", courses_url) + "›"
= link_to(h(@course.full_name), course_url(@course)) + "›"
= link_to("Wiki", course_url(@course))
= link_to("Wiki", course_wiki_url(@course))
- if @wiki_page.title
= "›" + link_to(h(@wiki_page.title), course_wiki_instance_url(@course, @wiki_page))
- @title = @title + " - #{h(@wiki_page.title)}"

View File

@@ -1,7 +1,5 @@
= javascript_include_tag 'news'
-# cache(course_news_path(@course.id)) do
.cmd
= action_icon 'add', 'Adicionar', new_course_news_instance_url
@@ -22,7 +20,7 @@
= n.timestamp.strftime("%d de %B")
%td
.title= link_to h(n.title), course_news_instance_url(@course, n)
.description{:style => (n.id == params[:id].to_i ? '' : 'display: none')}
.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

View File

@@ -231,7 +231,7 @@ body {
list-style: none;
}
.menu li, .news li, #shoutbox li {
.menu li, #shoutbox li {
border-top: 1px solid #eee;
margin-top: -1px;
padding: 9px 10px;
@@ -295,17 +295,10 @@ body {
border-bottom: 0px solid #ccc;
}
.widget_users li, .widget_news li, .widget_events li {
.widget_users li {
font-size: 11px;
}
.widget_news li, #shoutbox li {
line-height: 18px;
margin: 0px; margin-top: -1px;
padding: 9px 0px;
}
#shoutbox textarea {
font-family: sans-serif;
font-size: 11px;
@@ -559,10 +552,16 @@ textarea {
width: 100%;
}
.no_itens {
.no_itens, .see_all {
color: #aaa;
}
.box .see_all {
font-size: 11px;
background-image: none;
border-bottom-width: 0px;
}
.history input {
margin: 0px 10px 0px 0px;
@@ -889,6 +888,12 @@ ul.nested li {
padding: 0px 0px 0px 18px;
}
.box li.show_all {
background-image: none;
font-size: 11px;
}
/*body { background-image: url(<%= App.base_path %>/prototype/line.png); background-repeat: repeat; }
html * { background-color: transparent !important; }*/

View File

@@ -3,9 +3,11 @@
<h1>Disciplina</h1>
<ul>
<li><%= link_to "Visão Geral", course_url(@course) %></li>
<li><%= link_to "Participantes", course_events_url(@course) %></li>
<li><%= link_to "Notícias", course_news_url(@course) %></li>
<li><%= link_to "Arquivos", course_attachments_url(@course) %></li>
<li><%= link_to "Calendário", course_events_url(@course) %></li>
<li><%= link_to "Notícias", course_news_url(@course) %></li>
<li><%= link_to "Participantes", course_events_url(@course) %></li>
<li><%= link_to "Páginas Wiki", course_wiki_url(@course) %></li>
<li><%= link_to "Mudanças recentes", course_log_url(@course) %></li>
</ul>
</div>

View File

@@ -15,3 +15,5 @@
%dt
%label{:for => 'wiki_page_description'} Descrição das alterações
%dd= text_field('wiki_page', 'description', { :size => '80' })
%dt= check_box('wiki_page', 'front_page') + " Exibir página wiki na página inicial do curso"

View File

@@ -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