-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add filter by local group on events list
- Loading branch information
Showing
11 changed files
with
171 additions
and
37 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module Public::EventHelper | ||
def params_for_events | ||
request.params.slice("local_group_id", "scope") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@mixin xr-public-no-data { | ||
.no-data { | ||
margin-bottom: 1rem; | ||
padding: 2rem; | ||
background-image: repeating-linear-gradient(45deg, | ||
$color-extra-light-gray, $color-extra-light-gray 10px, | ||
$white 10px, $white 20px); | ||
color: $dark-gray; | ||
text-align: center; | ||
|
||
.no-data-image { | ||
margin-bottom: 1rem; | ||
|
||
img { | ||
max-width: 10rem; | ||
} | ||
} | ||
|
||
.no-data-notice { | ||
line-height: 1.2; | ||
|
||
small { | ||
display: block; | ||
margin-top: .5rem; | ||
} | ||
} | ||
|
||
&--smaller { | ||
padding: 1rem 2rem; | ||
text-align: left; | ||
|
||
.no-data-image { | ||
margin-bottom: 0; | ||
|
||
img { | ||
height: 5rem; | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0"?> | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> | ||
<defs> | ||
<style>.a{fill:none;stroke-linecap:round;stroke-linejoin:round;}</style> | ||
</defs> | ||
<rect class="a" x="0.5" y="2.501" width="23" height="21" rx="1" ry="1"></rect> | ||
<line class="a" x1="5.5" y1="0.501" x2="5.5" y2="5.501"></line> | ||
<line class="a" x1="18.5" y1="0.501" x2="18.5" y2="5.501"></line> | ||
<line class="a" x1="0.5" y1="7.501" x2="23.5" y2="7.501"></line> | ||
</svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0"?> | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> | ||
<defs> | ||
<style>.a{fill:none;stroke-linecap:round;stroke-linejoin:round;}</style> | ||
</defs> | ||
<path class="a" d="M12.013,22.122a.5.5,0,0,1-.943-.231V12.93H2.109a.5.5,0,0,1-.231-.943L21.66,1.666a.5.5,0,0,1,.674.674Z"></path> | ||
</svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
- if events.any? | ||
- events.each do |event| | ||
.card | ||
.card-section | ||
.grid-x.grid-margin-x | ||
.cell.auto | ||
h3 | ||
= link_to event.name, public_event_path(event) | ||
br | ||
small | ||
span.inline-icon | ||
= render "layouts/icons/calendar" | ||
=<> event.starts_at(date_only: true) | ||
- if event.local_group | ||
span.inline-icon | ||
= render "layouts/icons/compass_arrow" | ||
=< event.local_group.name | ||
- else | ||
span.label.label--warm-yellow = _("NATIONAL EVENT") | ||
|
||
- if event.facebook_url.presence | ||
.cell.shrink | ||
= sanitize(event.facebook_button) | ||
|
||
- if event.description.presence | ||
p | ||
small | ||
= event.excerpt | ||
.spacer-1 | ||
- else | ||
= render "public/shared/no_data", | ||
primary: _("No event planned."), | ||
image_src: "streamline/ux/calendar.svg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- if params[:scope] == "past" | ||
= link_to _("Upcoming events"), | ||
public_events_path(local_group_id: params[:local_group_id]), | ||
class: "expanded secondary button" | ||
- else | ||
= link_to _("Past events"), | ||
public_events_path(scope: "past", local_group_id: params[:local_group_id]), | ||
class: "expanded secondary button" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.no-data | ||
- if local_assigns[:image_src] | ||
.no-data-image | ||
= image_tag image_src, alt: "" | ||
.no-data-notice | ||
- if local_assigns[:primary] | ||
strong = primary | ||
- if local_assigns[:primary] and local_assigns[:secondary] | ||
br | ||
- if local_assigns[:secondary] | ||
small = secondary |