Skip to content
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

Changes for ArchivesSpace core v3.3.1 compatibility, plus #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions frontend/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,15 @@ en:
CC0683: YCAL-DRPR - CC0683
CC0684: GENE - CC0684
CC0685: GENEM-OSB - CC0685
CC1897.9: GENAM - CC1897
CC0686: GENAM-WA - CC0686
CC0687: GENM-ENG - CC0687
CC0688: GENM-EUR - CC0688
payments_module_spend_category:
SC121: Rare Archives - SC121
SC120: Rare Graphic Mat - SC120
SC122: Rare Manuscripts - SC122
SC670: Rare Maps - SC670
SC118: Rare Monographs - SC118
SC669: Rare Serials - SC669
SC119: Rare Unlisted - SC119
"351": "Rare Monographs - 351"
"352": "Rare Serials - 352"
"353": "Rare Graphic Mat - 353"
"356": "Rare Archives - 356"
"358": "Rare Maps - 358"
"359": "Rare Manuscripts - 359"
"369": "Rare Unlisted - 369"
130 changes: 118 additions & 12 deletions frontend/views/agents/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
<%= render_aspace_partial :partial => "shared/form_messages", :locals => {:object => @agent, :form => form} %>

<%= render_aspace_partial :partial => "agents/contact_details", :locals => {:form => form} %>

<% if !full_mode? && has_agent_subrecords?(@agent) %>
<div class="alert alert-warning">This agent has data that is only editable in Full mode. To enable it, ask your administrator to enable Full Mode on this instance and grant you Full Mode permission.</div>
<% end %>

<fieldset>
<section id="basic_information">
<h3>
<%= I18n.t("agent._frontend.section.basic_information") %>
<section id="basic_information" class="subrecord-form-section">
<h3 class='subrecord-form-heading-label'>
<% tooltip = I18n.t("section_headings.basic_information_tooltip") %>
<span title="" data-placement='bottom' data-html="true" data-delay="500" data-trigger="manual" data-template="<div class=&quot;tooltip archivesspace-help&quot;><div class=&quot;tooltip-arrow&quot;></div><div class=&quot;tooltip-inner&quot;></div></div>" class="has-tooltip subrecord-form-heading-label" data-original-title='<%= tooltip %>'>
<%= I18n.t("agent._frontend.section.basic_information") %>
</span>
<%= link_to_help :topic => "#{@agent.agent_type}_basic_information" %>
</h3>

<%= render_plugin_partials("top_of_basic_information_#{@agent.agent_type}",
:form => form,
:record => @agent) %>

<div class="form-group">
<label class="col-sm-2 control-label"><%= I18n.t("agent.type") %></label>
<div class="col-sm-9 label-only">
Expand All @@ -18,6 +29,10 @@

<%= render_aspace_partial :partial => "shared/slug", :locals => {:form => form, :record_type => @agent} if AppConfig[:use_human_readable_urls] %>

<% if @agent.has_key?("is_user") %>
<%= form.label_and_textfield "is_user", { :field_opts => { :readonly => true } } %>
<% end %>

<%= form.label_and_boolean "publish", {}, user_prefs["publish"] %>

<% if user_can?("administer_system") %>
Expand All @@ -28,18 +43,109 @@
<%= form.label_and_readonly "vendor_code" %>
<% end %>
<% end %>

<%= render_plugin_partials("basic_information_#{@agent.agent_type}",
:form => form,
:record => @agent) %>

</section>


