ecm_courses2 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ac9d692a0dbca8da096616acc55313f6700ea55
|
4
|
+
data.tar.gz: 534696d10a6bd8d17bd70b86978886d657252918
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bffeba15c668991b20f93746ffe0ec691411881f9e3e34d30c4c1d1d771b79e34443e85d5579eed2c9cebcc2133801cbb565a16016a590a0b279373f8f822174
|
7
|
+
data.tar.gz: 2480820d04d8424237dc6d44c168420d27f791d5673955b4d2010b8451618b654e1ea2e8251fce1ea8bce8d23901544f014358b2f9c94e2ffad86ea17b447c43
|
@@ -17,11 +17,13 @@ module Ecm::Courses
|
|
17
17
|
@course_category = load_resource
|
18
18
|
@courses = @course_category.courses.all
|
19
19
|
@course_dates = @courses.reduce([]) { |cd, c| cd << c.course_dates.for_month(@date).all }.flatten
|
20
|
-
end
|
21
20
|
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
respond_to do |format|
|
22
|
+
format.html
|
23
|
+
format.ics do
|
24
|
+
send_data @course_category.to_icalendar.to_ical, type: 'text/calendar'
|
25
|
+
end
|
26
|
+
end
|
25
27
|
end
|
26
28
|
|
27
29
|
private
|
@@ -9,9 +9,9 @@
|
|
9
9
|
= month_calendar_pagination(date)
|
10
10
|
= month_calendar date, course_dates, display_method: :course, start_day: :monday
|
11
11
|
.bottom-margin-4
|
12
|
-
= link_to(
|
12
|
+
= link_to(url_for(format: :ics), class: 'btn btn-default') do
|
13
13
|
%span.glyphicon.glyphicon-calendar
|
14
|
-
=
|
14
|
+
= url_for(format: :ics)
|
15
15
|
|
16
16
|
.course_categories-tree
|
17
17
|
= nested_li(course_category.descendants, {}) do |course_category, level|
|
data/config/routes.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
Ecm::Courses::Engine.routes.draw do
|
2
2
|
localized do
|
3
|
-
resources :course_categories, only: [:index, :show]
|
4
|
-
get :ical, on: :member
|
5
|
-
end
|
3
|
+
resources :course_categories, only: [:index, :show]
|
6
4
|
resources :courses, only: [:show] do
|
7
5
|
member do
|
8
6
|
get "calendar", action: :calendar
|
data/lib/ecm/courses/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_courses2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -388,7 +388,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
388
388
|
version: '0'
|
389
389
|
requirements: []
|
390
390
|
rubyforge_project:
|
391
|
-
rubygems_version: 2.
|
391
|
+
rubygems_version: 2.6.10
|
392
392
|
signing_key:
|
393
393
|
specification_version: 4
|
394
394
|
summary: Ecm::Courses.
|