Skip to content
Snippets Groups Projects
Commit 07e87105 authored by Anusha Ranganathan's avatar Anusha Ranganathan
Browse files

Modified metadata display in view

parent b7f3cf3f
No related branches found
No related tags found
3 merge requests!115Tombstone not available for dataset,!77Bump ruby v2.7.7,!31Feature/metadata ui improvements
Pipeline #4710 failed
......@@ -170,4 +170,12 @@ form .field-wrapper label[required="required"]::after {
.sub-collections-wrapper,
.works-wrapper {
margin-bottom: 10px;
}
.float-right {
float: right;
}
.work_description {
text-align: justify;
}
\ No newline at end of file
......@@ -4,39 +4,38 @@
<!-- Description accordion -->
<div class="panel panel-default">
<!-- Accordion header -->
<div class="panel-heading" data-toggle="collapse" data-target="#description">
<div class="panel-heading" data-toggle="collapse" data-target="#metadata">
<h4 class="panel-title edit-work">
<a class="accordion-toggle">Description</a>
<%= link_to t('.edit'), edit_polymorphic_path([main_app, presenter]), class: 'btn btn-default' %>
<a class="accordion-toggle">Metadata</a>
</h4>
</div> <!-- Accordion header -->
<!-- Accordion body -->
<div id="description" class="panel-collapse collapse in">
<div id="metadata" class="panel-collapse collapse in">
<div class="panel-body">
<%= presenter.attribute_to_html(:doi, label: t('rdms.fields.show.doi'), html_dl: true) %>
<%= presenter.attribute_to_html(:title, label: t('rdms.fields.show.title'), html_dl: true) %>
<%= presenter.attribute_to_html(:alternative_title, label: t('rdms.fields.show.alternative_title'), html_dl: true) %>
<%= presenter.attribute_to_html(:complex_person, render_as: :nested_person, label: t('rdms.fields.show.complex_person'), html_dl: true) %>
<%= presenter.attribute_to_html(:resource_type, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:abstract, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:description, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:crc_resource_type, label: t('rdms.fields.show.crc_resource_type'), render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:date_created, render_as: :linked, search_field: 'date_created_tesim', html_dl: true) %>
<%= presenter.attribute_to_html(:date_modified, label: t('hyrax.base.show.last_modified'), html_dl: true) %>
<%= presenter.attribute_to_html(:complex_date, render_as: :nested_date, label: t('rdms.fields.show.complex_date'), html_dl: true) %>
<%= presenter.attribute_to_html(:complex_identifier, render_as: :nested_identifier, label: t('rdms.fields.show.complex_identifier'), html_dl: true) %>
<%= presenter.attribute_to_html(:modality, label: t('rdms.fields.show.modality'), html_dl: true) %>
<%= presenter.attribute_to_html(:complex_subject, render_as: :nested_subject, label: t('rdms.fields.show.complex_subject'), html_dl: true) %>
<%= presenter.attribute_to_html(:approval_number, label: t('rdms.fields.show.approval_number'), html_dl: true) %>
<%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:complex_person, render_as: :nested_person, label: t('rdms.fields.complex_person'), html_dl: true) %>
<%= presenter.attribute_to_html(:coverage, label: t('rdms.fields.coverage'), render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:crc_resource_type, label: t('rdms.fields.crc_resource_type'), render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:modality, label: t('rdms.fields.modality'), html_dl: true) %>
<%= presenter.attribute_to_html(:complex_subject, render_as: :nested_subject, label: t('rdms.fields.complex_subject'), html_dl: true) %>
<%= presenter.attribute_to_html(:approval_number, label: t('rdms.fields.approval_number'), html_dl: true) %>
<%= presenter.attribute_to_html(:complex_identifier, render_as: :nested_identifier, label: t('rdms.fields.complex_identifier'), html_dl: true) %>
<%= presenter.attribute_to_html(:complex_date, render_as: :nested_date, label: t('rdms.fields.complex_date'), html_dl: true) %>
<%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:publisher, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:coverage, label: t('rdms.fields.show.coverage'), render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:complex_funding_reference, render_as: :nested_funding_reference, label: t('rdms.fields.show.complex_funding_reference'), html_dl: true) %>
<%= presenter.attribute_to_html(:complex_relation, render_as: :nested_relation, label: t('rdms.fields.show.complex_relation'), html_dl: true) %>
<%= presenter.attribute_to_html(:software_version, label: t('rdms.fields.show.software_version'), html_dl: true) %>
<%= presenter.attribute_to_html(:extra_information, label: t('rdms.fields.show.extra_information'), html_dl: true) %>
<%= presenter.attribute_to_html(:complex_funding_reference, render_as: :nested_funding_reference, label: t('rdms.fields.complex_funding_reference'), html_dl: true) %>
<%= presenter.attribute_to_html(:extra_information, label: t('rdms.fields.extra_information'), html_dl: true) %>
<%= presenter.attribute_to_html(:date_created, render_as: :linked, search_field: 'date_created_tesim', html_dl: true) %>
<%= presenter.attribute_to_html(:date_modified, label: t('hyrax.base.last_modified'), html_dl: true) %>
<%= presenter.attribute_to_html(:alternative_title, label: t('rdms.fields.alternative_title'), html_dl: true) %>
<%= presenter.attribute_to_html(:abstract, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:description, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:resource_type, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:doi, label: t('rdms.fields.doi'), html_dl: true) %>
<%= presenter.attribute_to_html(:complex_relation, render_as: :nested_relation, label: t('rdms.fields.complex_relation'), html_dl: true) %>
<%= presenter.attribute_to_html(:software_version, label: t('rdms.fields.software_version'), html_dl: true) %>
</div> <!-- panel body -->
</div> <!-- Accordion body -->
</div> <!-- Description accordion -->
......
<div class="base-terms">
<% f.object.primary_terms.each do |term| %>
<%= render_edit_field_partial(term, f: f) %>
<% end %>
</div>
<% if f.object.display_additional_fields? %>
<%= link_to t('hyrax.works.form.additional_fields'),
'#extended-terms',
class: 'btn btn-default additional-fields',
data: { toggle: 'collapse' },
role: "button",
'aria-expanded'=> "false",
'aria-controls'=> "extended-terms" %>
<div id="extended-terms" class='collapse'>
<% f.object.secondary_terms.each do |term| %>
<%= render_edit_field_partial(term, f: f) %>
<% end %>
<%= render 'form_media', f: f %>
</div>
<% end %>
<% titles = [] %>
<div class="float-right">
<%= link_to t('.edit'), edit_polymorphic_path([main_app, presenter]), class: 'btn btn-default' %>
</div><br/>
<% if presenter.title.present? %>
<% presenter.title.each do |title| %>
<h2 class="work_title">
<%= presenter.crc_work_type.first.capitalize %>: <%= title %>
</h2>
<% titles.append(title) %>
<% end %>
<% end %>
<% if presenter.experiment_title.present? %>
<% presenter.experiment_title.each do |title| %>
<% unless titles.include? title %>
<h2 class="work_title"><%= title %></h2>
<% end %>
<% end %>
<% end %>
<% if presenter.experiment_description.present? %>
<% presenter.experiment_description.each do |description| %>
<p class="work_description"><%= iconify_auto_link(description) %></p>
<% end %>
<% end %>
<% if presenter.description.present? %>
<% presenter.description.each do |description| %>
<p class="work_description"><%= iconify_auto_link(description) %></p>
<% end %>
<% end %>
......@@ -45,7 +45,11 @@ en:
complex_subject_type: "Subject type"
complex_subject_sex: "Subject sex"
complex_subject_age: "Subject age"
coverage: "Coverage"
crc_resource_type: "CRC Resource type"
doi: "DOI"
experiment_title: "Experiment title"
experiment_description: "Experiment description"
extra_information: "Extra information"
first_name: "Given name"
full_name: "Full name"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment