sufia 4.0.0.rc2 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +443 -621
- data/LICENSE.md +11 -174
- data/README.md +21 -7
- data/SUFIA_VERSION +1 -1
- data/app/assets/javascripts/sufia/batch.js +7 -2
- data/app/assets/javascripts/sufia/dashboard_actions.js +21 -10
- data/app/assets/javascripts/terms_of_service.js +1 -1
- data/app/assets/stylesheets/batch-edit.css.scss +21 -0
- data/app/assets/stylesheets/collections.css.scss +4 -0
- data/app/assets/stylesheets/home-page.css.scss +8 -1
- data/app/assets/stylesheets/styles.css.scss +8 -5
- data/app/assets/stylesheets/sufia.css.scss +1 -0
- data/app/builders/sufia/bootstrap_breadcrumbs_builder.rb +28 -0
- data/app/controllers/collections_controller.rb +2 -0
- data/app/controllers/concerns/sufia/batch_edits_controller_behavior.rb +3 -1
- data/app/controllers/concerns/sufia/breadcrumbs.rb +41 -0
- data/app/controllers/concerns/sufia/files_controller_behavior.rb +3 -1
- data/app/controllers/concerns/sufia/homepage_controller.rb +1 -1
- data/app/helpers/sufia/blacklight_override.rb +1 -1
- data/app/helpers/sufia/records_helper_behavior.rb +19 -5
- data/app/helpers/sufia/sufia_helper_behavior.rb +13 -6
- data/app/models/concerns/sufia/solr_document_behavior.rb +4 -0
- data/app/views/_user_util_links.html.erb +4 -2
- data/app/views/batch/_metadata.html.erb +25 -31
- data/app/views/batch/_more_metadata.html.erb +6 -5
- data/app/views/batch/edit.html.erb +3 -3
- data/app/views/batch_edits/edit.html.erb +1 -1
- data/app/views/catalog/_search_form.html.erb +1 -3
- data/app/views/collections/_form_for_select_collection.html.erb +6 -3
- data/app/views/collections/_show_actions.html.erb +2 -2
- data/app/views/collections/edit.html.erb +1 -3
- data/app/views/collections/show.html.erb +1 -2
- data/app/views/generic_files/_field_form.html.erb +3 -3
- data/app/views/generic_files/_permission_form.html.erb +20 -3
- data/app/views/generic_files/edit.html.erb +1 -1
- data/app/views/generic_files/new.html.erb +8 -7
- data/app/views/generic_files/show.html.erb +1 -1
- data/app/views/generic_files/stats.html.erb +1 -1
- data/app/views/generic_files/upload/_form_fields.html.erb +4 -4
- data/app/views/homepage/_featured_fields.html.erb +20 -18
- data/app/views/homepage/_home_content.html.erb +8 -7
- data/app/views/homepage/_recent_document.html.erb +3 -4
- data/app/views/homepage/_recents.html.erb +4 -1
- data/app/views/homepage/_tagcloud.html.erb +5 -4
- data/app/views/kaminari/blacklight_compact/_paginator.html.erb +23 -0
- data/app/views/my/_action_menu.html.erb +15 -12
- data/app/views/my/_collection_action_menu.html.erb +8 -6
- data/app/views/my/_facets.html.erb +1 -1
- data/app/views/my/_index_partials/_default_group.html.erb +1 -1
- data/app/views/my/_index_partials/_list_collections.html.erb +12 -6
- data/app/views/my/_index_partials/_list_files.html.erb +14 -6
- data/app/views/my/index.html.erb +7 -2
- data/app/views/records/edit_fields/_suffix.html.erb +0 -1
- data/app/views/shared/_attributes.html.erb +6 -6
- data/app/views/users/_notify_link.html.erb +1 -0
- data/app/views/users/_notify_number.html.erb +3 -2
- data/config/locales/sufia.en.yml +24 -4
- data/lib/sufia.rb +2 -0
- data/lib/sufia/version.rb +1 -1
- data/spec/actors/generic_file/actor_spec.rb +21 -2
- data/spec/controllers/batch_controller_spec.rb +3 -3
- data/spec/controllers/batch_edits_controller_spec.rb +4 -0
- data/spec/controllers/catalog_controller_spec.rb +3 -3
- data/spec/controllers/collections_controller_spec.rb +5 -1
- data/spec/controllers/generic_files_controller_spec.rb +21 -4
- data/spec/controllers/homepage_controller_spec.rb +8 -1
- data/spec/features/browse_dashboard_files_spec.rb +1 -1
- data/spec/features/collection_spec.rb +3 -3
- data/spec/helpers/records_helper_spec.rb +53 -25
- data/spec/jobs/import_url_job_spec.rb +2 -1
- data/spec/lib/sufia/breadcrumbs_spec.rb +80 -0
- data/spec/lib/sufia/messages_spec.rb +8 -1
- data/spec/models/characterization_spec.rb +23 -0
- data/spec/models/fits_datastream_spec.rb +20 -23
- data/spec/support/features/session_helpers.rb +1 -1
- data/spec/views/catalog/index.html.erb_spec.rb +2 -0
- data/spec/views/generic_file/stats.html.erb_spec.rb +0 -6
- data/spec/views/users/show.html.erb_spec.rb +19 -0
- data/sufia-models/app/actors/sufia/generic_file/actor.rb +2 -1
- data/sufia-models/app/models/concerns/sufia/generic_file/characterization.rb +3 -4
- data/sufia-models/app/models/concerns/sufia/generic_file/full_text_indexing.rb +21 -14
- data/sufia-models/app/models/concerns/sufia/generic_file/mime_types.rb +4 -0
- data/sufia-models/app/models/file_usage.rb +6 -2
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/sufia.gemspec +1 -0
- metadata +28 -9
- data/app/views/generic_files/_breadcrumbs.html.erb +0 -31
- data/spec/views/generic_file/_breadcrumbs.html.erb_spec.rb +0 -32
@@ -1,29 +1,30 @@
|
|
1
1
|
<h2>Upload</h2>
|
2
2
|
<%# using partials rather than inlining, so implementers can add or change stuff on this page without much duplication %>
|
3
|
-
<ul class="nav nav-tabs">
|
4
|
-
<li class="active"><a href="#local" data-toggle="tab"><i class="glyphicon glyphicon-folder-open"></i
|
3
|
+
<ul class="nav nav-tabs" role="tablist" title="Data Source Selectors" id="upload_tabs">
|
4
|
+
<li class="active" id="computer_tab" title="<%= t('sufia.upload.my_computer.sr_tab_label')+' '+ t('sufia.upload.my_computer.tab_label') %>"><a role="tab" href="#local" data-toggle="tab"><i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i><%= t('sufia.upload.my_computer.tab_label')%></a></li>
|
5
5
|
<% if Sufia.config.browse_everything %>
|
6
|
-
<li><a href="#browse_everything" data-toggle="tab"><i class="glyphicon glyphicon-cloud-download"></i> <%= t('sufia.upload.browse_everything.tab_label')%></a></li>
|
6
|
+
<li id="browse_everything_tab" title="<%= t('sufia.upload.browse_everything.sr_tab_label')+' '+ t('sufia.upload.browse_everything.tab_label') %>" aria-activedescendant="browse_everything_link"><a role="tab" href="#browse_everything" data-toggle="tab" id="browse_everything_link" ><i class="glyphicon glyphicon-cloud-download" aria-hidden="true"></i> <%= t('sufia.upload.browse_everything.tab_label')%></a></li>
|
7
7
|
<% end %>
|
8
8
|
<% if Sufia.config.enable_local_ingest %>
|
9
|
-
<li><a href="#ingest" data-toggle="tab"><i class="glyphicon glyphicon-hdd"></i> <%= t('sufia.upload.local_ingest.tab_label')%></a></li>
|
9
|
+
<li role="tab" id="local_ingest_tab"><a href="#ingest" data-toggle="tab"><i class="glyphicon glyphicon-hdd" aria-hidden="true"></i> <%= t('sufia.upload.local_ingest.tab_label')%></a></li>
|
10
10
|
<% end %>
|
11
11
|
</ul>
|
12
12
|
|
13
13
|
<div class="tab-content">
|
14
|
-
<div class="tab-pane active" id="local">
|
14
|
+
<div class="tab-pane active" id="local" aria-labelledby="computer_tab" role="tabpanel">
|
15
|
+
<span class="sr-only"><%= t("sufia.upload.my_computer.sr_instructions") %></span>
|
15
16
|
<%= render partial: 'multiple_upload' %>
|
16
17
|
</div>
|
17
18
|
|
18
19
|
<% if Sufia.config.browse_everything %>
|
19
|
-
<div class="tab-pane" id="browse_everything">
|
20
|
+
<div class="tab-pane" id="browse_everything" aria-labelledby="browse_everything_tab" role="tabpanel">
|
20
21
|
<%= render partial: 'browse_everything' %>
|
21
22
|
</div>
|
22
23
|
<% end %>
|
23
24
|
|
24
25
|
|
25
26
|
<% if Sufia.config.enable_local_ingest %>
|
26
|
-
<div class="tab-pane" id="ingest">
|
27
|
+
<div class="tab-pane" id="ingest" aria-labelledby="local_ingest_tab">
|
27
28
|
<%= render partial: 'generic_files/local_file_import' %>
|
28
29
|
</div>
|
29
30
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%=
|
1
|
+
<%= render_breadcrumbs builder: Sufia::BootstrapBreadcrumbsBuilder %>
|
2
2
|
|
3
3
|
<!-- Adapted from jquery-flot examples https://github.com/flot/flot/blob/master/examples/visitors/index.html -->
|
4
4
|
<!--[if lte IE 8]><%= javascript_include_tag 'excanvas' %><![endif]-->
|
@@ -9,15 +9,15 @@
|
|
9
9
|
<div class="col-md-7">
|
10
10
|
<!-- The fileinput-button span is used to style the file input field as button -->
|
11
11
|
<span class="btn btn-success fileinput-button">
|
12
|
-
<i class="glyphicon glyphicon-plus"></i>
|
13
|
-
<span>Select files...</span>
|
12
|
+
<i class="glyphicon glyphicon-plus" aria-hidden="true"></i>
|
13
|
+
<span aria-hidden="true">Select files...</span>
|
14
14
|
<input type="file" name="files[]" multiple />
|
15
15
|
</span>
|
16
16
|
<% ua = request.env['HTTP_USER_AGENT'] %>
|
17
17
|
<% if !!(ua =~ /Chrome/) %>
|
18
18
|
<span class="btn btn-success fileinput-button">
|
19
|
-
<i class="glyphicon glyphicon-plus"></i>
|
20
|
-
<span>Select folder...</span>
|
19
|
+
<i class="glyphicon glyphicon-plus" aria-hidden="true"></i>
|
20
|
+
<span aria-hidden="true">Select folder...</span>
|
21
21
|
<input type="file" name="files[]" directory webkitdirectory mozdirectory />
|
22
22
|
</span>
|
23
23
|
<% end %>
|
@@ -1,18 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
1
|
+
<h3>
|
2
|
+
<span class="sr-only">Title</span>
|
3
|
+
<%= link_to truncate(featured.title_or_label, length: 28, separator: ' '), sufia.generic_file_path(featured), title: featured.title_or_label %>
|
4
|
+
</h3>
|
5
|
+
<div>
|
6
|
+
<span class="sr-only">Depositor</span>
|
7
|
+
<%= link_to_profile featured.depositor("no depositor value") %>
|
8
|
+
</div>
|
9
|
+
<div>
|
10
|
+
<span class="sr-only">Filename</span>
|
11
|
+
<%= link_to truncate(featured.label, length: 25), sufia.generic_file_path(featured), title: featured.label %>
|
12
|
+
</div>
|
13
|
+
<div>
|
14
|
+
<span class="sr-only">File type</span>
|
15
|
+
<%= link_to_facet_list(featured.resource_type, 'desc_metadata__resource_type', 'no resource specified') %>
|
16
|
+
</div>
|
17
|
+
<div>
|
18
|
+
<span class="sr-only">Keywords</span>
|
19
|
+
<%= link_to_facet_list(featured.tags, 'desc_metadata__tag', 'no keywords specified') %>
|
20
|
+
</div>
|
@@ -1,22 +1,23 @@
|
|
1
1
|
<div class="col-xs-12 col-sm-6">
|
2
2
|
<ul id="homeTabs" class="nav nav-tabs">
|
3
|
-
<li><a href="#featured_container" data-toggle="tab"><%= t('sufia.homepage.featured_works') %></a></li>
|
4
|
-
<li><a href="#recently_uploaded" data-toggle="tab"
|
3
|
+
<li><a href="#featured_container" data-toggle="tab" role="tab" id="featureTab"><%= t('sufia.homepage.featured_works') %></a></li>
|
4
|
+
<li><a href="#recently_uploaded" data-toggle="tab" role="tab" id="recentTab"><%= t('sufia.homepage.recently_uploaded') %></a></li>
|
5
5
|
</ul>
|
6
6
|
<div class="tab-content">
|
7
|
-
<div class="tab-pane fade in" id="featured_container">
|
7
|
+
<div class="tab-pane fade in" id="featured_container" role="tabpanel" aria-labelledby="featureTab">
|
8
8
|
<%= render partial: '/homepage/featured_works' %>
|
9
9
|
</div>
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
<div class="tab-pane fade" id="recently_uploaded" role="tabpanel" aria-labelledby="recentTab">
|
11
|
+
<%= render partial: 'recents', locals: { recent_documents: @recent_documents, msg: t('sufia.homepage.no_public'), display_thumbs: true, display_access: false } %>
|
12
|
+
</div>
|
13
13
|
</div>
|
14
14
|
</div><!-- /.col-xs-6 -->
|
15
15
|
<div class="col-xs-12 col-sm-6">
|
16
16
|
<div>
|
17
17
|
<%- if blacklight_config.respond_to?(:tag_cloud_field_name) && blacklight_config.tag_cloud_field_name %>
|
18
18
|
<div class="row">
|
19
|
-
<h2 class="heading1 pull-left"
|
19
|
+
<h2 class="heading1 pull-left"><%= t('sufia.homepage.explore') %></h2>
|
20
|
+
<span class="sr-only"><%= t('sufia.homepage.sr_explore') %></span>
|
20
21
|
<%= render partial: 'tagcloud', locals: { tag_cloud_field_name: blacklight_config.tag_cloud_field_name } %>
|
21
22
|
</div>
|
22
23
|
<%- end %>
|
@@ -9,8 +9,7 @@
|
|
9
9
|
<% end %>
|
10
10
|
<td>
|
11
11
|
<h3>
|
12
|
-
|
13
|
-
|
12
|
+
<span class="sr-only">Title</span><%= 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
13
|
<% if display_access %>
|
15
14
|
<% if recent_document.registered? %>
|
16
15
|
<span class="label label-info" title="<%=t('sufia.institution_name') %>"><%=t('sufia.institution_name') %></span>
|
@@ -22,9 +21,9 @@
|
|
22
21
|
<% end %>
|
23
22
|
</h3>
|
24
23
|
<p>
|
25
|
-
|
24
|
+
<span class="sr-only">Filename</span><%= link_to truncate(recent_document.label, length: 25),
|
26
25
|
sufia.generic_file_path(recent_document.noid), title: recent_document.label %><br />
|
27
|
-
|
26
|
+
<span class="sr-only">Keywords</span><%= link_to_facet_list(recent_document.tags, 'desc_metadata__tag', 'no keywords specified').html_safe %>
|
28
27
|
</p>
|
29
28
|
</td>
|
30
29
|
</tr>
|
@@ -4,9 +4,12 @@
|
|
4
4
|
<% msg = 'You have no documents to display. Contribute some of your documents!' if msg.blank? %>
|
5
5
|
<h3><%= msg %></h3>
|
6
6
|
<% else %>
|
7
|
-
|
8
7
|
<div id="recent_docs">
|
9
8
|
<table class="table table-bordered table-striped">
|
9
|
+
<tr>
|
10
|
+
<th scope="col">Depositor</th>
|
11
|
+
<th scope="col">File Details</th>
|
12
|
+
</tr>
|
10
13
|
<%= render partial: "recent_document", collection: recent_documents, locals: {display_thumbs: display_thumbs, display_access: display_access} %>
|
11
14
|
</table>
|
12
15
|
</div>
|
@@ -1,7 +1,8 @@
|
|
1
|
-
<a role="button" class="btn btn-default tag-toggle-list">List</a>
|
2
|
-
<
|
3
|
-
<div class="btn-group btn-group-justified tag-sort">
|
1
|
+
<a role="button" aria-hidden="true" class="btn btn-default tag-toggle-list">List</a>
|
2
|
+
<label for="tag-cloud" class="sr-only">Sort By</label>
|
3
|
+
<div id="tag-cloud" class="btn-group btn-group-justified tag-sort">
|
4
4
|
<a role="button" class="btn btn-default tag-sort-za">Z-A</a>
|
5
5
|
<a role="button" class="btn btn-default tag-sort-az">A-Z</a>
|
6
6
|
<a role="button" class="btn btn-default tag-sort-numerical">Rank</a>
|
7
|
-
</div>
|
7
|
+
</div>
|
8
|
+
<ul class="tagcloud" data-facet="<%= tag_cloud_field_name %>"></ul>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<%# This is copied from blacklight-5.5.3/app/views/kaminari/blacklight_compact/_paginator.html.erb
|
2
|
+
so we can add a aria-hidden="true" attribute around it. If that gets added into
|
3
|
+
Blacklight, this file can be removed
|
4
|
+
-%>
|
5
|
+
<% if total_pages > 1 -%>
|
6
|
+
<%# #render checks if total_pages > 1, so we can't put our fallback
|
7
|
+
in here .. -%>
|
8
|
+
<%= paginator.render do -%>
|
9
|
+
<div aria-hidden="true" class="page_links">
|
10
|
+
<%= prev_page_tag %> |
|
11
|
+
<span class="page_entries">
|
12
|
+
<%= page_entries_info %>
|
13
|
+
</span> |
|
14
|
+
<%= next_page_tag %>
|
15
|
+
</div>
|
16
|
+
<% end -%>
|
17
|
+
<% else -%>
|
18
|
+
<div aria-hidden="true" class="page_links">
|
19
|
+
<span class="page_entries">
|
20
|
+
<%= page_entries_info %>
|
21
|
+
</span>
|
22
|
+
</div>
|
23
|
+
<% end -%>
|
@@ -1,27 +1,30 @@
|
|
1
1
|
<div class="btn-group">
|
2
|
-
<button class="btn btn-sm dropdown-toggle" data-toggle="dropdown"
|
2
|
+
<button class="btn btn-sm dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%=noid%>" aria-haspopup="true">
|
3
|
+
<span class="sr-only">Press to </span>
|
4
|
+
Select an action
|
5
|
+
<span class="caret" aria-hidden="true"></span>
|
3
6
|
</button>
|
4
|
-
<ul class="dropdown-menu dropdown-menu-right">
|
5
|
-
<li>
|
6
|
-
<%= link_to raw('<i class="glyphicon glyphicon-link over"></i> Single-Use Link to File'), '#',
|
7
|
+
<ul role="menu" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%=noid%>">
|
8
|
+
<li role="menuitem" tabindex="-1">
|
9
|
+
<%= link_to raw('<i class="glyphicon glyphicon-link over" aria-hidden="true"></i> Single-Use Link to File'), '#',
|
7
10
|
class: "copypaste itemicon itemcode", title: "Single-Use Link to File", id: "copy_link_#{noid}" %>
|
8
11
|
</li>
|
9
|
-
<li>
|
10
|
-
<%= link_to raw('<i class="glyphicon glyphicon-pencil"></i> Edit File'), sufia.edit_generic_file_path(noid),
|
12
|
+
<li role="menuitem" tabindex="-1">
|
13
|
+
<%= link_to raw('<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i> Edit File'), sufia.edit_generic_file_path(noid),
|
11
14
|
class: 'itemicon itemedit', title: 'Edit File' %>
|
12
15
|
</li>
|
13
|
-
<li>
|
14
|
-
<%= link_to raw('<i class="glyphicon glyphicon-download-alt"></i> Download File'), sufia.download_path(noid),
|
16
|
+
<li role="menuitem" tabindex="-1">
|
17
|
+
<%= link_to raw('<i class="glyphicon glyphicon-download-alt" aria-hidden="true"></i> Download File'), sufia.download_path(noid),
|
15
18
|
class: 'itemicon itemdownload', title: 'Download File', target: '_new' %>
|
16
19
|
</li>
|
17
|
-
<li>
|
18
|
-
<%= link_to raw('<i class="glyphicon glyphicon-trash"></i> Delete File'), sufia.generic_file_path(noid),
|
20
|
+
<li role="menuitem" tabindex="-1">
|
21
|
+
<%= link_to raw('<i class="glyphicon glyphicon-trash" aria-hidden="true"></i> Delete File'), sufia.generic_file_path(noid),
|
19
22
|
class: 'itemicon itemtrash', title: 'Delete File', method: :delete, data: {
|
20
23
|
confirm: "Deleting a file from #{t('sufia.product_name')} is permanent. Click OK to delete this file from #{t('sufia.product_name')}, or Cancel to cancel this operation" } %>
|
21
24
|
</li>
|
22
|
-
<li>
|
25
|
+
<li role="menuitem" tabindex="-1">
|
23
26
|
<%= display_trophy_link(@user, noid) do |text| %>
|
24
|
-
<i class='glyphicon glyphicon-star'></i> <%= text %>
|
27
|
+
<i aria-hidden="true" class='glyphicon glyphicon-star'></i> <%= text %>
|
25
28
|
<% end %>
|
26
29
|
</li>
|
27
30
|
</ul>
|
@@ -1,13 +1,15 @@
|
|
1
1
|
<div class="btn-group">
|
2
|
-
<button class="btn btn-sm dropdown-toggle" data-toggle="dropdown"
|
2
|
+
<button class="btn btn-sm dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%=noid%>" aria-haspopup="true">
|
3
|
+
<span class="sr-only">Press to </span>
|
4
|
+
Select an action <span class="caret" aria-hidden="true"></span>
|
3
5
|
</button>
|
4
|
-
<ul class="dropdown-menu dropdown-menu-right">
|
5
|
-
<li>
|
6
|
-
<%= link_to raw('<i class="glyphicon glyphicon-pencil"></i> Edit Collection'), collections.edit_collection_path(noid),
|
6
|
+
<ul role="menu" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%=noid%>">
|
7
|
+
<li role="menuitem" tabindex="-1">
|
8
|
+
<%= link_to raw('<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i> Edit Collection'), collections.edit_collection_path(noid),
|
7
9
|
class: 'itemicon itemedit', title: 'Edit Collection' %>
|
8
10
|
</li>
|
9
|
-
<li>
|
10
|
-
<%= link_to raw('<i class="glyphicon glyphicon-trash"></i> Delete Collection'), collections.collection_path(noid),
|
11
|
+
<li role="menuitem" tabindex="-1">
|
12
|
+
<%= link_to raw('<i class="glyphicon glyphicon-trash" aria-hidden="true"></i> Delete Collection'), collections.collection_path(noid),
|
11
13
|
class: 'itemicon itemtrash', title: 'Delete Collection', method: :delete, data: {
|
12
14
|
confirm: "Deleting a collection from #{t('sufia.product_name')} is permanent. Click OK to delete this collection from #{t('sufia.product_name')}, or Cancel to cancel this operation" } %>
|
13
15
|
</li>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% unless params[:display_type] == 'list' %>
|
4
4
|
<thead>
|
5
5
|
<tr>
|
6
|
-
<th><%= render_check_all %></th>
|
6
|
+
<th><label for="check_all" class="sr-only"><%= t("sufia.dashboard.my.sr.check_all_label") %></label><%= render_check_all %></th>
|
7
7
|
<th>Title</th>
|
8
8
|
<th class="sorts-dash"><i id="desc_metadata__date_uploaded_dtsi" class="<%=params[:sort]== "desc_metadata__date_uploaded_dtsi desc" ? 'caret' : params[:sort]== "desc_metadata__date_uploaded_dtsi asc" ? 'caret up' : ''%>"></i>Date Uploaded</th>
|
9
9
|
<th>Visibility</th>
|
@@ -4,17 +4,23 @@
|
|
4
4
|
on element ids -->
|
5
5
|
<% noid = document.noid %>
|
6
6
|
<tr id="document_<%= noid %>" class="<%= cycle("","zebra") %>">
|
7
|
-
<td width="3%"></td>
|
7
|
+
<td width="3%"></td>
|
8
8
|
<td width="41%">
|
9
9
|
<div class="media">
|
10
|
-
<%= link_to [collections, document], class: "pull-left" do %>
|
10
|
+
<%= link_to [collections, document], class: "pull-left", "aria-hidden" => true do %>
|
11
11
|
<span class="glyphicon glyphicon-th collection-icon-small">
|
12
12
|
<% end %>
|
13
13
|
<div class="media-body">
|
14
|
-
<
|
15
|
-
<%= link_to
|
16
|
-
|
17
|
-
|
14
|
+
<div class="media-heading">
|
15
|
+
<%= link_to collections.collection_path(noid), id: "src_copy_link#{noid}" do %>
|
16
|
+
<span class="sr-only"><%= t("sufia.dashboard.my.sr.show_label") %> </span>
|
17
|
+
<%= document.title_or_label %>
|
18
|
+
<% end %>
|
19
|
+
<a href="#" class="small" title="Click for more details">
|
20
|
+
<i id="expand_<%= noid %>" class="glyphicon glyphicon-chevron-right" aria-hidden="true"></i>
|
21
|
+
<span class="sr-only"> <%= "#{t("sufia.dashboard.my.sr.detail_label")} #{document.title_or_label}" %></span>
|
22
|
+
</a>
|
23
|
+
</div>
|
18
24
|
</div>
|
19
25
|
</div>
|
20
26
|
</td>
|
@@ -1,7 +1,9 @@
|
|
1
1
|
<% noid = document.noid %>
|
2
2
|
<tr id="document_<%= noid %>" class="<%= cycle("", "zebra") %>">
|
3
3
|
<% gf = GenericFile.load_instance_from_solr(document.id) %>
|
4
|
-
<td
|
4
|
+
<td>
|
5
|
+
<label for="batch_document_<%= document.id %>" class="sr-only"><%=t("sufia.dashboard.my.sr.batch_checkbox")%></label>
|
6
|
+
<%= batch_edit_select(document) %>
|
5
7
|
<%# This block is for adding/removing the magic wand while batch updates are processing %>
|
6
8
|
<% if gf.processing? %>
|
7
9
|
<i class="glyphicon glyphicon-time <%= 'ss-'+gf.batch.noid %>"/>
|
@@ -11,14 +13,20 @@
|
|
11
13
|
</td>
|
12
14
|
<td>
|
13
15
|
<div class="media">
|
14
|
-
<%= link_to sufia.generic_file_path(document), class: "pull-left" do %>
|
16
|
+
<%= link_to sufia.generic_file_path(document), class: "pull-left", "aria-hidden" => true do %>
|
15
17
|
<%= render_thumbnail_tag document, { class: "hidden-xs file_listing_thumbnail" }, { suppress_link: true } %>
|
16
18
|
<% end %>
|
17
19
|
<div class="media-body">
|
18
|
-
<
|
19
|
-
<%= link_to
|
20
|
-
|
21
|
-
|
20
|
+
<div class="media-heading">
|
21
|
+
<%= link_to sufia.generic_file_path(noid), id: "src_copy_link#{noid}", class: "#{'document-title' if document.title_or_label == document.label}" do %>
|
22
|
+
<span class="sr-only"><%= t("sufia.dashboard.my.sr.show_label") %> </span>
|
23
|
+
<%= document.title_or_label %>
|
24
|
+
<% end %>
|
25
|
+
<a href="#" class="small" title="Click for more details">
|
26
|
+
<i id="expand_<%= noid %>" class="glyphicon glyphicon-chevron-right" aria-hidden="true"></i>
|
27
|
+
<span class="sr-only"> <%= "#{t("sufia.dashboard.my.sr.detail_label")} #{document.title_or_label}" %></span>
|
28
|
+
</a>
|
29
|
+
</div>
|
22
30
|
<%= render_collection_list(gf) %>
|
23
31
|
</div>
|
24
32
|
</div>
|
data/app/views/my/index.html.erb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
<% current_tab = @selected_tab.to_s %>
|
1
2
|
<% content_for :head do %>
|
2
3
|
<%= auto_discovery_link_tag(:rss, sufia.url_for(params.merge(format: 'rss')), title: "RSS for results") %>
|
3
4
|
<%= auto_discovery_link_tag(:atom, sufia.url_for(params.merge(format: 'atom')), title: "Atom for results") %>
|
@@ -7,9 +8,12 @@
|
|
7
8
|
<%= render partial: 'scripts', formats: [:js] %>
|
8
9
|
<% end %>
|
9
10
|
|
10
|
-
<% @page_title =
|
11
|
+
<% @page_title = "#{current_tab.capitalize} listing" %>
|
12
|
+
|
11
13
|
|
12
14
|
<ul class="nav nav-tabs" id="my_nav">
|
15
|
+
<h1 class="sr-only">Listing Navigation Bar</h1>
|
16
|
+
<span class="sr-only">You are currently listing your <%= current_tab.pluralize %> . You have <%= @response.docs.count %> <%= current_tab.pluralize(@response.docs.count)%> </span>
|
13
17
|
<li class="<%= "active" if @selected_tab == :files %>">
|
14
18
|
<%= link_to t('sufia.dashboard.my.files'), sufia.dashboard_files_path %>
|
15
19
|
</li>
|
@@ -26,12 +30,13 @@
|
|
26
30
|
|
27
31
|
<%= render 'search_header' %>
|
28
32
|
|
33
|
+
<h1 class="sr-only"><%=@page_title %></h1>
|
29
34
|
<%= render partial: 'document_list' %>
|
30
35
|
|
31
36
|
<% content_for :sidebar do %>
|
32
37
|
<%= link_to t("sufia.dashboard.upload"), sufia.new_generic_file_path, class: "btn btn-primary" %>
|
33
38
|
<%= link_to t("sufia.dashboard.create_collection"), collections.new_collection_path, id: "hydra-collection-add", class: "btn btn-primary" %>
|
34
|
-
<%= render partial: 'facets' %>
|
39
|
+
<%= render partial: 'facets', locals: {current_tab: current_tab} %>
|
35
40
|
<% end %>
|
36
41
|
|
37
42
|
<%= render 'results_pagination' %>
|
@@ -1,26 +1,26 @@
|
|
1
1
|
<table class="table">
|
2
2
|
<tr>
|
3
|
-
<th><h4>Title:</
|
3
|
+
<th><span class="attribute-label h4">Title:</span></th>
|
4
4
|
<td><%= work.title %></td>
|
5
5
|
</tr>
|
6
6
|
<tr>
|
7
|
-
<th><h4>Depositor
|
7
|
+
<th><span class="attribute-label h4">Depositor:</span></div>
|
8
8
|
<td><%= link_to_profile work.depositor("no depositor value") %></td>
|
9
9
|
</tr>
|
10
10
|
<tr>
|
11
|
-
<th><h4>Creator:</
|
11
|
+
<th><span class="attribute-label h4">Creator:</span></th>
|
12
12
|
<td><%= work.creator %></td>
|
13
13
|
</tr>
|
14
14
|
<tr>
|
15
|
-
<th><h4>Description:</
|
15
|
+
<th><span class="attribute-label h4">Description:</span></th>
|
16
16
|
<td><%= iconify_auto_link(work.description) %></th>
|
17
17
|
</tr>
|
18
18
|
<tr>
|
19
|
-
<th><h4>Keywords:</
|
19
|
+
<th><span class="attribute-label h4">Keywords:</span></th>
|
20
20
|
<td><%= work.tags.join(', ') %></td>
|
21
21
|
</tr>
|
22
22
|
<tr>
|
23
|
-
<th><h4>Date Uploaded:</
|
23
|
+
<th><span class="attribute-label h4">Date Uploaded:</span></th>
|
24
24
|
<td><%= work.date_uploaded %></td>
|
25
25
|
</tr>
|
26
26
|
</table>
|