hydra-core 5.0.0.pre9 → 5.0.0.pre10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. data/hydra-core.gemspec +2 -2
  2. data/lib/generators/hydra/head_generator.rb +1 -4
  3. data/lib/generators/hydra/templates/config/initializers/hydra_config.rb +0 -1
  4. data/lib/generators/hydra/templates/fedora_conf/conf/development/fedora.fcfg +460 -385
  5. data/lib/generators/hydra/templates/fedora_conf/conf/test/fedora.fcfg +461 -386
  6. data/lib/generators/hydra/templates/solr_conf/conf/schema.xml +70 -484
  7. data/lib/generators/hydra/templates/solr_conf/conf/solrconfig.xml +615 -1663
  8. data/lib/hydra-head/version.rb +1 -1
  9. data/spec/controllers/catalog_controller_spec.rb +2 -4
  10. metadata +8 -25
  11. data/app/views/_flash_msg.html.erb +0 -5
  12. data/app/views/catalog/_citation.html.erb +0 -11
  13. data/app/views/catalog/_delete_partials/_default.html.erb +0 -22
  14. data/app/views/catalog/_edit_partials/_default.html.erb +0 -57
  15. data/app/views/catalog/_edit_partials/_default_details.html.erb +0 -13
  16. data/app/views/catalog/_home.html.erb +0 -4
  17. data/app/views/catalog/_home_text.html.erb +0 -4
  18. data/app/views/catalog/_index_partials/_default.html.erb +0 -20
  19. data/app/views/catalog/_index_partials/_default_details.html.erb +0 -14
  20. data/app/views/catalog/_show_partials/_default.html.erb +0 -20
  21. data/app/views/catalog/_show_partials/_default_details.html.erb +0 -15
  22. data/app/views/catalog/_show_partials/_facets.html.erb +0 -52
  23. data/app/views/catalog/_sms_form.html.erb +0 -21
  24. data/app/views/catalog/_uva_tabs.html.erb +0 -10
  25. data/app/views/catalog/about.html.erb +0 -0
  26. data/app/views/catalog/show.html.erb +0 -40
  27. data/app/views/layouts/hydra-head.html.erb +0 -47
@@ -1,4 +1,4 @@
1
1
  module HydraHead
2
- VERSION = "5.0.0.pre9"
2
+ VERSION = "5.0.0.pre10"
3
3
  end
4
4
 
@@ -54,10 +54,8 @@ describe CatalogController do
54
54
 
55
55
  describe "access controls" do
56
56
  before(:all) do
57
- @public_only_results = Blacklight.solr.find Hash[:fq=>"access_t:public"]
58
- # @public_only_results = Blacklight.solr.find Hash[:phrases=>{:access_t=>"public"}]
59
- # @private_only_results = Blacklight.solr.find Hash[:phrases=>{:access_t=>"private"}]
60
- @private_only_results = Blacklight.solr.find Hash[:fq=>"access_t:private"]
57
+ fq = "read_access_group_t:public OR edit_access_group_t:public OR discover_access_group_t:public"
58
+ @public_only_results = Blacklight.solr.find Hash[:fq=>fq]
61
59
  end
62
60
 
63
61
  it "should only return public documents if role does not have permissions" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0.pre9
4
+ version: 5.0.0.pre10
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-13 00:00:00.000000000 Z
13
+ date: 2012-10-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -67,7 +67,7 @@ dependencies:
67
67
  requirements:
68
68
  - - ~>
69
69
  - !ruby/object:Gem::Version
70
- version: 4.6.0.rc2
70
+ version: 5.0.0.rc1
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
@@ -75,7 +75,7 @@ dependencies:
75
75
  requirements:
76
76
  - - ~>
77
77
  - !ruby/object:Gem::Version
78
- version: 4.6.0.rc2
78
+ version: 5.0.0.rc1
79
79
  - !ruby/object:Gem::Dependency
80
80
  name: RedCloth
81
81
  requirement: !ruby/object:Gem::Requirement
@@ -131,7 +131,7 @@ dependencies:
131
131
  requirements:
132
132
  - - ! '>='
133
133
  - !ruby/object:Gem::Version
134
- version: 0.0.5
134
+ version: 0.0.6
135
135
  type: :runtime
136
136
  prerelease: false
137
137
  version_requirements: !ruby/object:Gem::Requirement
@@ -139,7 +139,7 @@ dependencies:
139
139
  requirements:
140
140
  - - ! '>='
141
141
  - !ruby/object:Gem::Version
142
- version: 0.0.5
142
+ version: 0.0.6
143
143
  - !ruby/object:Gem::Dependency
144
144
  name: deprecation
145
145
  requirement: !ruby/object:Gem::Requirement
@@ -179,7 +179,7 @@ dependencies:
179
179
  requirements:
180
180
  - - '='
181
181
  - !ruby/object:Gem::Version
182
- version: 5.0.0.pre9
182
+ version: 5.0.0.pre10
183
183
  type: :runtime
184
184
  prerelease: false
185
185
  version_requirements: !ruby/object:Gem::Requirement
@@ -187,7 +187,7 @@ dependencies:
187
187
  requirements:
188
188
  - - '='
189
189
  - !ruby/object:Gem::Version
190
- version: 5.0.0.pre9
190
+ version: 5.0.0.pre10
191
191
  - !ruby/object:Gem::Dependency
192
192
  name: sqlite3
193
193
  requirement: !ruby/object:Gem::Requirement
@@ -317,23 +317,6 @@ files:
317
317
  - app/helpers/hydra/facets_helper_behavior.rb
318
318
  - app/models/hydra/datastream/properties.rb
319
319
  - app/models/mods_asset.rb
320
- - app/views/_flash_msg.html.erb
321
- - app/views/catalog/_citation.html.erb
322
- - app/views/catalog/_delete_partials/_default.html.erb
323
- - app/views/catalog/_edit_partials/_default.html.erb
324
- - app/views/catalog/_edit_partials/_default_details.html.erb
325
- - app/views/catalog/_home.html.erb
326
- - app/views/catalog/_home_text.html.erb
327
- - app/views/catalog/_index_partials/_default.html.erb
328
- - app/views/catalog/_index_partials/_default_details.html.erb
329
- - app/views/catalog/_show_partials/_default.html.erb
330
- - app/views/catalog/_show_partials/_default_details.html.erb
331
- - app/views/catalog/_show_partials/_facets.html.erb
332
- - app/views/catalog/_sms_form.html.erb
333
- - app/views/catalog/_uva_tabs.html.erb
334
- - app/views/catalog/about.html.erb
335
- - app/views/catalog/show.html.erb
336
- - app/views/layouts/hydra-head.html.erb
337
320
  - config/jetty.yml
338
321
  - config/locales/hydra.en.yml
339
322
  - hydra-core.gemspec
