curation_concerns 0.11.0.rc1 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c78f15b06d8b5d61d52a99b9498950819fffdc9
4
- data.tar.gz: 79effc2f8a6b6ecec62815cbe91e5a5f0987f239
3
+ metadata.gz: 5316df9b39e54e4daa22c70a6c3b29792b5c34f5
4
+ data.tar.gz: 3bfc5ebcffca4b90f451bc5ff6939f7ba710b6ab
5
5
  SHA512:
6
- metadata.gz: ad7c5e7f4605f50a235bd79d2fce714e59fb3febd3f26f17e20fe3d21bf2aafa378dd3d44a8ce9dcb480f74e62d01640cbb0e0cebd5c5a6819848f0cab06a7eb
7
- data.tar.gz: 4f736f41c13de86dd6ed2004c35407024efbac2e8b3a6114dac7674e20fa61d04ea2811b1fa0fc89b325dc6fec9dff6c6f7c0ffa7b487abe789f94cc50c908ed
6
+ metadata.gz: 999744a175fde9f98b998ecb7da9a6ebd617d93ecac848d5ddeb8c5d0ebaf314e838dc6914bbf7619b191b4cfefd66ff8900948b8a7c3c186e0af0e6921491c5
7
+ data.tar.gz: 25caa2a90d520913508b28b7a7e695100ed53ed1257f1a88d1eead24e8869e0dd5612776ff0c5a6fb4c0d0aadbdd579661ef962744492ee033b9ff2956e5d045
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.0.rc1
1
+ 0.11.0
@@ -1,8 +1,6 @@
1
1
  @import 'bootstrap-sprockets';
2
2
  @import 'bootstrap';
3
- @import "bootstrap/variables";
4
3
  @import 'blacklight/facets';
5
- @import 'curation_concerns/variables_bootstrap';
6
4
  @import "curation_concerns/global-variables";
7
5
  @import "curation_concerns/positioning";
8
6
  @import "curation_concerns/modules";
@@ -1,8 +1,4 @@
1
- @import 'modules/accordion';
2
- @import 'modules/accessibility';
3
- @import 'modules/attributes';
4
1
  @import 'modules/classify_work';
5
- @import 'modules/emphatic_action_area';
6
2
  @import 'modules/forms';
7
3
  @import 'modules/multi_value_fields';
8
4
  @import 'modules/search_results';
@@ -69,38 +69,6 @@ form label.required { font-weight: bold; }
69
69
  }
70
70
  }
71
71
 
72
-
73
- .field-choice {
74
- padding-bottom:1em;
75
- padding-top:1em;
76
- text-align:center;
77
- font-size:1.3em;
78
- line-height:1;
79
- z-index: -1000; // Prevent padding from obscuring file upload button when window is narrow
80
- }
81
-
82
- .accept-contributor-agreement {
83
- padding: 1em 2.5em;
84
- input, label {
85
- font-size:1.3em;
86
- font-weight: normal;
87
- }
88
- }
89
-
90
72
  form.button-to {
91
73
  margin:0 .3em;
92
74
  }
93
-
94
- form.pull-right {
95
- margin-right:0;
96
- }
97
-
98
- .inline-checkbox {
99
- display: inline-block;
100
- padding-right:1em;
101
- }
102
-
103
- .help-inline {
104
- color: $gray;
105
- padding-left: 1em;
106
- }
@@ -1,6 +1,3 @@
1
- .search-results-list {
2
- }
3
-
4
1
  #documents .document {
5
2
  border-top: 1px solid $gray-lighter;
6
3
  margin-top: $padding-base-vertical;
@@ -47,8 +44,3 @@
47
44
  text-align:left;
48
45
  }
49
46
  }
50
-
51
-
52
- .search-result-details {
53
- }
54
-
@@ -1,9 +1,9 @@
1
1
  module CurationConcerns
2
- class FileSetSearchBuilder < Hydra::SearchBuilder
2
+ class FileSetSearchBuilder < ::SearchBuilder
3
3
  include CurationConcerns::SingleResult
4
- self.default_processor_chain += [:only_file_sets]
5
4
 
6
- def only_file_sets(solr_parameters)
5
+ # This overrides the filter_models in FilterByType
6
+ def filter_models(solr_parameters)
7
7
  solr_parameters[:fq] << ActiveFedora::SolrQueryBuilder.construct_query_for_rel(has_model: ::FileSet.to_class_uri)
8
8
  end
9
9
  end
@@ -1,10 +1,14 @@
1
- <div style="float: right;" >
1
+ <div class="col-md-3 pull-right">
2
2
  <%= form_for([collections, @collection], url: collections.edit_collection_path , method: :get, class: "well form-search") do |f| %>
3
3
 
4
4
  <label class="sr-only">Search Collection <%= @collection.title %></label>
5
- <%= text_field_tag :cq, params[:cq], class: "collection-query", placeholder: "Search Collection", size: '30', type: "search", id: "collection_search" %>
5
+ <div class="input-group">
6
+ <%= text_field_tag :cq, params[:cq], class: "collection-query form-control", placeholder: "Search Collection", size: '30', type: "search", id: "collection_search" %>
7
+ <div class="input-group-btn">
8
+ <button type="submit" class="btn btn-primary" id="collection_submit"><i class="glyphicon glyphicon-search"></i> Go</button>
9
+ </div>
10
+ </div>
6
11
  <%= hidden_field_tag :sort, params[:sort], id: 'collection_sort' %>
7
12
  <%= render_hash_as_hidden_fields(search_state.params_for_search.except(:cq, :sort, :qt, :page)) %>
8
- <button type="submit" class="btn btn-primary" id="collection_submit"><i class="icon-search"></i> Go</button>
9
13
  <% end %>
10
14
  </div>
@@ -1,10 +1,14 @@
1
- <div style="float: right;" >
1
+ <div class="col-md-3 pull-right">
2
2
  <%= form_for [collections, @presenter], method: :get, class: "well form-search" do |f| %>
3
3
 
4
4
  <label class="sr-only">Search Collection <%= @presenter.title %></label>
5
- <%= text_field_tag :cq, params[:cq], class: "collection-query", placeholder: "Search Collection", size: '30', type: "search", id: "collection_search" %>
5
+ <div class="input-group">
6
+ <%= text_field_tag :cq, params[:cq], class: "collection-query form-control", placeholder: "Search Collection", size: '30', type: "search", id: "collection_search" %>
7
+ <div class="input-group-btn">
8
+ <button type="submit" class="btn btn-primary" id="collection_submit"><i class="glyphicon glyphicon-search"></i> Go</button>
9
+ </div>
10
+ </div>
6
11
  <%= hidden_field_tag :sort, params[:sort], id: 'collection_sort' %>
7
12
  <%= render_hash_as_hidden_fields(search_state.params_for_search.except(:cq, :sort, :qt, :page)) %>
8
- <button type="submit" class="btn btn-primary" id="collection_submit"><i class="icon-search"></i> Go</button>
9
13
  <% end %>
10
14
  </div>
@@ -1,3 +1,7 @@
1
1
  <h1>Unauthorized</h1>
2
- <p>The <%= curation_concern.human_readable_type.downcase %> you have tried to access is private<p>
3
- <p>ID: <%= curation_concern.id %>
2
+ <% if respond_to?(:curation_concern) %>
3
+ <p>The <%= curation_concern.human_readable_type.downcase %> you have tried to access is private<p>
4
+ <p>ID: <%= curation_concern.id %>
5
+ <% else %>
6
+ <p>The page you have tried to access is private<p>
7
+ <% end %>
@@ -3,7 +3,7 @@
3
3
  <% if include_works_link || include_collections_link %>
4
4
  <div class="btn-group add-content">
