simple_calendar-timeslot 0.5.0 → 0.5.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 +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/README.md +5 -0
- data/lib/simple_calendar/timeslot/timeslot_calendar.rb +2 -2
- data/lib/simple_calendar/timeslot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43966203ce48c4c965bfb74fb242a926ecc9b5cb34aa0b56426d85410b3f08aa
|
4
|
+
data.tar.gz: 848c5d0c11a76c476e99c9376f81b8b708619bbf1ba1aafe93ad9dc87ec41267
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 849481225d905b3b962d6f90965324c0645db136c7e2bb5e350b26bca496ba9edf8a5f7409c37cfc4d53e3f3e3bf23d1f0d2716a7d0b25c27ceabcd004ba4369
|
7
|
+
data.tar.gz: 7ab1c262be43bc58ad0d3d184c76cf1fa927c58d1156d0c9e110098429f37b2c517b4d636d6c40263cecf4f2663119d284dd3bb3c212582e67cd4487906bd8ce
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -47,12 +47,17 @@ If you use an SCSS file (`application.scss`), add the following line instead:
|
|
47
47
|
|
48
48
|
TODO: Write usage instructions here
|
49
49
|
|
50
|
+
Your model must implement a `start_time` and `end_time` function,
|
51
|
+
or you can specify alternatives as options to the call below
|
52
|
+
as `attribute: :my_start_time` and `end_attribute: :my_end_time`.
|
53
|
+
|
50
54
|
```erb
|
51
55
|
<%= timeslot_calendar(events: @events,
|
52
56
|
number_of_days: 2,
|
53
57
|
px_per_minute: 1.5,
|
54
58
|
orientation: :horizontal,
|
55
59
|
horizontal_height_px: 250,
|
60
|
+
# attribute: :my_start_time,
|
56
61
|
# display_grid: false,
|
57
62
|
# display_bucket_title: :event_type,
|
58
63
|
# bucket_title_size: 30,
|
@@ -63,9 +63,9 @@ module SimpleCalendar
|
|
63
63
|
elsif event.send(attribute).to_date < event.send(end_attribute).to_date
|
64
64
|
(event.send(end_attribute).midnight - 60 - event.send(attribute))/60
|
65
65
|
else
|
66
|
-
event.
|
66
|
+
(event.send(end_attribute) - event.send(attribute))/60
|
67
67
|
end
|
68
|
-
minutes * px_per_minute
|
68
|
+
minutes * px_per_minute
|
69
69
|
end
|
70
70
|
|
71
71
|
def event_top_distance(event, day)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_calendar-timeslot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kim Laplume
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simple_calendar
|