<% unless @agent.agent_type.to_s == "agent_software" %>
<section id="record_control_information" class="agents-subsection subrecord-form-section">
<h3 class='subrecord-form-heading-label'>
<% tooltip = I18n.t("section_headings.record_control_information_tooltip") %>
<span title="" data-placement='bottom' data-html="true" data-delay="500" data-trigger="manual" data-template="<div class=&quot;tooltip archivesspace-help&quot;><div class=&quot;tooltip-arrow&quot;></div><div class=&quot;tooltip-inner&quot;></div></div>" class="has-tooltip subrecord-form-heading-label" data-original-title='<%= tooltip %>'>
<%= I18n.t("agent._frontend.section.record_control_information") %>
</span>
</h3>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_record_identifiers", :section_id => "#{@agent.agent_type}_agent_record_identifier", :template => "agent_record_identifiers", help_topic: "agent_record_identifiers", :invisible => false, :lightmode_toggle => false, :section_class => "agent_agent_record_identifiers"} %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_record_controls", :section_id => "#{@agent.agent_type}_agent_record_control", :template => "agent_record_control", help_topic: "agent_record_controls", :cardinality => :zero_to_one, :list_limited_to_one => true, :invisible => !full_mode?, :lightmode_toggle => true, :section_class => "agent_agent_record_control"} %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_other_agency_codes", :section_id => "#{@agent.agent_type}_agent_other_agency_codes", :template => "agent_other_agency_codes", help_topic: "agent_other_agency_codes", :invisible => !full_mode?, :lightmode_toggle => true, :section_class => 'agent_agent_other_agency_codes'} %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_conventions_declarations", :section_id => "#{@agent.agent_type}_agent_conventions_declaration", :template => "agent_conventions_declaration", help_topic: "agent_conventions_declarations", :invisible => !full_mode?, :lightmode_toggle => true, :section_class => "agent_agent_conventions_declarations"} %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "metadata_rights_declarations", :section_id => "#{@agent.agent_type}_metadata_rights_declaration", help_topic: "metadata_rights_declaration", :invisible => !full_mode?, :lightmode_toggle => true, :section_class => "agent_metadata_rights_declarations"} %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_maintenance_histories", :section_id => "#{@agent.agent_type}_agent_maintenance_history", :template => "agent_maintenance_histories", help_topic: "agent_maintenance_histories", :invisible => !full_mode?, :lightmode_toggle => true, :section_class => "agent_agent_maintenance_histories"} %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_sources", :section_id => "#{@agent.agent_type}_agent_sources", :template => "agent_sources", help_topic: "agent_sources", :invisible => !full_mode?, :lightmode_toggle => true, :section_class => "agent_agent_sources" } %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_alternate_sets", :section_id => "#{@agent.agent_type}_agent_alternate_set", :template => "agent_alternate_set", help_topic: "agent_alternate_sets", :invisible => !full_mode?, :lightmode_toggle => true, :section_class => "agent_agent_alternate_sets"} %>
</section>
<% end %>

<section id="identity_information" class="agents-subsection subrecord-form-section">
<h3 class='subrecord-form-heading-label'>
<% tooltip = I18n.t("section_headings.identity_information_tooltip") %>
<span title="" data-placement='bottom' data-html="true" data-delay="500" data-trigger="manual" data-template="<div class=&quot;tooltip archivesspace-help&quot;><div class=&quot;tooltip-arrow&quot;></div><div class=&quot;tooltip-inner&quot;></div></div>" class="has-tooltip subrecord-form-heading-label" data-original-title='<%= tooltip %>'>
<%= I18n.t("agent._frontend.section.identity_information") %>
</span>
</h3>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_identifiers", :section_id => "#{@agent.agent_type}_agent_identifier", :template => "agent_identifiers", help_topic: "agent_identifiers", :invisible => false, :lightmode_toggle => false, :section_class => "agent_agent_identifiers"} %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "names", :section_id => "#{@agent.agent_type}_names", :template_erb => "agents/name_forms/#{@agent.agent_type}", :template => "name_#{@agent.agent_type.to_s.gsub("agent_","")}", :help_topic => "#{@agent.agent_type}_names", :invisible => false, :lightmode_toggle => false, :section_class => "agent_names"} %>
</section>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "dates_of_existence", :section_id => "#{@agent.agent_type}_dates_of_existence", :template_erb => "dates/template", :template => "existence_date", :heading_text => I18n.t("agent._frontend.section.dates_of_existence"), :template_overrides => {"date_label" => "agents/date_labels"}, :help_topic => "#{@agent.agent_type}_dates_of_existence"} %>
<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "names", :section_id => "#{@agent.agent_type}_names", :template_erb => "agents/name_forms/#{@agent.agent_type}", :template => "name_#{@agent.agent_type.to_s.gsub("agent_","")}", :help_topic => "#{@agent.agent_type}_names"} %>
<section id="description_information" class="agents-subsection subrecord-form-section">
<h3 class='subrecord-form-heading-label'>
<% tooltip = I18n.t("section_headings.description_information_tooltip") %>
<span title="" data-placement='bottom' data-html="true" data-delay="500" data-trigger="manual" data-template="<div class=&quot;tooltip archivesspace-help&quot;><div class=&quot;tooltip-arrow&quot;></div><div class=&quot;tooltip-inner&quot;></div></div>" class="has-tooltip subrecord-form-heading-label" data-original-title='<%= tooltip %>'>
<%= I18n.t("agent._frontend.section.description_information") %>
</span>
</h3>


