-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2127 from NCCE/feature/primary-i-belong-release
Feature Release - I Belong Primary
- Loading branch information
Showing
132 changed files
with
2,063 additions
and
547 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
class CmsDynamicZoneComponent < ViewComponent::Base | ||
def initialize(cms_models) | ||
@cms_models = cms_models | ||
end | ||
|
||
erb_template <<~ERB | ||
<div class="cms-dynamic-zone"> | ||
<% @cms_models.each do |model| %> | ||
<%= render model.render %> | ||
<% end %> | ||
</div> | ||
ERB | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
class CmsFileComponent < ViewComponent::Base | ||
delegate :cms_url, to: :helpers | ||
|
||
def initialize(file:) | ||
@file = file | ||
end | ||
end |
11 changes: 11 additions & 0 deletions
11
app/components/cms_file_component/cms_file_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,11 @@ | ||
<div class="cms-file"> | ||
<div class="cms-file__content"> | ||
<div> | ||
<%= link_to(@file.filename, cms_url(@file.url)) %> | ||
</div> | ||
<div> | ||
<span class="cms-file__details"><%= "(#{@file.extension}, #{@file.file_size})" %></span> | ||
<span class="cms-file__updated">Updated: <%= @file.updated_at.strftime("%d %b %Y") %></span> | ||
</div> | ||
</div> | ||
</div> |
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,13 @@ | ||
|
||
.cms-file { | ||
@include govuk-font($size: 16); | ||
@include govuk-responsive-margin(2, "bottom"); | ||
|
||
background-image: url('../images/icons/resources-black.svg'); | ||
background-repeat: no-repeat; | ||
background-size: 1.6rem; | ||
|
||
&__content { | ||
margin-left: 1.9rem; | ||
} | ||
} |
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
Oops, something went wrong.