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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c5eec870decb050184747000f45203451f303d62d7ec429d9a0132122c67b49
4
- data.tar.gz: 2cd76e06a859a34d214b556c686048be4a1cfa920d9b1a29ba3c1805786c1feb
3
+ metadata.gz: f24e45c933e3321aedd576be10a7df7d8ce1ec1f4599e9ae8509a9997d1645c2
4
+ data.tar.gz: 62c674e85d85fea359bb32425a2f2eb515e17153a2d435dc57c4fc2359a1a5e1
5
5
  SHA512:
6
- metadata.gz: 93454dbea3a2d7ad966fa2c2fb9007cdebef1cb8a9b237168a4f3cb3da1b086bced0e344ecb455a8fd4e4c083f5a7bc55c70b745012688ae8dc8926a1e4eea49
7
- data.tar.gz: fca14c2e65806f9e7d38623ba97473a9ecb0ca7db918dfe987a28838fe1eb8df06dc11fb60d1dd1533ff8347baa89fbd52ef9f303b417bba2bf5b23fd3ccb169
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: 10px;
18
+ font-size: 1rem;
19
+ padding: 0.75rem .875rem;
8
20
 
9
- a {
10
- text-decoration: none;
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
 
@@ -14,9 +14,6 @@
14
14
  - if @event.file.attached?
15
15
  = image_tag(@event.file)
16
16
 
17
- - if @event.file.attached?
18
- = image_tag(@event.file)
19
-
20
17
  %ul.list-unstyled
21
18
  -# Not shown
22
19
  %li
@@ -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.mb-2.py-1
3
- - date = params[:start_date].presence.try(:to_date) || Date.current
4
- .calendar-arrow.p-1= link_to t('simple_calendar.previous', default: 'Previous').html_safe, effective_events.events_path(start_date: date - 1.month)
5
- %span.calendar-title.text-uppercase.text-primary.font-weight-bold= t('date.month_names')[start_date.month]
6
- .calendar-arrow.p-1= link_to t('simple_calendar.next', default: 'Next').html_safe, effective_events.events_path(start_date: date + 1.month)
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-striped.table-sm
14
+ %table.table.table-sm
9
15
  %thead
10
- %tr.text-center.text-primary.font-weight-normal.py-2
16
+ %tr
11
17
  - date_range.slice(0, 7).each do |day|
12
- %th.px-1= t('date.abbr_day_names')[day.wday]
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 && 'text-center bg-primary font-weight-bold font-size-small text-white' do
25
+ = content_tag :td, class: content.to_i > 0 && 'calendar-day' do
20
26
  = content
@@ -1,3 +1,3 @@
1
1
  module EffectiveEvents
2
- VERSION = '0.6.3'.freeze
2
+ VERSION = '0.6.5'.freeze
3
3
  end
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.3
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-16 00:00:00.000000000 Z
11
+ date: 2023-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails