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.
40 lines
1.1 KiB
40 lines
1.1 KiB
- cache do
|
|
|
|
- last_event = nil
|
|
|
|
.cmd
|
|
= action_icon 'add', 'Adicionar evento', new_course_event_url
|
|
|
|
%h4.title= h(@course.full_name)
|
|
%h1.title Calendário
|
|
|
|
.box.div_calendario
|
|
|
|
- @events.each do |event|
|
|
- if last_event != event.date
|
|
= "</ul></div>" if last_event
|
|
.date= event.date.strftime("%d de %B")
|
|
= "<div><ul>"
|
|
|
|
%li[event]
|
|
.time= event.time.strftime("%H:%M")
|
|
= link_to h(event.title), course_event_url(@course, event)
|
|
|
|
%div.description{:style => (event.id == params[:id].to_i ? '' : 'display: none')}
|
|
%div.cmd{:style => "height: 27px; margin-top: -27px;"}
|
|
= action_icon 'edit', 'Editar', edit_course_event_url(@course, event)
|
|
= action_icon 'trash', 'Excluir', course_event_url(@course, event), :confirm => 'Tem certeza que deseja excluir?', :method => :delete
|
|
= h(event.description)
|
|
= "Sem descrição" if event.description.empty?
|
|
|
|
- last_event = event.date
|
|
|
|
= "</ul></div>" if !@events.empty?
|
|
|
|
- if @events.empty?
|
|
.box
|
|
%ul
|
|
%li.grey Nenhum evento
|
|
|
|
%br
|