Initial import
This commit is contained in:
10
app/views/attachments/_form.html.haml
Normal file
10
app/views/attachments/_form.html.haml
Normal file
@@ -0,0 +1,10 @@
|
||||
= error_messages_for 'attachment'
|
||||
|
||||
%dl
|
||||
%dt
|
||||
%label{:for => 'attachment_file'} Arquivo
|
||||
%dd= file_field 'attachment', 'file'
|
||||
|
||||
%dt
|
||||
%label{:for => "attachment_description"} Descrição
|
||||
%dd= preserve(text_area 'attachment', 'description')
|
||||
7
app/views/attachments/edit.html.haml
Normal file
7
app/views/attachments/edit.html.haml
Normal file
@@ -0,0 +1,7 @@
|
||||
%h4.title= h(@course.full_name)
|
||||
%h1.title Modificar arquivo
|
||||
|
||||
%p
|
||||
- form_for :attachment, @attachment, :url => course_attachment_url, :html => { :method => 'put', :multipart => 'true' } do
|
||||
= render :partial => 'form'
|
||||
= submit_tag 'Editar'
|
||||
7
app/views/attachments/new.html.haml
Normal file
7
app/views/attachments/new.html.haml
Normal file
@@ -0,0 +1,7 @@
|
||||
%h4.title= h(@course.full_name)
|
||||
%h1.title Adicionar arquivo
|
||||
|
||||
%p
|
||||
- form_for :attachment, @attachment, :url => course_attachments_url, :html => { :method => 'post', :multipart => 'true' } do
|
||||
= render :partial => 'form'
|
||||
= submit_tag "Criar"
|
||||
20
app/views/attachments/show.html.haml
Normal file
20
app/views/attachments/show.html.haml
Normal file
@@ -0,0 +1,20 @@
|
||||
.cmd
|
||||
= action_icon 'edit', 'Editar', edit_course_attachment_url
|
||||
= 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
|
||||
|
||||
%p
|
||||
%dl
|
||||
%dt Arquivo
|
||||
%dd= link_to h(@attachment.file_name), download_course_attachment_url
|
||||
|
||||
%dt Descrição
|
||||
%dd= h(@attachment.description)
|
||||
|
||||
%dt Tipo de Arquivo
|
||||
%dd= h(@attachment.content_type)
|
||||
|
||||
%dt Tamanho
|
||||
%dd= number_to_human_size @attachment.size
|
||||
Reference in New Issue
Block a user