sufia 6.3.0 → 6.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -2
  3. data/.rubocop.yml +10 -0
  4. data/Gemfile +16 -7
  5. data/History.md +43 -0
  6. data/README.md +26 -19
  7. data/SUFIA_VERSION +1 -1
  8. data/app/assets/javascripts/notifications_check.js.erb +46 -0
  9. data/app/assets/javascripts/sufia.js +1 -2
  10. data/app/assets/javascripts/sufia/uploader.js +3 -3
  11. data/app/assets/stylesheets/sufia/_collections.scss +5 -0
  12. data/app/assets/stylesheets/sufia/_dashboard.scss +6 -1
  13. data/app/assets/stylesheets/sufia/_file-listing.scss +44 -6
  14. data/app/assets/stylesheets/sufia/_file-show.scss +4 -0
  15. data/app/assets/stylesheets/sufia/_settings.scss +3 -0
  16. data/app/controllers/api/items_controller.rb +7 -3
  17. data/app/controllers/concerns/sufia/admin/depositor_stats.rb +1 -1
  18. data/app/controllers/concerns/sufia/admin/stats_behavior.rb +6 -76
  19. data/app/controllers/concerns/sufia/batch_controller_behavior.rb +10 -2
  20. data/app/controllers/concerns/sufia/contact_form_controller_behavior.rb +1 -0
  21. data/app/controllers/concerns/sufia/files_controller_behavior.rb +11 -1
  22. data/app/controllers/concerns/sufia/homepage_controller.rb +1 -1
  23. data/app/controllers/concerns/sufia/my_controller_behavior.rb +2 -0
  24. data/app/controllers/concerns/sufia/users_controller_behavior.rb +2 -2
  25. data/app/helpers/generic_file_helper.rb +8 -5
  26. data/app/jobs/content_delete_event_job.rb +16 -11
  27. data/app/jobs/content_deposit_event_job.rb +4 -16
  28. data/app/jobs/content_depositor_change_event_job.rb +32 -20
  29. data/app/jobs/content_event_job.rb +39 -0
  30. data/app/jobs/content_new_version_event_job.rb +4 -16
  31. data/app/jobs/content_restored_version_event_job.rb +6 -19
  32. data/app/jobs/content_update_event_job.rb +4 -16
  33. data/app/jobs/event_job.rb +48 -4
  34. data/app/jobs/user_edit_profile_event_job.rb +4 -17
  35. data/app/jobs/user_follow_event_job.rb +10 -12
  36. data/app/jobs/user_unfollow_event_job.rb +10 -15
  37. data/app/models/concerns/sufia/solr_document_behavior.rb +11 -1
  38. data/app/models/system_stats.rb +108 -0
  39. data/app/presenters/sufia/admin_stats_presenter.rb +49 -0
  40. data/app/views/_controls.html.erb +1 -1
  41. data/app/views/_footer.html.erb +1 -1
  42. data/app/views/_logo.html.erb +1 -3
  43. data/app/views/admin/stats/_date_form.html.erb +8 -0
  44. data/app/views/admin/stats/_deposits.html.erb +2 -10
  45. data/app/views/admin/stats/_files.html.erb +6 -14
  46. data/app/views/admin/stats/_new_users.html.erb +7 -14
  47. data/app/views/admin/stats/_stats_by_date.html.erb +8 -0
  48. data/app/views/admin/stats/_top_data.html.erb +24 -0
  49. data/app/views/admin/stats/index.html.erb +5 -31
  50. data/app/views/collections/_form_for_select_collection.html.erb +5 -4
  51. data/app/views/collections/_show_actions.html.erb +7 -2
  52. data/app/views/collections/_show_document_list_row.html.erb +1 -9
  53. data/app/views/generic_files/_browse_everything.html.erb +3 -0
  54. data/app/views/generic_files/_descriptions.html.erb +1 -1
  55. data/app/views/generic_files/_generic_file.html.erb +1 -1
  56. data/app/views/generic_files/_local_file_import.html.erb +3 -0
  57. data/app/views/generic_files/_show_actions.html.erb +4 -0
  58. data/app/views/generic_files/upload/_form.html.erb +3 -0
  59. data/app/views/generic_files/upload/_to_collection.html.erb +5 -0
  60. data/app/views/homepage/_recent_document.html.erb +1 -7
  61. data/app/views/my/_index_partials/_default_group.html.erb +1 -1
  62. data/app/views/my/_index_partials/_list_collections.html.erb +3 -10
  63. data/app/views/my/_index_partials/_list_files.html.erb +13 -22
  64. data/app/views/my/_sort_and_per_page.html.erb +3 -3
  65. data/app/views/records/edit_fields/_rights.html.erb +2 -1
  66. data/app/views/static/terms.html.erb +1 -1
  67. data/config/locales/sufia.en.yml +13 -0
  68. data/lib/generators/sufia/templates/catalog_controller.rb +2 -2
  69. data/lib/sufia/version.rb +1 -1
  70. data/spec/actors/generic_file/actor_spec.rb +35 -0
  71. data/spec/controllers/admin_stats_controller_spec.rb +53 -23
  72. data/spec/controllers/api/items_controller_spec.rb +47 -41
  73. data/spec/controllers/batch_controller_spec.rb +1 -0
  74. data/spec/controllers/generic_files_controller_spec.rb +35 -1
  75. data/spec/controllers/my/files_controller_spec.rb +5 -0
  76. data/spec/factories/generic_files.rb +3 -0
  77. data/spec/features/collection_spec.rb +91 -0
  78. data/spec/features/contact_form_spec.rb +1 -0
  79. data/spec/forms/collection_edit_form_spec.rb +3 -3
  80. data/spec/forms/generic_file_edit_form_spec.rb +1 -1
  81. data/spec/jobs/create_derivatives_job_spec.rb +6 -0
  82. data/spec/models/file_content_datastream_spec.rb +1 -1
  83. data/spec/models/file_download_stat_spec.rb +4 -4
  84. data/spec/models/file_usage_spec.rb +2 -2
  85. data/spec/models/file_view_stat_spec.rb +4 -4
  86. data/spec/models/generic_file_spec.rb +15 -3
  87. data/spec/models/geo_names_resource_spec.rb +10 -0
  88. data/spec/models/solr_document_spec.rb +28 -0
  89. data/spec/models/system_stats_spec.rb +184 -0
  90. data/spec/models/user_spec.rb +1 -1
  91. data/spec/models/user_usage_stats_spec.rb +1 -1
  92. data/spec/services/generic_file_csv_service_spec.rb +66 -0
  93. data/spec/services/generic_file_indexing_service_spec.rb +35 -0
  94. data/spec/services/lock_manager_spec.rb +12 -0
  95. data/spec/spec_helper.rb +2 -1
  96. data/spec/views/admin/stats/index.html.erb_spec.rb +11 -10
  97. data/spec/views/catalog/sort_and_per_page.html.erb_spec.rb +1 -1
  98. data/spec/views/collections/_form_for_select_collection.html.erb_spec.rb +51 -0
  99. data/spec/views/generic_file/_browse_everything.html.erb_spec.rb +4 -0
  100. data/spec/views/generic_file/edit.html.erb_spec.rb +31 -24
  101. data/spec/views/generic_file/new.html.erb_spec.rb +70 -0
  102. data/spec/views/generic_file/show.html.erb_spec.rb +23 -0
  103. data/sufia.gemspec +3 -2
  104. data/tasks/sufia-dev.rake +2 -0
  105. metadata +42 -9
  106. data/lib/sufia/role_mapper.rb +0 -7
@@ -1,3 +1 @@
1
- <a id="logo" href="/"><span class="glyphicon glyphicon-globe"></span></a><a href="/" class="institution_name"><%=t('sufia.product_name') %></a>
2
-
3
-
1
+ <a id="logo" href="<%= sufia.root_path %>"><span class="glyphicon glyphicon-globe"></span></a><a href="<%= sufia.root_path %>" class="institution_name"><%=t('sufia.product_name') %></a>
@@ -0,0 +1,8 @@
1
+ <%= form_for "stats_filters", url: sufia.admin_stats_path, method: "GET" do |f| %>
2
+ <%= f.label "Start *" %>
3
+ <input type="date" name="stats_filters[start_date]" value="<%= @presenter.stats_filters[:start_date] %>" placeholder="yyyy-mm-dd" ></input>
4
+ <%= f.label "end [defaults to now]" %>
5
+ <input type="date" name="stats_filters[end_date]" value="<%= @presenter.stats_filters[:end_date] %>" placeholder="yyyy-mm-dd" ></input>
6
+ <%= f.submit "Load Stats" %>
7
+ <%- end %>
8
+
@@ -1,14 +1,6 @@
1
- <h3>Deposits By Users</h3>
2
- <%= form_for "deposit_stats", url: sufia.admin_stats_path, method: "GET" do |f| %>
3
- <%= f.label "#{ t("sufia.admin.stats.deposited_form.heading") } #{ t("sufia.admin.stats.deposited_form.start_label") }" %>
4
- <input type="date" name="deposit_stats[start_date]" value="<%= @deposit_stats[:start_date] %>"></input>
5
- <%= f.label t("sufia.admin.stats.deposited_form.end_label") %>
6
- <input type="date" name="deposit_stats[end_date]" value="<%= @deposit_stats[:end_date] %>"></input>
7
- <%= f.submit "Load Stats" %>
8
- <%- end %>
9
-
1
+ <h3>Deposits By Users (<%= @presenter.date_filter_string %>)</h3>
10
2
  <ul>
