curate 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/images/blacklight/bg.png +0 -0
- data/app/assets/images/blacklight/border.png +0 -0
- data/app/assets/images/blacklight/bul_sq_gry.gif +0 -0
- data/app/assets/images/blacklight/checkmark.gif +0 -0
- data/app/assets/images/blacklight/logo.png +0 -0
- data/app/assets/images/blacklight/magnifying_glass.gif +0 -0
- data/app/assets/images/blacklight/remove.gif +0 -0
- data/app/assets/images/blacklight/separator.gif +0 -0
- data/app/assets/images/blacklight/start_over.gif +0 -0
- data/app/assets/javascripts/curate.js +38 -0
- data/app/assets/javascripts/help_modal.js +36 -0
- data/app/assets/javascripts/manage_repeating_fields.js +65 -0
- data/app/assets/javascripts/toggle_details.js +10 -0
- data/app/assets/stylesheets/blacklight.css.scss +6 -0
- data/app/assets/stylesheets/curate.css.scss +23 -0
- data/app/assets/stylesheets/downloads.css.scss +3 -0
- data/app/assets/stylesheets/global-variables.scss +303 -0
- data/app/assets/stylesheets/help_requests.css.scss +3 -0
- data/app/assets/stylesheets/layout/positioning.css.scss +59 -0
- data/app/assets/stylesheets/modules.scss +5 -0
- data/app/assets/stylesheets/modules/action_bar.css.scss +14 -0
- data/app/assets/stylesheets/modules/emphatic_action_area.css.scss +14 -0
- data/app/assets/stylesheets/modules/forms.css.scss +39 -0
- data/app/assets/stylesheets/modules/multi_value_fields.css.scss +13 -0
- data/app/assets/stylesheets/modules/site_search.css.scss +26 -0
- data/app/assets/stylesheets/style/theme.css.scss +44 -0
- data/app/assets/stylesheets/style/typography.css.scss +130 -0
- data/app/repository_models/curation_concern/model.rb +40 -0
- data/app/repository_models/curation_concern/with_generic_files.rb +16 -0
- data/lib/curate/railtie.rb +9 -0
- data/lib/curate/version.rb +1 -1
- data/lib/generators/curate/curation_concern/USAGE +14 -0
- data/lib/generators/curate/curation_concern/curation_concern_generator.rb +55 -0
- data/lib/generators/curate/curation_concern/templates/curation_concern.rb.erb +46 -0
- data/lib/generators/curate/curation_concern/templates/curation_concern_factory.rb.erb +13 -0
- data/lib/generators/curate/curation_concern/templates/curation_concern_serializer.rb.erb +8 -0
- data/lib/generators/curate/curation_concern/templates/curation_concern_serializer_spec.rb.erb +11 -0
- data/lib/generators/curate/curation_concern/templates/curation_concern_spec.rb.erb +9 -0
- data/lib/generators/curate/curation_concern/templates/metadata_datastream.rb.erb +67 -0
- data/lib/generators/curate/curation_concern/templates/metadata_datastream_spec.rb.erb +7 -0
- data/spec/dummy/app/controllers/curation_concern/mock_curation_concerns_controller.rb +9 -0
- data/spec/dummy/config/routes.rb +1 -1
- data/spec/dummy/log/test.log +20535 -0
- data/spec/features/error_handlers_spec.rb +36 -0
- data/spec/routing/classify_concerns_routing_spec.rb +15 -0
- data/spec/routing/common_objects_routing_spec.rb +10 -0
- data/spec/routing/downloads_routing_spec.rb +17 -0
- data/spec/routing/generic_files_routing_spec.rb +79 -0
- data/spec/routing/help_requests_routing_spec.rb +11 -0
- data/spec/support/mock_curation_concern.rb +26 -38
- data/spec/validators/future_date_validator_spec.rb +35 -0
- metadata +75 -4
@@ -0,0 +1,59 @@
|
|
1
|
+
body {
|
2
|
+
padding:0;
|
3
|
+
}
|
4
|
+
|
5
|
+
#site-search{
|
6
|
+
form {
|
7
|
+
margin:2em 0;
|
8
|
+
text-align:right;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
#footer .row {
|
13
|
+
margin-bottom:1em;
|
14
|
+
margin-top:3em;
|
15
|
+
}
|
16
|
+
|
17
|
+
.page-search {
|
18
|
+
padding-top:2em;
|
19
|
+
text-align:right;
|
20
|
+
}
|
21
|
+
|
22
|
+
legend .pull-right {
|
23
|
+
margin-top:.2em;
|
24
|
+
}
|
25
|
+
|
26
|
+
.with-headroom {
|
27
|
+
padding-top:3em;
|
28
|
+
}
|
29
|
+
|
30
|
+
.with-side-padding {
|
31
|
+
padding-left:2em;
|
32
|
+
padding-right:2em;
|
33
|
+
}
|
34
|
+
|
35
|
+
dl.stacked {
|
36
|
+
dt {
|
37
|
+
clear:both;
|
38
|
+
float:left;
|
39
|
+
width:30%;
|
40
|
+
}
|
41
|
+
|
42
|
+
dd {
|
43
|
+
clear:right;
|
44
|
+
margin:0 0 0 30%;
|
45
|
+
width:70%;
|
46
|
+
word-wrap:break-word;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
.main-header {
|
51
|
+
border-bottom: 1px solid $grayLighter;
|
52
|
+
margin-bottom: 30px;
|
53
|
+
margin-top: 20px;
|
54
|
+
padding-bottom: 9px;
|
55
|
+
}
|
56
|
+
|
57
|
+
legend + .control-group {
|
58
|
+
margin-top: 0px;
|
59
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
.input-xxxlarge {
|
2
|
+
box-sizing:border-box;
|
3
|
+
width:100%;
|
4
|
+
}
|
5
|
+
|
6
|
+
legend small {
|
7
|
+
margin-left:.5em;
|
8
|
+
}
|
9
|
+
|
10
|
+
.label-large {
|
11
|
+
font-size: 110%;
|
12
|
+
line-height: 1.2;
|
13
|
+
padding: .3em .6em;
|
14
|
+
white-space: normal;
|
15
|
+
position: relative;
|
16
|
+
|
17
|
+
|
18
|
+
input[type="checkbox"]{
|
19
|
+
margin:-2px 0 0;
|
20
|
+
position: absolute;
|
21
|
+
left:.5em;
|
22
|
+
top:38%;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
.label-checkbox .label-text {
|
27
|
+
display:block;
|
28
|
+
padding-left:1.2em;
|
29
|
+
}
|
30
|
+
|
31
|
+
.control-group.error input,
|
32
|
+
.control-group.error option,
|
33
|
+
.control-group.error textarea {
|
34
|
+
color:$grayDark;
|
35
|
+
}
|
36
|
+
|
37
|
+
.form-actions .btn-link {
|
38
|
+
color: $blue;
|
39
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
.search-form {
|
2
|
+
.search-query,
|
3
|
+
.search-submit {
|
4
|
+
box-sizing:border-box;
|
5
|
+
}
|
6
|
+
|
7
|
+
.search-query {
|
8
|
+
width:80%;
|
9
|
+
padding-top:1em;
|
10
|
+
padding-bottom:1em;
|
11
|
+
@include border-bottom-left-radius(15px);
|
12
|
+
@include border-bottom-right-radius(0);
|
13
|
+
@include border-top-left-radius(15px);
|
14
|
+
@include border-top-right-radius(0);
|
15
|
+
}
|
16
|
+
|
17
|
+
.search-submit {
|
18
|
+
padding-left:0;
|
19
|
+
width:20%;
|
20
|
+
white-space:nowrap;
|
21
|
+
@include border-bottom-left-radius(0);
|
22
|
+
@include border-bottom-right-radius(15px);
|
23
|
+
@include border-top-left-radius(0);
|
24
|
+
@include border-top-right-radius(15px);
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
#brand-bar-wrapper {
|
2
|
+
background-color:$blueDark;
|
3
|
+
@include background-image(linear-gradient($blueDark, #07366C 85%, #001834));
|
4
|
+
border-bottom:1px solid #001834;
|
5
|
+
|
6
|
+
h2 a, h3 a {
|
7
|
+
color:#FFF;
|
8
|
+
}
|
9
|
+
|
10
|
+
.division {
|
11
|
+
float:right;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
#title-bar-wrapper {
|
16
|
+
background-color:$yellow;
|
17
|
+
@include background-image(linear-gradient(#F5E59E, $yellow 98%, #9C7012));
|
18
|
+
border-top:1px solid #FFF;
|
19
|
+
margin-bottom:.3em;
|
20
|
+
|
21
|
+
h1 {
|
22
|
+
color:$blue;
|
23
|
+
@include text-shadow(#FFF 0 0 1px)
|
24
|
+
|
25
|
+
}
|
26
|
+
|
27
|
+
a:visited {
|
28
|
+
color:$blue;
|
29
|
+
}
|
30
|
+
|
31
|
+
.site-search {
|
32
|
+
float:right;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
#main {
|
37
|
+
h1,h2,h3,h4,h5,h6 {
|
38
|
+
color:$blue;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
#footer {
|
43
|
+
color:#999;
|
44
|
+
}
|
@@ -0,0 +1,130 @@
|
|
1
|
+
@import "compass/css3/columns";
|
2
|
+
|
3
|
+
#banner {
|
4
|
+
font-family:$serifFontFamily;
|
5
|
+
|
6
|
+
h1,h2,h3 {
|
7
|
+
font-weight:normal;
|
8
|
+
}
|
9
|
+
|
10
|
+
h1 {
|
11
|
+
margin:.65em 0;
|
12
|
+
}
|
13
|
+
|
14
|
+
a {
|
15
|
+
text-decoration:none;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
#brand-bar-wrapper {
|
20
|
+
letter-spacing:.2em;
|
21
|
+
padding:.15em 0;
|
22
|
+
text-transform:uppercase;
|
23
|
+
|
24
|
+
h2, h3 {
|
25
|
+
font-size:.95em;
|
26
|
+
margin:0;
|
27
|
+
}
|
28
|
+
|
29
|
+
.division {
|
30
|
+
text-align:right;
|
31
|
+
}
|
32
|
+
|
33
|
+
i {
|
34
|
+
letter-spacing:0;
|
35
|
+
padding:0 .2em;
|
36
|
+
text-transform:none;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
#main,
|
41
|
+
.modal-header {
|
42
|
+
h1,h2,h3,h4,h5,h6 {
|
43
|
+
font-family:$headerFontFamily;
|
44
|
+
font-weight:normal;
|
45
|
+
text-rendering: optimizeLegibility;
|
46
|
+
}
|
47
|
+
h1 {
|
48
|
+
.human_readable_type {
|
49
|
+
font-size:.66em;
|
50
|
+
padding-left:1em;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
legend {
|
56
|
+
font-family:$headerFontFamily;
|
57
|
+
|
58
|
+
a {
|
59
|
+
font-family:$sansFontFamily;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
.table-heading {
|
64
|
+
text-align:left;
|
65
|
+
|
66
|
+
h1,h2,h3,h4,h5,h6 {
|
67
|
+
padding-top:1em;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
.nested-field-heading {
|
72
|
+
font-family:$sansFontFamily;
|
73
|
+
font-size: 14px;
|
74
|
+
font-weight:normal;
|
75
|
+
}
|
76
|
+
|
77
|
+
.redacted,
|
78
|
+
.unratified .contributor_agreement p {
|
79
|
+
font-family:'BLOKKNeue-Regular';
|
80
|
+
}
|
81
|
+
|
82
|
+
#footer {
|
83
|
+
text-align:center;
|
84
|
+
|
85
|
+
p {
|
86
|
+
margin-bottom:.3em;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
.accessible-hidden {
|
91
|
+
border: 0;
|
92
|
+
clip: rect(0 0 0 0);
|
93
|
+
height: 1px;
|
94
|
+
margin: -1px;
|
95
|
+
overflow: hidden;
|
96
|
+
padding: 0;
|
97
|
+
position: absolute;
|
98
|
+
width: 1px;
|
99
|
+
}
|
100
|
+
|
101
|
+
.centered {
|
102
|
+
text-align:center;
|
103
|
+
}
|
104
|
+
|
105
|
+
.contributor_agreement.human_readable {
|
106
|
+
font-size:150%;
|
107
|
+
}
|
108
|
+
|
109
|
+
.doi {
|
110
|
+
font-size:200%;
|
111
|
+
margin:1em 0;
|
112
|
+
text-align:center;
|
113
|
+
}
|
114
|
+
|
115
|
+
.inline-item-actions {
|
116
|
+
padding:0 .5em;
|
117
|
+
|
118
|
+
a {
|
119
|
+
margin-right:.5em;
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
.wide-text {
|
124
|
+
@include column-count(2);
|
125
|
+
@include column-width(30px);
|
126
|
+
|
127
|
+
p {
|
128
|
+
@include column-break-inside(avoid);
|
129
|
+
}
|
130
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module CurationConcern
|
2
|
+
module Model
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
include Hydra::ModelMixins::CommonMetadata
|
7
|
+
include Sufia::ModelMethods
|
8
|
+
include Sufia::Noid
|
9
|
+
include Sufia::GenericFile::Permissions
|
10
|
+
|
11
|
+
has_metadata name: "properties", type: PropertiesDatastream, control_group: 'M'
|
12
|
+
delegate_to :properties, [:relative_path, :depositor], unique: true
|
13
|
+
delegate_to :descMetadata, [:archived_object_type], unique: true
|
14
|
+
before_save :set_archived_object_type
|
15
|
+
end
|
16
|
+
|
17
|
+
def human_readable_type
|
18
|
+
self.class.to_s.demodulize.titleize
|
19
|
+
end
|
20
|
+
|
21
|
+
def set_archived_object_type
|
22
|
+
self.archived_object_type = human_readable_type
|
23
|
+
end
|
24
|
+
|
25
|
+
def to_solr(solr_doc={}, opts={})
|
26
|
+
super(solr_doc, opts)
|
27
|
+
solr_doc["noid_s"] = noid
|
28
|
+
return solr_doc
|
29
|
+
end
|
30
|
+
|
31
|
+
def to_param
|
32
|
+
noid
|
33
|
+
end
|
34
|
+
|
35
|
+
def to_s
|
36
|
+
title
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module CurationConcern
|
2
|
+
module WithGenericFiles
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
has_many :generic_files, property: :is_part_of
|
7
|
+
|
8
|
+
after_destroy :after_destroy_cleanup
|
9
|
+
end
|
10
|
+
|
11
|
+
def after_destroy_cleanup
|
12
|
+
generic_files.each(&:destroy)
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
data/lib/curate/version.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
Description:
|
2
|
+
This generator provides a means of creating a collection
|
3
|
+
|
4
|
+
Example:
|
5
|
+
rails generate curate:collection ChickenPie
|
6
|
+
|
7
|
+
This will create:
|
8
|
+
app/repository_models/chicken_pie.rb
|
9
|
+
app/repository_datastreams/chicken_pie_metadata_datastream.rb
|
10
|
+
app/repository_serializers/chicken_pie_serializer.rb
|
11
|
+
spec/repository_models/chicken_pie_spec.rb
|
12
|
+
spec/repository_datastreams/chicken_pie_metadata_datastream_spec.rb
|
13
|
+
spec/repository_serializers/chicken_pie_serializer.rb
|
14
|
+
spec/factories/chicken_pie_factory.rb
|