5
5
  <%= link_to curation_concerns.new_classify_concern_path, id: "add-content", class: "btn btn-primary dropdown-toggle", data: { toggle: "dropdown"} do %>
6
- <span class="glyphicon glyphicon-plus"></span><span class="visuallyhidden">Add</span>
6
+ <span class="glyphicon glyphicon-plus"></span><span class="sr-only">Add</span>
7
7
  <% end %>
8
8
  <ul class="dropdown-menu quick-create">
9
9
  <% if include_works_link %>
@@ -3,10 +3,17 @@
3
3
  <legend class="sr-only">Search <%= t('curation_concerns.product_name') %></legend>
4
4
  <%= label_tag :catalog_search, t('curation_concerns.search.form.q.label'), class: "sr-only" %>
5
5
  <%= render_hash_as_hidden_fields(search_state.params_for_search.except(:q, :search_field, :qt, :page, :utf8)) %>
6
- <%= text_field_tag(:q, params[:q], class: "q search-query", id: "catalog_search",
7
- placeholder: t('curation_concerns.search.form.q.placeholder'), tabindex: "1", type: "search") %>
8
- <button type="submit" class="search-submit btn btn-primary" id="keyword-search-submit" tabindex="2">
9
- <i class="glyphicon glyphicon-search"></i><span class="sr-only">Search</span>
10
- </button>
6
+
7
+
8
+ <div class="input-group">
9
+ <%= text_field_tag(:q, params[:q], class: "q search-query form-control", id: "catalog_search",
10
+ placeholder: t('curation_concerns.search.form.q.placeholder'), tabindex: "1", type: "search") %>
11
+ <div class="input-group-btn">
12
+ <button type="submit" class="search-submit btn btn-primary" id="keyword-search-submit" tabindex="2">
13
+ <i class="glyphicon glyphicon-search"></i><span class="sr-only">Search</span>
14
+ </button>
15
+ </div>
16
+ </div>
17
+
11
18
  </fieldset>
12
19
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module CurationConcerns
2
- VERSION = "0.11.0.rc1".freeze
2
+ VERSION = "0.11.0".freeze
3
3
  end
@@ -9,7 +9,6 @@
9
9
  # end
10
10
  #
11
11
  # Example: prevent PhantomJS auto install, uses PhantomJS already on your path.
12
- # Jasmine.configure do |config|
13
- # config.prevent_phantom_js_auto_install = true
14
- # end
15
- #
12
+ Jasmine.configure do |config|
13
+ config.prevent_phantom_js_auto_install = true
14
+ end
@@ -8,8 +8,8 @@ describe CurationConcerns::FileSetSearchBuilder do
8
8
  let(:solr_params) { { fq: [] } }
9
9
 
10
10
  subject { described_class.new(context) }
11
- describe '#only_file_sets' do
12
- before { subject.only_file_sets(solr_params) }
11
+ describe '#filter_models' do
12
+ before { subject.filter_models(solr_params) }
13
13
 
14
14
  it 'adds FileSet to query' do
15
15
  expect(solr_params[:fq].first).to include('{!field f=has_model_ssim}FileSet')
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'curation_concerns/base/unauthorized.html.erb' do
4
+ context "when it responds to curation_concern" do
5
+ let(:concern) { double(human_readable_type: 'Book', id: '777') }
6
+ before do
7
+ allow(view).to receive(:curation_concern).and_return(concern)
8
+ render
9
+ end
10
+ it "shows a message to the user" do
11
+ expect(rendered).to have_content "Unauthorized The book you have tried to access is private ID: 777"
12
+ end
13
+ end
14
+
15
+ context "when it doesn't respond to curation_concern" do
16
+ before do
17
+ render
18
+ end
19
+ it "shows a message to the user" do
20
+ expect(rendered).to have_content "Unauthorized The page you have tried to access is private"
21
+ end
22
+ end
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: curation_concerns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0.rc1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt
@@ -88,14 +88,14 @@ dependencies:
88
88
  requirements:
89
89
  - - '='
90
90
  - !ruby/object:Gem::Version
91
- version: 0.11.0.rc1
91
+ version: 0.11.0
92
92
  type: :runtime
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - '='
97
97
  - !ruby/object:Gem::Version
98
- version: 0.11.0.rc1
98
+ version: 0.11.0
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: hydra-editor
101
101
  requirement: !ruby/object:Gem::Requirement
@@ -452,17 +452,11 @@ files:
452
452
  - app/assets/stylesheets/curation_concerns/_positioning.scss
453
453
  - app/assets/stylesheets/curation_concerns/_theme.scss
454
454
  - app/assets/stylesheets/curation_concerns/_typography.scss
455
- - app/assets/stylesheets/curation_concerns/_variables_bootstrap.scss
456
- - app/assets/stylesheets/curation_concerns/downloads.scss
457
455
  - app/assets/stylesheets/curation_concerns/fileupload.scss
458
456
  - app/assets/stylesheets/curation_concerns/fileupload/jquery.fileupload-ui.scss
459
457
  - app/assets/stylesheets/curation_concerns/fileupload/thumbnail-scaling.css
460
- - app/assets/stylesheets/curation_concerns/modules/accessibility.scss
461
- - app/assets/stylesheets/curation_concerns/modules/accordion.scss
462
- - app/assets/stylesheets/curation_concerns/modules/attributes.scss
463
458
  - app/assets/stylesheets/curation_concerns/modules/classify_work.scss
464
459
  - app/assets/stylesheets/curation_concerns/modules/embargoes.scss
465
- - app/assets/stylesheets/curation_concerns/modules/emphatic_action_area.scss
466
460
  - app/assets/stylesheets/curation_concerns/modules/file_manager.scss
467
461
  - app/assets/stylesheets/curation_concerns/modules/forms.scss
468
462
  - app/assets/stylesheets/curation_concerns/modules/icons.scss
@@ -882,6 +876,7 @@ files:
882
876
  - spec/views/curation_concerns/base/file_manager.html.erb_spec.rb
883
877
  - spec/views/curation_concerns/base/show.html.erb_spec.rb
884
878
  - spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
879
+ - spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
885
880
  - spec/views/curation_concerns/file_sets/show.html.erb_spec.rb
886
881
  - spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
887
882
  - spec/views/curation_concerns/permissions/confirm.html.erb_spec.rb
@@ -917,9 +912,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
917
912
  version: '0'
918
913
  required_rubygems_version: !ruby/object:Gem::Requirement
919
914
  requirements:
920
- - - ">"
915
+ - - ">="
921
916
  - !ruby/object:Gem::Version
922
- version: 1.3.1
917
+ version: '0'
923
918
  requirements: []
924
919
  rubyforge_project:
925
920
  rubygems_version: 2.5.1
@@ -1075,6 +1070,7 @@ test_files:
1075
1070
  - spec/views/curation_concerns/base/file_manager.html.erb_spec.rb
1076
1071
  - spec/views/curation_concerns/base/show.html.erb_spec.rb
1077
1072
  - spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
1073
+ - spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
1078
1074
  - spec/views/curation_concerns/file_sets/show.html.erb_spec.rb
1079
1075
  - spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
1080
1076
  - spec/views/curation_concerns/permissions/confirm.html.erb_spec.rb
