sufia 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/.travis.yml +6 -0
- data/Gemfile +5 -2
- data/History.md +6 -0
- data/README.md +40 -0
- data/Rakefile +4 -0
- data/app/assets/javascripts/sufia.js +3 -115
- data/app/assets/javascripts/sufia/batch_select_all.js +179 -0
- data/app/assets/javascripts/sufia/edit_metadata.js +86 -0
- data/app/assets/javascripts/sufia/multiForm.js +57 -0
- data/app/assets/javascripts/terms_of_service.js +7 -0
- data/app/assets/stylesheets/audio-js.css +3 -0
- data/app/assets/stylesheets/dashboard.css.scss +51 -0
- data/app/assets/stylesheets/generic_files.css +36 -0
- data/app/assets/stylesheets/sufia.css.scss +2 -0
- data/app/controllers/batch_controller.rb +11 -0
- data/app/controllers/batch_edits_controller.rb +1 -77
- data/app/controllers/generic_files_controller.rb +1 -0
- data/app/controllers/mailbox_controller.rb +1 -1
- data/app/controllers/single_use_link_controller.rb +11 -7
- data/app/helpers/generic_file_helper.rb +11 -3
- data/app/helpers/sufia_helper.rb +13 -10
- data/app/models/batch.rb +1 -1
- data/app/models/datastreams/fits_datastream.rb +2 -2
- data/app/models/datastreams/generic_file_rdf_datastream.rb +22 -18
- data/app/models/datastreams/properties_datastream.rb +2 -2
- data/app/views/_user_util_links.html.erb +2 -2
- data/app/views/batch/_metadata.html.erb +82 -0
- data/app/views/batch/_more_metadata.html.erb +6 -0
- data/app/views/batch/edit.html.erb +1 -8
- data/app/views/batch_edits/_check_all.html.erb +0 -157
- data/app/views/batch_edits/edit.html.erb +0 -29
- data/app/views/catalog/_index_partials/_list_files.html.erb +8 -10
- data/app/views/catalog/_recent_document.html.erb +9 -18
- data/app/views/catalog/_results_pagination.html.erb +1 -1
- data/app/views/contact_form/new.html.erb +1 -1
- data/app/views/dashboard/_index_partials/_default_group.html.erb +1 -1
- data/app/views/dashboard/_index_partials/_list_files.html.erb +12 -14
- data/app/views/dashboard/_index_partials/_thumbnail_display.html.erb +9 -19
- data/app/views/dashboard/_results_pagination.html.erb +1 -1
- data/app/views/dashboard/index.html.erb +6 -82
- data/app/views/error/single_use_error.html.erb +35 -0
- data/app/views/generic_files/_descriptions.html.erb +2 -2
- data/app/views/generic_files/_extra_fields_modal.html.erb +1 -1
- data/app/views/generic_files/_field_form.html.erb +2 -5
- data/app/views/generic_files/_media_display.html.erb +8 -6
- data/app/views/generic_files/_permission.html.erb +2 -2
- data/app/views/generic_files/_rights_modal.html.erb +1 -1
- data/app/views/generic_files/_show_actions.html.erb +1 -1
- data/app/views/generic_files/_show_details.html.erb +11 -6
- data/app/views/generic_files/edit.html.erb +0 -8
- data/app/views/generic_files/edit_fields/_type.html.erb +1 -1
- data/app/views/generic_files/show.html.erb +5 -8
- data/app/views/generic_files/show_fields/_based_near.html.erb +4 -1
- data/app/views/generic_files/show_fields/_contributor.html.erb +4 -1
- data/app/views/generic_files/show_fields/_creator.html.erb +4 -1
- data/app/views/generic_files/show_fields/_date_created.html.erb +4 -1
- data/app/views/generic_files/show_fields/_description.html.erb +4 -1
- data/app/views/generic_files/show_fields/_language.html.erb +1 -1
- data/app/views/generic_files/show_fields/_publisher.html.erb +4 -1
- data/app/views/generic_files/show_fields/_related_url.html.erb +3 -1
- data/app/views/generic_files/show_fields/_resource_type.html.erb +1 -1
- data/app/views/generic_files/show_fields/_subject.html.erb +4 -1
- data/app/views/generic_files/show_fields/_tag.html.erb +1 -1
- data/app/views/generic_files/show_fields/_title.html.erb +4 -1
- data/app/views/layouts/error.html.erb +0 -4
- data/app/views/layouts/hydra-head.html.erb +2 -6
- data/app/views/single_use_link/show.html.erb +1 -1
- data/app/views/users/index.html.erb +1 -1
- data/app/views/users/show.html.erb +1 -1
- data/config/locales/sufia.en.yml +1 -0
- data/config/routes.rb +11 -4
- data/lib/generators/sufia/sufia_generator.rb +2 -1
- data/lib/generators/sufia/templates/catalog_controller.rb +143 -117
- data/lib/generators/sufia/templates/config/resque_admin.rb +10 -0
- data/lib/generators/sufia/templates/config/sufia.rb +8 -0
- data/lib/sufia.rb +4 -14
- data/lib/sufia/batch_edits_controller_behavior.rb +89 -0
- data/lib/sufia/controller.rb +7 -5
- data/lib/sufia/downloads_controller_behavior.rb +14 -19
- data/lib/sufia/file_content/extract_metadata.rb +11 -4
- data/lib/sufia/files_controller_behavior.rb +63 -44
- data/lib/sufia/generic_file.rb +29 -11
- data/lib/sufia/generic_file/audit.rb +1 -1
- data/lib/sufia/generic_file/thumbnail.rb +51 -26
- data/lib/sufia/id_service.rb +28 -11
- data/lib/sufia/jobs/batch_update_job.rb +2 -2
- data/lib/sufia/jobs/characterize_job.rb +11 -3
- data/lib/sufia/jobs/ffmpeg_transcode_job.rb +61 -0
- data/lib/sufia/jobs/resolrize_job.rb +1 -1
- data/lib/sufia/jobs/transcode_audio_job.rb +40 -0
- data/lib/sufia/jobs/transcode_video_job.rb +9 -49
- data/lib/sufia/queue/resque.rb +2 -2
- data/lib/sufia/single_use_error.rb +4 -0
- data/lib/sufia/solr_document_behavior.rb +108 -1
- data/lib/sufia/version.rb +1 -1
- data/solr_conf/conf/schema.xml +332 -652
- data/solr_conf/conf/solrconfig.xml +60 -196
- data/spec/controllers/batch_controller_spec.rb +4 -5
- data/spec/controllers/catalog_controller_spec.rb +13 -13
- data/spec/controllers/dashboard_controller_spec.rb +2 -2
- data/spec/controllers/downloads_controller_spec.rb +74 -62
- data/spec/controllers/generic_files_controller_spec.rb +10 -8
- data/spec/controllers/single_use_link_controller_spec.rb +12 -4
- data/spec/fixtures/Example.ogg +0 -0
- data/spec/fixtures/piano_note.wav +0 -0
- data/spec/fixtures/sufia_generic_stub.descMeta.txt +1 -1
- data/spec/helpers/sufia_helper_spec.rb +12 -0
- data/spec/models/characterize_job_spec.rb +89 -0
- data/spec/models/checksum_audit_log_spec.rb +1 -0
- data/spec/models/event_jobs_spec.rb +9 -9
- data/spec/models/file_content_datastream_spec.rb +16 -10
- data/spec/models/fits_datastream_spec.rb +2 -8
- data/spec/models/generic_file_spec.rb +131 -60
- data/spec/models/solr_document_spec.rb +21 -0
- data/spec/models/transcode_audio_job_spec.rb +81 -0
- data/spec/models/transcode_video_job_spec.rb +2 -2
- data/spec/models/unzip_job_spec.rb +3 -3
- data/spec/spec_helper.rb +21 -0
- data/spec/support/Gemfile +7 -3
- data/sufia.gemspec +8 -11
- data/tasks/cucumber.rake +1 -2
- data/tasks/sufia-dev.rake +13 -2
- data/tasks/sufia.rake +1 -1
- metadata +77 -118
- data/app/views/batch_edits/_metadata.html.erb +0 -180
- data/lib/generators/sufia/templates/config/hydra_config.rb +0 -32
- data/lib/kaminari/helpers/tag.rb +0 -11
|
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
%>
|
|
16
16
|
|
|
17
|
-
<table class="table table-striped">
|
|
17
|
+
<table class="table table-striped dashboard">
|
|
18
18
|
<caption class="accessible-hidden">Listing of files you have deposited in <%= t('sufia.product_name') %></caption>
|
|
19
19
|
<% unless params[:display_type] == 'list' %>
|
|
20
20
|
<thead>
|
|
@@ -17,8 +17,7 @@ limitations under the License.
|
|
|
17
17
|
<!-- scholarsphere over ride -->
|
|
18
18
|
<!-- the sub on ':' is b.c. jQuery has trouble with '.' or ':'
|
|
19
19
|
on element ids -->
|
|
20
|
-
<%
|
|
21
|
-
<% noid = document[:noid_s].first %>
|
|
20
|
+
<% noid = document.noid %>
|
|
22
21
|
<tr id="document_<%= noid.gsub(":", "_") %>" class="<%= cycle("","zebra") %>">
|
|
23
22
|
<% gf = GenericFile.find(document.id) %>
|
|
24
23
|
<td width="6%"><%= batch_edit_select(document) %> </td>
|
|
@@ -32,13 +31,13 @@ on element ids -->
|
|
|
32
31
|
<td width="37%">
|
|
33
32
|
<a href="" title="Click for more details"><i id="expand_<%= noid.gsub(":", "_") %>" class="icon-plus icon-large fleft"></i></a>
|
|
34
33
|
<%= render :partial => 'dashboard/_index_partials/thumbnail_display', :locals => {:document=>document} %>
|
|
35
|
-
<span class=center><%= link_to
|
|
34
|
+
<span class=center><%= link_to document.title_or_label, sufia.generic_file_path(noid), :id => "src_copy_link#{noid}" %> <br /></span>
|
|
36
35
|
</td>
|
|
37
|
-
<td width="17%"><%= document.
|
|
36
|
+
<td width="17%"><%= document.date_uploaded %> </td>
|
|
38
37
|
<td width="5%" align="center">
|
|
39
|
-
<% if
|
|
38
|
+
<% if document.registered? %>
|
|
40
39
|
<a href="<%= sufia.generic_file_path(noid) %>/edit/?tab=permissions" id="permission_<%= noid %>"><span class="label label-info" title="<%=t('sufia.institution_name') %>"><%=t('sufia.institution_name') %></span></a>
|
|
41
|
-
<% elsif
|
|
40
|
+
<% elsif document.public? %>
|
|
42
41
|
<a href="<%= sufia.generic_file_path(noid) %>/edit/?tab=permissions" id="permission_<%= noid %>"><span class="label label-success" title="Open Access">Open Access</span></a>
|
|
43
42
|
<% else %>
|
|
44
43
|
<a href="<%= sufia.generic_file_path(noid) %>/edit/?tab=permissions" id="permission_<%= noid %>"><span class="label label-important" title="Private">Private</span></a>
|
|
@@ -59,23 +58,22 @@ on element ids -->
|
|
|
59
58
|
<td colspan="6">
|
|
60
59
|
<table class="expanded-details">
|
|
61
60
|
<tr>
|
|
62
|
-
<td><strong>File Name: </strong> <%= link_to
|
|
63
|
-
<td><strong>File Format: </strong> <%=
|
|
61
|
+
<td><strong>File Name: </strong> <%= link_to document.label, sufia.generic_file_path(noid) %> </td>
|
|
62
|
+
<td><strong>File Format: </strong> <%= document.file_format %> </td>
|
|
64
63
|
</tr>
|
|
65
64
|
<tr>
|
|
66
|
-
<td><strong>Creator: </strong> <%=
|
|
67
|
-
<td><strong>Depositor: </strong> <%= link_to_profile
|
|
65
|
+
<td><strong>Creator: </strong> <%= document.creator %> </td>
|
|
66
|
+
<td><strong>Depositor: </strong> <%= link_to_profile document.depositor %> </td>
|
|
68
67
|
</tr>
|
|
69
68
|
<tr>
|
|
70
69
|
<td colspan="2"><strong>Edit Access: </strong>
|
|
71
|
-
<% if
|
|
72
|
-
Groups: <%=
|
|
70
|
+
<% if document.edit_groups.present? %>
|
|
71
|
+
Groups: <%= document.edit_groups.join(', ') %>
|
|
73
72
|
<br />
|
|
74
73
|
<% end %>
|
|
75
|
-
Users: <%=
|
|
74
|
+
Users: <%= document.edit_people.join(', ') %>
|
|
76
75
|
</td>
|
|
77
76
|
</tr>
|
|
78
77
|
</table>
|
|
79
78
|
</td>
|
|
80
79
|
</tr>
|
|
81
|
-
<% end %>
|
|
@@ -16,26 +16,16 @@ limitations under the License.
|
|
|
16
16
|
|
|
17
17
|
<%- height = 42 if height.blank? -%>
|
|
18
18
|
<%- width = 36 if width.blank? -%>
|
|
19
|
-
<% if (document
|
|
20
|
-
<% if
|
|
21
|
-
<%= link_to image_tag(sufia.download_path(document["id"], {:datastream_id => 'thumbnail'}), {:width=>width
|
|
22
|
-
<% elsif
|
|
23
|
-
<%= link_to image_tag(sufia.download_path(document["id"], {:datastream_id => 'thumbnail'}), {:width=>width
|
|
24
|
-
<% elsif
|
|
25
|
-
|
|
26
|
-
class="video-js vjs-default-skin" data-setup="{}"
|
|
27
|
-
preload="auto">
|
|
28
|
-
<source src="<%= sufia.download_path(document["id"]) %>"
|
|
29
|
-
type="<%= document['mime_type_t'].first %>" />
|
|
30
|
-
Your browser does not support the video tag.
|
|
31
|
-
</video>
|
|
32
|
-
<% elsif !(document['mime_type_t'] & ['audio/mp3',
|
|
33
|
-
'audio/mpeg']).empty? %>
|
|
34
|
-
<audio src="<%= sufia.download_path(document["id"], format:'audio')
|
|
35
|
-
%>" > </audio>
|
|
19
|
+
<% if (document.mime_type) %>
|
|
20
|
+
<% if document.image? %>
|
|
21
|
+
<%= link_to image_tag(sufia.download_path(document["id"], {:datastream_id => 'thumbnail'}), {:width=>width}), sufia.generic_file_path(document.noid) %>
|
|
22
|
+
<% elsif document.pdf? %>
|
|
23
|
+
<%= link_to image_tag(sufia.download_path(document["id"], {:datastream_id => 'thumbnail'}), {:width=>width}),sufia.generic_file_path(document.noid) %>
|
|
24
|
+
<% elsif document.video? %>
|
|
25
|
+
<%= link_to image_tag(sufia.download_path(document["id"], {:datastream_id => 'thumbnail'}), {:width=>width}),sufia.generic_file_path(document.noid) %>
|
|
36
26
|
<% else %>
|
|
37
|
-
<%= link_to image_tag("/assets/default.png", {:width=>width
|
|
27
|
+
<%= link_to image_tag("/assets/default.png", {:width=>width}), sufia.generic_file_path(document) %>
|
|
38
28
|
<% end %>
|
|
39
29
|
<% else %>
|
|
40
|
-
<%= link_to image_tag("/assets/default.png", {:width=>width
|
|
30
|
+
<%= link_to image_tag("/assets/default.png", {:width=>width}), sufia.generic_file_path(document) %>
|
|
41
31
|
<% end %>
|
|
@@ -16,7 +16,7 @@ limitations under the License.
|
|
|
16
16
|
|
|
17
17
|
<% if paginate_params(@response).num_pages > 1 %>
|
|
18
18
|
<div class="pager">
|
|
19
|
-
<%= paginate_rsolr_response @response, :outer_window => 2, :theme => 'blacklight' %>
|
|
19
|
+
<%= paginate_rsolr_response @response, :outer_window => 2, :theme => 'blacklight', :route_set=> sufia %>
|
|
20
20
|
<div class="clearfix"></div>
|
|
21
21
|
</div><!-- /pager -->
|
|
22
22
|
<% end %>
|
|
@@ -14,26 +14,6 @@ See the License for the specific language governing permissions and
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
%>
|
|
16
16
|
|
|
17
|
-
<% content_for :js_head do %>
|
|
18
|
-
|
|
19
|
-
<script type = "text/javascript">
|
|
20
|
-
|
|
21
|
-
// function to hide or show the batch update buttons based on how may items are checked
|
|
22
|
-
function toggleButtons(forceOn, otherPage ){
|
|
23
|
-
forceOn = typeof forceOn !== 'undefined' ? forceOn : false
|
|
24
|
-
otherPage = typeof otherPage !== 'undefined' ? otherPage : <%= !@batch_part_on_other_page %>
|
|
25
|
-
var n = $(".batch_toggle:checked").length;
|
|
26
|
-
if ((n>0) || (forceOn)) {
|
|
27
|
-
$('.batch-select-all').show();
|
|
28
|
-
$('.button_to').show();
|
|
29
|
-
} else if ( otherPage){
|
|
30
|
-
$('.batch-select-all').hide();
|
|
31
|
-
$('.button_to').hide();
|
|
32
|
-
}
|
|
33
|
-
$("body").css("cursor", "auto");
|
|
34
|
-
}
|
|
35
|
-
</script>
|
|
36
|
-
<% end %>
|
|
37
17
|
<% content_for :local_js do %>
|
|
38
18
|
|
|
39
19
|
initialize_audio();
|
|
@@ -83,79 +63,23 @@ limitations under the License.
|
|
|
83
63
|
return false;
|
|
84
64
|
});
|
|
85
65
|
}
|
|
86
|
-
|
|
87
|
-
// hide or show the batch update buttons file selections
|
|
88
|
-
$(".batch_toggle").bind('click', function(e) {
|
|
89
|
-
e.preventDefault();
|
|
90
|
-
toggleButtons();
|
|
91
|
-
});
|
|
92
66
|
});
|
|
93
67
|
|
|
94
68
|
|
|
95
69
|
// hide or show the batch update buttons on page startup
|
|
70
|
+
window.batch_part_on_other_page = <%= @batch_part_on_other_page%>;
|
|
71
|
+
window.batch_size_on_other_page = <%= @batch_size_on_other_page%>;
|
|
72
|
+
window.result_set_size = <%= @result_set_size%>;
|
|
73
|
+
window.document_list_count = <%= @document_list.count %>;
|
|
96
74
|
toggleButtons(<%= !@empty_batch %>);
|
|
97
75
|
|
|
98
|
-
|
|
99
|
-
$('#documents').batchEdit();
|
|
76
|
+
// initialize hydra batch edit and set up select all button toggle after checkboxes have been created
|
|
77
|
+
$('#documents').batchEdit({afterCheckboxUpdate: setup_buttontoggle});
|
|
100
78
|
|
|
101
79
|
|
|
102
80
|
<% end %>
|
|
103
81
|
|
|
104
82
|
|
|
105
|
-
<% content_for :local_css do %>
|
|
106
|
-
|
|
107
|
-
.audiojs {
|
|
108
|
-
width: 38px;
|
|
109
|
-
float: left;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
audio {
|
|
113
|
-
width: 38px;
|
|
114
|
-
float: left;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.batch-select-all, .button_to {
|
|
118
|
-
|
|
119
|
-
float: right;
|
|
120
|
-
padding-left: 6px;
|
|
121
|
-
padding-top: 0px;
|
|
122
|
-
padding-top: 0px;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.bedit {
|
|
126
|
-
width: 65%;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.batch-select-all .btn-primary {
|
|
130
|
-
background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(top, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{background-color:#bd362f;*background-color:#a9302a;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.button_to .btn-primary {
|
|
134
|
-
background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{background-color:#f89406;*background-color:#df8505;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.table th, .table td {
|
|
138
|
-
padding: 4px;
|
|
139
|
-
}
|
|
140
|
-
.table .sm {
|
|
141
|
-
padding: 2px;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.over {
|
|
145
|
-
z-index:100;
|
|
146
|
-
}
|
|
147
|
-
.under
|
|
148
|
-
{
|
|
149
|
-
position:absolute;
|
|
150
|
-
padding:0px 0px 0px 0px;
|
|
151
|
-
left:10px;
|
|
152
|
-
top:-8px;
|
|
153
|
-
color:orange;
|
|
154
|
-
z-index:1;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
<% end %>
|
|
158
|
-
|
|
159
83
|
<% @page_title = application_name + " Dashboard" %>
|
|
160
84
|
|
|
161
85
|
<div class="accessible-hidden" id="current_user"><%=@user.user_key%></div>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<%#
|
|
2
|
+
Copyright © 2012 The Pennsylvania State University
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
%>
|
|
16
|
+
|
|
17
|
+
<!DOCTYPE html>
|
|
18
|
+
<html>
|
|
19
|
+
<head>
|
|
20
|
+
<title>Single use link Not Found</title>
|
|
21
|
+
</head>
|
|
22
|
+
<body>
|
|
23
|
+
<div class="columns two-a">
|
|
24
|
+
<div class="column second">
|
|
25
|
+
<h1>Single Use Link Expired or Not Found</h1>
|
|
26
|
+
<p>
|
|
27
|
+
<%= t('sufia.product_name') %> could not locate the single use link.
|
|
28
|
+
This link either expired or had been used previously. We apologize
|
|
29
|
+
for the inconvenience. You might be interested in using
|
|
30
|
+
<a href="/help/">the help page</a> for looking up
|
|
31
|
+
solutions.
|
|
32
|
+
</p>
|
|
33
|
+
</div>
|
|
34
|
+
</body>
|
|
35
|
+
</html>
|
|
@@ -21,8 +21,8 @@ limitations under the License.
|
|
|
21
21
|
<div class="well">
|
|
22
22
|
|
|
23
23
|
<%= render :partial=>'generic_files/edit_fields/type', :locals => {f:f} %>
|
|
24
|
-
<% @
|
|
25
|
-
<%= render :partial => "generic_files/field_form", :locals => { :generic_file => @generic_file, :f =>f, :render_req => true, :key => term } %>
|
|
24
|
+
<% (@generic_file.terms_for_editing - [:resource_type]).each do |term| %>
|
|
25
|
+
<%= render :partial => "generic_files/field_form", :locals => { :generic_file => @generic_file, :f =>f, :render_req => true, :key => term } %>
|
|
26
26
|
<% end %>
|
|
27
27
|
|
|
28
28
|
</div><!-- /well -->
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- Button to trigger modal -->
|
|
4
4
|
<a href="#extraFieldsModal_<%=name %>" role="button" class="btn btn-warning fright vmiddle" data-toggle="modal">Additional <%= label %> <i class="icon-plus-sign icon-large"></i></a>
|
|
5
5
|
<!-- Modal -->
|
|
6
|
-
<div class="modal hide
|
|
6
|
+
<div class="modal hide" id="extraFieldsModal_<%=name %>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
7
7
|
<div class="modal-header">
|
|
8
8
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
|
|
9
9
|
<h2 id="extraFieldsModal_<%=name %>_Label">Additional <%= label %>(s)</h2>
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
<% render_req ||= true # render_req is true for single file edit, false for batch edit%>
|
|
2
2
|
<div class="control-group">
|
|
3
|
-
<% vals = generic_file
|
|
4
|
-
<%# if vals is empty we create an one element array to loop over for output %>
|
|
5
|
-
<% vals = [''] if vals.count == 0 %>
|
|
6
|
-
|
|
3
|
+
<% vals = generic_file[key] %>
|
|
7
4
|
<% if render_req && required?(key) %>
|
|
8
5
|
<% tmp = '<span class="error">*</span>' + get_label(key) %>
|
|
9
6
|
<%= f.label key, tmp.html_safe, :class=>"control-label" %>
|
|
@@ -11,7 +8,7 @@
|
|
|
11
8
|
<%= f.label key, get_label(key), :class=>"control-label"%>
|
|
12
9
|
<% end %>
|
|
13
10
|
|
|
14
|
-
<% vals.each_with_index do |v, index| %>
|
|
11
|
+
<% vals.to_ary.each_with_index do |v, index| %>
|
|
15
12
|
<%= render_edit_field_partial(key, f:f, v: v, index: index, render_req: render_req) %>
|
|
16
13
|
<% end %>
|
|
17
14
|
</div><!-- /control-group -->
|
|
@@ -15,19 +15,21 @@ limitations under the License.
|
|
|
15
15
|
%>
|
|
16
16
|
|
|
17
17
|
<% if @generic_file.image? %>
|
|
18
|
-
<a href="<%= sufia.download_path(@generic_file) %>" target="_new"><img src="<%= sufia.download_path(@generic_file) %>" width="338"
|
|
18
|
+
<a href="<%= sufia.download_path(@generic_file) %>" target="_new" title="Download the full-sized image"><img src="<%= sufia.download_path(@generic_file, {:datastream_id => 'thumbnail'}) %>" width="338" alt="Download the full-sized image of <%= @generic_file.title.first %>"/>Download the full-sized image</a>
|
|
19
19
|
<% elsif @generic_file.video? %>
|
|
20
20
|
<video controls="controls" class="video-js vjs-default-skin" data-setup="{}" preload="auto">
|
|
21
21
|
<source src="<%= sufia.download_path(@generic_file, datastream_id: 'webm') %>" type="video/webm" />
|
|
22
22
|
<source src="<%= sufia.download_path(@generic_file, datastream_id: 'mp4') %>" type="video/mp4" />
|
|
23
|
-
Your browser does not support the
|
|
23
|
+
Your browser does not support the video tag.
|
|
24
24
|
</video>
|
|
25
|
-
<% elsif
|
|
26
|
-
<audio
|
|
25
|
+
<% elsif @generic_file.audio? %>
|
|
26
|
+
<audio controls="controls" class="video-js vjs-default-skin" data-setup="{}" preload="auto">
|
|
27
|
+
<source src="<%= sufia.download_path(@generic_file, datastream_id: 'ogg') %>" type="audio/ogg" />
|
|
28
|
+
<source src="<%= sufia.download_path(@generic_file, datastream_id: 'mp3') %>" type="audio/mp3" />
|
|
27
29
|
Your browser does not support the audio tag.
|
|
28
|
-
|
|
30
|
+
</audio>
|
|
29
31
|
<% elsif @generic_file.pdf?%>
|
|
30
|
-
<a href="<%= sufia.download_path(@generic_file) %>" target="_new"><img src="<%= sufia.download_path(@generic_file,
|
|
32
|
+
<a href="<%= sufia.download_path(@generic_file) %>" target="_new" title="Download the full-sized PDF"><img src="<%= sufia.download_path(@generic_file, datastream_id: 'thumbnail') %>" width="338" alt="Download the full-sized PDF of <%= @generic_file.title.first %>"/>Download the full-sized PDF</a>
|
|
31
33
|
<% else %>
|
|
32
34
|
<a href="<%= sufia.download_path(@generic_file) %>" target="_new"><img src="/assets/default.png" alt="No preview available" width="338" height="493" /></a>
|
|
33
35
|
<% end %>
|
|
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
%>
|
|
16
16
|
|
|
17
|
-
<% depositor = gf.depositor ||
|
|
17
|
+
<% depositor = gf.depositor || batch.generic_files.first.depositor %>
|
|
18
18
|
<% public_perm = gf.permissions.map { |perm| perm[:access] if perm[:name] == "public"}.compact.first %>
|
|
19
19
|
<% public_perm = true if params[:controller] == 'batch' %>
|
|
20
20
|
<% psu_perm = gf.permissions.map { |perm| perm[:access] if perm[:name] == "registered"}.compact.first %>
|
|
@@ -32,7 +32,7 @@ limitations under the License.
|
|
|
32
32
|
<!-- Button to trigger modal -->
|
|
33
33
|
<a href="#myModal" role="button" class="btn btn-warning" data-toggle="modal">What's this <i class="icon-question-sign icon-large"></i></a>
|
|
34
34
|
<!-- Modal -->
|
|
35
|
-
<div class="modal hide
|
|
35
|
+
<div class="modal hide" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
36
36
|
<div class="modal-header">
|
|
37
37
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
|
|
38
38
|
<h2 id="myModalLabel"><%=t('sufia.product_name') %> Permissions</h2>
|
|
@@ -18,7 +18,7 @@ limitations under the License.
|
|
|
18
18
|
<!-- Button to trigger modal -->
|
|
19
19
|
<a href="#rightsModal" role="button" class="btn btn-warning fright" data-toggle="modal">License Descriptions <i class="icon-question-sign icon-large"></i></a>
|
|
20
20
|
<!-- Modal -->
|
|
21
|
-
<div class="modal hide
|
|
21
|
+
<div class="modal hide" id="rightsModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
22
22
|
<div class="modal-header">
|
|
23
23
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
|
|
24
24
|
<h2 id="rightsModallLabel"><%= t('sufia.product_name') %> License Descriptions</h2>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<%= link_to "Download", sufia.download_path(@generic_file.noid) %>
|
|
4
4
|
<!-- | -->
|
|
5
5
|
<%# link_to "Cite", citation_generic_file_path, {:id => 'citeLink', :name => 'citation', :class => 'lightboxLink'}, :action => 'citation' %>
|
|
6
|
-
<% if @
|
|
6
|
+
<% if can? :edit, @generic_file %>
|
|
7
7
|
|
|
|
8
8
|
<%= link_to "Edit", sufia.edit_generic_file_path unless @generic_file.processing? %>
|
|
9
9
|
<%= "File is being processed you may edit once it is complete" if @generic_file.processing? %>
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
<tbody>
|
|
4
4
|
<tr>
|
|
5
5
|
<th>Depositor</th>
|
|
6
|
-
<td><%= link_to_profile @generic_file.depositor %></td>
|
|
6
|
+
<td itemprop="accountablePerson" itemscope itemtype="http://schema.org/Person"><span itemprop="name"><%= link_to_profile @generic_file.depositor %></span></td>
|
|
7
7
|
</tr>
|
|
8
8
|
<tr>
|
|
9
9
|
<th>Date Uploaded</th>
|
|
10
|
-
<td>
|
|
10
|
+
<td itemprop="datePublished">
|
|
11
11
|
<%= @generic_file.date_uploaded %>
|
|
12
12
|
</td>
|
|
13
13
|
</tr>
|
|
14
14
|
<tr>
|
|
15
15
|
<th>Date Modified</th>
|
|
16
|
-
<td>
|
|
16
|
+
<td itemprop="dateModified">
|
|
17
17
|
<%= @generic_file.date_modified %>
|
|
18
18
|
</td>
|
|
19
19
|
</tr>
|
|
@@ -24,11 +24,16 @@
|
|
|
24
24
|
</tr>
|
|
25
25
|
<% unless @generic_file.related_files.empty? %>
|
|
26
26
|
<tr>
|
|
27
|
+
|
|
27
28
|
<th>Related Files</th>
|
|
28
29
|
<td>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
<div class="related-files">
|
|
31
|
+
<dl><dt>
|
|
32
|
+
<% @generic_file.related_files.each do |f| %>
|
|
33
|
+
<dd><%= link_to(f.label, sufia.generic_file_url(f.noid)) %></dd>
|
|
34
|
+
<% end %>
|
|
35
|
+
</dt></dl>
|
|
36
|
+
</div>
|
|
32
37
|
</td>
|
|
33
38
|
</tr>
|
|
34
39
|
<% end %>
|
|
@@ -50,14 +50,6 @@ $("a[rel=popover]").popover();
|
|
|
50
50
|
|
|
51
51
|
<% end %>
|
|
52
52
|
|
|
53
|
-
<% content_for :local_css do %>
|
|
54
|
-
.audiojs {
|
|
55
|
-
width: 338px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
label.error { float: left; color: red; padding-left: .5em; vertical-align: top; }
|
|
59
|
-
<% end %>
|
|
60
|
-
|
|
61
53
|
<%= render :partial => 'breadcrumbs' %>
|
|
62
54
|
|
|
63
55
|
<h1 class="lower">Edit <%= display_title(@generic_file) %></h1>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<%= f.label :resource_type, "Resource Types", :class=>"control-label", :for=>"resource_type" %>
|
|
3
3
|
<div class="controls">
|
|
4
4
|
<p class="help-block">You may select multiple types to apply<p>
|
|
5
|
-
<%= f.select "resource_type", options_for_select(Sufia::Engine.config.resource_types.keys, @generic_file.resource_type
|
|
5
|
+
<%= f.select "resource_type", options_for_select(Sufia::Engine.config.resource_types.keys, @generic_file.resource_type), {}, {:multiple=>true, :size=>7} %>
|
|
6
6
|
<%= help_icon(:resource_type) %>
|
|
7
7
|
</div>
|
|
8
8
|
</div><!-- /control-group -->
|
|
@@ -17,18 +17,15 @@ limitations under the License.
|
|
|
17
17
|
|
|
18
18
|
<% content_for :js_head do %>
|
|
19
19
|
<% javascript_include_tag 'https://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4ff1d986721ebb24' %>
|
|
20
|
+
<script type="text/javascript">
|
|
21
|
+
var addthis_config = {"data_track_addressbar":true};
|
|
22
|
+
</script>
|
|
20
23
|
<% end %>
|
|
21
24
|
|
|
22
25
|
<% content_for :local_js do %>
|
|
23
|
-
initialize_audio();
|
|
24
|
-
var addthis_config = {"data_track_addressbar":true};
|
|
26
|
+
initialize_audio();
|
|
25
27
|
<% end %>
|
|
26
28
|
|
|
27
|
-
<% content_for :local_css do %>
|
|
28
|
-
.audiojs {
|
|
29
|
-
width: 338px;
|
|
30
|
-
}
|
|
31
|
-
<% end %>
|
|
32
29
|
<%= render :partial => 'generic_files/breadcrumbs' %>
|
|
33
30
|
|
|
34
31
|
<h1 class="lower"><%= display_title(@generic_file) %></h1>
|
|
@@ -38,7 +35,7 @@ var addthis_config = {"data_track_addressbar":true};
|
|
|
38
35
|
<%= render :partial => 'generic_files/media_display' %>
|
|
39
36
|
</div>
|
|
40
37
|
<div class="span2"> </div>
|
|
41
|
-
<div class="span68"><!-- class="column second"> -->
|
|
38
|
+
<div itemscope itemtype="http://schema.org/CreativeWork" class="span68"><!-- class="column second"> -->
|
|
42
39
|
<%= render partial: 'show_actions' %>
|
|
43
40
|
<%= render partial: 'show_descriptions' %>
|
|
44
41
|
<%= render partial: 'show_details' %>
|