sufia 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -0
- data/app/assets/javascripts/sufia.js +11 -0
- data/app/assets/stylesheets/sufia.css +1 -0
- data/app/controllers/batch_edits_controller.rb +1 -1
- data/app/controllers/downloads_controller.rb +1 -65
- data/app/controllers/generic_files_controller.rb +1 -296
- data/app/models/datastreams/generic_file_rdf_datastream.rb +0 -4
- data/app/views/_ga.html.erb +2 -2
- data/app/views/batch/edit.html.erb +1 -13
- data/app/views/batch_edits/edit.html.erb +0 -8
- data/app/views/catalog/index.html.erb +1 -1
- data/app/views/dashboard/index.html.erb +0 -19
- data/app/views/generic_files/_media_display.html.erb +6 -6
- data/app/views/generic_files/_show_actions.html.erb +37 -0
- data/app/views/generic_files/_show_descriptions.html.erb +118 -0
- data/app/views/generic_files/_show_details.html.erb +67 -0
- data/app/views/generic_files/edit.html.erb +6 -19
- data/app/views/generic_files/show.html.erb +3 -236
- data/app/views/users/edit.html.erb +0 -6
- data/lib/generators/sufia/templates/catalog_controller.rb +2 -2
- data/lib/generators/sufia/templates/config/sufia.rb +3 -0
- data/lib/sufia.rb +10 -8
- data/lib/sufia/downloads_controller_behavior.rb +77 -0
- data/lib/sufia/files_controller_behavior.rb +245 -0
- data/lib/sufia/generic_file.rb +9 -15
- data/lib/sufia/version.rb +1 -1
- data/spec/controllers/generic_files_controller_spec.rb +9 -19
- data/spec/models/generic_file_spec.rb +2 -3
- metadata +7 -7
- data/app/assets/javascripts/batch.js +0 -26
- data/app/assets/javascripts/bootstrap-button.js +0 -96
- data/app/assets/javascripts/bootstrap-dropdown.js +0 -100
- data/app/assets/javascripts/bootstrap-modal.js +0 -218
- data/app/assets/javascripts/dashboard.js +0 -40
@@ -14,20 +14,8 @@ See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
15
15
|
%>
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
<% content_for :js_head do %>
|
20
|
-
<%= javascript_include_tag 'bootstrap-tooltip.js'%>
|
21
|
-
<%= javascript_include_tag 'bootstrap-popover.js'%>
|
22
|
-
<%= javascript_include_tag 'bootstrap-modal.js'%>
|
23
|
-
|
24
|
-
<%= javascript_include_tag 'batch.js' %>
|
25
|
-
|
26
|
-
<%= javascript_include_tag 'jquery.validate.js' %>
|
27
|
-
<style type="text/css">
|
17
|
+
<% content_for :local_css do %>
|
28
18
|
label.error { float: left; color: red; padding-left: .5em; vertical-align: top; }
|
29
|
-
|
30
|
-
</style>
|
31
19
|
<% end %>
|
32
20
|
|
33
21
|
|
@@ -1,11 +1,3 @@
|
|
1
|
-
<% content_for :js_head do %>
|
2
|
-
<%= javascript_include_tag 'bootstrap-modal.js'%>
|
3
|
-
<%= javascript_include_tag 'bootstrap-tooltip.js'%>
|
4
|
-
<%= javascript_include_tag 'bootstrap-popover.js'%>
|
5
|
-
<% end %>
|
6
|
-
|
7
|
-
<% stylesheet_link_tag "jquery-ui-1.8.23.custom.css" %>
|
8
|
-
|
9
1
|
<% content_for :local_js do %>
|
10
2
|
|
11
3
|
window.onbeforeunload = clearBatch;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% content_for :local_js do %>
|
2
2
|
// setting a fixed height so that the dialog does not hop around when you get to the last small page
|
3
|
-
|
3
|
+
//$.ui.dialog.prototype.options["height"]=window.innerHeight *0.75
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<!--div id="sidebar" class="span3">
|
@@ -15,11 +15,6 @@ limitations under the License.
|
|
15
15
|
%>
|
16
16
|
|
17
17
|
<% content_for :js_head do %>
|
18
|
-
<%= javascript_include_tag 'video.js' %>
|
19
|
-
<%= javascript_include_tag 'audio.min.js' %>
|
20
|
-
<%= stylesheet_link_tag 'video-js.css' %>
|
21
|
-
<%= javascript_include_tag 'dashboard.js' %>
|
22
|
-
<%= javascript_include_tag 'swfobject.js' %>
|
23
18
|
|
24
19
|
<script type = "text/javascript">
|
25
20
|
|
@@ -102,20 +97,6 @@ limitations under the License.
|
|
102
97
|
|
103
98
|
$('#documents').batchEdit();
|
104
99
|
|
105
|
-
/*$('a.copypaste').zclip({
|
106
|
-
path: "/assets/ZeroClipboard.swf",
|
107
|
-
copy: function(){
|
108
|
-
return '123 abc';
|
109
|
-
}
|
110
|
-
});
|
111
|
-
|
112
|
-
$("#copy-button").zclip({
|
113
|
-
path: "/assets/ZeroClipboard.swf",
|
114
|
-
copy: function(){
|
115
|
-
return 'abc 123';
|
116
|
-
}
|
117
|
-
});*/
|
118
|
-
|
119
100
|
|
120
101
|
<% end %>
|
121
102
|
|
@@ -15,19 +15,19 @@ limitations under the License.
|
|
15
15
|
%>
|
16
16
|
|
17
17
|
<% if @generic_file.image? %>
|
18
|
-
<a href="<%= sufia.download_path(@generic_file
|
18
|
+
<a href="<%= sufia.download_path(@generic_file) %>" target="_new"><img src="<%= sufia.download_path(@generic_file) %>" width="338" /></a>
|
19
19
|
<% elsif @generic_file.video? %>
|
20
20
|
<video controls="controls" class="video-js vjs-default-skin" data-setup="{}" preload="auto">
|
21
|
-
<source src="<%= sufia.download_path(@generic_file
|
22
|
-
<source src="<%= sufia.download_path(@generic_file
|
21
|
+
<source src="<%= sufia.download_path(@generic_file, datastream_id: 'webm') %>" type="video/webm" />
|
22
|
+
<source src="<%= sufia.download_path(@generic_file, datastream_id: 'mp4') %>" type="video/mp4" />
|
23
23
|
Your browser does not support the audio tag.
|
24
24
|
</video>
|
25
25
|
<% elsif ['audio/mp3', 'audio/mpeg'].include?(@generic_file.mime_type) %>
|
26
|
-
<audio src="<%= sufia.download_path(@generic_file
|
26
|
+
<audio src="<%= sufia.download_path(@generic_file, format:'audio') %>" type="<%= @generic_file.mime_type %>" />
|
27
27
|
Your browser does not support the audio tag.
|
28
28
|
</audio>
|
29
29
|
<% elsif @generic_file.pdf?%>
|
30
|
-
<a href="<%= sufia.download_path(@generic_file
|
30
|
+
<a href="<%= sufia.download_path(@generic_file) %>" target="_new"><img src="<%= sufia.download_path(@generic_file, {:datastream_id => 'thumbnail'}) %>" width="338" height="493" /></a>
|
31
31
|
<% else %>
|
32
|
-
<a href="<%= sufia.download_path(@generic_file
|
32
|
+
<a href="<%= sufia.download_path(@generic_file) %>" target="_new"><img src="/assets/default.png" alt="No preview available" width="338" height="493" /></a>
|
33
33
|
<% end %>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<h2 class="non lower">Actions</h2>
|
2
|
+
<p>
|
3
|
+
<%= link_to "Download", sufia.download_path(@generic_file.noid) %>
|
4
|
+
<!-- | -->
|
5
|
+
<%# link_to "Cite", citation_generic_file_path, {:id => 'citeLink', :name => 'citation', :class => 'lightboxLink'}, :action => 'citation' %>
|
6
|
+
<% if @can_edit %>
|
7
|
+
|
|
8
|
+
<%= link_to "Edit", sufia.edit_generic_file_path unless @generic_file.processing? %>
|
9
|
+
<%= "File is being processed you may edit once it is complete" if @generic_file.processing? %>
|
10
|
+
<%end %>
|
11
|
+
</p>
|
12
|
+
<p>Export to:
|
13
|
+
<%= link_to 'EndNote', sufia.generic_file_path(@generic_file.noid, :format => 'endnote') %>
|
14
|
+
|
|
15
|
+
<%= link_to 'Zotero', sufia.static_path('zotero'), {:id => 'zoteroLink', :name => 'zotero', :class => 'lightboxLink'} %>
|
16
|
+
|
|
17
|
+
<%= link_to 'Mendeley', sufia.static_path('mendeley'), {:id => 'mendeleyLink', :name => 'mendeley', :class => 'lightboxLink'} %>
|
18
|
+
<!-- Disabling RefWorks export due to stakeholder deprioritization -->
|
19
|
+
<%# link_to 'RefWorks', refworks_export_url(:id => @generic_file.noid) %>
|
20
|
+
<!-- | -->
|
21
|
+
<!-- Disabling Email This and SMS This links due to lack of use cases -->
|
22
|
+
<%# link_to 'Email This', email_catalog_path(:id => @generic_file.persistent_url), {:id => 'emailLink', :name => 'email', :class => 'lightboxLink'} %>
|
23
|
+
</p>
|
24
|
+
<!-- AddThis Button BEGIN -->
|
25
|
+
<div class="addthis_toolbox addthis_default_style">
|
26
|
+
<a class="addthis_button_preferred_1"></a>
|
27
|
+
<a class="addthis_button_preferred_2"></a>
|
28
|
+
<a class="addthis_button_preferred_3"></a>
|
29
|
+
<a class="addthis_button_preferred_4"></a>
|
30
|
+
<a class="addthis_button_compact"></a>
|
31
|
+
<a class="addthis_counter addthis_bubble_style"></a>
|
32
|
+
</div>
|
33
|
+
<!-- AddThis Button END -->
|
34
|
+
|
35
|
+
<!-- COinS hook for Zotero -->
|
36
|
+
<span class="Z3988" title="<%= @generic_file.export_as_openurl_ctx_kev %>"></span>
|
37
|
+
|
@@ -0,0 +1,118 @@
|
|
1
|
+
<h2 class="non lower">Descriptions</h2>
|
2
|
+
<table class="table table-striped"><!-- class="verticalheadings"> -->
|
3
|
+
<tbody>
|
4
|
+
<tr>
|
5
|
+
<th>Title</th>
|
6
|
+
<td>
|
7
|
+
<% @generic_file.title.each do |title| %>
|
8
|
+
<%= title %><br />
|
9
|
+
<% end %>
|
10
|
+
</td>
|
11
|
+
</tr>
|
12
|
+
<tr>
|
13
|
+
<th>Creator</th>
|
14
|
+
<td>
|
15
|
+
<% @generic_file.creator.each do |creator| %>
|
16
|
+
<%= link_to_facet(creator, 'generic_file__creator_facet') %><br />
|
17
|
+
<% end %>
|
18
|
+
</td>
|
19
|
+
</tr>
|
20
|
+
<tr>
|
21
|
+
<th>Contributor</th>
|
22
|
+
<td>
|
23
|
+
<% @generic_file.contributor.each do |contributor| %>
|
24
|
+
<%= link_to_field('contributor', contributor) %><br />
|
25
|
+
<% end %>
|
26
|
+
</td>
|
27
|
+
</tr>
|
28
|
+
<tr>
|
29
|
+
<th>Related URL</th>
|
30
|
+
<td>
|
31
|
+
<% @generic_file.related_url.each do |url| %>
|
32
|
+
<%= iconify_auto_link(url) %><br />
|
33
|
+
<% end %>
|
34
|
+
</td>
|
35
|
+
</tr>
|
36
|
+
<tr>
|
37
|
+
<th>Location</th>
|
38
|
+
<td>
|
39
|
+
<% @generic_file.based_near.each do |bn| %>
|
40
|
+
<%= link_to_facet(bn, 'generic_file__based_near_facet') %><br />
|
41
|
+
<% end %>
|
42
|
+
</td>
|
43
|
+
</tr>
|
44
|
+
<tr>
|
45
|
+
<th>Abstract or Summary</th>
|
46
|
+
<td>
|
47
|
+
<% @generic_file.description.each do |desc| %>
|
48
|
+
<%= iconify_auto_link(desc) %><br />
|
49
|
+
<% end %>
|
50
|
+
</td>
|
51
|
+
</tr>
|
52
|
+
<tr>
|
53
|
+
<th>Language</th>
|
54
|
+
<td>
|
55
|
+
<% @generic_file.language.each do |lang| %>
|
56
|
+
<%= link_to_facet(lang,'generic_file__language_facet') %><br />
|
57
|
+
<% end %>
|
58
|
+
</td>
|
59
|
+
</tr>
|
60
|
+
<tr>
|
61
|
+
<th>Resource Type</th>
|
62
|
+
<td>
|
63
|
+
<% @generic_file.resource_type.each do |rtype| %>
|
64
|
+
<%= link_to_facet(rtype, 'generic_file__resource_type_facet') %><br />
|
65
|
+
<% end %>
|
66
|
+
</td>
|
67
|
+
</tr>
|
68
|
+
<tr>
|
69
|
+
<th>Publisher</th>
|
70
|
+
<td>
|
71
|
+
<% @generic_file.publisher.each do |pub| %>
|
72
|
+
<%= link_to_facet(pub,'generic_file__publisher_facet') %><br />
|
73
|
+
<% end %>
|
74
|
+
</td>
|
75
|
+
</tr>
|
76
|
+
<tr>
|
77
|
+
<th>Rights</th>
|
78
|
+
<td>
|
79
|
+
<% @generic_file.rights.each do |r| %>
|
80
|
+
<%=link_to_field('rights',r, Sufia::Engine.config.cc_licenses_reverse[r])%> <%= iconify_auto_link(r,false) %><br />
|
81
|
+
<% end %>
|
82
|
+
</td>
|
83
|
+
</tr>
|
84
|
+
<tr>
|
85
|
+
<th>Subject</th>
|
86
|
+
<td>
|
87
|
+
<% @generic_file.subject.each do |sub| %>
|
88
|
+
<%= link_to_facet(sub, 'generic_file__subject_facet') %><br />
|
89
|
+
<% end %>
|
90
|
+
</td>
|
91
|
+
</tr>
|
92
|
+
<tr>
|
93
|
+
<th>Keyword</th>
|
94
|
+
<td>
|
95
|
+
<% @generic_file.tag.each do |t| %>
|
96
|
+
<%= link_to_facet(t, 'generic_file__tag_facet') %><br />
|
97
|
+
<% end %>
|
98
|
+
</td>
|
99
|
+
</tr>
|
100
|
+
<tr>
|
101
|
+
<th>Identifier</th>
|
102
|
+
<td>
|
103
|
+
<% @generic_file.identifier.each do |id| %>
|
104
|
+
<%= id %><br />
|
105
|
+
<% end %>
|
106
|
+
</td>
|
107
|
+
</tr>
|
108
|
+
<tr>
|
109
|
+
<th>Date Created</th>
|
110
|
+
<td>
|
111
|
+
<% @generic_file.date_created.each do |dc| %>
|
112
|
+
<%= dc %><br />
|
113
|
+
<% end %>
|
114
|
+
</td>
|
115
|
+
</tr>
|
116
|
+
</tbody>
|
117
|
+
</table> <!-- /verticalheadings -->
|
118
|
+
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<h2 class="non lower">File Details</h2>
|
2
|
+
<table class="table table-striped">
|
3
|
+
<tbody>
|
4
|
+
<tr>
|
5
|
+
<th>Depositor</th>
|
6
|
+
<td><%= link_to_profile @generic_file.depositor %></td>
|
7
|
+
</tr>
|
8
|
+
<tr>
|
9
|
+
<th>Date Uploaded</th>
|
10
|
+
<td>
|
11
|
+
<%= @generic_file.date_uploaded %>
|
12
|
+
</td>
|
13
|
+
</tr>
|
14
|
+
<tr>
|
15
|
+
<th>Date Modified</th>
|
16
|
+
<td>
|
17
|
+
<%= @generic_file.date_modified %>
|
18
|
+
</td>
|
19
|
+
</tr>
|
20
|
+
<tr>
|
21
|
+
<th>Audit Status</th>
|
22
|
+
<%- stat= @generic_file.audit_stat(false) %>
|
23
|
+
<td> <%= (stat == 1 ? 'passing' : (stat == 0 ? 'failing' : stat)) %></td>
|
24
|
+
</tr>
|
25
|
+
<% unless @generic_file.related_files.empty? %>
|
26
|
+
<tr>
|
27
|
+
<th>Related Files</th>
|
28
|
+
<td>
|
29
|
+
<% @generic_file.related_files.each do |f| %>
|
30
|
+
<dd><%= link_to(f.label, sufia.generic_file_url(f.noid)) %></dd>
|
31
|
+
<% end %>
|
32
|
+
</td>
|
33
|
+
</tr>
|
34
|
+
<% end %>
|
35
|
+
<tr>
|
36
|
+
<th>Characterization</th>
|
37
|
+
<td>
|
38
|
+
<%= "not yet characterized" if @generic_file.characterization_terms.values.flatten.map(&:empty?).reduce(true) { |sum, value| sum && value } %>
|
39
|
+
<% @generic_file.characterization_terms.each_pair do |term, values| %>
|
40
|
+
<div>
|
41
|
+
<% label = term.to_s %>
|
42
|
+
<% if label == "format_label" %>
|
43
|
+
<% label = "File Format" %>
|
44
|
+
<% values = @generic_file.file_format %>
|
45
|
+
<% end %>
|
46
|
+
<% label = label.humanize %>
|
47
|
+
<% if values.is_a? Array %>
|
48
|
+
<% length = values.length %>
|
49
|
+
<% length = Sufia::Engine.config.fits_message_length-1 if term == :status_message && values.length > Sufia::Engine.config.fits_message_length-1 %>
|
50
|
+
<% values[0..length].each_with_index do |value, idx| %>
|
51
|
+
<% next if value.empty? %>
|
52
|
+
<%= "#{label}: #{value.truncate(250)}" %>
|
53
|
+
<%= "<br />".html_safe unless idx == length %>
|
54
|
+
<% end %>
|
55
|
+
<% if length != values.length %>
|
56
|
+
<%= render :partial => "generic_files/extra_fields_modal", :locals=>{:name=>term, :values=> values, :start=>Sufia::Engine.config.fits_message_length}%>
|
57
|
+
<% end %>
|
58
|
+
<% else %>
|
59
|
+
<%= "#{label}: #{values.truncate(250)}" %><br />
|
60
|
+
<% end %>
|
61
|
+
</div>
|
62
|
+
<% end %>
|
63
|
+
</td>
|
64
|
+
</tr>
|
65
|
+
</tbody>
|
66
|
+
</table> <!-- /verticalheadings -->
|
67
|
+
|
@@ -14,25 +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
|
-
<%= javascript_include_tag 'video.js' %>
|
19
|
-
<%= javascript_include_tag 'audio.min.js' %>
|
20
|
-
<%= stylesheet_link_tag 'video-js.css' %>
|
21
|
-
|
22
|
-
<%= javascript_include_tag 'bootstrap-tooltip.js'%>
|
23
|
-
<%= javascript_include_tag 'bootstrap-popover.js'%>
|
24
|
-
<%= javascript_include_tag 'bootstrap-modal.js'%>
|
25
|
-
|
26
|
-
|
27
|
-
<%= javascript_include_tag 'jquery.validate.js' %>
|
28
|
-
|
29
|
-
<style type="text/css">
|
30
|
-
label.error { float: left; color: red; padding-left: .5em; vertical-align: top; }
|
31
|
-
</style>
|
32
|
-
<% end %>
|
33
|
-
|
34
|
-
|
35
|
-
|
36
17
|
<% content_for :local_js do %>
|
37
18
|
if (navigator.userAgent.match("MSIE")){
|
38
19
|
$("form").validate();
|
@@ -73,6 +54,12 @@ $("a[rel=popover]").popover();
|
|
73
54
|
.audiojs {
|
74
55
|
width: 338px;
|
75
56
|
}
|
57
|
+
|
58
|
+
label.error { float: left; color: red; padding-left: .5em; vertical-align: top; }
|
59
|
+
<% end %>
|
60
|
+
|
61
|
+
|
62
|
+
|
76
63
|
<% end %>
|
77
64
|
<%= render :partial => 'breadcrumbs' %>
|
78
65
|
|
@@ -16,15 +16,7 @@ limitations under the License.
|
|
16
16
|
|
17
17
|
|
18
18
|
<% content_for :js_head do %>
|
19
|
-
<% javascript_include_tag 'video.js' %>
|
20
|
-
<% javascript_include_tag 'audio.min.js' %>
|
21
19
|
<% javascript_include_tag 'https://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4ff1d986721ebb24' %>
|
22
|
-
<% javascript_include_tag 'bootstrap-tooltip.js'%>
|
23
|
-
<% javascript_include_tag 'bootstrap-popover.js'%>
|
24
|
-
<% javascript_include_tag 'bootstrap-modal.js'%>
|
25
|
-
<% end %>
|
26
|
-
<% content_for :css_head do %>
|
27
|
-
<% stylesheet_link_tag 'video-js.css' %>
|
28
20
|
<% end %>
|
29
21
|
|
30
22
|
<% content_for :local_js do %>
|
@@ -47,234 +39,9 @@ var addthis_config = {"data_track_addressbar":true};
|
|
47
39
|
</div>
|
48
40
|
<div class="span2"> </div>
|
49
41
|
<div class="span68"><!-- class="column second"> -->
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
<!-- | -->
|
54
|
-
<%# link_to "Cite", citation_generic_file_path, {:id => 'citeLink', :name => 'citation', :class => 'lightboxLink'}, :action => 'citation' %>
|
55
|
-
<% if @can_edit %>
|
56
|
-
|
|
57
|
-
<%= link_to "Edit", sufia.edit_generic_file_path unless @generic_file.processing? %>
|
58
|
-
<%= "File is being processed you may edit once it is complete" if @generic_file.processing? %>
|
59
|
-
<%end %>
|
60
|
-
</p>
|
61
|
-
<p>Export to:
|
62
|
-
<%= link_to 'EndNote', sufia.generic_file_path(@generic_file.noid, :format => 'endnote') %>
|
63
|
-
|
|
64
|
-
<%= link_to 'Zotero', sufia.static_path('zotero'), {:id => 'zoteroLink', :name => 'zotero', :class => 'lightboxLink'} %>
|
65
|
-
|
|
66
|
-
<%= link_to 'Mendeley', sufia.static_path('mendeley'), {:id => 'mendeleyLink', :name => 'mendeley', :class => 'lightboxLink'} %>
|
67
|
-
<!-- Disabling RefWorks export due to stakeholder deprioritization -->
|
68
|
-
<%# link_to 'RefWorks', refworks_export_url(:id => @generic_file.noid) %>
|
69
|
-
<!-- | -->
|
70
|
-
<!-- Disabling Email This and SMS This links due to lack of use cases -->
|
71
|
-
<%# link_to 'Email This', email_catalog_path(:id => @generic_file.persistent_url), {:id => 'emailLink', :name => 'email', :class => 'lightboxLink'} %>
|
72
|
-
</p>
|
73
|
-
<!-- AddThis Button BEGIN -->
|
74
|
-
<div class="addthis_toolbox addthis_default_style">
|
75
|
-
<a class="addthis_button_preferred_1"></a>
|
76
|
-
<a class="addthis_button_preferred_2"></a>
|
77
|
-
<a class="addthis_button_preferred_3"></a>
|
78
|
-
<a class="addthis_button_preferred_4"></a>
|
79
|
-
<a class="addthis_button_compact"></a>
|
80
|
-
<a class="addthis_counter addthis_bubble_style"></a>
|
81
|
-
</div>
|
82
|
-
<!-- AddThis Button END -->
|
83
|
-
|
84
|
-
<!-- COinS hook for Zotero -->
|
85
|
-
<span class="Z3988" title="<%= @generic_file.export_as_openurl_ctx_kev %>"></span>
|
86
|
-
|
87
|
-
<!--
|
88
|
-
<p>
|
89
|
-
|
|
90
|
-
<a href="#">Run Audit Now</a> | <a href="#">View Full Audit History</a></p>
|
91
|
-
</p>
|
92
|
-
-->
|
93
|
-
|
94
|
-
<h2 class="non lower">Descriptions</h2>
|
95
|
-
<table class="table table-striped"><!-- class="verticalheadings"> -->
|
96
|
-
<tbody>
|
97
|
-
<tr>
|
98
|
-
<th>Title</th>
|
99
|
-
<td>
|
100
|
-
<% @generic_file.title.each do |title| %>
|
101
|
-
<%= title %><br />
|
102
|
-
<% end %>
|
103
|
-
</td>
|
104
|
-
</tr>
|
105
|
-
<tr>
|
106
|
-
<th>Creator</th>
|
107
|
-
<td>
|
108
|
-
<% @generic_file.creator.each do |creator| %>
|
109
|
-
<%= link_to_facet(creator, 'generic_file__creator_facet') %><br />
|
110
|
-
<% end %>
|
111
|
-
</td>
|
112
|
-
</tr>
|
113
|
-
<tr>
|
114
|
-
<th>Contributor</th>
|
115
|
-
<td>
|
116
|
-
<% @generic_file.contributor.each do |contributor| %>
|
117
|
-
<%= link_to_field('contributor', contributor) %><br />
|
118
|
-
<% end %>
|
119
|
-
</td>
|
120
|
-
</tr>
|
121
|
-
<tr>
|
122
|
-
<th>Related URL</th>
|
123
|
-
<td>
|
124
|
-
<% @generic_file.related_url.each do |url| %>
|
125
|
-
<%= iconify_auto_link(url) %><br />
|
126
|
-
<% end %>
|
127
|
-
</td>
|
128
|
-
</tr>
|
129
|
-
<tr>
|
130
|
-
<th>Location</th>
|
131
|
-
<td>
|
132
|
-
<% @generic_file.based_near.each do |bn| %>
|
133
|
-
<%= link_to_facet(bn, 'generic_file__based_near_facet') %><br />
|
134
|
-
<% end %>
|
135
|
-
</td>
|
136
|
-
</tr>
|
137
|
-
<tr>
|
138
|
-
<th>Abstract or Summary</th>
|
139
|
-
<td>
|
140
|
-
<% @generic_file.description.each do |desc| %>
|
141
|
-
<%= iconify_auto_link(desc) %><br />
|
142
|
-
<% end %>
|
143
|
-
</td>
|
144
|
-
</tr>
|
145
|
-
<tr>
|
146
|
-
<th>Language</th>
|
147
|
-
<td>
|
148
|
-
<% @generic_file.language.each do |lang| %>
|
149
|
-
<%= link_to_facet(lang,'generic_file__language_facet') %><br />
|
150
|
-
<% end %>
|
151
|
-
</td>
|
152
|
-
</tr>
|
153
|
-
<tr>
|
154
|
-
<th>Resource Type</th>
|
155
|
-
<td>
|
156
|
-
<% @generic_file.resource_type.each do |rtype| %>
|
157
|
-
<%= link_to_facet(rtype, 'generic_file__resource_type_facet') %><br />
|
158
|
-
<% end %>
|
159
|
-
</td>
|
160
|
-
</tr>
|
161
|
-
<tr>
|
162
|
-
<th>Publisher</th>
|
163
|
-
<td>
|
164
|
-
<% @generic_file.publisher.each do |pub| %>
|
165
|
-
<%= link_to_facet(pub,'generic_file__publisher_facet') %><br />
|
166
|
-
<% end %>
|
167
|
-
</td>
|
168
|
-
</tr>
|
169
|
-
<tr>
|
170
|
-
<th>Rights</th>
|
171
|
-
<td>
|
172
|
-
<% @generic_file.rights.each do |r| %>
|
173
|
-
<%=link_to_field('rights',r, Sufia::Engine.config.cc_licenses_reverse[r])%> <%= iconify_auto_link(r,false) %><br />
|
174
|
-
<% end %>
|
175
|
-
</td>
|
176
|
-
</tr>
|
177
|
-
<tr>
|
178
|
-
<th>Subject</th>
|
179
|
-
<td>
|
180
|
-
<% @generic_file.subject.each do |sub| %>
|
181
|
-
<%= link_to_facet(sub, 'generic_file__subject_facet') %><br />
|
182
|
-
<% end %>
|
183
|
-
</td>
|
184
|
-
</tr>
|
185
|
-
<tr>
|
186
|
-
<th>Keyword</th>
|
187
|
-
<td>
|
188
|
-
<% @generic_file.tag.each do |t| %>
|
189
|
-
<%= link_to_facet(t, 'generic_file__tag_facet') %><br />
|
190
|
-
<% end %>
|
191
|
-
</td>
|
192
|
-
</tr>
|
193
|
-
<tr>
|
194
|
-
<th>Identifier</th>
|
195
|
-
<td>
|
196
|
-
<% @generic_file.identifier.each do |id| %>
|
197
|
-
<%= id %><br />
|
198
|
-
<% end %>
|
199
|
-
</td>
|
200
|
-
</tr>
|
201
|
-
<tr>
|
202
|
-
<th>Date Created</th>
|
203
|
-
<td>
|
204
|
-
<% @generic_file.date_created.each do |dc| %>
|
205
|
-
<%= dc %><br />
|
206
|
-
<% end %>
|
207
|
-
</td>
|
208
|
-
</tr>
|
209
|
-
</tbody>
|
210
|
-
</table> <!-- /verticalheadings -->
|
211
|
-
|
212
|
-
<h2 class="non lower">File Details</h2>
|
213
|
-
<table class="table table-striped">
|
214
|
-
<tbody>
|
215
|
-
<tr>
|
216
|
-
<th>Depositor</th>
|
217
|
-
<td><%= link_to_profile @generic_file.depositor %></td>
|
218
|
-
</tr>
|
219
|
-
<tr>
|
220
|
-
<th>Date Uploaded</th>
|
221
|
-
<td>
|
222
|
-
<%= @generic_file.date_uploaded %>
|
223
|
-
</td>
|
224
|
-
</tr>
|
225
|
-
<tr>
|
226
|
-
<th>Date Modified</th>
|
227
|
-
<td>
|
228
|
-
<%= @generic_file.date_modified %>
|
229
|
-
</td>
|
230
|
-
</tr>
|
231
|
-
<tr>
|
232
|
-
<th>Audit Status</th>
|
233
|
-
<%- stat= @generic_file.audit_stat(false) %>
|
234
|
-
<td> <%= (stat == 1 ? 'passing' : (stat == 0 ? 'failing' : stat)) %></td>
|
235
|
-
</tr>
|
236
|
-
<% unless @generic_file.related_files.empty? %>
|
237
|
-
<tr>
|
238
|
-
<th>Related Files</th>
|
239
|
-
<td>
|
240
|
-
<% @generic_file.related_files.each do |f| %>
|
241
|
-
<dd><%= link_to(f.label, sufia.generic_file_url(f.noid)) %></dd>
|
242
|
-
<% end %>
|
243
|
-
</td>
|
244
|
-
</tr>
|
245
|
-
<% end %>
|
246
|
-
<tr>
|
247
|
-
<th>Characterization</th>
|
248
|
-
<td>
|
249
|
-
<%= "not yet characterized" if @generic_file.characterization_terms.values.flatten.map(&:empty?).reduce(true) { |sum, value| sum && value } %>
|
250
|
-
<% @generic_file.characterization_terms.each_pair do |term, values| %>
|
251
|
-
<div>
|
252
|
-
<% label = term.to_s %>
|
253
|
-
<% if label == "format_label" %>
|
254
|
-
<% label = "File Format" %>
|
255
|
-
<% values = @generic_file.file_format %>
|
256
|
-
<% end %>
|
257
|
-
<% label = label.humanize %>
|
258
|
-
<% if values.is_a? Array %>
|
259
|
-
<% length = values.length %>
|
260
|
-
<% length = Sufia::Engine.config.fits_message_length-1 if term == :status_message && values.length > Sufia::Engine.config.fits_message_length-1 %>
|
261
|
-
<% values[0..length].each_with_index do |value, idx| %>
|
262
|
-
<% next if value.empty? %>
|
263
|
-
<%= "#{label}: #{value.truncate(250)}" %>
|
264
|
-
<%= "<br />".html_safe unless idx == length %>
|
265
|
-
<% end %>
|
266
|
-
<% if length != values.length %>
|
267
|
-
<%= render :partial => "generic_files/extra_fields_modal", :locals=>{:name=>term, :values=> values, :start=>Sufia::Engine.config.fits_message_length}%>
|
268
|
-
<% end %>
|
269
|
-
<% else %>
|
270
|
-
<%= "#{label}: #{values.truncate(250)}" %><br />
|
271
|
-
<% end %>
|
272
|
-
</div>
|
273
|
-
<% end %>
|
274
|
-
</td>
|
275
|
-
</tr>
|
276
|
-
</tbody>
|
277
|
-
</table> <!-- /verticalheadings -->
|
42
|
+
<%= render partial: 'show_actions' %>
|
43
|
+
<%= render partial: 'show_descriptions' %>
|
44
|
+
<%= render partial: 'show_details' %>
|
278
45
|
<%= render :partial => 'users/activity_log', :locals => {:events => @events} %>
|
279
46
|
</div><!-- /columns second -->
|
280
47
|
</div> <!-- /columns two-b -->
|