effective_events 0.6.3 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/effective_events/simple_calendar.scss +20 -4
- data/app/models/effective/event.rb +19 -0
- data/app/views/effective/events/show.html.haml +0 -3
- data/app/views/simple_calendar/_month_calendar.html.haml +15 -9
- data/lib/effective_events/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: f24e45c933e3321aedd576be10a7df7d8ce1ec1f4599e9ae8509a9997d1645c2
|
4
|
+
data.tar.gz: 62c674e85d85fea359bb32425a2f2eb515e17153a2d435dc57c4fc2359a1a5e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82304ee7f0098f50722860d3dd7c96c7805184adad091db68adcac850bb4b34d7ee3fa5d44a68a1c3c2013e03132a2a138097c19ff718b69ea34c5f6ceee4eec
|
7
|
+
data.tar.gz: 13a8e694faea6f2b093ef6c30a30cc199dabc3890a16f3e6f6500ae8cc7100c786820fc202433f738233f673f9adee34ebec610cc2ce39504894840e34c238b3
|
@@ -1,14 +1,25 @@
|
|
1
1
|
.effective__simple-calendar {
|
2
|
+
font-weight: $font-weight-bold;
|
3
|
+
text-align: center;
|
4
|
+
max-width: 18rem;
|
5
|
+
|
2
6
|
.calendar-heading {
|
3
7
|
background: $gray-200;
|
8
|
+
margin-bottom: 0.5rem;
|
9
|
+
line-height: 1;
|
10
|
+
}
|
11
|
+
|
12
|
+
.calendar-title {
|
13
|
+
text-transform: uppercase;
|
14
|
+
|
4
15
|
}
|
5
16
|
|
6
17
|
.calendar-arrow {
|
7
|
-
font-size:
|
18
|
+
font-size: 1rem;
|
19
|
+
padding: 0.75rem .875rem;
|
8
20
|
|
9
|
-
a {
|
10
|
-
|
11
|
-
}
|
21
|
+
a { text-decoration: none; }
|
22
|
+
a:hover { text-decoration: none; }
|
12
23
|
}
|
13
24
|
|
14
25
|
.table th {
|
@@ -22,4 +33,9 @@
|
|
22
33
|
vertical-align: middle;
|
23
34
|
border: 1px solid $gray-200;
|
24
35
|
}
|
36
|
+
|
37
|
+
.calendar-day {
|
38
|
+
background: $primary;
|
39
|
+
color: $white;
|
40
|
+
}
|
25
41
|
}
|
@@ -2,6 +2,25 @@
|
|
2
2
|
|
3
3
|
module Effective
|
4
4
|
class Event < ActiveRecord::Base
|
5
|
+
if defined?(PgSearch)
|
6
|
+
include PgSearch::Model
|
7
|
+
|
8
|
+
multisearchable against: [
|
9
|
+
:title,
|
10
|
+
:slug,
|
11
|
+
],
|
12
|
+
associated_against: {
|
13
|
+
rich_texts: [:body],
|
14
|
+
},
|
15
|
+
using: {
|
16
|
+
trigram: {},
|
17
|
+
tsearch: {
|
18
|
+
highlight: true,
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
end
|
23
|
+
|
5
24
|
has_many :event_tickets, -> { EventTicket.sorted }, inverse_of: :event, dependent: :destroy
|
6
25
|
accepts_nested_attributes_for :event_tickets, allow_destroy: true
|
7
26
|
|
@@ -1,20 +1,26 @@
|
|
1
|
+
- date = params[:start_date].presence.try(:to_date) || Date.current
|
2
|
+
|
1
3
|
.effective__simple-calendar
|
2
|
-
.calendar-heading.d-flex.justify-content-between.align-items-center
|
3
|
-
-
|
4
|
-
|
5
|
-
|
6
|
-
.calendar-
|
4
|
+
.calendar-heading.d-flex.justify-content-between.align-items-center
|
5
|
+
.calendar-arrow
|
6
|
+
= link_to t('simple_calendar.previous', default: 'Previous').html_safe, effective_events.events_path(start_date: date - 1.month)
|
7
|
+
|
8
|
+
%span.calendar-title
|
9
|
+
= t('date.month_names')[start_date.month]
|
10
|
+
|
11
|
+
.calendar-arrow
|
12
|
+
= link_to t('simple_calendar.next', default: 'Next').html_safe, effective_events.events_path(start_date: date + 1.month)
|
7
13
|
|
8
|
-
%table.table.table-
|
14
|
+
%table.table.table-sm
|
9
15
|
%thead
|
10
|
-
%tr
|
16
|
+
%tr
|
11
17
|
- date_range.slice(0, 7).each do |day|
|
12
|
-
%th
|
18
|
+
%th= t('date.abbr_day_names')[day.wday]
|
13
19
|
|
14
20
|
%tbody
|
15
21
|
- date_range.each_slice(7) do |week|
|
16
22
|
%tr
|
17
23
|
- week.each do |day|
|
18
24
|
- content = capture_haml(day, sorted_events.fetch(day, []), &passed_block)
|
19
|
-
= content_tag :td, class: content.to_i > 0 && '
|
25
|
+
= content_tag :td, class: content.to_i > 0 && 'calendar-day' do
|
20
26
|
= content
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_events
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|