-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Genia Kazymova
committed
Sep 17, 2024
1 parent
2750c27
commit 6ea5c87
Showing
4 changed files
with
19 additions
and
26 deletions.
There are no files selected for viewing
23 changes: 9 additions & 14 deletions
23
app/components/trln_argon/document_header_metadata_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 |
---|---|---|
@@ -1,16 +1,11 @@ | ||
# <dl> | ||
# <!% @fields.each do |field| -%> | ||
# <!%= @view_context.render(field_component(field).new( | ||
# field: field, | ||
# show: @show, | ||
# layout: TrlnArgon::MetadataHeaderFieldLayoutComponent)) %> | ||
# <!% end -%> | ||
# </dl> | ||
|
||
<% content = capture do %> | ||
<% fields.each do |field| -%> | ||
<%= field %> | ||
<% end -%> | ||
<% end %> | ||
<dl> | ||
<% @fields.each do |field| %> | ||
<%= render field.component.new( | ||
field: field, | ||
show: @show, | ||
layout: TrlnArgon::MetadataHeaderFieldLayoutComponent | ||
) %> | ||
<% end %> | ||
</dl> | ||
|
||
<%= @tag.nil? ? content : tag.public_send(@tag, content, class: @classes, **@component_args) %> |
6 changes: 5 additions & 1 deletion
6
app/components/trln_argon/document_metadata_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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
<dl class="document-metadata"> | ||
<% @fields.each do |field| -%> | ||
# <!%= @view_context.render(field_component(field).new(field: field, show: @show, layout: TrlnArgon::MetadataFieldLayoutComponent)) %> | ||
<%= render field.component.new( | ||
field: field, | ||
show: @show, | ||
layout: TrlnArgon::MetadataFieldLayoutComponent | ||
) %> | ||
<% end -%> | ||
</dl> |
2 changes: 1 addition & 1 deletion
2
app/components/trln_argon/document_metadata_list_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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<dl> | ||
<% @fields.each do |field| -%> | ||
# <!%= @view_context.render(field_component(field).new(field: field, show: @show, layout: TrlnArgon::MetadataListFieldLayoutComponent)) %> | ||
<%= render field.component.new(field: field, show: @show, layout: TrlnArgon::MetadataListFieldLayoutComponent) %> | ||
<% end -%> | ||
</dl> |
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