sufia 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -4
- data/SUFIA_VERSION +1 -1
- data/app/assets/javascripts/sufia.js +1 -9
- data/app/assets/javascripts/sufia/batch_edit.js +3 -3
- data/app/assets/javascripts/sufia/multiForm.js +4 -2
- data/app/assets/javascripts/sufia/{single_use_link.js → single_use_link.js.erb} +1 -1
- data/app/assets/javascripts/sufia/tagcloud.js +12 -0
- data/app/assets/stylesheets/sufia.css.scss +3 -12
- data/app/assets/stylesheets/{batch-edit.css.scss → sufia/_batch-edit.scss} +0 -0
- data/app/assets/stylesheets/sufia/_buttons.scss +8 -0
- data/app/assets/stylesheets/{catalog.css.scss → sufia/_catalog.scss} +0 -0
- data/app/assets/stylesheets/{collections.css.scss → sufia/_collections.scss} +0 -0
- data/app/assets/stylesheets/sufia/_dashboard.scss +112 -0
- data/app/assets/stylesheets/{featured.css.scss → sufia/_featured.scss} +0 -0
- data/app/assets/stylesheets/{file-listing.css.scss → sufia/_file-listing.scss} +0 -0
- data/app/assets/stylesheets/{header.css.scss → sufia/_header.scss} +0 -0
- data/app/assets/stylesheets/{home-page.css.scss → sufia/_home-page.scss} +0 -0
- data/app/assets/stylesheets/sufia/_settings.scss +37 -0
- data/app/assets/stylesheets/{styles.css.scss → sufia/_styles.scss} +1 -1
- data/app/assets/stylesheets/{tagcloud.css → sufia/_tagcloud.scss} +0 -0
- data/app/assets/stylesheets/{usage-stats.css → sufia/_usage-stats.scss} +0 -0
- data/app/controllers/concerns/sufia/controller.rb +1 -1
- data/app/controllers/concerns/sufia/dashboard_controller_behavior.rb +1 -1
- data/app/helpers/sufia/records_helper_behavior.rb +13 -7
- data/app/views/batch/_metadata.html.erb +3 -3
- data/app/views/collections/_form_for_select_collection.html.erb +7 -7
- data/app/views/dashboard/_index_partials/_contents.html.erb +10 -6
- data/app/views/dashboard/_index_partials/_heading_actions.html.erb +16 -8
- data/app/views/dashboard/_index_partials/_heading_greetings.html.erb +3 -3
- data/app/views/dashboard/_index_partials/_stats.html.erb +22 -20
- data/app/views/dashboard/_index_partials/_user_info.html.erb +15 -15
- data/app/views/dashboard/index.html.erb +6 -10
- data/app/views/error/401.html.erb +1 -1
- data/app/views/error/404.html.erb +1 -1
- data/app/views/error/single_use_error.html.erb +1 -1
- data/app/views/generic_files/_permission_form.html.erb +2 -2
- data/app/views/homepage/_home_content.html.erb +3 -3
- data/app/views/layouts/error.html.erb +1 -1
- data/app/views/layouts/homepage.html.erb +1 -1
- data/app/views/layouts/sufia-dashboard.html.erb +9 -11
- data/app/views/layouts/sufia-one-column.html.erb +1 -1
- data/app/views/layouts/sufia-two-column.html.erb +1 -1
- data/app/views/mailbox/_notifications.html.erb +5 -4
- data/app/views/my/_facets.html.erb +1 -1
- data/config/locales/sufia.en.yml +24 -1
- data/fedora_conf/conf/development/fedora.fcfg +1 -1
- data/fedora_conf/conf/test/fedora.fcfg +1 -1
- data/lib/sufia.rb +4 -0
- data/lib/sufia/version.rb +1 -1
- data/spec/controllers/downloads_controller_spec.rb +1 -1
- data/spec/controllers/my/files_controller_spec.rb +26 -5
- data/spec/helpers/records_helper_spec.rb +2 -2
- data/spec/jobs/import_url_job_spec.rb +5 -2
- data/spec/models/file_usage_spec.rb +53 -1
- data/spec/views/dashboard/index_spec.rb +8 -8
- data/sufia-models/app/actors/sufia/generic_file/actor.rb +8 -1
- data/sufia-models/app/jobs/import_url_job.rb +1 -1
- data/sufia-models/app/models/concerns/sufia/generic_file/audit.rb +16 -12
- data/sufia-models/app/models/file_usage.rb +4 -2
- data/sufia-models/lib/generators/sufia/models/install_generator.rb +1 -0
- data/sufia-models/lib/generators/sufia/models/templates/config/resque-pool.yml +1 -0
- data/sufia-models/lib/generators/sufia/models/templates/config/sufia.rb +8 -0
- data/sufia-models/lib/sufia/models/engine.rb +4 -0
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/tasks/sufia-dev.rake +1 -0
- metadata +20 -16
- data/app/assets/stylesheets/settings.css.scss +0 -6
@@ -3,13 +3,13 @@
|
|
3
3
|
<div class="modal-content">
|
4
4
|
<div class="modal-header">
|
5
5
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
6
|
-
<h4 class="modal-title" id="col_add_title"
|
6
|
+
<h4 class="modal-title" id="col_add_title"><%= t("sufia.collection.select_form.title") %></h4>
|
7
7
|
</div>
|
8
8
|
<div class="modal-body">
|
9
9
|
<% if user_collections.blank? %>
|
10
|
-
<em>
|
10
|
+
<em> <%= t("sufia.collection.select_form.no_collections") %></em><br><br><br><br>
|
11
11
|
<% else %>
|
12
|
-
|
12
|
+
<%= t("sufia.collection.select_form.select_heading") %>
|
13
13
|
<div class="collection-list">
|
14
14
|
<ul>
|
15
15
|
<% user_collections.sort! { |c1,c2| c1['desc_metadata__date_modified_dtsi'] <=> c2['desc_metadata__date_modified_dtsi'] } %>
|
@@ -24,12 +24,12 @@
|
|
24
24
|
<% end %> <!-- else -->
|
25
25
|
</div>
|
26
26
|
<div class="modal-footer">
|
27
|
-
<button type="button" class="btn btn-default" data-dismiss="modal"
|
27
|
+
<button type="button" class="btn btn-default" data-dismiss="modal"><%= t("sufia.collection.select_form.close")%></button>
|
28
28
|
<% if user_collections.blank? %>
|
29
|
-
<%= button_for_create_collection %>
|
29
|
+
<%= button_for_create_collection t("sufia.collection.select_form.create") %>
|
30
30
|
<% else %>
|
31
|
-
<%= button_for_update_collection %>
|
32
|
-
<%= button_for_create_collection "
|
31
|
+
<%= button_for_update_collection t("sufia.collection.select_form.update") %>
|
32
|
+
<%= button_for_create_collection t("sufia.collection.select_form.create_new") %>
|
33
33
|
<% end %>
|
34
34
|
</div>
|
35
35
|
</div><!-- /.modal-content -->
|
@@ -1,13 +1,17 @@
|
|
1
|
-
<div class="
|
2
|
-
<div class="
|
3
|
-
<h3><%= t("sufia.dashboard.user_activity") %></h3>
|
1
|
+
<div class="panel panel-default" id="activity">
|
2
|
+
<div class="panel-heading dashboard-panel">
|
3
|
+
<h3 class="panel-title "><%= t("sufia.dashboard.user_activity") %></h3>
|
4
|
+
</div>
|
5
|
+
<div class="panel-body">
|
4
6
|
<%= render_recent_activity %>
|
5
7
|
</div>
|
6
8
|
</div>
|
7
9
|
|
8
|
-
<div class="
|
9
|
-
<div class="
|
10
|
-
<h3><%= t("sufia.dashboard.user_notifications") %></h3>
|
10
|
+
<div class="panel panel-default" id="notifications">
|
11
|
+
<div class="panel-heading dashboard-panel">
|
12
|
+
<h3 class="panel-title "><%= t("sufia.dashboard.user_notifications") %></h3>
|
13
|
+
</div>
|
14
|
+
<div class="panel-body">
|
11
15
|
<%= render_recent_notifications %>
|
12
16
|
<%= link_to_additional_notifications %>
|
13
17
|
</div>
|
@@ -1,18 +1,26 @@
|
|
1
1
|
<div class="col-xs-12 heading-row">
|
2
2
|
<div class="col-xs-6 col-sm-3 heading-tile">
|
3
|
-
|
4
|
-
|
3
|
+
<%= link_to sufia.new_generic_file_path do %>
|
4
|
+
<span class="glyphicon glyphicon-upload"></span>
|
5
|
+
<%= t("sufia.dashboard.upload") %>
|
6
|
+
<% end %>
|
5
7
|
</div>
|
6
8
|
<div class="col-xs-6 col-sm-3 heading-tile">
|
7
|
-
|
8
|
-
|
9
|
+
<%= link_to collections.new_collection_path, id: "hydra-collection-add" do %>
|
10
|
+
<span class="glyphicon glyphicon-plus"></span>
|
11
|
+
<%= t("sufia.dashboard.create_collection") %>
|
12
|
+
<% end %>
|
9
13
|
</div>
|
10
14
|
<div class="col-xs-6 col-sm-3 heading-tile">
|
11
|
-
|
12
|
-
|
15
|
+
<%= link_to sufia.dashboard_collections_path, id: "hydra-collection-view" do %>
|
16
|
+
<span class="glyphicon glyphicon-th"></span>
|
17
|
+
<%= t("sufia.dashboard.view_collections") %>
|
18
|
+
<% end %>
|
13
19
|
</div>
|
14
20
|
<div class="col-xs-6 col-sm-3 heading-tile">
|
15
|
-
|
16
|
-
|
21
|
+
<%= link_to sufia.dashboard_files_path do %>
|
22
|
+
<span class="glyphicon glyphicon-eye-open"></span>
|
23
|
+
<%= t("sufia.dashboard.view_files") %>
|
24
|
+
<% end %>
|
17
25
|
</div>
|
18
26
|
</div>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<div class="col-xs-12 heading-row">
|
2
|
-
<div class="col-xs-3
|
2
|
+
<div class="col-xs-3 hidden-xs">
|
3
3
|
<h1><%= t("sufia.dashboard.title") %></h1>
|
4
4
|
</div>
|
5
|
-
<div class="col-xs-9
|
6
|
-
<
|
5
|
+
<div class="col-xs-9">
|
6
|
+
<h2><%= t("sufia.dashboard.greeting") + current_user.name %></h2>
|
7
7
|
</div>
|
8
8
|
</div>
|
@@ -1,20 +1,22 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
<
|
4
|
-
<
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<
|
18
|
-
|
19
|
-
|
20
|
-
</
|
1
|
+
<div class="panel panel-default">
|
2
|
+
<div class="panel-heading dashboard-panel">
|
3
|
+
<h3 class="panel-title"><%= t("sufia.dashboard.stats.heading") %></h3></div>
|
4
|
+
<table class="table table-condensed">
|
5
|
+
<tr>
|
6
|
+
<td><span class="badge"><%= number_of_files %></span></td>
|
7
|
+
<td><%= t("sufia.dashboard.stats.files") %></td>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<td><span class="badge"><%= number_of_collections %></span></td>
|
11
|
+
<td><%= t("sufia.dashboard.stats.collections") %></td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<td><span class="badge"><%= @user.all_following.count %></span></td>
|
15
|
+
<td><%= t("sufia.dashboard.stats.following") %></td>
|
16
|
+
</tr>
|
17
|
+
<tr>
|
18
|
+
<td><span class="badge"><%= @user.followers.count %></span></td>
|
19
|
+
<td><%= t("sufia.dashboard.stats.followers") %></td>
|
20
|
+
</tr>
|
21
|
+
</table>
|
22
|
+
</div>
|
@@ -1,18 +1,18 @@
|
|
1
|
-
<div class="
|
2
|
-
<div class="
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
</div>
|
1
|
+
<div class="panel panel-default">
|
2
|
+
<div class="panel-body">
|
3
|
+
<div class="col-xs-12 user-info">
|
4
|
+
<h3><%= @user.name %></h3>
|
5
|
+
<h4><%= @user.title %></h4>
|
6
|
+
<h4><%= @user.department %></h4>
|
7
|
+
<h5><%= link_to_telephone %></h5>
|
8
|
+
<h5><%= @user.email %></h5>
|
9
|
+
</div>
|
10
10
|
|
11
|
-
<div class="
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
<div class="col-xs-6 col-sm-12 col-md-6 user-info">
|
12
|
+
<%= link_to t("sufia.view_profile"), sufia.profile_path(@user), class: "btn btn-default btn-raised" %>
|
13
|
+
</div>
|
14
|
+
<div class="col-xs-6 col-sm-12 col-md-6 user-info">
|
15
|
+
<%= link_to t("sufia.edit_profile"), sufia.edit_profile_path(@user), class: "btn btn-default btn-raised" %>
|
16
|
+
</div>
|
17
17
|
</div>
|
18
18
|
</div>
|
@@ -1,20 +1,16 @@
|
|
1
1
|
<%= content_for :heading do %>
|
2
2
|
|
3
|
-
|
3
|
+
<%= render partial: "dashboard/_index_partials/heading_greetings" %>
|
4
4
|
|
5
|
-
|
5
|
+
<%= render partial: "dashboard/_index_partials/heading_actions" %>
|
6
6
|
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<%= content_for :sidebar do %>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<div class="row">
|
16
|
-
<div class="portal"><%= render partial: "dashboard/_index_partials/user_info" %></div>
|
17
|
-
</div>
|
10
|
+
|
11
|
+
<%= render partial: "dashboard/_index_partials/stats" %>
|
12
|
+
|
13
|
+
<%= render partial: "dashboard/_index_partials/user_info" %>
|
18
14
|
|
19
15
|
<% end %>
|
20
16
|
|
@@ -67,7 +67,7 @@
|
|
67
67
|
<div class="col-sm-3">
|
68
68
|
<button class="btn btn-mini btn-inverse" id="add_new_user_skel">
|
69
69
|
<span class="sr-only">Add this <%= t('sufia.account_label') %></span>
|
70
|
-
<span aria-hidden="true"><i class="glyphicon glyphicon-plus"></i
|
70
|
+
<span aria-hidden="true"><i class="glyphicon glyphicon-plus"></i></span>
|
71
71
|
</button>
|
72
72
|
<br /> <span id="directory_user_result"></span>
|
73
73
|
</div>
|
@@ -87,7 +87,7 @@
|
|
87
87
|
</div>
|
88
88
|
<div class="col-sm-3">
|
89
89
|
<span class="sr-only">Add this group</span>
|
90
|
-
<button class="btn btn-mini btn-inverse" id="add_new_group_skel"><i class="glyphicon glyphicon-plus"></i
|
90
|
+
<button class="btn btn-mini btn-inverse" id="add_new_group_skel"><i class="glyphicon glyphicon-plus"></i></button>
|
91
91
|
<br /><span id="directory_group_result"></span>
|
92
92
|
</div>
|
93
93
|
</div>
|
@@ -13,6 +13,9 @@
|
|
13
13
|
</div>
|
14
14
|
</div><!-- /.col-xs-6 -->
|
15
15
|
<div class="col-xs-12 col-sm-6">
|
16
|
+
<div>
|
17
|
+
<%= render partial: 'featured_researcher' %>
|
18
|
+
</div>
|
16
19
|
<div>
|
17
20
|
<%- if blacklight_config.respond_to?(:tag_cloud_field_name) && blacklight_config.tag_cloud_field_name %>
|
18
21
|
<div class="row">
|
@@ -22,7 +25,4 @@
|
|
22
25
|
</div>
|
23
26
|
<%- end %>
|
24
27
|
</div>
|
25
|
-
<div>
|
26
|
-
<%= render partial: 'featured_researcher' %>
|
27
|
-
</div>
|
28
28
|
</div>
|
@@ -1,31 +1,29 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
|
-
<html>
|
2
|
+
<html lang="<%= t("sufia.document_language") %>">
|
3
3
|
<head><%= render partial: 'layouts/head_tag_content' %></head>
|
4
|
-
<body>
|
5
|
-
<div id="wrapper">
|
4
|
+
<body>
|
5
|
+
<div id="wrapper">
|
6
6
|
<div class="container-fluid">
|
7
7
|
<div id="page-positioner">
|
8
8
|
|
9
9
|
<%= render partial: '/masthead' %>
|
10
10
|
<%= render partial: '/controls' %>
|
11
11
|
<%= render partial: '/flash_msg' %>
|
12
|
-
|
13
|
-
<div id="content-wrapper">
|
12
|
+
|
13
|
+
<div id="content-wrapper" class="dashboard">
|
14
14
|
<div class="container-fluid">
|
15
15
|
<div id="content-header" class="row"><%= yield :heading %></div>
|
16
16
|
</div>
|
17
17
|
<div class="container-fluid">
|
18
18
|
<div id="content" class="row">
|
19
|
-
<div class="col-xs-12">
|
20
|
-
|
21
|
-
<div class="col-sm-9"><%= yield %></div>
|
22
|
-
</div>
|
19
|
+
<div id="sidebar" class="col-xs-12 col-sm-3"><%= yield :sidebar %></div>
|
20
|
+
<div class="col-xs-12 col-sm-9"><%= yield %></div>
|
23
21
|
</div>
|
24
22
|
</div>
|
25
23
|
</div>
|
26
|
-
|
24
|
+
|
27
25
|
<%= render partial: '/footer' %>
|
28
|
-
|
26
|
+
|
29
27
|
</div><!-- /#page-positioner -->
|
30
28
|
</div><!-- /.container -->
|
31
29
|
</div><!-- /#wrapper -->
|
@@ -1,9 +1,10 @@
|
|
1
1
|
<table class="table table-striped">
|
2
2
|
<thead>
|
3
3
|
<tr>
|
4
|
-
<th
|
5
|
-
<th
|
6
|
-
<th
|
4
|
+
<th><%= t('sufia.mailbox.date') %></th>
|
5
|
+
<th><%= t('sufia.mailbox.subject') %></th>
|
6
|
+
<th><%= t('sufia.mailbox.message') %></th>
|
7
|
+
<th class="sr-only"><%= t('sufia.mailbox.delete') %></th>
|
7
8
|
</tr>
|
8
9
|
</thead>
|
9
10
|
<tbody>
|
@@ -13,7 +14,7 @@
|
|
13
14
|
<td><%= msg.last_message.subject.html_safe %></td>
|
14
15
|
<td><%= msg.last_message.body.html_safe %></td>
|
15
16
|
<td>
|
16
|
-
<%= link_to raw('<i class="glyphicon glyphicon-trash"></i>'), sufia.notification_path(msg.id), class: "itemicon itemtrash", title: "Delete
|
17
|
+
<%= link_to raw('<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>'), sufia.notification_path(msg.id), class: "itemicon itemtrash", title: "Delete Message", method: :delete %>
|
17
18
|
</td>
|
18
19
|
<% end %>
|
19
20
|
<% end %>
|
data/config/locales/sufia.en.yml
CHANGED
@@ -2,6 +2,7 @@ en:
|
|
2
2
|
sufia:
|
3
3
|
account_name: "My Institution Account Id"
|
4
4
|
deposit_agreement: "Sufia's Deposit Agreement"
|
5
|
+
document_language: "en"
|
5
6
|
upload_tooltip: "Please accept Deposit Agreement before you can upload."
|
6
7
|
share_button: "Share Your Work"
|
7
8
|
view_profile: "View Profile"
|
@@ -82,7 +83,11 @@ en:
|
|
82
83
|
collections: "My Collections"
|
83
84
|
highlights: "My Highlights"
|
84
85
|
shares: "Files Shared with Me"
|
85
|
-
|
86
|
+
facet_label:
|
87
|
+
files: "Filter your files"
|
88
|
+
collections: "Filter your collections"
|
89
|
+
highlighted: "Filter your highlights"
|
90
|
+
shared: "Filter your shares"
|
86
91
|
sr:
|
87
92
|
show_label: "Display all details of"
|
88
93
|
detail_label: "Display summary details of"
|
@@ -141,3 +146,21 @@ en:
|
|
141
146
|
help:
|
142
147
|
title: "Filename will be the default title. Please provide a more meaningful title, and filenames will still be preserved by the system."
|
143
148
|
resource_type: "You may select multiple types to apply to all files"
|
149
|
+
collection:
|
150
|
+
select_form:
|
151
|
+
title: "Add to collection"
|
152
|
+
no_collections: "You do not have access to any existing collections. You may create a new collection."
|
153
|
+
select_heading: "Select the collection to add your files to:"
|
154
|
+
close: "Close"
|
155
|
+
create: "Create Collection"
|
156
|
+
update: "Update Collection"
|
157
|
+
create_new: "Add to new Collection"
|
158
|
+
metadata:
|
159
|
+
add_another_keyword: "add another Keyword"
|
160
|
+
add_another_creator: "add another Creator"
|
161
|
+
add_another_rights: "add another Rights"
|
162
|
+
mailbox:
|
163
|
+
date: 'Date'
|
164
|
+
subject: 'Subject'
|
165
|
+
message: 'Message'
|
166
|
+
delete: 'Delete Message'
|
@@ -464,7 +464,7 @@
|
|
464
464
|
<comment>The local path for the Fedora-METS 1.0 XML
|
465
465
|
schema used to do XML schema validation of digital objects.</comment>
|
466
466
|
</param>
|
467
|
-
<param name="xsd_xacml_policy1.0" value="xsd/cs-xacml-schema-policy-
|
467
|
+
<param name="xsd_xacml_policy1.0" value="xsd/cs-xacml-schema-policy-01.xsd">
|
468
468
|
<comment>The local path for the OASIS XACML XML policy schema
|
469
469
|
used to do XML schema validation of XACML policies.</comment>
|
470
470
|
</param>
|
@@ -464,7 +464,7 @@
|
|
464
464
|
<comment>The local path for the Fedora-METS 1.0 XML
|
465
465
|
schema used to do XML schema validation of digital objects.</comment>
|
466
466
|
</param>
|
467
|
-
<param name="xsd_xacml_policy1.0" value="xsd/cs-xacml-schema-policy-
|
467
|
+
<param name="xsd_xacml_policy1.0" value="xsd/cs-xacml-schema-policy-01.xsd">
|
468
468
|
<comment>The local path for the OASIS XACML XML policy schema
|
469
469
|
used to do XML schema validation of XACML policies.</comment>
|
470
470
|
</param>
|
data/lib/sufia.rb
CHANGED
@@ -30,5 +30,9 @@ module Sufia
|
|
30
30
|
|
31
31
|
config.assets.paths << config.root.join('vendor', 'assets', 'fonts')
|
32
32
|
config.assets.precompile << %r(vjs\.(?:eot|ttf|woff)$)
|
33
|
+
config.assets.precompile += %w( fontawesome-webfont.woff )
|
34
|
+
config.assets.precompile += %w( fontawesome-webfont.ttf )
|
35
|
+
config.assets.precompile += %w( fontawesome-webfont.svg )
|
36
|
+
config.assets.precompile += %w( ZeroClipboard.swf )
|
33
37
|
end
|
34
38
|
end
|