11
- <% @depositors.each do |usr| %>
3
+ <% @presenter.depositors.each do |usr| %>
12
4
  <li>
13
5
  <a href="<%= sufia.profile_path(usr[:key]) %>" title="View user's profile"><%= usr[:user].name %></a>
14
6
  <% num_files = usr[:deposits]%>
@@ -1,16 +1,8 @@
1
- <h2>File Statistics</h2>
2
- <%= form_for "users_stats", url: sufia.admin_stats_path, method: "GET" do |f| %>
3
- <%= f.label "#{ t("sufia.admin.stats.deposited_form.heading") } #{ t("sufia.admin.stats.deposited_form.start_label") }" %>
4
- <input type="date" name="users_stats[file_start_date]" value="<%= @users_stats[:file_start_date] %>"></input>
5
- <%= f.label t("sufia.admin.stats.deposited_form.end_label") %>
6
- <input type="date" name="users_stats[file_end_date]" value="<%= @users_stats[:file_end_date] %>"></input>
7
- <%= f.submit "Load Stats" %>
8
- <h3>Total Files: <%= @files_count[:total] %> </h3>
9
- <br/>
10
- <%- end %>
11
- <h3>Totals by Visibility</h3>
1
+ <h3>File Statistics (<%= @presenter.date_filter_string %>)</h3>
2
+ <h4>Total Files: <%= @presenter.files_count[:total] %> </h4>
3
+ <h4>Totals by Visibility</h4>
12
4
  <ul>
13
- <li>Open Access <span class="count">(<%= @files_count[:public] %>)</span></li>
14
- <li><%= t("sufia.admin.stats.registered") %> <span class="count">(<%= @files_count[:registered] %>)</span></li>
15
- <li>Private <span class="count">(<%= @files_count[:private] %>)</span></li>
5
+ <li>Open Access <span class="count">(<%= @presenter.files_count[:public] %>)</span></li>
6
+ <li><%= t("sufia.admin.stats.registered") %> <span class="count">(<%= @presenter.files_count[:registered] %>)</span></li>
7
+ <li>Private <span class="count">(<%= @presenter.files_count[:private] %>)</span></li>
16
8
  </ul>
@@ -1,20 +1,13 @@
1
- <h3>Newest Users</h3>
2
- <%= form_for "users_stats", url: sufia.admin_stats_path, method: "GET" do |f| %>
3
- <%= f.label "Display users registered: Start" %>
4
- <input type="date" name="users_stats[start_date]" value="<%= @users_stats[:start_date] %>"></input>
5
- <%= f.label "end [defaults to now]" %>
6
- <input type="date" name="users_stats[end_date]" value="<%= @users_stats[:end_date] %>"></input>
7
- <%= f.submit "Load Stats" %>
8
- <%- end %>
9
-
10
- <%- if @users_stats[:start_date] %>
11
- <div>Total: <%= @recent_users.count %></div>
1
+ <h3>Newest Users (<%= @presenter.date_filter_string %>)</h3>
2
+ <h4>
3
+ <%- if !@presenter.start_date.blank? %>
4
+ Total: <%= @presenter.recent_users.count %></div>
12
5
  <%- else %>
13
- Five most recent users:
6
+ <%= @presenter.recent_users.count %> most recent users:
14
7
  <%- end %>
15
-
8
+ </h4>
16
9
  <ul>
17
- <% @recent_users.each do |usr| %>
10
+ <% @presenter.recent_users.each do |usr| %>
18
11
  <li>
19
12
  <a href="<%= sufia.profile_path(usr.user_key) %>" title="View user's profile"><%= usr.name %></a>
20
13
  <%- if usr.department %>
@@ -0,0 +1,8 @@
1
+ <h2>Statistics By Date</h2>
2
+ <h3>Statistics in this section are filtered by the dates entered in the form below.
3
+ The data is unfiltered unless the date form has been filled in. Start date is required and the deafult end is now.
4
+ </h3>
5
+ <%= render "admin/stats/date_form" %>
6
+ <%= render "admin/stats/files" %>
7
+ <%= render "admin/stats/new_users" %>
8
+ <%= render "admin/stats/deposits" %>
@@ -0,0 +1,24 @@
1
+ <h2>Top File Formats and Users</h2>
2
+ <h3>Statistics in this section shows the top <%= @presenter.limit %> items for each category</h3>
3
+ <% if @presenter.limit == 5 %>
4
+ <p><%= link_to "View top 20", Sufia::Engine.routes.url_for(controller: "admin/stats", action:"index", limit: "20", only_path: true) %> </p>
5
+ <% else %>
6
+ <p><%= link_to "View top 5", Sufia::Engine.routes.url_for(controller: "admin/stats", action:"index", only_path: true) %> </p>
7
+ <% end %>
8
+
9
+ <h3>Top File Formats (top <%= @presenter.top_formats.count %>)</h3>
10
+ <ul>
11
+ <% @presenter.top_formats.each do |k, v| %>
12
+ <li><%= k %> <span class="count">(<%= v %>)</span></li>
13
+ <% end %>
14
+ </ul>
15
+
16
+ <br/>
17
+ <h3>Most Active Users (top <%= @presenter.active_users.count %>)</h3>
18
+ <ul>
19
+ <% @presenter.active_users.each do |k, v| %>
20
+ <li>
21
+ <%= link_to_profile(k) %> <span class="count">(<%= v %>)</span>
22
+ </li>
23
+ <% end %>
24
+ </ul>
@@ -1,36 +1,10 @@
1
1
  <div class="stats">
2
2
  <h1>Statistics for <%= application_name %>
3
3
  <%= Sufia::VERSION %></h1>
4
- <br/>
5
4
 
6
- <%= render "admin/stats/files" %>
7
-
8
- <h3>Top File Formats</h3>
9
- <ul>
10
- <% @top_formats.each do |k, v| %>
11
- <li><%= k %> <span class="count">(<%= v %>)</span></li>
12
- <% end %>
13
- </ul>
14
-
15
- <br/>
16
-
17
- <h2>Total <%= application_name %> Users:&nbsp; <%= @users_count %> </h2>
18
- <br/>
19
-
20
- <%= render "admin/stats/new_users" %>
21
-
22
- <br/>
23
- <h3>Most Active Users (top <%= @active_users.count %>)</h3>
24
- <ul>
25
- <% @active_users.each do |k, v| %>
26
- <li>
27
- <%= link_to_profile(k) %> <span class="count">(<%= v %>)</span>
28
- </li>
29
- <% end %>
30
- <% if !params[:dep_count] %>
31
- <p><%= link_to "View top 20", sufia.admin_stats_path, controller: "stats", dep_count: "20" %> </p>
32
- <% end %>
33
- </ul>
34
-
35
- <%= render "admin/stats/deposits" %>
5
+ <h2>Total <%= application_name %> Users:&nbsp; <%= @presenter.users_count %> </h2>
6
+ <hr/>
7
+ <%= render "admin/stats/stats_by_date" %>
8
+ <hr/>
9
+ <%= render "admin/stats/top_data" %>
36
10
  </div>
@@ -13,9 +13,10 @@
13
13
  <fieldset>
14
14
  <legend><%= t("sufia.collection.select_form.select_heading") %></legend>
15
15
  <ul>
16
- <% user_collections.sort { |c1,c2| c1['date_modified_dtsi'] <=> c2['date_modified_dtsi'] }.each do |collection| %>
16
+ <% user_collections.sort { |c1,c2| c2[CatalogController.uploaded_field] <=> c1[CatalogController.uploaded_field] }.each_with_index do |collection,index| %>
17
17
  <li>
18
- <%= radio_button_tag(:id, collection.id, true, class: "collection-selector") %>
18
+ <% selected = (collection.id == @add_files_to_collection) || (@add_files_to_collection.blank? && index == 0) %>
19
+ <%= radio_button_tag(:id, collection.id, selected, class: "collection-selector") %>
19
20
  <%= label_tag(:collection, collection.title, for: "id_#{collection.id}") %>
20
21
  </li>
21
22
  <% end %>
@@ -28,10 +29,10 @@
28
29
  <button type="button" class="btn btn-default" data-dismiss="modal"><%= t("sufia.collection.select_form.close")%></button>
29
30
  <% if user_collections.blank? %>
30
31
  <%= button_for_create_collection t("sufia.collection.select_form.create") %>
31
- <% else %>
32
+ <% else %>
32
33
  <%= button_for_update_collection t("sufia.collection.select_form.update") %>
33
34
  <%= button_for_create_collection t("sufia.collection.select_form.create_new") %>
34
- <% end %>
35
+ <% end %>
35
36
  </div>
36
37
  </div><!-- /.modal-content -->
37
38
  </div><!-- /.modal-dialog -->
@@ -1,7 +1,12 @@
1
1
  <h2 class="sr-only">Actions</h2>
2
2
  <div class="actions-controls-collections">
3
3
  <% if can? :edit, @collection %>
4
- <span class="label label-default"><%= link_to "Edit", collections.edit_collection_path, title: "Edit this Collection" %></span> &nbsp;&nbsp;
5
- <span class="label label-default"><%= link_to "Add files", sufia.dashboard_files_path, title: "Add files to this Collection" %></span>
4
+ <span class="label label-default"><%= link_to t("sufia.collection.show.edit.label"), collections.edit_collection_path, title: t("sufia.collection.show.edit.label") %></span> &nbsp;&nbsp;
5
+ <span class="label label-default"><%= link_to t("sufia.collection.show.add_files.label"), sufia.dashboard_files_path( add_files_to_collection: @collection.id ), title: t("sufia.collection.show.add_files.label") %></span>
6
+ <% if Sufia.config.upload_to_collection %>
7
+ <div class="actions-controls-collections-line2">
8
+ <span class="label label-default"><%= link_to t("sufia.collection.show.upload_files.label"), sufia.new_generic_file_path( collection: @collection.id ), title: t("sufia.collection.show.upload_files.desc") %></span>
9
+ </div>
10
+ <%end %>
6
11
  <%end %>
7
12
  </div>
@@ -25,15 +25,7 @@
25
25
  </td>
26
26
  <td class="text-center"><%= document.date_uploaded %> </td>
27
27
  <td class="text-center">
28
- <a href="<%= sufia.generic_file_path(document) %>/edit/?tab=permissions" id="permission_<%= id %>" class="visibility-link">
29
- <% if document.registered? %>
30
- <span class="label label-info" title="<%= t('sufia.institution_name') %>"><%= t('sufia.institution_name') %></span>
31
- <% elsif document.public? %>
32
- <span class="label label-success" title="<%= t('sufia.visibility.open_title_attr') %>"><%= t('sufia.visibility.open') %></span>
33
- <% else %>
34
- <span class="label label-danger" title="<%= t('sufia.visibility.private_title_attr') %>"><%= t('sufia.visibility.private') %></span>
35
- <% end %>
36
- </a>
28
+ <%= render_visibility_link(document) %>
37
29
  </td>
38
30
  <td class="text-center">
39
31
  <%= render partial: 'show_document_list_menu', locals: { id: id, gf: gf } %>
@@ -4,6 +4,9 @@
4
4
  </div>
5
5
  <div class="well">
6
6
  <%= form_tag(sufia.generic_files_path, id: 'browse_everything_form', method: 'post') do %>
7
+ <% if Sufia.config.upload_to_collection %>
8
+ <%= render partial: 'generic_files/upload/to_collection' %>
9
+ <% end %>
7
10
  <%= render partial: 'generic_files/upload/tos_checkbox' %>
8
11
  <%= hidden_field_tag(:batch_id, @batch_id) %>
9
12
  <%= button_tag(t('sufia.upload.browse_everything.browse_files_button'), type: 'button', class: 'btn btn-lg btn-success', id: "browse-btn",
@@ -10,7 +10,7 @@
10
10
 
11
11
  </div><!-- /well -->
12
12
  <div>
13
- <%= f.submit class: 'btn btn-primary', onclick: "confirmation_needed = false;", id: "upload_submit", name: "update_descriptions" do %>
13
+ <%= button_tag class: 'btn btn-primary btn-lg', id: "upload_submit", name: "update_descriptions" do %>
14
14
  <i class="glyphicon glyphicon-floppy-disk"></i> Save Descriptions
15
15
  <% end %>
16
16
  </div>
@@ -9,7 +9,7 @@
9
9
  </div>
10
10
  <div class="col-sm-9">
11
11
  <%= render 'shared/attributes', work: generic_file %>
12
- </table>
12
+ </div>
13
13
  </div>
14
14
  </li>
15
15
 
@@ -1,2 +1,5 @@
1
+ <% if Sufia.config.upload_to_collection %>
2
+ <%= render partial: 'generic_files/upload/to_collection' %>
3
+ <% end %>
1
4
  <%= render partial: 'generic_files/upload/agreement' %>
2
5
  <%= render partial: 'generic_files/upload/local_file_import_chooser' %>
@@ -6,6 +6,10 @@
6
6
  &nbsp;|&nbsp;
7
7
  <%= link_to "Analytics", sufia.stats_generic_file_path(@generic_file), id: 'stats' %>
8
8
  <% end %>
9
+ <% if Sufia.config.citations %>
10
+ &nbsp;|&nbsp;
11
+ <%= link_to "Citations", sufia.citation_generic_file_path(@generic_file), id: 'citations' %>
12
+ <% end %>
9
13
  <% if can? :edit, @generic_file %>
10
14
  &nbsp;|&nbsp;
11
15
  <% if @generic_file.processing? %>
@@ -6,6 +6,9 @@
6
6
  </div>
7
7
  <% end %>
8
8
  <div class="well">
9
+ <% if Sufia.config.upload_to_collection %>
10
+ <%= render partial: 'generic_files/upload/to_collection' %>
11
+ <% end %>
9
12
  <%= render partial: 'generic_files/upload/form_fields' %>
10
13
  </div>
11
14
  <% end %>
@@ -0,0 +1,5 @@
1
+ <p>
2
+ <label><%= t("sufia.upload.collection.select_label") %></label>
3
+ <%= select_tag 'collection', options_from_collection_for_select(@user_collections, "id", "title", @collection_id) %>
4
+ </p>
5
+ <p>&nbsp;</p>
@@ -11,13 +11,7 @@
11
11
  <h3>
12
12
  <span class="sr-only">Title</span><%= link_to truncate(recent_document.title_or_label, length: 28, separator: ' '), sufia.generic_file_path(recent_document) %>
13
13
  <% if display_access %>
14
- <% if recent_document.registered? %>
15
- <span class="label label-info" title="<%=t('sufia.institution_name') %>"><%=t('sufia.institution_name') %></span>
16
- <% elsif recent_document.public? %>
17
- <span class="label label-success">Open Access</span>
18
- <% else %>
19
- <span class="label label-danger">Private</span>
20
- <% end %>
14
+ <%= render_visibility_label(recent_document) %>
21
15
  <% end %>
22
16
  </h3>
23
17
  <p>
@@ -5,7 +5,7 @@
5
5
  <tr>
6
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
- <th class="sorts-dash"><i id="date_uploaded_dtsi" class="<%=params[:sort]== "date_uploaded_dtsi desc" ? 'caret' : params[:sort]== "date_uploaded_dtsi asc" ? 'caret up' : ''%>"></i>Date Uploaded</th>
8
+ <th class="sorts-dash"><i id="<%= CatalogController.uploaded_field %>" class="<%=params[:sort]== "#{CatalogController.uploaded_field} desc" ? 'caret' : params[:sort]== "#{CatalogController.uploaded_field} asc" ? 'caret up' : ''%>"></i>Date Uploaded</th>
9
9
  <th>Visibility</th>
10
10
  <th>Action</th>
11
11
  </tr>
@@ -21,16 +21,9 @@
21
21
  </div>
22
22
  </div>
23
23
  </td>
24
- <td width="17%"><%= document.date_uploaded %> </td>
25
- <td width="5%" class="text-center">
26
- <% if document.registered? %>
27
- <span class="label label-info" title="<%=t('sufia.institution_name') %>"><%=t('sufia.institution_name') %></span></a>
28
- <% elsif document.public? %>
29
- <span class="label label-success" title="Open Access">Open Access</span></a>
30
- <% else %>
31
- <span class="label label-danger" title="Private">Private</span></a>
32
- <% end %>
33
-
24
+ <td width="17%" class="text-center"><%= document.create_date %> </td>
25
+ <td width="5%" class="text-center visibility-link">
26
+ <%= render_visibility_label(document) %>
34
27
  </td>
35
28
  <td class="text-center">
36
29
  <%= render partial:'collection_action_menu', locals: { id: id } %>
@@ -6,32 +6,23 @@
6
6
  <%= batch_edit_select(document) %>&nbsp;
7
7
  <%# This block is for adding/removing the magic wand while batch updates are processing %>
8
8
  <% if gf.processing? %>
9
- <i class="glyphicon glyphicon-time <%= 'ss-'+gf.batch.id %>"/>
9
+ <span class="glyphicon glyphicon-time <%= 'ss-'+gf.batch.id %>"></span>
10
10
  <% elsif gf.depositor != @user.user_key %>
11
- <i class="glyphicon glyphicon-share-alt"/>
11
+ <span class="glyphicon glyphicon-share-alt"></span>
12
12
  <% end %>
13
13
  </td>
14
- <td>
15
- <div class="media">
16
- <%= link_to sufia.generic_file_path(document), class: "media-left", "aria-hidden" => true do %>
17
- <%= render_thumbnail_tag document, { class: "hidden-xs file_listing_thumbnail" }, { suppress_link: true } %>
18
- <% end %>
19
- <div class="media-body">
20
- <div class="media-heading">
21
- <%= link_to sufia.generic_file_path(document), id: "src_copy_link#{id}", 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_<%= id %>" 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>
30
- <%= render_collection_list(gf) %>
31
- </div>
32
- </div>
14
+ <td class="file-listing-links">
15
+ <%= link_to sufia.generic_file_path(document), id: "src_copy_link#{id}", class: "#{'document-title' if document.title_or_label == document.label}" do %>
16
+ <%= render_thumbnail_tag document, { class: "hidden-xs file_listing_thumbnail pull-left" }, { suppress_link: true } %>
17
+ <div class="file-listing-title"><span class="sr-only"><%= t("sufia.dashboard.my.sr.show_label") %> </span> <%= document.title_or_label %></div>
18
+ <% end %>
19
+ <a href="#" class="small" title="Click for more details">
20
+ <span id="expand_<%= id %>" class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
21
+ <span class="sr-only"> <%= "#{t("sufia.dashboard.my.sr.detail_label")} #{document.title_or_label}" %></span>
22
+ </a>
23
+ <div class="part_of_collection"><%= render_collection_list(gf) %></div>
33
24
  </td>
34
- <td class="text-center"><%= document.date_uploaded %> </td>
25
+ <td class="text-center"><%= document.create_date %> </td>
35
26
  <td class="text-center">
36
27
  <%= render_visibility_link document %>
37
28
  </td>
@@ -1,4 +1,4 @@
1
- <div class="batch-info">
1
+ <div class="batch-info">
2
2
  <div>
3
3
  <%= render partial: 'collections/form_for_select_collection', locals: {user_collections: @user_collections} %>
4
4
  </div>
@@ -17,7 +17,7 @@
17
17
 
18
18
  <div class="sort-toggle">
19
19
  <% unless @response.response['numFound'] < 2 %>
20
- <%= form_tag sufia.dashboard_files_path, method: :get, class: 'per_page form-inline' do %>
20
+ <%= form_tag search_action_for_dashboard, method: :get, class: 'per_page form-inline' do %>
21
21
  <fieldset class="col-xs-12">
22
22
  <legend class="sr-only"><%= t('sufia.sort_label') %></legend>
23
23
  <%= label_tag(:sort, "<span>Sort By:</span>".html_safe) %>
@@ -35,5 +35,5 @@
35
35
  <% end %>
36
36
  <% end unless sort_fields.empty? %>
37
37
  </div>
38
-
38
+
39
39
  </div>
@@ -1,3 +1,4 @@
1
- <%= f.input :rights, as: :select, collection: Sufia.config.cc_licenses,
1
+ <%= f.input :rights, as: :select_with_modal_help, collection: Sufia.config.cc_licenses,
2
2
  input_html: { class: 'form-control', multiple: true }
3
3
  %>
4
+ <%= render "generic_files/rights_modal" %>
@@ -49,7 +49,7 @@
49
49
  <ul>
50
50
  <li>
51
51
  A. Copyright Complaints: We respect the intellectual property rights of others. If you believe your copyright has been violated on the Site, please notify us through <%= t('sufia.institution_name') %>'s designated agent under the Digital Millennium Copyright Act (see 17 U.S.C. Â&sect;512(c)(3).</li>
52
- <li> B. Other Site Issues: Please direct all other communications to <a href="/contact/">contact form</a>.</ul>
52
+ <li> B. Other Site Issues: Please direct all other communications to <a href="<%= sufia.contact_path %>">contact form</a>.</ul>
53
53
  </ul>
54
54
  </p>
55
55
 
@@ -54,6 +54,9 @@ en:
54
54
  partial_fail_html: "One or more files did not upload successfully. To continue using the files that uploaded %{metadata_href}. <br /> Use the %{contact_href} to report the error if it persists."
55
55
  partial_fail_metadata_href_text: "edit their metadata"
56
56
  cloud_timeout_message: "Please note that if you upload a large number of files within a short period of time, the cloud provider may not be able to accommodate your request. If you experience any errors uploading from the cloud, let us know via the %{contact_href}."
57
+ collection:
58
+ select_label: "Upload to:"
59
+ select_default_option: "Select collection..."
57
60
  homepage:
58
61
  featured_works:
59
62
  tab_label: 'Featured Works'
@@ -160,6 +163,16 @@ en:
160
163
  add_another_keyword: "add another Keyword"
161
164
  add_another_creator: "add another Creator"
162
165
  add_another_rights: "add another Rights"
166
+ show:
167
+ edit:
168
+ label: "Edit"
169
+ desc: "Edit metadata for this Collection"
170
+ add_files:
171
+ label: "Add files"
172
+ desc: "Add files to this Collection"
173
+ upload_files:
174
+ label: "Upload files"
175
+ desc: "Upload files to this Collection"
163
176
  mailbox:
164
177
  date: 'Date'
165
178
  subject: 'Subject'