Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate render_index_field_value and just use the presenter
- Loading branch information
Showing
4 changed files
with
13 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<% doc_presenter = index_presenter(document) %> | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jcoyne
Author
Member
|
||
<%# default partial to display solr document fields in catalog index view -%> | ||
<dl class="document-metadata dl-horizontal dl-invert"> | ||
|
||
<% index_fields(document).each do |field_name, field| -%> | ||
<% if should_render_index_field? document, field %> | ||
<dt class="blacklight-<%= field_name.parameterize %>"><%= render_index_field_label document, field: field_name %></dt> | ||
<dd class="blacklight-<%= field_name.parameterize %>"><%= render_index_field_value document, field: field_name %></dd> | ||
<dd class="blacklight-<%= field_name.parameterize %>"><%= doc_presenter.field_value field_name %></dd> | ||
<% end -%> | ||
<% 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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<% doc_presenter = show_presenter(document) %> | ||
<%# default partial to display solr document fields in catalog show view -%> | ||
<dl class="dl-horizontal dl-invert"> | ||
<% document_show_fields(document).each do |field_name, field| -%> | ||
<% if should_render_show_field? document, field %> | ||
<dt class="blacklight-<%= field_name.parameterize %>"><%= render_document_show_field_label document, field: field_name %></dt> | ||
<dd class="blacklight-<%= field_name.parameterize %>"><%= render_document_show_field_value document, field: field_name %></dd> | ||
<dd class="blacklight-<%= field_name.parameterize %>"><%= doc_presenter.field_value field_name %></dd> | ||
<% end -%> | ||
<% 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
What do you think about the
present(&block)
pattern @flyingzumwalt suggested (not saying it's necessarily a blocker to merging now..): #1329