-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Descriptive terms #275
base: dev
Are you sure you want to change the base?
Descriptive terms #275
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ def metadata(res, label, api_field, link: true, separator: " | ") | |
end | ||
end | ||
html << dataArray | ||
.map { |i| "<span>#{i}</span>" } | ||
.map { |i| "#{i}" } | ||
.join(separator) | ||
|
||
sanitize html | ||
|
@@ -36,6 +36,7 @@ def metadata_create_field_link(api_field, item) | |
item_label = value_label(api_field, item) | ||
link_to item_label, prefix_path(route_path, search_params), | ||
rel: "nofollow" | ||
"<dd>#{link}</dd>" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's no There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed as suggested |
||
end | ||
|
||
# regardless of whether the results are a simple array or an array | ||
|
@@ -56,7 +57,7 @@ def metadata_get_field_values(res, api_field) | |
# or could be used by overriding applications if desired | ||
def metadata_label(label, length: nil) | ||
# TODO add pluralization that uses locale | ||
"<strong>#{label}:</strong> " | ||
"<dt><strong>#{label}:</strong> </dt>" | ||
end | ||
|
||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,44 @@ | ||
<div class="metadata"> | ||
<ul> | ||
<dl> | ||
<% if @res["title"].present? %> | ||
<li> | ||
<%= metadata(@res, t("item.metadata.title", default: "Title"), | ||
<%= metadata(@res, t("item.metadata.title", default: "Title"), | ||
"title", link: false) %> | ||
</li> | ||
<% end %> | ||
<% if @res["date_display"].present? %> | ||
<li> | ||
<%= metadata(@res, t("item.metadata.date", default: "Date"), | ||
<%= metadata(@res, t("item.metadata.date", default: "Date"), | ||
"date_display") %> | ||
</li> | ||
<% end %> | ||
<% if @res["creator"].present? %> | ||
<li> | ||
<%= metadata(@res, t("item.metadata.creators", default: "Author(s)"), | ||
<%= metadata(@res, t("item.metadata.creators", default: "Author(s)"), | ||
"creator.name") %> | ||
</li> | ||
<% end %> | ||
<% if @res["format"].present? %> | ||
<li> | ||
<%= metadata(@res, t("item.metadata.format", default: "Format"), | ||
<%= metadata(@res, t("item.metadata.format", default: "Format"), | ||
"format") %> | ||
</li> | ||
<% end %> | ||
<% if @res["category"].present? %> | ||
<li> | ||
<%= metadata(@res, t("item.metadata.category", default: "Category"), | ||
<%= metadata(@res, t("item.metadata.category", default: "Category"), | ||
"category") %> | ||
</li> | ||
<% end %> | ||
<% if @res["subcategory"].present? %> | ||
<li> | ||
<%= metadata(@res, t("item.metadata.subcategory", | ||
<%= metadata(@res, t("item.metadata.subcategory", | ||
default: "Subcategory"), "subcategory") %> | ||
</li> | ||
<% end %> | ||
<% if @res["works"].present? %> | ||
<li> | ||
<%= metadata(@res, t("item.metadata.works", default: "Works"), | ||
<%= metadata(@res, t("item.metadata.works", default: "Works"), | ||
"works") %> | ||
</li> | ||
<% end %> | ||
<% if @res["places"].present? %> | ||
<li> | ||
<%= metadata(@res, t("item.metadata.places", default: "Place(s)"), | ||
<%= metadata(@res, t("item.metadata.places", default: "Place(s)"), | ||
"places") %> | ||
</li> | ||
<% end %> | ||
<%# When copying this template into projects, consider adding rel tag to the source link | ||
to note the format and if the link is external %> | ||
<% if @res["uri_data"].present? %> | ||
<li><strong>Source Document: </strong> | ||
<a href="<%= @res["uri_data"] %>"><%= File.basename(@res["uri_data"]) %></a> | ||
</li> | ||
<dt><strong>Source Document: </strong></dt> | ||
<dl><a href="<%= @res["uri_data"] %>"><%= File.basename(@res["uri_data"]) %></a></dl> | ||
<% end %> | ||
</ul> | ||
</dl> | ||
<%# When copying this template into projects, consider adding rel tag to the source link | ||
to note the format and if the link is external %> | ||
|
||
|
||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think changing this to
is what we want to replace all of the old
<li>
tags with<dd>
tagsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed as suggested