Skip to content

Commit

Permalink
Merge branch 'master' into clarify_multi_value
Browse files Browse the repository at this point in the history
  • Loading branch information
bess committed Oct 15, 2019
2 parents a94bf17 + 178b8d4 commit f37e269
Show file tree
Hide file tree
Showing 17 changed files with 144,547 additions and 1 deletion.
9 changes: 9 additions & 0 deletions app/assets/stylesheets/zizia/_field_guide.scss
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
.system-field { display: none; }
.field-guide-intro {
margin-top: 1em;
margin-bottom: 1em;
font-size: large;
}
.delimiter {
font-weight: 800;
font-family: monospace;
}
3 changes: 3 additions & 0 deletions app/controllers/zizia/metadata_details_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ class MetadataDetailsController < ::ApplicationController
def show
@details = MetadataDetails.instance.details(work_attributes:
WorkAttributes.instance)

@delimiter = Zizia::HyraxBasicMetadataMapper.new.delimiter

respond_to do |format|
format.html
format.json { render json: @details.to_json }
Expand Down
13 changes: 13 additions & 0 deletions app/views/zizia/metadata_details/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<h2>Metadata Field Guide</h2>
<div class="field-guide-intro">
<p>
This is a dynamically generated guide to the metadata used in this application.
Many fields are multi-valued. To include multiple values in a single CSV cell,
separate them with the delimiter that has been configured for this application:
<span class="delimiter"><%= @delimiter %></span>
</p>
<p>
Example: <span class="delimiter">Value 1<%= @delimiter %>Value 2</span>
</p>
</div>

<% content_for :title, 'Importer Field Guide' %>
<div class="guide-container">
<a class="btn btn-primary" href="/importer_documentation/profile">Download as CSV</a>
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit f37e269

Please sign in to comment.