@@ -1,7 +0,0 @@
1
- $font-size-base: 14px;
2
- $font-size-h1: floor(($font-size-base * 2.15)) !default; // ~30px
3
- $font-size-h2: floor(($font-size-base * 1.7)) !default; // ~24px
4
- $font-size-h3: ceil(($font-size-base * 1.53)) !default; // ~201px
5
- $font-size-h4: ceil(($font-size-base * 1.21)) !default; // ~17px
6
- $font-size-h5: $font-size-base !default;
7
- $font-size-h6: ceil(($font-size-base * 0.85)) !default; // ~12px
@@ -1,3 +0,0 @@
1
- // Place all the styles related to the Downloads controller here.
2
- // They will automatically be included in application.css.
3
- // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -1,50 +0,0 @@
1
- /* ==========================================================================
2
- Helper classes from http://html5boilerplate.com/
3
- ========================================================================== */
4
-
5
- /*
6
- * Hide from both screenreaders and browsers: h5bp.com/u
7
- */
8
-
9
- .hidden {
10
- display: none !important;
11
- visibility: hidden;
12
- }
13
-
14
- /*
15
- * Hide only visually, but have it available for screenreaders: h5bp.com/v
16
- */
17
-
18
- .visuallyhidden {
19
- border: 0;
20
- clip: rect(0 0 0 0);
21
- height: 1px;
22
- margin: -1px;
23
- overflow: hidden;
24
- padding: 0;
25
- position: absolute;
26
- width: 1px;
27
- }
28
-
29
- /*
30
- * Extends the .visuallyhidden class to allow the element to be focusable
31
- * when navigated to via the keyboard: h5bp.com/p
32
- */
33
-
34
- .visuallyhidden.focusable:active,
35
- .visuallyhidden.focusable:focus {
36
- clip: auto;
37
- height: auto;
38
- margin: 0;
39
- overflow: visible;
40
- position: static;
41
- width: auto;
42
- }
43
-
44
- /*
45
- * Hide visually and from screenreaders, but maintain layout
46
- */
47
-
48
- .invisible {
49
- visibility: hidden;
50
- }
@@ -1,33 +0,0 @@
1
- .accordion {
2
- .accordion-toggle {
3
- color:$blue
4
- }
5
-
6
- .accordion-toggle:hover {
7
- text-decoration:none;
8
- }
9
- }
10
-
11
- .js .accordion {
12
- .accordion-toggle:before {
13
- content:"";
14
- display:inline-block;
15
- width: 0;
16
- height: 0;
17
- margin:0 .4em .25em -.2em;
18
- border-style:solid;
19
- border-color:$blue transparent transparent transparent;
20
- border-width:.3em .3em 0 .3em;
21
- }
22
-
23
- .accordion-toggle.collapsed:before {
24
- margin:0 .5em .2em 0;
25
- border-color:transparent transparent transparent $blue;
26
- border-width:.3em 0 .3em .3em;
27
- }
28
- }
29
-
30
- /* If form elements are present in an accordion they won't be wrapped in a row */
31
- .accordion-inner .form-group {
32
- margin-bottom:1.5em;
33
- }
@@ -1,41 +0,0 @@
1
- .attribute-list {
2
- clear:both;
3
- float:left;
4
- list-style-type:none;
5
- margin-top:0;
6
- width:100%;
7
-
8
- dt,
9
- .label {
10
- float:left;
11
- clear:both;
12
- }
13
-
14
- dd,
15
- .value {
16
- float:left;
17
- }
18
- }
19
-
20
- .attributes {
21
- .thumbnail {
22
- width: 150px;
23
- display: block; // Don't let the image control the size of the cell
24
- img {
25
- width: 100%;
26
- }
27
- }
28
- }
29
-
30
- .attribute a .secondary {
31
- font-size: .8em;
32
- display: block;
33
- }
34
-
35
- .table .tabular {
36
- margin: 0;
37
- padding: 0;
38
- .attribute {
39
- list-style-type: none;
40
- }
41
- }
@@ -1,14 +0,0 @@
1
- .emphatic-action-area {
2
- padding-top:2em;
3
- text-align:center;
4
-
5
- a {
6
- font-family:$font-family-serif;
7
- font-size:2em;
8
- padding:.5em;
9
- }
10
- }
11
-
12
- .home .emphatic-action-area {
13
- padding-bottom:8em;
14
- }