Skip to content

Commit

Permalink
Merge branch 'develop' into devel-activeadmin-2.0
Browse files Browse the repository at this point in the history
* develop:
  Fix #1118, add and remove tags
  Fix #1133, collections go only in composite volumes, also clean up the code a bit
  Fix #1136, completely remove 511
  • Loading branch information
xhero committed Aug 24, 2021
2 parents ffb09fa + fdfaaf0 commit e1d9ad8
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 15 deletions.
4 changes: 3 additions & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ def edit_user_registration_path
def get_allowed_record_type(source)
return nil if !source.is_a? Source

if source.record_type == MarcSource::RECORD_TYPES[:source] || source.record_type == MarcSource::RECORD_TYPES[:collection]
if source.record_type == MarcSource::RECORD_TYPES[:source]
[MarcSource::RECORD_TYPES[:collection], MarcSource::RECORD_TYPES[:composite_volume]]
elsif source.record_type == MarcSource::RECORD_TYPES[:collection]
[MarcSource::RECORD_TYPES[:composite_volume]]
elsif source.record_type == MarcSource::RECORD_TYPES[:edition_content]
MarcSource::RECORD_TYPES[:edition]
else
Expand Down
12 changes: 7 additions & 5 deletions app/views/editor/_tag_header_buttons.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@
<div class="abuttonset abuttonset-multi">
<%if new_window_controller && !empty_header %>
<!-- this is a special case, see new_window_select_ujs.js -->
<% if selection_record_type != nil && selection_record_type.is_a?(Array) && selection_record_type.count > 1 %>
<!-- For some record types, it is necessary to show two different select windows -->
<!-- For two different types ot document -->
<a class="abutton ui-state-default abutton-icon-solo ui-corner-all new_window_select" href="#" data-controller="<%=new_window_controller%>" data-new-window-field="<%=new_window_field%>" data-selection-record-type="<%=selection_record_type[0]%>" data-selection-lib-siglum="<%=selection_lib_siglum%>" title="Search Collection"><span class="muscat-ui-icon search-button-collection"></span>_</a>
<a class="abutton ui-state-default abutton-icon-solo ui-corner-all new_window_select" href="#" data-controller="<%=new_window_controller%>" data-new-window-field="<%=new_window_field%>" data-selection-record-type="<%=selection_record_type[1]%>" data-selection-lib-siglum="<%=selection_lib_siglum%>" title="Search Composite"><span class="muscat-ui-icon search-button-composite"></span>_</a>
<% if selection_record_type != nil && selection_record_type.is_a?(Array) %>
<% if selection_record_type.include?(MarcSource::RECORD_TYPES[:collection])%>
<a class="abutton ui-state-default abutton-icon-solo ui-corner-all new_window_select" href="#" data-controller="<%=new_window_controller%>" data-new-window-field="<%=new_window_field%>" data-selection-record-type="<%=MarcSource::RECORD_TYPES[:collection]%>" title="Search Collection"><span class="muscat-ui-icon search-button-collection"></span>_</a>
<% end %>
<% if selection_record_type.include?(MarcSource::RECORD_TYPES[:composite_volume])%>
<a class="abutton ui-state-default abutton-icon-solo ui-corner-all new_window_select" href="#" data-controller="<%=new_window_controller%>" data-new-window-field="<%=new_window_field%>" data-selection-record-type="<%=MarcSource::RECORD_TYPES[:composite_volume]%>" title="Search Composite"><span class="muscat-ui-icon search-button-composite"></span>_</a>
<% end %>
<% else %>
<a class="abutton ui-state-default abutton-icon-solo ui-corner-all new_window_select" href="#" data-controller="<%=new_window_controller%>" data-new-window-field="<%=new_window_field%>" data-selection-record-type="<%=selection_record_type%>" data-selection-lib-siglum="<%=selection_lib_siglum%>" title="Search"><span class="ui-icon ui-icon-search"></span>_</a>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
a:
label: records.performer_note
label: records.note_on_performance
'525':
fields:
a:
label: records.supplementary_material
label: records.supplementary_material
'541':
fields:
a:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ groups:
edit_references:
all_tags:
- '500'
- '525'
- '691'
- '651'
- '518'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ groups:
edit_references:
all_tags:
- '500'
- '525'
- '691'
- '651'
- '518'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ tag_exclude:
- '595'
- '651'
- '657'
- '775'
- '787'
edition:
- '506'
Expand Down Expand Up @@ -56,6 +57,7 @@ tag_exclude:
- '787'
- '852'
libretto_source:
- '026'
- '588'
- '590'
- '594'
Expand All @@ -67,7 +69,7 @@ tag_exclude:
- '787'
libretto_edition:
- '506'
- '541'
- '525'
- '541'
- '561'
- '563'
Expand All @@ -77,17 +79,24 @@ tag_exclude:
- '596'
- '598'
- '773'
- '775'
- '787'
- '852'
libretto_edition_content:
- '506'
- '525'
- '541'
- '561'
- '588'
- '591'
- '594'
- '598'
- '774'
- '775'
- '787'
- '852'
theoretica_source:
- '026'
- '588'
- '590'
- '594'
Expand All @@ -97,9 +106,11 @@ tag_exclude:
- '651'
- '657'
- '774'
- '775'
- '787'
theoretica_edition:
- '506'
- '525'
- '541'
- '561'
- '563'
Expand All @@ -113,14 +124,18 @@ tag_exclude:
- '657'
- '772'
- '773'
- '775'
- '787'
- '852'
theoretica_edition_content:
- '506'
- '541'
- '561'
- '591'
- '594'
- '598'
- '774'
- '775'
- '787'
- '852'
composite_volume:
Expand Down
7 changes: 7 additions & 0 deletions config/marc/tag_config_holding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@
:fields:
- - a
- :occurrences: "?"
"525":
:master: a
:indicator: "##"
:occurrences: "*"
:fields:
- - a
- :occurrences: "?"
"541":
:master: a
:indicator: "1#"
Expand Down
7 changes: 0 additions & 7 deletions config/marc/tag_config_source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,6 @@
- :occurrences: "?"
- - c
- :occurrences: "?"
"511":
:master: a
:indicator: "0#"
:occurrences: "*"
:fields:
- - a
- :occurrences: "?"
"518":
:master: a
:indicator: "##"
Expand Down
1 change: 0 additions & 1 deletion config/marc_index/index_config_source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ fields:
"508a":
"510a":
"510c":
"511a":
"518a":
:holding_record: true
"520a":
Expand Down

0 comments on commit e1d9ad8

Please sign in to comment.