sufia 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -13,11 +13,11 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
15
|
# properties datastream: catch-all for info that didn't have another home. Particularly depositor.
|
16
|
-
class PropertiesDatastream < ActiveFedora::
|
16
|
+
class PropertiesDatastream < ActiveFedora::OmDatastream
|
17
17
|
set_terminology do |t|
|
18
18
|
t.root(:path=>"fields", :xmlns => '', :namespace_prefix => nil)
|
19
19
|
# This is where we put the user id of the object depositor -- impacts permissions/access controls
|
20
|
-
t.depositor :xmlns => '', :namespace_prefix => nil, :index_as=>[:
|
20
|
+
t.depositor :xmlns => '', :namespace_prefix => nil, :index_as=>[:stored_searchable]
|
21
21
|
# This is where we put the relative path of the file if submitted as a folder
|
22
22
|
t.relative_path :xmlns => '', :namespace_prefix => nil
|
23
23
|
end
|
@@ -13,14 +13,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
See the License for the specific language governing permissions and
|
14
14
|
limitations under the License.
|
15
15
|
%>
|
16
|
-
<% if
|
16
|
+
<% if user_signed_in? %>
|
17
17
|
<%= render :partial => 'users/notify_link' %>
|
18
18
|
<a href="<%= sufia.profile_path(current_user) %>" class="btn btn-small " title="click for User Profile"><i class="icon-user"> </i><%= current_user.name %></a>
|
19
19
|
<a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><span class="icon-caret-down" title="click for additional menu options"></span></a>
|
20
20
|
<ul class="dropdown-menu">
|
21
21
|
<li><%= link_to raw('<i class="icon-dashboard"></i> my dashboard'), sufia.dashboard_index_path, :id => 'dashboard_nav_link' %></li>
|
22
22
|
<li><%= link_to raw('<i class="icon-upload-alt"></i> upload'), sufia.new_generic_file_path, :id => 'upload_nav_link' %></li>
|
23
|
-
<li><%= link_to raw('<i class="icon-cog"></i> edit profile'), sufia.edit_profile_path(current_user
|
23
|
+
<li><%= link_to raw('<i class="icon-cog"></i> edit profile'), sufia.edit_profile_path(current_user), :id => 'upload_nav_link' %></li>
|
24
24
|
<li class="divider"></li>
|
25
25
|
<li><%= link_to raw('<i class="icon-signout"></i> log out'), destroy_user_session_path, :id => 'logout_nav_link' %></li>
|
26
26
|
</ul>
|
@@ -0,0 +1,82 @@
|
|
1
|
+
<h2>Individual Titles <small>(applied to individual files uploaded)</small><small class="pull-right"><span class="error">*</span> indicates required fields</small> </h2>
|
2
|
+
<div id="" class="well">
|
3
|
+
<p>
|
4
|
+
<i class="icon-info-sign"></i> Filename will be the default title. Please provide a more meaningful title, and filenames will still be preserved by the system.
|
5
|
+
</p>
|
6
|
+
<div class="row">
|
7
|
+
<div class="span60">
|
8
|
+
<% @batch.generic_files.sort! { |a,b| a.label.downcase <=> b.label.downcase }.each_with_index do |gen_f, index| %>
|
9
|
+
<div class="control-group">
|
10
|
+
<%= f.label :title, "<span class='error'>*</span> Title #{index+1}".html_safe, :class=>"control-label" %>
|
11
|
+
<div class="controls" id="additional_title_clone">
|
12
|
+
<%= f.text_field :title, :name=>"title[#{gen_f.id}][]", :value=>gen_f.label, :required=> true %>
|
13
|
+
<%= help_icon(:title) %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="span40">
|
20
|
+
<!-- put metadata about file being edited here -->
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<%= hidden_field_tag(:extra_description_count, "1") %>
|
26
|
+
<div id="descriptions_display">
|
27
|
+
<h2 class="non lower">Bulk Descriptions <small>(applied to all files just uploaded)</small> <small class="pull-right"><span class="error">*</span> indicates required fields</small></h2>
|
28
|
+
<div class="well">
|
29
|
+
<div class="control-group" id="resources">
|
30
|
+
<%# See if this works: render_edit_field_partial(:type, f:f) %>
|
31
|
+
<%= f.label :resource_type, "Resource Types", :class=>"control-label", :for=>"resource_type" %>
|
32
|
+
<div class="controls">
|
33
|
+
<p class="help-block">You may select multiple types to apply to all files<p>
|
34
|
+
<%= f.select "resource_type", Sufia::Engine::config.resource_types, {}, {:multiple=>true, :size=>7} %>
|
35
|
+
<%= help_icon(:resource_type) %>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="control-group">
|
40
|
+
<%= f.label :tag, "<span class='error'>*</span> Keyword".html_safe, :class=>"control-label" %>
|
41
|
+
<div class="controls" id="additional_tag_clone">
|
42
|
+
<%= f.text_field :tag, :name=>"generic_file[tag][]", :value=>"", :required=> true %>
|
43
|
+
<button class="adder btn" name="additional_tag" id="additional_tag_submit">+<span class="accessible-hidden">add another Tag</span></button>
|
44
|
+
|
45
|
+
<%= help_icon(:tag) %>
|
46
|
+
</div>
|
47
|
+
<div id="additional_tag_elements"></div>
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<div class="control-group">
|
51
|
+
<%= f.label :creator, "<span class='error'>*</span> Creator".html_safe, :class=>"control-label" %>
|
52
|
+
<div class="controls" id="additional_creator_clone">
|
53
|
+
<%= f.text_field :creator, :name=>"generic_file[creator][]", :value=>"", :required=> true %>
|
54
|
+
<button class="adder btn" name="additional_creator" id="additional_creator_submit">+<span class="accessible-hidden">add another Creator</span></button>
|
55
|
+
|
56
|
+
<%= help_icon(:creator) %>
|
57
|
+
</div>
|
58
|
+
<div id="additional_creator_elements"></div>
|
59
|
+
</div>
|
60
|
+
|
61
|
+
<div class="control-group">
|
62
|
+
<%= f.label :rights, '<span class="error">*</span> Rights'.html_safe, :class=>"control-label" %>
|
63
|
+
<div class="controls" id="additional_rights_clone">
|
64
|
+
<%= f.select "rights", options_for_select(Sufia::Engine::config.cc_licenses, 'http://creativecommons.org/licenses/by-nc-nd/3.0/us/'), :required => true %>
|
65
|
+
<button class="adder btn" name="additional_rights" id="additional_rights_submit">+<span class="accessible-hidden">add another Rights</span></button>
|
66
|
+
|
67
|
+
<%= help_icon(:rights) %>
|
68
|
+
<%= render :partial => "generic_files/rights_modal" %>
|
69
|
+
|
70
|
+
</div>
|
71
|
+
<div id="additional_rights_elements"></div>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<div class="row" id="add_descriptions">
|
75
|
+
<a href="#" id="add_descriptions" >Add More Description Types</a>
|
76
|
+
</div>
|
77
|
+
<!-- hidden on initial load -->
|
78
|
+
|
79
|
+
<%= render partial: 'more_metadata', locals: {f:f} %>
|
80
|
+
|
81
|
+
</div><!-- /well -->
|
82
|
+
</div> <!-- /row /span6 -->
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<div class="hide" id="more_descriptions">
|
2
|
+
<% (@generic_file.terms_for_editing - [:title, :creator, :rights, :tag, :resource_type]).each do |term| %>
|
3
|
+
<%= render :partial => "generic_files/field_form", :locals => { :generic_file => @generic_file, :f =>f, :render_req => false, :key => term } %>
|
4
|
+
<% end %>
|
5
|
+
</div> <!-- /more_descriptions -->
|
6
|
+
|
@@ -14,13 +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 :local_css do %>
|
18
|
-
label.error { float: left; color: red; padding-left: .5em; vertical-align: top; }
|
19
|
-
<% end %>
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
17
|
<% content_for :local_js do %>
|
25
18
|
if (navigator.userAgent.match("MSIE")){
|
26
19
|
$("#new_generic_file").validate();
|
@@ -52,7 +45,7 @@ function confirmExit(){
|
|
52
45
|
</div>
|
53
46
|
<%= form_for([@batch, @generic_file], :url => sufia.batch_generic_files_path, :html => {:multipart => true, :class => 'form-horizontal'}) do |f| %>
|
54
47
|
|
55
|
-
<%= render :partial => '
|
48
|
+
<%= render :partial => 'metadata', :formats => [:html], :locals => {:f => f} %>
|
56
49
|
|
57
50
|
<%= render :partial => 'generic_files/permission', :formats => [:html], :locals => { :gf => @generic_file, :batch => @batch } %>
|
58
51
|
|
@@ -1,160 +1,3 @@
|
|
1
|
-
<script type = "text/javascript">
|
2
|
-
|
3
|
-
function toggleState (obj, state) {
|
4
|
-
if (state == 'on'){
|
5
|
-
obj.attr("data-state", 'on');
|
6
|
-
obj.find('a i').addClass('icon-ok');
|
7
|
-
}else {
|
8
|
-
obj.attr("data-state", 'off');
|
9
|
-
obj.find('a i').removeClass('icon-ok');
|
10
|
-
}
|
11
|
-
|
12
|
-
}
|
13
|
-
|
14
|
-
function check_all_page(e) {
|
15
|
-
var checked = $("#check_all")[0]['checked'];
|
16
|
-
|
17
|
-
// only check the current page
|
18
|
-
var timeout = 0;
|
19
|
-
var timeoutInc = 60;
|
20
|
-
|
21
|
-
$("input[type='checkbox'].batch_toggle").each(function(index, value) {
|
22
|
-
// check each individual box
|
23
|
-
var ck = value['checked'];
|
24
|
-
// not the same state click the box
|
25
|
-
if ((checked && !ck) || (!checked && ck)){
|
26
|
-
window.parent.setTimeout(function(){value.click();},timeout);
|
27
|
-
}
|
28
|
-
timeout+=timeoutInc;
|
29
|
-
});
|
30
|
-
window.parent.setTimeout(toggleButtons,timeout+500);
|
31
|
-
$("#check_all").attr('checked', checked);
|
32
|
-
}
|
33
|
-
|
34
|
-
function clear_batch () {
|
35
|
-
var url = '<%=clear_batch_edits_path %>';
|
36
|
-
var clearState = $.ajax({
|
37
|
-
headers: {
|
38
|
-
Accept : "application/javascript",
|
39
|
-
},
|
40
|
-
type: 'PUT',
|
41
|
-
url: url,
|
42
|
-
async: false,
|
43
|
-
});
|
44
|
-
|
45
|
-
}
|
46
|
-
|
47
|
-
function set_all_checkboxes(checked){
|
48
|
-
$("input[type='checkbox'].batch_toggle").each(function(){
|
49
|
-
$(this).attr('checked', checked);
|
50
|
-
|
51
|
-
// make sure the form is set correctly
|
52
|
-
form = $($(this).parent()[0]);
|
53
|
-
if (checked) {
|
54
|
-
form.find("input[name=_method]").val("delete");
|
55
|
-
|
56
|
-
} else {
|
57
|
-
form.find("input[name=_method]").val("put");
|
58
|
-
}
|
59
|
-
});
|
60
|
-
|
61
|
-
}
|
62
|
-
|
63
|
-
|
64
|
-
$(document).ready(function() {
|
65
|
-
|
66
|
-
$("[data-behavior='batch-edit-select-page']").bind('click', function(e) {
|
67
|
-
$("body").css("cursor", "progress");
|
68
|
-
e.preventDefault();
|
69
|
-
$("#check_all").attr('checked', true);
|
70
|
-
toggleState($(this),'on');
|
71
|
-
toggleState($("[data-behavior='batch-edit-select-all']"),'off');
|
72
|
-
toggleState($("[data-behavior='batch-edit-select-none']"),'off');
|
73
|
-
clear_batch();
|
74
|
-
|
75
|
-
// uncheck everything on the current page
|
76
|
-
set_all_checkboxes(false);
|
77
|
-
|
78
|
-
// check everything on the current page
|
79
|
-
check_all_page();
|
80
|
-
|
81
|
-
});
|
82
|
-
|
83
|
-
$("[data-behavior='batch-edit-select-all']").bind('click', function(e) {
|
84
|
-
$("body").css("cursor", "progress");
|
85
|
-
e.preventDefault();
|
86
|
-
$("#check_all").attr('checked', true);
|
87
|
-
toggleState($(this), 'on');
|
88
|
-
toggleState($("[data-behavior='batch-edit-select-page']"),'off');
|
89
|
-
toggleState($("[data-behavior='batch-edit-select-none']"),'off');
|
90
|
-
var url = '<%=all_batch_edits_path %>';
|
91
|
-
var clearState = $.ajax({
|
92
|
-
headers: {
|
93
|
-
Accept : "application/javascript",
|
94
|
-
},
|
95
|
-
type: 'PUT',
|
96
|
-
url: url,
|
97
|
-
async: false,
|
98
|
-
});
|
99
|
-
|
100
|
-
// show that update on the local screen
|
101
|
-
set_all_checkboxes(true)
|
102
|
-
$("body").css("cursor", "auto");
|
103
|
-
toggleButtons(true);
|
104
|
-
});
|
105
|
-
|
106
|
-
$("[data-behavior='batch-edit-select-none']").bind('click', function(e) {
|
107
|
-
$("body").css("cursor", "progress");
|
108
|
-
e.preventDefault();
|
109
|
-
$("#check_all").attr('checked', false);
|
110
|
-
toggleState($(this), 'on');
|
111
|
-
toggleState($("[data-behavior='batch-edit-select-page']"),'off');
|
112
|
-
toggleState($("[data-behavior='batch-edit-select-all']"),'off');
|
113
|
-
clear_batch();
|
114
|
-
|
115
|
-
// show that update on the local screen
|
116
|
-
set_all_checkboxes(false)
|
117
|
-
$("body").css("cursor", "auto");
|
118
|
-
toggleButtons(false, true);
|
119
|
-
});
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
// check all buttons
|
124
|
-
$("#check_all").bind('click', check_all_page);
|
125
|
-
|
126
|
-
|
127
|
-
$(".batch_toggle").bind('click', function(e) {
|
128
|
-
|
129
|
-
// if we are unchecking a box remove the group selections
|
130
|
-
if ($(e.currentTarget).attr('checked') != "checked") {
|
131
|
-
toggleState($("[data-behavior='batch-edit-select-all']"),'off');
|
132
|
-
toggleState($("[data-behavior='batch-edit-select-page']"),'off');
|
133
|
-
toggleState($("[data-behavior='batch-edit-select-none']"),'off');
|
134
|
-
$("#check_all").attr('checked', false);
|
135
|
-
}
|
136
|
-
// checking a single box see if we need to turn on one of the groups
|
137
|
-
else {
|
138
|
-
var n = $(".batch_toggle:checked").length;
|
139
|
-
if (n == <%= @document_list.count %>) {
|
140
|
-
$("#check_all").attr('checked', true);
|
141
|
-
if (!<%=@batch_part_on_other_page%>) {
|
142
|
-
toggleState($("[data-behavior='batch-edit-select-page']"),'on');
|
143
|
-
} else if ((n + <%=@batch_size_on_other_page%>) == <%=@result_set_size%>){
|
144
|
-
toggleState($("[data-behavior='batch-edit-select-all']"),'on');
|
145
|
-
}
|
146
|
-
} else {
|
147
|
-
if ((n + <%=@batch_size_on_other_page%>) == 0){
|
148
|
-
toggleState($("[data-behavior='batch-edit-select-none']"),'on');
|
149
|
-
}
|
150
|
-
}
|
151
|
-
}
|
152
|
-
});
|
153
|
-
|
154
|
-
|
155
|
-
});
|
156
|
-
|
157
|
-
</script>
|
158
1
|
<% if !@disable_select_all %>
|
159
2
|
<div class="dropdown" >
|
160
3
|
<%= check_box_tag 'check_all', 'yes', @all_checked, :disabled => ((@batch_size_on_other_page + @document_list.count) > @max_batch_size) %>
|
@@ -204,35 +204,6 @@ $("a[rel=popover]").popover();
|
|
204
204
|
|
205
205
|
<% end %>
|
206
206
|
|
207
|
-
<% content_for :local_css do %>
|
208
|
-
#upload_tooltip { background: #ff0; padding: 5px; border: 1px solid #ddd; position: absolute; }
|
209
|
-
|
210
|
-
.fileHeight {
|
211
|
-
max-height: 50px
|
212
|
-
}
|
213
|
-
|
214
|
-
.scrollx {
|
215
|
-
overflow-x: auto;
|
216
|
-
}
|
217
|
-
|
218
|
-
.scrolly {
|
219
|
-
overflow-y: auto;
|
220
|
-
}
|
221
|
-
|
222
|
-
h2 small {
|
223
|
-
color: red;
|
224
|
-
}
|
225
|
-
|
226
|
-
|
227
|
-
.status {
|
228
|
-
color: green;
|
229
|
-
padding:5px 5px 5px;
|
230
|
-
}
|
231
|
-
|
232
|
-
.loading {
|
233
|
-
background: white url('/assets/loading.gif') center bottom no-repeat;
|
234
|
-
}
|
235
|
-
<% end %>
|
236
207
|
|
237
208
|
<%= render :partial => 'generic_files/breadcrumbs', :locals => {:include_file=>false} %>
|
238
209
|
<h2 class="non lower">Batch Edit Descriptions <small>Click on labels below to edit file descriptions.</small> </h2>
|
@@ -1,36 +1,34 @@
|
|
1
|
-
<% if document.has_key?(:noid_s) %>
|
2
1
|
<li>
|
3
2
|
<h2>
|
4
|
-
<%= link_to
|
5
|
-
<small>[<%= link_to 'Download', sufia.download_path(document
|
3
|
+
<%= link_to document.title_or_label, sufia.generic_file_path(document.noid) %>
|
4
|
+
<small>[<%= link_to 'Download', sufia.download_path(document.noid), :target => '_new' %>]</small>
|
6
5
|
</h2>
|
7
6
|
<table class="table">
|
8
7
|
<tr>
|
9
8
|
<td rowspan="6" class="span20"> <%= render :partial => 'dashboard/_index_partials/thumbnail_display', :locals => {:document=>document, :height=>200, :width=>150} %>
|
10
9
|
</td>
|
11
10
|
<th><h4>Title:</h4></th>
|
12
|
-
<td><%=
|
11
|
+
<td><%= document.title %></td>
|
13
12
|
</tr>
|
14
13
|
<tr>
|
15
14
|
<th><h4>Depositor:<h4></div>
|
16
|
-
<td><%= link_to_profile
|
15
|
+
<td><%= link_to_profile document.depositor("no depositor value") %></td>
|
17
16
|
</tr>
|
18
17
|
<tr>
|
19
18
|
<th><h4>Creator:</h4></th>
|
20
|
-
<td><%=
|
19
|
+
<td><%= document.creator %></td>
|
21
20
|
</tr>
|
22
21
|
<tr>
|
23
22
|
<th><h4>Description:</h4></th>
|
24
|
-
<td><%= iconify_auto_link(
|
23
|
+
<td><%= iconify_auto_link(document.description) %></th>
|
25
24
|
</tr>
|
26
25
|
<tr>
|
27
26
|
<th><h4>Keywords:</h4></th>
|
28
|
-
<td><%=
|
27
|
+
<td><%= document.tags.join(', ') %></td>
|
29
28
|
</tr>
|
30
29
|
<tr>
|
31
30
|
<th><h4>Date Uploaded:</h4></th>
|
32
|
-
<td><%=
|
31
|
+
<td><%= document.date_uploaded %></td>
|
33
32
|
</tr>
|
34
33
|
</table>
|
35
34
|
</li>
|
36
|
-
<% end %>
|
@@ -1,34 +1,25 @@
|
|
1
|
-
<%- keywords = link_to_facet_list(recent_document[:desc_metadata__tag_t], 'desc_metadata__tag_facet', 'no keywords specified') -%>
|
2
|
-
<%- filename = render_document_show_field_value(:document=>recent_document, :field=>"label_t") -%>
|
3
|
-
<%- title = render_document_show_field_value(:document=>recent_document, :field=>"desc_metadata__title_t") -%>
|
4
|
-
<%- title = filename if title.empty? -%>
|
5
|
-
<%- short_title = truncate(title, :length => 28, :separator => ' ') -%>
|
6
|
-
<%- depositor = get_depositor_from_document(recent_document) -%>
|
7
1
|
<tr>
|
8
2
|
<% if display_thumbs %>
|
9
|
-
<td class="span10"><%= link_to_profile depositor %> <%= render :partial => 'dashboard/_index_partials/thumbnail_display', :locals => {:document=>recent_document, :height=>60, :width=>45} %> </td>
|
3
|
+
<td class="span10"><%= link_to_profile recent_document.depositor("no depositor value") %> <%= render :partial => 'dashboard/_index_partials/thumbnail_display', :locals => {:document=>recent_document, :height=>60, :width=>45} %> </td>
|
10
4
|
<% end %>
|
11
5
|
<td>
|
12
6
|
<h3>
|
13
|
-
<%= link_to
|
7
|
+
<%= link_to truncate(recent_document.title_or_label, :length => 28, :separator => ' '), sufia.generic_file_path(recent_document.noid), :title => recent_document.title_or_label %>
|
14
8
|
|
15
9
|
<% if display_access %>
|
16
|
-
<% if
|
10
|
+
<% if recent_document.registered? %>
|
17
11
|
<span class="label label-info" title="<%=t('sufia.institution_name') %>"><%=t('sufia.institution_name') %></span>
|
18
|
-
<% elsif recent_document
|
19
|
-
<span class="label label-important">Private</span>
|
20
|
-
<% else %>
|
12
|
+
<% elsif recent_document.public? %>
|
21
13
|
<span class="label label-success">Open Access</span>
|
14
|
+
<% else %>
|
15
|
+
<span class="label label-important">Private</span>
|
22
16
|
<% end %>
|
23
17
|
<% end %>
|
24
18
|
</h3>
|
25
19
|
<p>
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
<%= link_to filename, sufia.generic_file_path(recent_document.fetch(:noid_s, :id)), :title => filename %><br />
|
30
|
-
<% end %>
|
31
|
-
<%= keywords.html_safe %>
|
20
|
+
<%= link_to truncate(recent_document.label, :length=>25),
|
21
|
+
sufia.generic_file_path(recent_document.noid), :title => recent_document.label %><br />
|
22
|
+
<%= link_to_facet_list(recent_document.tags, 'desc_metadata__tag', 'no keywords specified').html_safe %>
|
32
23
|
</p>
|
33
24
|
</td>
|
34
25
|
</tr>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% if paginate_params(@response).num_pages > 1 %>
|
2
2
|
<div class="pager">
|
3
|
-
<%= paginate_rsolr_response @response, :outer_window => 2, :theme => 'blacklight' %>
|
3
|
+
<%= paginate_rsolr_response @response, :outer_window => 2, :theme => 'blacklight', :route_set=> sufia %>
|
4
4
|
<div class="clearfix"></div>
|
5
5
|
</div><!-- /pager -->
|
6
6
|
<% end %>
|