parent
9cd00247f9
commit
c206a678bd
@ -1,3 +1,2 @@
|
||||
- cache(:controller => 'courses', :action => 'show', :id => @course, :part => 'left') do
|
||||
= render 'widgets/menu_disciplina'
|
||||
= render 'widgets/menu_user'
|
||||
= render 'widgets/menu_disciplina'
|
||||
= render 'widgets/menu_user'
|
||||
|
@ -1,3 +1,3 @@
|
||||
- cache(:controller => 'courses', :action => 'show', :id => @course, :part => 'right') do
|
||||
= render 'widgets/calendario'
|
||||
= render 'widgets/news'
|
||||
-# cache(course_path(@course.id, :part => :right)) do
|
||||
= render 'widgets/calendario'
|
||||
= render 'widgets/news'
|
||||
|
@ -1,30 +1,30 @@
|
||||
.cmd
|
||||
= action_icon('add', 'Cadastrar nova disciplina', new_course_url) if admin?
|
||||
|
||||
- cache do
|
||||
%h4.title= App.title
|
||||
%h1.title Disciplinas
|
||||
|
||||
.box
|
||||
%ul
|
||||
- if logged_in?
|
||||
%h3 Disciplinas Matriculadas
|
||||
- if @current_user.courses.empty?
|
||||
%li.no_itens Nenhuma disciplina matriculada
|
||||
- for course in @current_user.courses
|
||||
%li{highlight(course.id)}
|
||||
.right
|
||||
= action_icon('subtract', 'Desmatricular-se', unenroll_course_url(course))
|
||||
= link_to h(course.full_name), course_url(course)
|
||||
|
||||
- old_period = 0
|
||||
- for course in @courses
|
||||
- if course.period != old_period
|
||||
%h3= (course.period == 99 ? "Optativas" : "Semestre #{course.period}")
|
||||
- old_period = course.period
|
||||
%h4.title= App.title
|
||||
%h1.title Disciplinas
|
||||
|
||||
.box
|
||||
%ul
|
||||
- if logged_in?
|
||||
%h3 Disciplinas Matriculadas
|
||||
- if @current_user.courses.empty?
|
||||
%li.no_itens Nenhuma disciplina matriculada
|
||||
- for course in @current_user.courses
|
||||
%li{highlight(course.id)}
|
||||
.right
|
||||
= action_icon('add', 'Matricular-se', enroll_course_url(course))
|
||||
= action_icon('subtract', 'Desmatricular-se', unenroll_course_url(course))
|
||||
= link_to h(course.full_name), course_url(course)
|
||||
|
||||
-# cache(courses_path) do
|
||||
- old_period = 0
|
||||
- for course in @courses
|
||||
- if course.period != old_period
|
||||
%h3= (course.period == 99 ? "Optativas" : "Semestre #{course.period}")
|
||||
- old_period = course.period
|
||||
|
||||
%li
|
||||
.right
|
||||
= action_icon('add', 'Matricular-se', enroll_course_url(course))
|
||||
= link_to h(course.full_name), course_url(course)
|
||||
|
||||
|
@ -1,37 +1,37 @@
|
||||
= javascript_include_tag 'events'
|
||||
|
||||
- cache do
|
||||
-# cache(course_events_path(@course.id)) do
|
||||
|
||||
- last_date = nil
|
||||
- last_date = nil
|
||||
|
||||
.cmd
|
||||
= action_icon 'add', 'Adicionar evento', new_course_event_url
|
||||
.cmd
|
||||
= action_icon 'add', 'Adicionar evento', new_course_event_url
|
||||
|
||||
%h4.title= h(@course.full_name)
|
||||
%h1.title Calendário
|
||||
%h4.title= h(@course.full_name)
|
||||
%h1.title Calendário
|
||||
|
||||
.box.div_calendario
|
||||
- if !@events.empty?
|
||||
%table
|
||||
- @events.each do |event|
|
||||
%tr[event]
|
||||
%td.top.aright{:width => '1%'}
|
||||
= event.time.strftime("%d de %B") #unless event.time == last_date
|
||||
%td.top{:width => '1%'}
|
||||
= event.time.strftime("%H:%M")
|
||||
%td.top
|
||||
.title=link_to h(event.title), course_event_url(@course, event)
|
||||
.description{:style => (event.id == params[:id].to_i ? '' : 'display: none')}
|
||||
%div.cmd
|
||||
= 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?
|
||||
.box.div_calendario
|
||||
- if !@events.empty?
|
||||
%table
|
||||
- @events.each do |event|
|
||||
%tr[event]
|
||||
%td.top.aright{:width => '1%'}
|
||||
= event.time.strftime("%d de %B") #unless event.time == last_date
|
||||
%td.top{:width => '1%'}
|
||||
= event.time.strftime("%H:%M")
|
||||
%td.top
|
||||
.title=link_to h(event.title), course_event_url(@course, event)
|
||||
.description{:style => (event.id == params[:id].to_i ? '' : 'display: none')}
|
||||
%div.cmd
|
||||
= 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_date = event.time
|
||||
- else
|
||||
.box
|
||||
%ul
|
||||
%li.no_itens Nenhum evento
|
||||
- last_date = event.time
|
||||
- else
|
||||
.box
|
||||
%ul
|
||||
%li.no_itens Nenhum evento
|
||||
|
||||
%br
|
||||
%br
|
||||
|
@ -1,31 +1,31 @@
|
||||
= javascript_include_tag 'news'
|
||||
|
||||
- cache do
|
||||
-# cache(course_news_index_path(@course.id)) do
|
||||
|
||||
.cmd
|
||||
= action_icon 'add', 'Adicionar', new_course_news_url
|
||||
.cmd
|
||||
= action_icon 'add', 'Adicionar', new_course_news_url
|
||||
|
||||
%h4.title= h(@course.full_name)
|
||||
%h1.title Notícias
|
||||
%h4.title= h(@course.full_name)
|
||||
%h1.title Notícias
|
||||
|
||||
= auto_discovery_link_tag :rss, formatted_course_news_index_url(@course, :rss)
|
||||
= auto_discovery_link_tag :rss, formatted_course_news_index_url(@course, :rss)
|
||||
|
||||
.box.div_news
|
||||
- if !@course.news.empty?
|
||||
%table
|
||||
- @course.news.each do |n|
|
||||
%tr[n]
|
||||
%td.top.aright{:width => '1%'}
|
||||
= n.timestamp.strftime("%d de %B")
|
||||
%td
|
||||
.title= link_to h(n.title), course_news_url(@course, n)
|
||||
.description{:style => (n.id == params[:id].to_i ? '' : 'display: none')}
|
||||
.cmd
|
||||
= action_icon 'edit', 'Editar', edit_course_news_url(@course, n)
|
||||
= action_icon 'trash', 'Excluir', course_news_url(@course, n), :confirm => 'Tem certeza que deseja excluir?', :method => :delete
|
||||
= h(n.body)
|
||||
= "Sem descrição" if n.body.empty?
|
||||
- else
|
||||
.box
|
||||
%ul
|
||||
%li.no_itens Nenhuma notícia
|
||||
.box.div_news
|
||||
- if !@course.news.empty?
|
||||
%table
|
||||
- @course.news.each do |n|
|
||||
%tr[n]
|
||||
%td.top.aright{:width => '1%'}
|
||||
= n.timestamp.strftime("%d de %B")
|
||||
%td
|
||||
.title= link_to h(n.title), course_news_url(@course, n)
|
||||
.description{:style => (n.id == params[:id].to_i ? '' : 'display: none')}
|
||||
.cmd
|
||||
= action_icon 'edit', 'Editar', edit_course_news_url(@course, n)
|
||||
= action_icon 'trash', 'Excluir', course_news_url(@course, n), :confirm => 'Tem certeza que deseja excluir?', :method => :delete
|
||||
= h(n.body)
|
||||
= "Sem descrição" if n.body.empty?
|
||||
- else
|
||||
.box
|
||||
%ul
|
||||
%li.no_itens Nenhuma notícia
|
||||
|
@ -1,7 +1,7 @@
|
||||
- cache do
|
||||
%h4.title= App.title
|
||||
%h1.title Usuários
|
||||
-# cache(users_path) do
|
||||
%h4.title= App.title
|
||||
%h1.title Usuários
|
||||
|
||||
.box
|
||||
%ul
|
||||
= render :partial => @users
|
||||
.box
|
||||
%ul
|
||||
= render :partial => @users
|
||||
|
@ -1,14 +1,14 @@
|
||||
- cache do
|
||||
#users
|
||||
.cmd
|
||||
= action_icon('edit', 'Editar perfil', edit_user_url) if admin? or @current_user == @user
|
||||
/= action_icon 'trash', 'Excluir usuário', user_url, :confirm => 'Tem certeza que deseja excluir?', :method => :delete
|
||||
#users
|
||||
.cmd
|
||||
= action_icon('edit', 'Editar perfil', edit_user_url) if admin? or @current_user == @user
|
||||
=# action_icon 'trash', 'Excluir usuário', user_url, :confirm => 'Tem certeza que deseja excluir?', :method => :delete
|
||||
|
||||
.card
|
||||
%img.avatar{:src => gravatar_url_for(@user.email)}
|
||||
%h1.title= h(@user.display_name)
|
||||
%p= h(@user.name)
|
||||
%p= "Membro desde {c}"[:member_since, @user.created_at.strftime("%d de %B de %Y")]
|
||||
%p= "Última visita há {c}"[:last_seen, distance_of_time_in_words(Time.now, @user.last_seen)]
|
||||
.card
|
||||
%img.avatar{:src => gravatar_url_for(@user.email)}
|
||||
%h1.title= h(@user.display_name)
|
||||
%p= h(@user.name)
|
||||
%p= "Membro desde {c}"[:member_since, @user.created_at.strftime("%d de %B de %Y")]
|
||||
%p= "Última visita há {c}"[:last_seen, distance_of_time_in_words(Time.now, @user.last_seen)]
|
||||
|
||||
= wiki @user.description if !@user.description.blank?
|
||||
-# cache(user_path(@user.id)) do
|
||||
= wiki @user.description if !@user.description.blank?
|
||||
|
Reference in new issue