This repository has been archived by the owner on Jul 21, 2020. It is now read-only.
/
_form.html.erb
100 lines (89 loc) · 5.32 KB
/
_form.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<%= assets_navbar %>
<% semantic_form_for [@asset, @instantiation] do |form| %>
<h3>Instantiation Identifiers</h3>
<% form.semantic_fields_for :format_ids do |f| %>
<%= render 'format_id_fields', :f => f %>
<% end %>
<%= add_another form, :format_ids %>
<h3>Instantiation Dates</h3>
<% form.semantic_fields_for :instantiation_dates do |f| %>
<%= render 'instantiation_date_fields', :f => f %>
<% end %>
<%= add_another form, :instantiation_dates %>
<h3>Instantiation Dimensions</h3>
<% form.semantic_fields_for :instantiation_dimensions do |f| %>
<%= render 'instantiation_dimension_fields', :f => f %>
<% end %>
<%= add_another form, :instantiation_dimensions %>
<% unless PBCore.config["theme"] == "wnyc" %>
<h3>Instantiation Standard</h3>
<% form.inputs do %>
<%= form.input :standard, :as => :string, :required => false %>
<%= form.input :standard_ref, :as => :string, :label => "Ref", :required => false %>
<%= form.input :standard_source, :as => :string, :label => "Source", :required => false %>
<% end %>
<% end %>
<h3>Instantiation Information</h3>
<% form.inputs do %>
<% if PBCore.config["instantiation_digitized_flag"].present? and PBCore.config["instantiation_digitized_flag"] == true %>
<%= form.input :digitized, :required => false %>
<% end %>
<%= form.input :instantiation_media_type, :collection => InstantiationMediaType.visible, :label => "Media Type", :required => false %>
<%= form.input :format_name, :as => :pbcore_instantiation_format,
:collection => [["Physical", "FormatPhysical"], ["Digital", "FormatDigital"]],
:input_html => { :class => "pbcore-autocomplete",
"data-autocomplete-source" => autocomplete_source_for_format_type(@instantiation) },
:label => "Format",
:required => false %>
<%= form.input :format_location, :as => :string,
:label => "Location",
:required => false %>
<%= form.input :instantiation_generation_tokens, :label => "Generations",
:input_html => { "data-pre" => @instantiation.instantiation_generations.collect { |ig| { :id => ig.id, :name => ig.name }}.to_json },
:required => false %>
<%= form.input :format_time_start, :as => :string, :label => "Time Start", :required => false, :wrapper_html => { :class => "col-1" } %>
<%= form.input :format_duration, :as => :string, :label => "Duration", :required => false, :wrapper_html => { :class => "col-2" } %>
<%= form.input :format_file_size, :as => :string,
:label => "File Size",
:required => false,
:wrapper_html => { :class => "col-1" } %>
<%= form.input :format_file_size_units_of_measure,
:label => "Units of Measure",
:required => false,
:wrapper_html => { :class => "col-2" } %>
<%= form.input :format_data_rate, :as => :string, :label => "Data Rate", :required => false, :wrapper_html => { :class => "col-1" } %>
<%= form.input :format_data_rate_units_of_measure, :label => "Units of Measure", :required => false, :wrapper_html => { :class => "col-2" } %>
<%= form.input :instantiation_color_name, :as => :pbcore_combobox,
:input_html => { :class => "pbcore-autocomplete",
"data-autocomplete-source" => InstantiationColor.visible.map(&:name).to_json },
:label => "Colors",
:required => false %>
<%= form.input :format_tracks, :as => :string, :label => "Tracks", :required => false %>
<%= form.input :format_channel_configuration, :as => :string, :label => "Channel Configuration", :required => false %>
<%= form.input :language_tokens, :label => "Languages",
:input_html => { "data-pre" => prepopulate_language_tokens_for(form.object) },
:required => false %>
<%= form.input :alternative_modes, :as => :string, :required => false %>
<% end %>
<h3>Essence Tracks</h3>
<% form.semantic_fields_for :essence_tracks do |f| %>
<%= render 'essence_track_fields', :f => f %>
<% end %>
<%= add_another form, :essence_tracks %>
<h3>Relations</h3>
<% form.semantic_fields_for :instantiation_relations do |f| %>
<%= render 'instantiation_relation_fields', :f => f %>
<% end %>
<%= add_another form, :instantiation_relations %>
<h3>Rights</h3>
<% form.semantic_fields_for :instantiation_rights_summaries do |f| %>
<%= render 'instantiation_rights_summary_fields', :f => f %>
<% end %>
<%= add_another form, :instantiation_rights_summaries %>
<h3>Annotations</h3>
<% form.semantic_fields_for :annotations do |f| %>
<%= render 'annotation_fields', :f => f %>
<% end %>
<%= add_another form, :annotations %>
<%= form.buttons %>
<% end %>