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_disciplina'
|
= render 'widgets/menu_user'
|
||||||
= render 'widgets/menu_user'
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
- cache(:controller => 'courses', :action => 'show', :id => @course, :part => 'right') do
|
-# cache(course_path(@course.id, :part => :right)) do
|
||||||
= render 'widgets/calendario'
|
= render 'widgets/calendario'
|
||||||
= render 'widgets/news'
|
= render 'widgets/news'
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
.cmd
|
.cmd
|
||||||
= action_icon('add', 'Cadastrar nova disciplina', new_course_url) if admin?
|
= action_icon('add', 'Cadastrar nova disciplina', new_course_url) if admin?
|
||||||
|
|
||||||
- cache do
|
%h4.title= App.title
|
||||||
%h4.title= App.title
|
%h1.title Disciplinas
|
||||||
%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
|
|
||||||
|
|
||||||
|
.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)}
|
%li{highlight(course.id)}
|
||||||
.right
|
.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)
|
= 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'
|
= javascript_include_tag 'events'
|
||||||
|
|
||||||
- cache do
|
-# cache(course_events_path(@course.id)) do
|
||||||
|
|
||||||
- last_date = nil
|
- last_date = nil
|
||||||
|
|
||||||
.cmd
|
.cmd
|
||||||
= action_icon 'add', 'Adicionar evento', new_course_event_url
|
= action_icon 'add', 'Adicionar evento', new_course_event_url
|
||||||
|
|
||||||
%h4.title= h(@course.full_name)
|
%h4.title= h(@course.full_name)
|
||||||
%h1.title Calendário
|
%h1.title Calendário
|
||||||
|
|
||||||
.box.div_calendario
|
.box.div_calendario
|
||||||
- if !@events.empty?
|
- if !@events.empty?
|
||||||
%table
|
%table
|
||||||
- @events.each do |event|
|
- @events.each do |event|
|
||||||
%tr[event]
|
%tr[event]
|
||||||
%td.top.aright{:width => '1%'}
|
%td.top.aright{:width => '1%'}
|
||||||
= event.time.strftime("%d de %B") #unless event.time == last_date
|
= event.time.strftime("%d de %B") #unless event.time == last_date
|
||||||
%td.top{:width => '1%'}
|
%td.top{:width => '1%'}
|
||||||
= event.time.strftime("%H:%M")
|
= event.time.strftime("%H:%M")
|
||||||
%td.top
|
%td.top
|
||||||
.title=link_to h(event.title), course_event_url(@course, event)
|
.title=link_to h(event.title), course_event_url(@course, event)
|
||||||
.description{:style => (event.id == params[:id].to_i ? '' : 'display: none')}
|
.description{:style => (event.id == params[:id].to_i ? '' : 'display: none')}
|
||||||
%div.cmd
|
%div.cmd
|
||||||
= action_icon 'edit', 'Editar', edit_course_event_url(@course, event)
|
= 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
|
= action_icon 'trash', 'Excluir', course_event_url(@course, event), :confirm => 'Tem certeza que deseja excluir?', :method => :delete
|
||||||
= h(event.description)
|
= h(event.description)
|
||||||
= "Sem descrição" if event.description.empty?
|
= "Sem descrição" if event.description.empty?
|
||||||
|
|
||||||
- last_date = event.time
|
- last_date = event.time
|
||||||
- else
|
- else
|
||||||
.box
|
.box
|
||||||
%ul
|
%ul
|
||||||
%li.no_itens Nenhum evento
|
%li.no_itens Nenhum evento
|
||||||
|
|
||||||
%br
|
%br
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
= javascript_include_tag 'news'
|
= javascript_include_tag 'news'
|
||||||
|
|
||||||
- cache do
|
-# cache(course_news_index_path(@course.id)) do
|
||||||
|
|
||||||
.cmd
|
.cmd
|
||||||
= action_icon 'add', 'Adicionar', new_course_news_url
|
= action_icon 'add', 'Adicionar', new_course_news_url
|
||||||
|
|
||||||
%h4.title= h(@course.full_name)
|
%h4.title= h(@course.full_name)
|
||||||
%h1.title Notícias
|
%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
|
.box.div_news
|
||||||
- if !@course.news.empty?
|
- if !@course.news.empty?
|
||||||
%table
|
%table
|
||||||
- @course.news.each do |n|
|
- @course.news.each do |n|
|
||||||
%tr[n]
|
%tr[n]
|
||||||
%td.top.aright{:width => '1%'}
|
%td.top.aright{:width => '1%'}
|
||||||
= n.timestamp.strftime("%d de %B")
|
= n.timestamp.strftime("%d de %B")
|
||||||
%td
|
%td
|
||||||
.title= link_to h(n.title), course_news_url(@course, n)
|
.title= link_to h(n.title), course_news_url(@course, n)
|
||||||
.description{:style => (n.id == params[:id].to_i ? '' : 'display: none')}
|
.description{:style => (n.id == params[:id].to_i ? '' : 'display: none')}
|
||||||
.cmd
|
.cmd
|
||||||
= action_icon 'edit', 'Editar', edit_course_news_url(@course, n)
|
= 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
|
= action_icon 'trash', 'Excluir', course_news_url(@course, n), :confirm => 'Tem certeza que deseja excluir?', :method => :delete
|
||||||
= h(n.body)
|
= h(n.body)
|
||||||
= "Sem descrição" if n.body.empty?
|
= "Sem descrição" if n.body.empty?
|
||||||
- else
|
- else
|
||||||
.box
|
.box
|
||||||
%ul
|
%ul
|
||||||
%li.no_itens Nenhuma notícia
|
%li.no_itens Nenhuma notícia
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
- cache do
|
-# cache(users_path) do
|
||||||
%h4.title= App.title
|
%h4.title= App.title
|
||||||
%h1.title Usuários
|
%h1.title Usuários
|
||||||
|
|
||||||
.box
|
.box
|
||||||
%ul
|
%ul
|
||||||
= render :partial => @users
|
= render :partial => @users
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
- cache do
|
#users
|
||||||
#users
|
.cmd
|
||||||
.cmd
|
= action_icon('edit', 'Editar perfil', edit_user_url) if admin? or @current_user == @user
|
||||||
= 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
|
||||||
/= action_icon 'trash', 'Excluir usuário', user_url, :confirm => 'Tem certeza que deseja excluir?', :method => :delete
|
|
||||||
|
|
||||||
.card
|
.card
|
||||||
%img.avatar{:src => gravatar_url_for(@user.email)}
|
%img.avatar{:src => gravatar_url_for(@user.email)}
|
||||||
%h1.title= h(@user.display_name)
|
%h1.title= h(@user.display_name)
|
||||||
%p= h(@user.name)
|
%p= h(@user.name)
|
||||||
%p= "Membro desde {c}"[:member_since, @user.created_at.strftime("%d de %B de %Y")]
|
%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)]
|
%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