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.
31 lines
947 B
31 lines
947 B
.cmd
|
|
= action_icon('add', 'Cadastrar nova disciplina', new_course_url) if admin?
|
|
|
|
%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)
|
|
|
|
-# 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{highlight(course.id)}
|
|
.right
|
|
= action_icon('add', 'Matricular-se', enroll_course_url(course))
|
|
= link_to h(course.full_name), course_url(course)
|
|
|