@@ -1,5 +0,0 @@
1
- <% [:notice, :error, :alert].each do |type| %>
2
- <% if flash[type] %>
3
- <div class="ui-state-<%= type == :error ? 'error' : 'highlight' %> ui-corner-all msg <%= type.to_s %>"><%= flash[type] %></div>
4
- <% end %>
5
- <% end %>
@@ -1,11 +0,0 @@
1
- <h1><%= document_show_html_title %></h1>
2
-
3
- <% if @document.respond_to?(:export_as_mla_citation_txt) %>
4
- <h4>MLA</h4>
5
- <%= @document.send(:export_as_mla_citation_txt) %><br/><br/>
6
- <% end %>
7
-
8
- <% if @document.respond_to?(:export_as_apa_citation_txt) %>
9
- <h4>APA</h4>
10
- <%= @document.send(:export_as_apa_citation_txt) %>
11
- <% end %>
@@ -1,22 +0,0 @@
1
- <%# default partial to delete display solr document fields in catalog show view -%>
2
-
3
- <div class="document_viewer" id="cover_container">
4
- <div id="delete_dialog">
5
- <div id="delete_dialog_container">
6
-
7
-
8
- <div>
9
- <span>Permanently delete <%= @document['id'] %> and its assets from the repository?</span><br/>
10
- <div id="deletable_assets"></div>
11
- </div>
12
-
13
- <div>
14
- <%= button_to("Delete", hydra_asset_path(@document['id']), :confirm => 'Are you sure?', :method => :delete )%>
15
- <%= button_to("Withdraw", withdraw_path(:id => @document['id']) ) %>
16
- <%= button_to("Cancel", :action=>:edit, :controller => :catalog, :id => @document['id'] ) %>
17
-
18
- </div>
19
-
20
- </div>
21
- </div>
22
- </div>
@@ -1,57 +0,0 @@
1
- <%# default partial to display solr document fields in catalog show view -%>
2
-
3
- <%- stylesheet_links << "../plugin_assets/hydra-head/javascripts/date-picker/css/datepicker" %>
4
- <%- stylesheet_links << ["../plugin_assets/hydra-head/javascripts/select_to_ui_slider/css/ui.slider.extras.css"] %>
5
- <%- stylesheet_links << ["../plugin_assets/hydra-head/stylesheets/slider.css"] %>
6
-
7
-
8
-
9
- <% @fedora_object = ActiveFedora::Base.find(params[:id])
10
- @datastreams = @fedora_object.datastreams
11
- %>
12
-
13
- <div class="document_viewer" id="cover_container">
14
- <dl>
15
- <dt>pid:</dt>
16
- <dd><%= @fedora_object.pid %></dd>
17
- </dl>
18
- <dl>
19
- <dt>label:</dt>
20
- <dd><%= @fedora_object.label %></dd>
21
- <dt>state:</dt>
22
- <dd><%= @fedora_object.state %></dd>
23
- <dt>owner id:</dt>
24
- <dd><%= @fedora_object.inner_object.ownerId %></dd>
25
- </dl>
26
- <dl>
27
- <dt>created:</dt>
28
- <dd><%= @fedora_object.create_date %></dd>
29
- <dt>last modified:</dt>
30
- <dd><%= @fedora_object.modified_date %></dd>
31
- </dl>
32
- <dl>
33
- <dt>datastreams:</dt>
34
- <dd>
35
- <ul>
36
- <% @datastreams.keys.sort!.each do |dsid| %>
37
- <li><a href="#<%=dsid%>" class="inline"><%=dsid%></a>
38
- <div style='display:none'>
39
- <div id='<%=dsid%>'>
40
- <h1><%=dsid%></h1>
41
- <dl>
42
- <%= ("<dt>label:</dt><dd>" + @datastreams[dsid].dsLabel + "</dd>").html_safe unless @datastreams[dsid].dsLabel.blank? %>
43
- <%= ("<dt>last modified:</dt><dd>" + @datastreams[dsid].lastModifiedDate + "</dd>").html_safe unless @datastreams[dsid].lastModifiedDate.blank? %>
44
- <%= ("<dt>mimetype:</dt><dd>" + @datastreams[dsid].mimeType + "</dd>").html_safe unless @datastreams[dsid].mimeType.blank? %>
45
- <%= ("<dt>control group:</dt><dd>" + @datastreams[dsid].controlGroup + "</dd>").html_safe unless @datastreams[dsid].controlGroup.blank? %>
46
- </dl>
47
- </div>
48
- </div></li>
49
- <% end %>
50
- </ul>
51
- </dd>
52
- </dl>
53
-
54
- <%= render :partial => "hydra/permissions/index", :locals => {:document => document, :asset_id=>params[:id]}%>
55
-
56
- </div>
57
-
@@ -1,13 +0,0 @@
1
-
2
-
3
- <%# this should imitate the stuff in catalog/_show_partials/_default_details -%>
4
- <%= form_tag hydra_update_url_for(:action=>"update", :controller=>"hydra/assets"), :id=>"document_metadata" "accept-charset"=>"utf-8" do %>
5
-
6
- <div id="multipleEdit">
7
- <dl class="defList fl-theme-mist">
8
- <%= editable_metadata_field(@document_fedora, "descMetadata", :title, :label => "Title:") %>
9
- </dl>
10
- </div>
11
- </div>
12
- <% end %>
13
- <%# -- end of code replicating catalog/_show_partials/_default_details -%>
@@ -1,4 +0,0 @@
1
- <%= render :partial=>'search_form' %>
2
- <%= render :partial=>'home_text' %>
3
-
4
- <%= sidebar_items.join('').html_safe %>
@@ -1,4 +0,0 @@
1
- <div id="results" class="home-text">
2
- <h1>Welcome to Hydra</h1>
3
- <p>Edit or override this page (views/catalog/_home_text.html.erb)</p>
4
- </div>
@@ -1,20 +0,0 @@
1
- <tr class="document">
2
- <td>
3
- <%= link_to_document(document, :label => blacklight_config.show.heading.to_sym) %>
4
- </td>
5
- <td>
6
-
7
- </td>
8
- <td>
9
- <%= l DateTime.parse(document.fetch(:system_create_dt,nil)).to_time %>
10
- </td>
11
- <td>
12
- <%= document.document_type(blacklight_config.show.display_type) %>
13
- </td>
14
- <td>
15
- <%= document.get_file_asset_count()%>
16
- </td>
17
- <td>
18
- Created
19
- </td>
20
- </tr>
@@ -1,14 +0,0 @@
1
- <%# default partial to display solr document fields in catalog index view -%>
2
- <dl class="defList">
3
- <%#= get_relevance_bar(document[:score],"Relevance:") %>
4
- <dt>Date: </dt>
5
- <dd><%= render_document_show_field_value(:document=>document, :field=>"date_t") %></dd>
6
- <dt>Title: </dt>
7
- <dd><%= render_document_show_field_value(:document=>document, :field=>"title_t") %></dd>
8
- <dt>Document Type: </dt>
9
- <dd><%= render_document_show_field_value(:document=>document, :field=>"medium_t") %></dd>
10
- <dt>Location: </dt>
11
- <dd><%= render_document_show_field_value(:document=>document, :field=>"location_t") %></dd>
12
- <dt>Date: </dt>
13
- <dd><%= render_document_show_field_value(:document=>document, :field=>"date_t") %></dd>
14
- </dl>
@@ -1,20 +0,0 @@
1
- <%# default partial to display solr document fields in catalog show view -%>
2
-
3
-
4
- <div class="document_viewer" id="cover_container">
5
- <dl class="defList">
6
- <dt>ID: </dt>
7
- <dd><%= render_document_show_field_value(:document=>document, :field=>"id") %></dd>
8
- <dt>Download:</dt>
9
- <dd id="downloads">
10
- <ul>
11
- <% %>
12
- </ul>
13
- </dd>
14
- <dt>Copyright: </dt>
15
- <dd><%= render_document_show_field_value(:document=>document, :field=>"rights_t") %></dd>
16
- </dl>
17
- </div>
18
- <div class="<%= params[:action]%>_details">
19
- <%= render :partial => "#{params[:controller]}/_#{params[:action]}_partials/default_details", :locals => {:document => document}%>
20
- </div>
@@ -1,15 +0,0 @@
1
- <%# default partial to display solr document fields in catalog show view -%>
2
- <div>
3
- <dl class="defList">
4
- <dt>Date: </dt>
5
- <dd><%= render_document_show_field_value(:document=>document, :field=>"date_t") %></dd>
6
- <dt>Title: </dt>
7
- <dd><%= render_document_show_field_value(:document=>document, :field=>"title_t") %></dd>
8
- <dt>Document Type: </dt>
9
- <dd><%= render_document_show_field_value(:document=>document, :field=>"medium_t") %></dd>
10
- <dt>Location: </dt>
11
- <dd><%= render_document_show_field_value(:document=>document, :field=>"location_t") %></dd>
12
- <dt>Date: </dt>
13
- <dd><%= render_document_show_field_value(:document=>document, :field=>"date_t") %></dd>
14
- </dl>
15
- </div>
@@ -1,52 +0,0 @@
1
- <% facets_display_heading ||= "" %>
2
- <% # main container for facets/limits menu -%>
3
- <div id="facets">
4
- <h2><%=h facets_display_heading %></h2>
5
- <% facet_field_names.each do |solr_fname| %>
6
- <div>
7
- <% display_facet = @response.facets.detect {|f| f.name == solr_fname} -%>
8
- <%#- raise solr_fname.inspect unless display_facet -%>
9
- <% if display_facet && display_facet.items.length > 0 %>
10
- <h3 class="facet_selected"><%= facet_field_labels[solr_fname] -%></h3>
11
- <ul>
12
- <% item_counter = 0 %>
13
- <% display_facet.items.each do |item| -%>
14
- <% if item.hits > 0 %>
15
- <% facet_count_for_value = facet_value_hits(@facet_lookup, solr_fname, item.value) %>
16
- <% if facet_in_params? solr_fname, item.value %>
17
- <li>
18
- <span class="selected"><%= h(item.value) %> (<%= format_num facet_count_for_value %>)</span>
19
- <% link_options = remove_facet_params(solr_fname, item.value, params).merge!Hash["controller" => "catalog", :action=> "index"] %>
20
- [<%= link_to 'remove', url_for(link_options), :class=>'remove' %>]
21
- </li>
22
- <% else %>
23
- <%- if item_counter > Blacklight.config[:facet_more_num]-1 -%>
24
- <li class="more">
25
- <%- else -%>
26
- <li>
27
- <%- end -%>
28
- <% link_options = add_facet_params(solr_fname, item.value).merge!Hash["controller" => "catalog", :action=> "index"] %>
29
- <%= link_to h(item.value), url_for(link_options) %> (<%= format_num facet_count_for_value %>)
30
- </li>
31
- <% end -%>
32
- <% end -%>
33
- <% item_counter += 1 %>
34
- <% end %>
35
- <%= display_facet.items.length > Blacklight.config[:facet_more_num] ? "<li class='more_li'><a href='' class='more_link' title='more #{pluralize(2, facet_field_labels[solr_fname])[2..-1].downcase}'>more<span class='off_screen'> #{pluralize(2, facet_field_labels[solr_fname])[2..-1].downcase}</span></a></li>" : "" %>
36
- <%= display_facet.items.length > Blacklight.config[:facet_more_num] ? "<li class='less_li' style='display:none;'><a href='' class='more_link' title='less #{pluralize(2, facet_field_labels[solr_fname])[2..-1].downcase}'>less<span class='off_screen'> #{pluralize(2, facet_field_labels[solr_fname])[2..-1].downcase}</span></a></li>" : "" %>
37
- </ul>
38
- <% end %>
39
- </div>
40
- <% end %>
41
- </div>
42
- <script type="text/javascript">
43
- $(".more").toggle();
44
- $('.more_link').each(function(){
45
- $(this).click(function(){
46
- $(this).parent().parent().children("li.more").toggle();
47
- $(this).parent().parent().children("li.more_li").toggle();
48
- $(this).parent().parent().children("li.less_li").toggle();
49
- return false;
50
- });
51
- });
52
- </script>
@@ -1,21 +0,0 @@
1
- <% carriers =
2
- {
3
- 'Please select your carrier' => '',
4
- 'AT&T' => 'att',
5
- 'Verizon' => 'verizon',
6
- 'T Mobile' => 'tmobile',
7
- 'Sprint' => 'sprint',
8
- 'Nextel' => 'nextel',
9
- 'Virgin Mobile' => 'vmobile',
10
- 'Alltel' => 'alltel',
11
- 'Cricket' => 'cricket'
12
- }
13
- %>
14
- <h1>SMS This</h1>
15
- <%= form_tag url_for(:action => 'send_email_record', :style => 'sms'), :id => 'sms_form', :method => :post do %>
16
- <%= label_tag(:to, "Phone Number:") %><br/>
17
- <%= text_field_tag :sms_to %><br/>
18
- <%= label_tag(:carrier, "Carrier:") %><br/>
19
- <%= select_tag(:carrier, options_for_select(carriers, '')) %><br/>
20
- <%= submit_tag "Send" %>
21
- <% end %>
@@ -1,10 +0,0 @@
1
- <ul>
2
- <li>
3
- <% display_class = (!params[:home_context] || params[:home_context]=='authors') ? 'class="selected"' : '' %>
4
- <a <%= display_class %> href="/catalog?home_context=authors">Authors</a>
5
- </li>
6
- <li>
7
- <% display_class = params[:home_context]=='journals' ? 'class="selected"' : '' %>
8
- <a <%= display_class %> href="/catalog?home_context=journals">Journals</a>
9
- </li>
10
- </ul>
File without changes
@@ -1,40 +0,0 @@
1
- <%-
2
- doc_title = (document_show_html_title.nil? || document_show_html_title.empty?) ? @document[:id] : document_show_html_title.first
3
- @page_title = "#{doc_title} - #{application_name}"
4
- -%>
5
- <div id="showHead">
6
- <div id="showUtils">
7
- <span class="back_to_cat"><%= link_back_to_catalog :label=>'← Return to search results' %></span>
8
- <%- if @previous_document || @next_document -%>
9
- <div id="previousNextDocument">
10
- <span class="previous"><%= link_to_previous_document(@previous_document) %></span>
11
- <%- end -%>
12
- <%- if session[:search][:counter].to_i > 0 -%>
13
- <span class="result-num">
14
- <%= session[:search][:counter].to_i %> of <%= format_num(session[:search][:total]) %>
15
- </span>
16
- <%- end -%>
17
- <%- if @previous_document || @next_document -%>
18
- <span class="next"><%= link_to_next_document(@next_document)%></span>
19
- </div>
20
- <%- end -%>
21
- <%- if can?(:edit, @document) && controller.action_name != "delete" -%>
22
- <span class="edit-browse">
23
- <%= edit_and_browse_links %>
24
- </span>
25
- <%- end -%>
26
- </div>
27
- </div>
28
- <div id="document" class="<%= controller.action_name == "edit" ? "document_edit" : "document_show" %> <%= "combined_document_view" if session[:scripts] %>">
29
- <div id="<%= format_pid(@document[:id]) %>">
30
- <%= "<h1>Add Your Work</h1>".html_safe if controller.action_name == "edit" %>
31
- <div class="document">
32
- <%= render_document_partial @document, params["action"] %>
33
- </div>
34
- </div>
35
- </div>
36
- <% if controller.action_name == "edit" %>
37
- <div class="delete-asset">
38
- <%= button_to("Delete This Item", {:action => :destroy, :controller => :"hydra/assets", :id => @document_fedora.pid}, :data => { :confirm => 'Are you sure?' }, :method => :delete )%>
39
- </div>
40
- <% end %>