-
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
Oct 9, 2024
1 parent
456f712
commit 9e9b6cf
Showing
10 changed files
with
47 additions
and
68 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<%= render_control %> |
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,12 @@ | ||
module TrlnArgon | ||
module Document | ||
class ActionComponent < Blacklight::Document::ActionComponent | ||
# rubocop:disable Style/StringConcatenation | ||
def label | ||
(content_tag(:i, '', class: @action[:icon].to_s, 'aria-hidden' => true) + ' ' if @action.key?(:icon)).to_s + | ||
t("blacklight.tools.#{@action.name}", default: @action.label || @action.name.to_s.humanize).html_safe | ||
end | ||
# rubocop:enable Style/StringConcatenation | ||
end | ||
end | ||
end |
13 changes: 13 additions & 0 deletions
13
app/components/trln_argon/document/show_tools_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,13 @@ | ||
<div id="document-tools" aria-labelledby="toolsLabel"> | ||
<h2 class="sr-only" id="toolsLabel">Tools</h2> | ||
<%= render Blacklight::Document::ActionsComponent.new( | ||
document: document, | ||
tag: 'ul', | ||
classes: "#{controller_name}Tools nav nav-pills", | ||
wrapping_tag: 'li', | ||
wrapping_classes: "#{config.name}", | ||
actions: actions, | ||
link_classes: "btn btn-outline-secondary", | ||
url_opts: Blacklight::Parameters.sanitize(params.to_unsafe_h) | ||
) %> | ||
</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,6 @@ | ||
module TrlnArgon | ||
module Document | ||
class ShowToolsComponent < Blacklight::Document::ShowToolsComponent | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
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