-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into aws-eb-master
- Loading branch information
Showing
154 changed files
with
6,516 additions
and
1,030 deletions.
There are no files selected for viewing
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
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
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
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,19 @@ | ||
class TogglerDropdownComponent < ApplicationComponent | ||
include ApplicationHelper | ||
|
||
attr_reader :title, :hide | ||
|
||
def initialize(title: nil, hide: true, id: nil, classes: '') | ||
super(id: id, classes: classes) | ||
@title = title | ||
@hide = hide | ||
end | ||
|
||
def identifier | ||
@identifier ||= SecureRandom.hex | ||
end | ||
|
||
def render? | ||
content | ||
end | ||
end |
19 changes: 19 additions & 0 deletions
19
app/components/toggler_dropdown_component/toggler_dropdown_component.html.erb
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,19 @@ | ||
<% if hide %> | ||
<div class="bg-light border rounded py-2 m-4"> | ||
<div class="col-12 clearfix"> | ||
<span data-toggle="collapse" | ||
href="#target-<%= identifier %>" | ||
role="button" aria-expanded="true" aria-controls="target" | ||
class="px-2 toggler text-decoration-none collapsed"> | ||
<%= toggler %> | ||
<strong><%= title %></strong> | ||
</span> | ||
|
||
<div id='target-<%= identifier %>' class='collapse p-4'> | ||
<%= content %> | ||
</div> | ||
</div> | ||
</div> | ||
<% else %> | ||
<%= content %> | ||
<% 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ def index | |
end | ||
|
||
def show | ||
route_not_found unless @programme_type.active | ||
end | ||
|
||
private | ||
|
Oops, something went wrong.