hydra-head 3.0.0pre2 → 3.0.0pre3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. data/README.textile +1 -1
  2. data/README_RAILS3_CHANGES.textile +4 -0
  3. data/app/views/catalog/_edit_partials/_default_details.html.erb +2 -2
  4. data/app/views/contributors/_new.html.erb +2 -2
  5. data/app/views/contributors/new.html.erb +3 -2
  6. data/app/views/fluid_infusion/_uploader.html.erb +5 -6
  7. data/app/views/generic_content_objects/_edit_description.html.erb +2 -2
  8. data/app/views/generic_content_objects/_show_description.html.erb +1 -1
  9. data/app/views/generic_contents/_edit.html.erb +0 -14
  10. data/app/views/generic_images/_edit.html.erb +2 -15
  11. data/app/views/mods_assets/_edit.html.erb +0 -15
  12. data/app/views/mods_assets/_edit_description.html.erb +2 -2
  13. data/app/views/mods_assets/_progress_box.html.erb +5 -5
  14. data/app/views/permissions/_index.html.erb +2 -2
  15. data/app/views/permissions/_new.html.erb +2 -2
  16. data/lib/hydra-head/version.rb +1 -1
  17. data/lib/hydra/catalog.rb +2 -7
  18. metadata +4 -12
  19. data/app/views/_brown_sidebar.html +0 -15
  20. data/app/views/generic_content_objects/contributors/_edit_conference.html.erb +0 -29
  21. data/app/views/generic_content_objects/contributors/_edit_organization.html.erb +0 -29
  22. data/app/views/generic_content_objects/contributors/_edit_person.html.erb +0 -37
  23. data/app/views/generic_content_objects/contributors/_new.html.erb +0 -10
  24. data/app/views/generic_content_objects/contributors/_show_conference.html.erb +0 -22
  25. data/app/views/generic_content_objects/contributors/_show_organization.html.erb +0 -22
  26. data/app/views/generic_content_objects/contributors/_show_person.html.erb +0 -38
data/README.textile CHANGED
@@ -99,7 +99,7 @@ h3. Run the generators and migrations:
99
99
 
100
100
  Run the blacklight generator
101
101
 
102
- <pre>rails g blacklight -devise</pre>
102
+ <pre>rails g blacklight --devise</pre>
103
103
 
104
104
  Run the hydra-head generator
105
105
 
@@ -1,4 +1,8 @@
1
1
 