<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "dates_of_existence", :section_id => "#{@agent.agent_type}_dates_of_existence", :template_erb => "dates/template", :template => "structured_date_label_existence", :heading_text => I18n.t("agent._frontend.section.dates_of_existence"), :template_overrides => {"date_label" => "agents/date_labels"}, :help_topic => "#{@agent.agent_type}_dates_of_existence", :invisible => false, :lightmode_toggle => false, :section_class => "agent_dates_of_existence"} %>


<% if @agent.agent_type.to_s == "agent_person" %>
<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_genders", :section_id => "#{@agent.agent_type}_agent_gender", :template => "agent_gender", help_topic: "agent_genders", :invisible => !full_mode?, :lightmode_toggle => true, :section_class => "agent_agent_genders"} %>
<% end %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_places", :section_id => "#{@agent.agent_type}_agent_place", :template => "agent_place", help_topic: "agent_place", :invisible => !full_mode?, :lightmode_toggle => true, :section_class => "agent_agent_places"} %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_occupations", :section_id => "#{@agent.agent_type}_agent_occupation", :template => "agent_occupation", help_topic: "agent_occupation", :invisible => !full_mode?, :lightmode_toggle => true, :section_class => "agent_agent_occupation"} %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_functions", :section_id => "#{@agent.agent_type}_agent_function", :template => "agent_function", help_topic: "agent_function", :invisible => !full_mode?, :lightmode_toggle => true, :section_class => "agent_agent_function"} %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_topics", :section_id => "#{@agent.agent_type}_agent_topic", :template => "agent_topic", help_topic: "agent_topic", :invisible => !full_mode?, :lightmode_toggle => true, :section_class => "agent_agent_topics"} %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "used_languages", :section_id => "#{@agent.agent_type}_used_language", :template => "used_language", :invisible => !full_mode?, :lightmode_toggle => true, :help_topic => "agent_used_language", :section_class => "agent_agent_used_languages"} %>

<% if user_can?('view_agent_contact_record') %>
<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_contacts", :section_id => "#{@agent.agent_type}_contact_details", :template_erb => "agents/contact_details", :template => "agent_contact", :help_topic => "#{@agent.agent_type}_contact_details"} %>
<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_contacts", :section_id => "#{@agent.agent_type}_contact_details", :template_erb => "agents/contact_details", :template => "agent_contact", :help_topic => "#{@agent.agent_type}_contact_details", :invisible => false, :lightmode_toggle => false, :section_class => "agent_agent_contacts"} %>
<% else %>
<%= form.hidden_input "restricted_properties[]", 'agent_contacts' %>
<% end %>

<%= render_aspace_partial :partial => "notes/form", :locals => {:form => form, :all_note_types => note_types_for(form['jsonmodel_type']), :section_id => "#{@agent.agent_type}_notes", :show_apply_note_order_action => false} %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "external_documents", :section_id => "#{@agent.agent_type}_external_documents", :help_topic => "agent_external_documents", :invisible => false, :lightmode_toggle => false, :section_class => "agent_external_documents"} %>
</section>


<% unless @agent.agent_type.to_s == "agent_software" %>
<section id="relation_information" class="agents-subsection subrecord-form-section">
<h3 class='subrecord-form-heading-label'>
<% tooltip = I18n.t("section_headings.relation_information_tooltip") %>
<span title="" data-placement='bottom' data-html="true" data-delay="500" data-trigger="manual" data-template="<div class=&quot;tooltip archivesspace-help&quot;><div class=&quot;tooltip-arrow&quot;></div><div class=&quot;tooltip-inner&quot;></div></div>" class="has-tooltip subrecord-form-heading-label" data-original-title='<%= tooltip %>'>
<%= I18n.t("agent._frontend.section.relation_information") %>
</span>
</h3>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "agent_resources", :section_id => "#{@agent.agent_type}_agent_resource", :template => "agent_resource", help_topic: "agent_external_resources", :invisible => !full_mode?, :lightmode_toggle => true, :section_class => "agent_agent_resources"} %>

<%= render_aspace_partial :partial => "related_agents/form", :locals => {:form => form} %>

<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "external_ids", :hidden => true} %>
</section>
<% end %>
<%= render_aspace_partial :partial => "notes/form", :locals => {:form => form, :all_note_types => note_types_for(form['jsonmodel_type']), :section_id => "#{@agent.agent_type}_notes"} %>
<%= render_aspace_partial :partial => "related_agents/form", :locals => {:form => form} %>
<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "external_documents", :section_id => "#{@agent.agent_type}_external_documents", :help_topic => "#{@agent.agent_type}_external_documents"} %>
<%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "external_ids", :hidden => true} %>

<%= form_plugins_for("agent", form) %>
<%= form_plugins_for("agent", form) %>

</fieldset>
Loading