2
+ h2. Views
3
+
4
+ Security has been tightened in Rails3, forcing you to include _authenticity_token__ with all requests. If you have forms or javascript that submits requests without this token, Rails will destroy the user session, effectively logging the user out (see http://weblog.rubyonrails.org/2011/2/8/csrf-protection-bypass-in-ruby-on-rails). The easiest way to make sure this token is properly included in your forms is to generate the forms using the +form_tag+ or +form_for+ view helpers from Rails.
5
+
2
6
  h2. Fixtures
3
7
 
4
8
  Fixtures are loaded from a directory _within the test app_, which is updated when you run rake hyhead:setup_test_app so in order to update a fixture, you must change it in test_support/fixtures and then either re-run rake hyhead:setup_test_app or copy the fixture into tmp/test_app/test_support/fixtures
@@ -1,7 +1,7 @@
1
1
 
2
2
 
3
3
  <%# this should imitate the stuff in catalog/_show_partials/_default_details -%>
4
- <form id="document_metadata" action="<%= url_for(:action=>"update", :controller=>"assets") %>" method="post" accept-charset="utf-8">
4
+ <%= form_tag url_for(:action=>"update", :controller=>"assets"), :id=>"document_metadata" "accept-charset"=>"utf-8" do %>
5
5
 
6
6
  <div id="multipleEdit">
7
7
  <div id="loading" style="display:none;"><img src="/plugin_assets/hydra-head/images/ajax-loader.gif" width="32" height="32" alt="Saving"/> Saving...</div>
@@ -11,5 +11,5 @@
11
11
  </dl>
12
12
  </div>
13
13
  </div>
14
- </form>
14
+ <% end %>
15
15
  <%# -- end of code replicating catalog/_show_partials/_default_details -%>
@@ -1,4 +1,4 @@
1
- <form id="new_contributor" action="<%=url_for(:action=>"create", :controller=>"contributors", :asset_id=>params[:asset_id]) %>" method="post">
1
+ <%= form_tag url_for(:action=>"create", :controller=>"contributors", :asset_id=>params[:asset_id]), :id=>"new_contributor" "accept-charset"=>"utf-8" do %>
2
2
  <input class="content_type" type="hidden" name="content_type" value="generic_content" />
3
3
  <label for="contributor_type">Contributor Type</label>
4
4
  <select id="contributor_type" name="contributor_type">
@@ -7,4 +7,4 @@
7
7
  <option value="conference">Add a Conference</option>
8
8
  </select>
9
9
  <input type="submit" value="Add Contributor" />
10
- </form>
10
+ <% end %>
@@ -3,11 +3,12 @@
3
3
  <%- ct = params[:contributor_type] %>
4
4
  <%# Calculating the new index so all field values (ie first name & last name) will be added to one contributor with that index %>
5
5
  <%- new_contributor_index = @document_fedora.datastreams_in_memory["descMetadata"].find_by_terms(ct.to_sym).length %>
6
- <form id="add_contributor" action="<%= url_for(:action=>"update", :controller=>"assets", :content_type=>"mods_asset", :id=>params[:asset_id]) %>" method="post" data-resourceType="mods_asset" accept-charset="utf-8">
6
+
7
+ <%= form_tag url_for(:action=>"update", :controller=>"assets", :content_type=>"mods_asset", :id=>params[:asset_id]), :id=>"add_contributor", "data-resourceType"=>"mods_asset", "accept-charset"=>"utf-8" do %>
7
8
  <input name="_method" type="hidden" value="put" />
8
9
  <%= render :partial=>"contributors/edit_#{ct}.html", :locals=>{"edit_#{ct}".to_sym =>{}, "edit_#{ct}_counter".to_sym =>new_contributor_index} %>
9
10
  <%= submit_tag "Add #{ct.capitalize}", {:id => "addContributor"} %>
10
- </form>
11
+ <% end %>
11
12
  <%- else %>
12
13
  <%= render :partial=>"contributors/new.html" %>
13
14
  <%- end %>
@@ -3,19 +3,18 @@
3
3
  <%- container_content_type_param = defined?(container_content_type) ? "?container_content_type=#{container_content_type}" : "" %>
4
4
  <div id="uploader-contents">
5
5
 
6
- <!-- This form will be progressively enhanced by the Fluid Uploader component. -->
7
- <form method="post" enctype="multipart/form-data" class="fl-uploader fl-progEnhance-basic" action="<%=h upload_url %>">
6
+ <!-- This form will be progressively enhanced by the Fluid Uploader component. -->
7
+ <%= form_tag upload_url, :enctype=>"multipart/form-data", :class=>"fl-uploader fl-progEnhance-basic" do %>
8
8
  <input type="hidden" name="container_id" value="<%=h container_id %>"/>
9
9
  <%= hidden_field_tag("container_content_type", container_content_type) if defined?(container_content_type) %>
10
10
  <p>Browse to upload a file.</p>
11
11
  <!-- <input name="Filedata-orig" type="file" /> -->
12
12
  <%= file_field_tag "Filedata", field_tag_options %>
13
13
  <div><input type="submit" value="Upload File"/></div>
14
- </form>
14
+ <% end %>
15
15
 
16
16
  <!-- This is the markup for the Fluid Uploader component itself. -->
17
- <form class="flc-uploader fl-uploader fl-progEnhance-enhanced" action="<%=h upload_url %>" method="get" enctype="multipart/form-data">
18
-
17
+ <%= form_tag upload_url, :enctype=>"multipart/form-data", :class=>"flc-uploader fl-uploader fl-progEnhance-enhanced", :method=>:get do %>
19
18
  <!-- The file queue -->
20
19
  <div class="fl-uploader-queue-wrapper">
21
20
 
@@ -75,7 +74,7 @@
75
74
  <div class="fl-uploader-btns">
76
75
  <button type="button" class="flc-uploader-button-pause fl-uploader-pause fl-uploader-hidden">Stop Upload</button><button type="button" class="flc-uploader-button-upload fl-uploader-upload fl-uploader-button-default fl-uploader-dim ui-button ui-widget ui-state-default" disabled="disabled">Upload</button>
77
76
  </div>
78
- </form>
77
+ <% end %>
79
78
 
80
79
  </div>
81
80
  <div style="clear:both;"></div>
@@ -1,4 +1,4 @@
1
- <form id="descriptive_metadata" action="<%= url_for(:action=>"update", :controller=>"assets", :content_type=>"mods_asset")%>" method="post" data-resourceType="mods_asset" accept-charset="utf-8">
1
+ <%= form_tag url_for(:action=>"update", :controller=>"assets", :content_type=>"mods_asset"), :id=>"descriptive_metadata", "data-resourceType"=>"mods_asset", "accept-charset"=>"utf-8" do %>
2
2
  <input type="hidden" name="_method" value="put"/>
3
3
  <fieldset id="title_fields">
4
4
  <legend>Title</legend>
@@ -47,4 +47,4 @@
47
47
  </dl>
48
48
  </fieldset>
49
49
  <%= submit_tag 'Save Description', {:id => "submitDescription"} %>
50
- </form>
50
+ <% end %>
@@ -1,5 +1,5 @@
1
- <form id="document_metadata" action="<%= url_for(:action=>"update", :controller=>"assets", :content_type=>"mods_asset")%>" method="post" data-resourceType="mods_asset" accept-charset="utf-8">
2
1
 
2
+ <%= form_tag url_for(:action=>"update", :controller=>"assets", :content_type=>"mods_asset"), :id=>"descriptive_metadata", "data-resourceType"=>"mods_asset", "accept-charset"=>"utf-8" do %>
3
3
  <%= render :partial => "#{content_type}s/show_content" %>
4
4
 
5
5
  <fieldset id="title_fields">
@@ -36,20 +36,6 @@
36
36
 
37
37
  </div>
38
38
 
39
- <%#
40
- // This hidden form really belongs elsewhere, but putting it inside of an
41
- // accordion section un-hides it, so I stuck it here for now. -MZ
42
- %>
43
- <form id="new_contributor" action="<%=url_for(:action=>"create", :controller=>"contributors", :asset_id=>params[:id]) %>" method="post" style="display:none;">
44
- <input class="content_type" type="hidden" name="content_type" value="mods_asset" />
45
- <label for="contributor_type">Contributor Type</label>
46
- <select id="contributor_type" name="contributor_type">
47
- <option value="person">Person</option>
48
- <option value="organization">Organization</option>
49
- <option value="conference">Conference</option>
50
- </select>
51
- <input type="submit" value="Add Contributor" />
52
- </form>
53
39
  </div>
54
40
  </div>
55
41
  <% sidebar_items << capture do %>
@@ -34,21 +34,8 @@
34
34
  </div>
35
35
 
36
36
  </div>
37
-
38
- <%#
39
- // This hidden form really belongs elsewhere, but putting it inside of an
40
- // accordion section un-hides it, so I stuck it here for now. -MZ
41
- %>
42
- <form id="new_contributor" action="<%=url_for(:action=>"create", :controller=>"contributors", :asset_id=>params[:id]) %>" method="post" style="display:none;">
43
- <input class="content_type" type="hidden" name="content_type" value="generic_content" />
44
- <label for="contributor_type">Contributor Type</label>
45
- <select id="contributor_type" name="contributor_type">
46
- <option value="person">Person</option>
47
- <option value="organization">Organization</option>
48
- <option value="conference">Conference</option>
49
- </select>
50
- <input type="submit" value="Add Contributor" />
51
- </form>
37
+
38
+
52
39
  </div>
53
40
  </div>
54
41
  <% sidebar_items << capture do %>
@@ -21,21 +21,6 @@
21
21
 
22
22
  </div>
23
23
 
24
- <%#
25
- // This hidden form really belongs elsewhere, but putting it inside of an
26
- // accordion section un-hides it, so I stuck it here for now. -MZ
27
- %>
28
- <form id="new_contributor" action="<%=url_for(:action=>"create", :controller=>"contributors", :asset_id=>params[:id]) %>" method="post" style="display:none;">
29
- <input class="content_type" type="hidden" name="content_type" value="mods_asset" />
30
- <label for="contributor_type">Contributor Type</label>
31
- <select id="contributor_type" name="contributor_type">
32
- <option value="person">Person</option>
33
- <option value="organization">Organization</option>
34
- <option value="conference">Conference</option>
35
- </select>
36
- <input type="submit" value="Add Contributor" />
37
- </form>
38
-
39
24
 
40
25
  </div>
41
26
  </div>
@@ -7,7 +7,7 @@
7
7
  <%- license_values = @ds_rights_metadata.term_values(:copyright, :license) %>
8
8
  <%- journal_title_values = @ds_desc_metadata.term_values(:journal,:title_info,:main_title) %>
9
9
 
10
- <form id="document_metadata" action="<%= url_for(:action=>"update", :controller=>"assets", :content_type=>"mods_asset")%>" method="post" data-resourceType="mods_asset" accept-charset="utf-8">
10
+ <%= form_tag url_for( :action=>"update", :controller=>"assets", :content_type=>"mods_asset"), "data-resourceType"=>"mods_asset", "accept-charset"=>"utf-8" do %>
11
11
  <input name="_method" type="hidden" value="put" />
12
12
 
13
13
  <input class="content_type" type="hidden" name="content_type" value="mods_asset" />
@@ -74,7 +74,7 @@
74
74
 
75
75
  <input name="_method" type="hidden" value="put" />
76
76
  <%= submit_tag 'Save Description', {:id => "saveDescription"} %>
77
- </form>
77
+ <% end %>
78
78
 
79
79
  <%= render :partial => "shared/delete_asset_confirmation", :locals => {:pid => params[:id], :title => (get_values_from_datastream(@document_fedora,"descMetadata", [:title_info, :main_title]).first.empty? ? "this article" : "'" << get_values_from_datastream(@document_fedora,"descMetadata", [:title_info, :main_title]).first << "'") } %>
80
80
  <div id="deleteAsset">
@@ -39,8 +39,8 @@
39
39
  <hr size="1" />
40
40
  <!-- <p class="progressItem progressItemChecked bold">Released</p> -->
41
41
  <!-- <div class="progressInfoBox"><%#= formatTimestamp(@ds_properties.submit_date_values.first) %></div> -->
42
- <form id="document_metadata" action="<%= url_for(:action=>"update", :controller=>"assets", :content_type=>"mods_asset")%>" method="post" data-resourceType="mods_asset" accept-charset="utf-8">
43
- <input name="_method" type="hidden" value="put" />
42
+ <%= form_tag url_for( :action=>"update", :controller=>"assets", :content_type=>"mods_asset"), "data-resourceType"=>"mods_asset", "accept-charset"=>"utf-8" do %>
43
+ <input name="_method" type="hidden" value="put" />
44
44
  <div>
45
45
  <p class="progressItem progressItemChecked bold">
46
46
  <%= fedora_field_label("properties", [:release_to], "Released to") %>
@@ -49,7 +49,7 @@
49
49
  <%= tag(:input, :type=>"hidden", :name=>"asset[properties][released][0]", :value=>"true")%>
50
50
  </p>
51
51
  </div>
52
- </form>
52
+ <% end %>
53
53
  <hr size="1" />
54
54
  <div id="deleteAsset">
55
55
  <%= delete_asset_link(params[:id], "article") %>
@@ -58,7 +58,7 @@
58
58
  <% else %>
59
59
  <li class="progressBoxSubmit noIndent" id="submitToRegistrarDiv">
60
60
  <hr size="1" />
61
- <form id="document_metadata" action="<%= url_for(:action=>"update", :controller=>"assets", :content_type=>"mods_asset")%>" method="post" data-resourceType="mods_asset" accept-charset="utf-8">
61
+ <%= form_tag url_for( :action=>"update", :controller=>"assets", :content_type=>"mods_asset"), "data-resourceType"=>"mods_asset", "accept-charset"=>"utf-8" do %>
62
62
  <input name="_method" type="hidden" value="put" />
63
63
  <div>
64
64
  <%= fedora_field_label("properties", [:release_to], "Release to") %>
@@ -71,7 +71,7 @@
71
71
  <%= button_to 'Release for UVa Library Circulation', {},{:id => "submitForRelease", :disabled => "disabled"} %>
72
72
  <% end %>
73
73
  </div>
74
- </form>
74
+ <% end %>
75
75
  <hr size="1" />
76
76
  <div id="deleteAsset">
77
77
  <%= delete_asset_link(params[:id], "article") %>
@@ -1,7 +1,7 @@
1
1
  <% unless defined?(asset_id) %>
2
2
  <% asset_id = params[:asset_id] %>
3
3
  <% end %>
4
- <form id="permissions_metadata" action="<%= url_for(:asset_id=>@document_fedora.pid,:action=>"update", :controller=>"permissions") %>" method="post" accept-charset="utf-8">
4
+ <%= form_tag url_for(:asset_id=>@document_fedora.pid,:action=>"update", :controller=>"permissions"), :id=>"permissions_metadata", :method=>"post", "accept-charset"=>"utf-8" do %>
5
5
  <input type="hidden" name="_method" value="put"/>
6
6
  <fieldset class="slider">
7
7
  <legend>Group Permissions</legend>
@@ -51,5 +51,5 @@
51
51
  </dl>
52
52
  </fieldset>
53
53
  <%= submit_tag 'Save Permissions', {:id => "submitPermissions"} %>
54
- </form>
54
+ <% end %>
55
55
  <%= render :partial=>"permissions/new.html", :locals=>{:asset_id=>asset_id} %>
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
  <div id="add_permissions" class="slider">
5
5
  <h2>Add Individual Permissions</h2>
6
- <form id="new_permissions" action="<%= url_for(:action=>"create", :controller=>"permissions", :asset_id=>asset_id) %>" method="post">
6
+ <%= form_tag url_for(:action=>"create", :controller=>"permissions", :asset_id=>asset_id), :id=>"new_permissions", :method=>"post" do %>
7
7
  <input id="permission_actor_type" type="hidden" name="permission[actor_type]" value="person" />
8
8
  <label for="permission_actor_id">User ID</label>
9
9
  <input id="permission_actor_id" name="permission[actor_id]" />
@@ -14,5 +14,5 @@
14
14
  <option value="edit">Edit &amp; Upload</option>
15
15
  </select>
16
16
  <input type="submit" value="Add Permissions" />
17
- </form>
17
+ <% end %>
18
18
  </div>
@@ -1,4 +1,4 @@
1
1
  module HydraHead
2
- VERSION = "3.0.0pre2"
2
+ VERSION = "3.0.0pre3"
3
3
  end
4
4
 
data/lib/hydra/catalog.rb CHANGED
@@ -24,9 +24,8 @@ module Hydra::Catalog
24
24
 
25
25
  # Controller filters
26
26
  # Also see the generator (or generated CatalogController) to see more before_filters in action
27
- klass.before_filter :require_solr, :require_fedora, :only=>[:show, :edit, :index, :delete]
27
+ klass.before_filter :require_solr, :require_fedora
28
28
  klass.before_filter :load_fedora_document, :only=>[:show,:edit]
29
- klass.before_filter :lookup_facets, :only=>:edit
30
29
 
31
30
  # View Helpers
32
31
  klass.helper :hydra
@@ -56,9 +55,5 @@ module Hydra::Catalog
56
55
  end
57
56
  @file_assets = @document_fedora.file_objects(:response_format=>:solr)
58
57
  end
59
-
60
- def lookup_facets
61
- params = {:qt=>"search",:defType=>"dismax",:q=>"*:*",:rows=>"0",:facet=>"true", :facets=>{:fields=>Blacklight.config[:facet][:field_names]}}
62
- @facet_lookup = Blacklight.solr.find params
63
- end
58
+
64
59
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-head
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1923832013
4
+ hash: 1923832015
5
5
  prerelease: 5
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
9
  - 0
10
10
  - pre
11
- - 2
12
- version: 3.0.0pre2
11
+ - 3
12
+ version: 3.0.0pre3
13
13
  platform: ruby
14
14
  authors:
15
15
  - Matt Zumwalt, Bess Sadler, Julie Meloni, Naomi Dushay, Jessie Keck, John Scofield, Justin Coyne & many more. See https://github.com/projecthydra/hydra-head/contributors
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-08-02 00:00:00 Z
20
+ date: 2011-08-09 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rails
@@ -741,7 +741,6 @@ files:
741
741
  - app/models/superuser.rb
742
742
  - app/models/video_asset.rb
743
743
  - app/views/_add_assets_links.html.erb
744
- - app/views/_brown_sidebar.html
745
744
  - app/views/_user_util_links.html.erb
746
745
  - app/views/catalog/_citation.html.erb
747
746
  - app/views/catalog/_constraints_element.html.erb
@@ -788,13 +787,6 @@ files:
788
787
  - app/views/generic_content_objects/_edit_description.html.erb
789
788
  - app/views/generic_content_objects/_new.html.erb
790
789
  - app/views/generic_content_objects/_show_description.html.erb
791
- - app/views/generic_content_objects/contributors/_edit_conference.html.erb
792
- - app/views/generic_content_objects/contributors/_edit_organization.html.erb
793
- - app/views/generic_content_objects/contributors/_edit_person.html.erb
794
- - app/views/generic_content_objects/contributors/_new.html.erb
795
- - app/views/generic_content_objects/contributors/_show_conference.html.erb
796
- - app/views/generic_content_objects/contributors/_show_organization.html.erb
797
- - app/views/generic_content_objects/contributors/_show_person.html.erb
798
790
  - app/views/generic_contents/_edit.html.erb
799
791
  - app/views/generic_contents/_index.html.erb
800
792
  - app/views/generic_contents/_show.html.erb
@@ -1,15 +0,0 @@
1
- <div id="brown_box">
2
- <form action="/catalog" method="get" id="side_search">
3
- <label for="q">Search Libra</label>
4
- <input class="q" id="q" name="q" type="text" />
5
- <input type="submit" value="Submit" />
6
- </form>
7
-
8
- <ul>
9
- <li><a href="/">Return to Libra</a></li>
10
- <li><a href="/open_access_self_deposit_policies.html">Libra Policies</a></li>
11
- <li><a href="/open_access_self_deposit_policies.html">Help & FAQs</a></li>
12
- <li><a href="http://search.lib.virginia.edu">VIRGO Library Catalog</a></li>
13
- <li><a href="http://www.lib.virginia.edu">UVa Library Home</a></li>
14
- </ul>
15
- </div>
@@ -1,29 +0,0 @@
1
- <% conference = edit_conference %>
2
- <% conference_counter = edit_conference_counter %>
3
- <% conference_name = get_values_from_datastream(@document_fedora,'descMetadata', [{:conference=>conference_counter}, :namePart]).first %>
4
- <% base_id = "conference_#{conference_counter}" %>
5
- <% if @document_fedora.class.respond_to?(:conference_relator_terms) %>
6
- <% choices = @document_fedora.class.conference_relator_terms %>
7
- <% else %>
8
- <% choices = Hydra::ModsArticle.conference_relator_terms %>
9
- <% end %>
10
- <li>
11
- <dl class="conference contributor" id="<%= base_id %>">
12
- <dt>
13
- <%= fedora_field_label("descMetadata", [{:conference=>conference_counter}, :role, :text], "Conference's Role:") %>
14
- <%= fedora_select(@document_fedora,"descMetadata", [{:conference=>conference_counter}, :role, :text], :choices=>choices.values.sort) %>
15
- </dt>
16
- <dd class="organization">
17
- <ul>
18
- <li>
19
- <%= fedora_field_label("descMetadata", [{:conference=>conference_counter}, :namePart], "Conference:") %>
20
- <%= fedora_text_field(@document_fedora,"descMetadata", [{:conference=>conference_counter}, :namePart], :multiple=>false) %>
21
- </li>
22
- </ul>
23
- <% if params[:action] == "edit" && !conference_name.empty? %>
24
- <%= field_selectors_for("descMetadata", [{:person=>conference_counter}]) %>
25
- <a class="destructive destroy_contributor" href="<%= asset_contributor_path(@document_fedora.pid, "conference", conference_counter) %>" title="Delete '<%= conference_name %>"> Delete</a>
26
- <% end %>
27
- </dd>
28
- </dl>
29
- </li>
@@ -1,29 +0,0 @@
1
- <% organization = edit_organization %>
2
- <% organization_counter = edit_organization_counter %>
3
- <% organization_name = get_values_from_datastream(@document_fedora,'descMetadata', [{:organization=>organization_counter}, :namePart]).first %>
4
- <% base_id = "organization_#{organization_counter}" %>
5
- <% if @document_fedora.class.respond_to?(:organization_relator_terms) %>
6
- <% choices = @document_fedora.class.organization_relator_terms %>
7
- <% else %>
8
- <% choices = Hydra::ModsArticle.organization_relator_terms %>
9
- <% end %>
10
- <li>
11
- <dl class="organization contributor" id="<%= base_id %>">
12
- <dt>
13
- <%= fedora_field_label("descMetadata", [{:organization => organization_counter}, :role, :text], "Organization's Role:") %>
14
- <%= fedora_select(@document_fedora,"descMetadata", [{:organization => organization_counter}, :role, :text], :choices=>choices.values.sort) %>
15
- </dt>
16
- <dd class="organization">
17
- <ul>
18
- <li>
19
- <%= fedora_field_label("descMetadata", [{:organization => organization_counter}, :namePart], "Organization:") %>
20
- <%= fedora_text_field(@document_fedora,"descMetadata", [{:organization => organization_counter}, :namePart], :multiple=>false) %>
21
- </li>
22
- </ul>
23
- <% if (params[:action] == "edit" && !organization_name.empty?) %>
24
- <%= field_selectors_for("descMetadata", [{:person=>organization_counter}]) %>
25
- <a class="destructive destroy_contributor" href="<%= asset_contributor_path(@document_fedora.pid, "organization", organization_counter) %>" title="Delete '<%= organization_name %>"> Delete</a>
26
- <% end %>
27
- </dd>
28
- </dl>
29
- </li>
@@ -1,37 +0,0 @@
1
- <% person = edit_person %>
2
- <% person_counter = edit_person_counter %>
3
- <% person_name = "#{get_values_from_datastream(@document_fedora,'descMetadata', [{:person=>person_counter}, :first_name])} #{get_values_from_datastream(@document_fedora,'descMetadata', [{:person=>person_counter}, :last_name])}" %>
4
- <% base_id = "person_#{person_counter}" %>
5
- <% if @document_fedora.class.respond_to?(:person_relator_terms) %>
6
- <% choices = @document_fedora.class.person_relator_terms %>
7
- <% else %>
8
- <% choices = Hydra::ModsArticle.person_relator_terms %>
9
- <% end %>
10
- <li>
11
- <dl class="person contributor" id="<%= base_id %>">
12
- <dt>
13
- <%= fedora_field_label("descMetadata", [{:person=>person_counter}, :role, :text], "Person's Role:") %>
14
- <%= fedora_select(@document_fedora,"descMetadata", [{:person=>person_counter}, :role, :text], :choices=>choices.values.sort) %>
15
- </dt>
16
- <dd class="multi_inline person">
17
- <ul>
18
- <li class="name_first">
19
- <%= fedora_field_label("descMetadata", [{:person=>person_counter}, :first_name], "First Name") %>
20
- <%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :first_name], :multiple=>false) %>
21
- </li>
22
- <li class="name_last">
23
- <%= fedora_field_label("descMetadata", [{:person=>person_counter}, :last_name], "Last Name") %>
24
- <%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :last_name], :multiple=>false) %>
25
- </li>
26
- <li class="affiliation">
27
- <%= fedora_field_label("descMetadata", [{:person=>person_counter}, :institution], "Institution") %>
28
- <%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :institution], :multiple=>false) %>
29
- </li>
30
- </ul>
31
- <% if ( (params[:action] == "edit" || params[:action] == "create") && !person_name.strip.empty? ) %>
32
- <%= field_selectors_for("descMetadata", [{:person=>person_counter}]) %>
33
- <a class="destructive destroy_contributor" href="<%= asset_contributor_path(@document_fedora.pid, "person", person_counter) %>" title="Delete '<%= person_name %>'"> Delete</a>
34
- <% end %>
35
- </dd>
36
- </dl>
37
- </li>
@@ -1,10 +0,0 @@
1
- <form id="new_contributor" :action=>"http://localhost:3000/assets/#{params[:asset_id]}! /contributors", :method=>"post">
2
- <input class="content_type" :type=>"hidden", :name=>"content_type", :value=>params[:content_type] />
3
- <label :for=>"contributor_type">Contributor Type</label>
4
- <select id="contributor_type" :name=>"contributor_type">
5
- <option :value=>"person">Person</option>
6
- <option :value=>"organization">Organization</option>
7
- <option :value=>"conference">Conference</option>
8
- </select>
9
- <input :type=>"submit", :value=>"Add Contributor" />
10
- </form>
@@ -1,22 +0,0 @@
1
- <% conference = show_conference %>
2
- <% conference_counter = show_conference_counter %>
3
- <% conference_name = get_values_from_datastream(@document_fedora,'descMetadata', [{:conference=>conference_counter}, :namePart]).first %>
4
- <% base_id = "conference_#{conference_counter}" %>
5
- <% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:conference=>conference_counter}, :namePart]).first.empty? %>
6
- <li>
7
- <dl class="conference contributor" id="<%= base_id %>">
8
- <dt>
9
- <%= fedora_field_label("descMetadata", [{:conference=>conference_counter}, :role, :text], "Conference's Role:") %>
10
- <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:conference=>conference_counter}, :role, :text]) %>
11
- </dt>
12
- <dd class="organization">
13
- <ul>
14
- <li>
15
- <%= fedora_field_label("descMetadata", [{:conference=>conference_counter}, :namePart], "Conference:") %>
16
- <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:conference=>conference_counter}, :namePart]) %>
17
- </li>
18
- </ul>
19
- </dd>
20
- </dl>
21
- </li>
22
- <% end %>
@@ -1,22 +0,0 @@
1
- <% organization = show_organization %>
2
- <% organization_counter = show_organization_counter %>
3
- <% organization_name = get_values_from_datastream(@document_fedora,'descMetadata', [{:organization=>organization_counter}, :namePart]).first %>
4
- <% base_id = "organization_#{organization_counter}" %>
5
- <% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:organization => organization_counter}, :namePart]).first.empty? %>
6
- <li>
7
- <dl class="organization contributor" id="<%= base_id %>">
8
- <dt>
9
- <%= fedora_field_label("descMetadata", [{:organization => organization_counter}, :role, :text], "Organization's Role:") %>
10
- <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:organization => organization_counter}, :role, :text]) %>
11
- </dt>
12
- <dd class="organization">
13
- <ul>
14
- <li>
15
- <%= fedora_field_label("descMetadata", [{:organization => organization_counter}, :namePart], "Organization:") %>
16
- <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:organization => organization_counter}, :namePart]) %>
17
- </li>
18
- </ul>
19
- </dd>
20
- </dl>
21
- </li>
22
- <% end %>
@@ -1,38 +0,0 @@
1
- <% person = show_person %>
2
- <% person_counter = show_person_counter %>
3
- <% person_name = "#{get_values_from_datastream(@document_fedora,'descMetadata', [{:person=>person_counter}, :first_name])} #{get_values_from_datastream(@document_fedora,'descMetadata', [{:person=>person_counter}, :last_name])}" %>
4
- <% base_id = "person_#{person_counter}" %>
5
- <% unless ( get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :last_name]).first.empty? || get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :first_name]).first.empty? ) %>
6
- <li>
7
- <dl class="person contributor" id="<%= base_id %>">
8
- <% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :role]).first.empty? %>
9
- <dt>
10
- <%= fedora_field_label("descMetadata", [{:person=>person_counter}, :role, :text], "Person's Role:") %>
11
- <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :role, :text]) %>
12
- </dt>
13
- <% end %>
14
- <dd class="multi_inline person">
15
- <ul>
16
- <% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :first_name]).first.empty? %>
17
- <li class="name_first">
18
- <%= fedora_field_label("descMetadata", [{:person=>person_counter}, :first_name], "First Name") %>
19
- <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :first_name]) %>
20
- </li>
21
- <% end %>
22
- <% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :last_name]).first.empty? %>
23
- <li class="name_last">
24
- <%= fedora_field_label("descMetadata", [{:person=>person_counter}, :last_name], "Last Name") %>
25
- <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :last_name]) %>
26
- </li>
27
- <% end %>
28
- <% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :institution]).first.empty? %>
29
- <li class="affiliation">
30
- <%= fedora_field_label("descMetadata", [{:person=>person_counter}, :institution], "Institution") %>
31
- <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :institution]) %>
32
- </li>
33
- <% end %>
34
- </ul>
35
- </dd>
36
- </dl>
37
- </li>
38
- <% end %>