sufia 4.2.0 → 4.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +21 -0
- data/README.md +7 -19
- data/SUFIA_VERSION +1 -1
- data/app/assets/images/orcid.png +0 -0
- data/app/assets/javascripts/sufia.js +6 -1
- data/app/assets/javascripts/sufia/permissions.js +2 -26
- data/app/assets/stylesheets/sufia.css.scss +6 -0
- data/app/assets/stylesheets/sufia/_buttons.scss +6 -1
- data/app/assets/stylesheets/sufia/_dashboard.scss +10 -0
- data/app/assets/stylesheets/sufia/_file-listing.scss +8 -0
- data/app/assets/stylesheets/sufia/_settings.scss +1 -0
- data/app/helpers/batch_edits_helper.rb +1 -1
- data/app/helpers/sufia/sufia_helper_behavior.rb +11 -0
- data/app/models/featured_work_list.rb +4 -1
- data/app/views/batch/edit.html.erb +2 -2
- data/app/views/batch_edits/_check_all.html.erb +8 -6
- data/app/views/collections/_edit_descriptions.html.erb +1 -1
- data/app/views/dashboard/_index_partials/_stats.html.erb +10 -1
- data/app/views/generic_files/_descriptions.html.erb +1 -1
- data/app/views/generic_files/_permission.html.erb +2 -2
- data/app/views/generic_files/_permission_form.html.erb +4 -6
- data/app/views/generic_files/_versioning.html.erb +2 -2
- data/app/views/records/show_fields/_contributor.html.erb +1 -1
- data/app/views/records/show_fields/_creator.html.erb +1 -1
- data/app/views/users/_profile.html.erb +1 -2
- data/app/views/users/_user_info.html.erb +20 -3
- data/app/views/users/edit.html.erb +11 -2
- data/app/views/users/show.html.erb +1 -1
- data/config/locales/sufia.en.yml +5 -0
- data/lib/generators/sufia/install_generator.rb +4 -0
- data/lib/generators/sufia/templates/catalog_controller.rb +4 -0
- data/lib/sufia/version.rb +1 -1
- data/spec/controllers/users_controller_spec.rb +18 -10
- data/spec/features/browse_files_spec.rb +17 -3
- data/spec/features/users_spec.rb +1 -1
- data/spec/helpers/batch_edits_helper_spec.rb +7 -1
- data/spec/lib/sufia/user_stat_importer_spec.rb +206 -0
- data/spec/models/featured_work_list_spec.rb +12 -0
- data/spec/models/file_view_stat_spec.rb +6 -2
- data/spec/models/user_spec.rb +25 -2
- data/spec/models/user_usage_stats_spec.rb +39 -0
- data/spec/views/dashboard/index_spec.rb +4 -0
- data/spec/views/generic_file/_permission_form.html.erb_spec.rb +19 -0
- data/spec/views/generic_file/show.html.erb_spec.rb +2 -2
- data/sufia-models/app/models/concerns/sufia/file_stat_utils.rb +3 -3
- data/sufia-models/app/models/concerns/sufia/user.rb +27 -10
- data/sufia-models/app/models/concerns/sufia/user_usage_stats.rb +15 -0
- data/sufia-models/app/models/file_download_stat.rb +2 -2
- data/sufia-models/app/models/file_usage.rb +7 -3
- data/sufia-models/app/models/file_view_stat.rb +2 -2
- data/sufia-models/app/models/sufia/orcid_validator.rb +8 -0
- data/sufia-models/app/models/user_stat.rb +2 -0
- data/sufia-models/lib/generators/sufia/models/abstract_migration_generator.rb +30 -0
- data/sufia-models/lib/generators/sufia/models/cached_stats_generator.rb +2 -31
- data/sufia-models/lib/generators/sufia/models/install_generator.rb +11 -31
- data/sufia-models/lib/generators/sufia/models/orcid_field_generator.rb +19 -0
- data/sufia-models/lib/generators/sufia/models/proxies_generator.rb +2 -31
- data/sufia-models/lib/generators/sufia/models/templates/config/sufia.rb +3 -5
- data/sufia-models/lib/generators/sufia/models/templates/migrations/add_orcid_to_users.rb +5 -0
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_user_stats.rb +19 -0
- data/sufia-models/lib/generators/sufia/models/upgrade400_generator.rb +2 -33
- data/sufia-models/lib/generators/sufia/models/user_stats_generator.rb +31 -0
- data/sufia-models/lib/sufia/models/stats/user_stat_importer.rb +85 -0
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/sufia-models/lib/tasks/stats_tasks.rake +12 -0
- data/sufia.gemspec +0 -1
- metadata +21 -19
- data/app/views/users/_social_media_info.html.erb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 202087176245b06ed3908752e6474c316fe2d669
|
4
|
+
data.tar.gz: 46a3bf0c6206c0d76738b2e1092b310f793f02d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9d2a4b2abc2ccbd14ecee1047f87c9f5ffc3cc93b9361fe7a5a3c651d601c014534230a8098e83aadb8ec078a071678257333816eb65a7874f767fab3398ae8
|
7
|
+
data.tar.gz: f1e9781b0f053375be769c16c963b1702de618b471f9af9c2177ceba5262b091da4e24bb5b143c7476614aced26800ed559aa5e7e189ed4ecfa7ba8d35e33798
|
data/History.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# History of Sufia releases
|
2
2
|
|
3
|
+
## 4.3.1
|
4
|
+
|
5
|
+
* Adds an ORCID field to the user model. [Michael J. Giarlo]
|
6
|
+
* Styles count for views and downloads, refs #9672 [Michael Tribone]
|
7
|
+
* Merge pull request #787 from projecthydra/update_master_to_bl-5.8 [Justin Coyne]
|
8
|
+
* More facets modal defaults to numerical sort [Adam Wead]
|
9
|
+
* Upgrade to Blacklight 5.8 [Adam Wead]
|
10
|
+
* Adding select2 name look up to permissions form for GenericFile and Batch. [Carolyn Cole]
|
11
|
+
* Adding blacklight gallery default views to catalog controller to match with the new installer.
|
12
|
+
* Display file stats for user. Feature #9305 [Valerie Maher]
|
13
|
+
* Making sure the modal is actually sorted numerically and allow some files to be on the second p
|
14
|
+
* Fixing a bug that the home page crashes when a featured work has been destroyed [Carolyn Cole]
|
15
|
+
* Fixes button size and alignment issues with metadata and upload forms, refs #9569 [Michael Tribone]
|
16
|
+
* Updated dev notes [Valerie Maher]
|
17
|
+
* Disable check all instead of making it disappear. User testing indicated this was confusing [Carolyn Cole]
|
18
|
+
* Views should not use the invalid Agent schema.org class [Michael J. Giarlo]
|
19
|
+
* README should not implicitly suggest an outdated version of Sufia. (Inspired by #719 -- thx, @mistydemeo!) [Michael J. Giarlo]
|
20
|
+
|
21
|
+
## 4.3.0 - YANKED
|
22
|
+
|
3
23
|
## 4.2.0
|
4
24
|
|
5
25
|
* Caches google analytics data in the database so we do not have to retrieve them each time the page is loaded [Carolyn Cole]
|
@@ -172,6 +192,7 @@ This release contains bug fixes and css fixes found after the Sufia 4.0 release.
|
|
172
192
|
* changing to bootstrap 3 danger from important to get the red background for permissions, and fixing collection detail spacing when there is no description [Carolyn Cole]
|
173
193
|
* Upgrade to rspec 3. Fixes #493 [Carolyn Cole]
|
174
194
|
* Removed extraneous colons preceding key names. Fixes #516 [kerchner]
|
195
|
+
|
175
196
|
## 4.0.0.rc1
|
176
197
|
|
177
198
|
* Use the bootstrap_form helpers (bootstrap_forms is no longer available) [Justin Coyne]
|
data/README.md
CHANGED
@@ -65,7 +65,7 @@ If you have questions or need help, please email [the Hydra community developmen
|
|
65
65
|
### Add gems to Gemfile
|
66
66
|
|
67
67
|
```
|
68
|
-
gem 'sufia'
|
68
|
+
gem 'sufia'
|
69
69
|
gem 'kaminari', github: 'harai/kaminari', branch: 'route_prefix_prototype' # required to handle pagination properly in dashboard. See https://github.com/amatsuda/kaminari/pull/322
|
70
70
|
```
|
71
71
|
|
@@ -123,22 +123,6 @@ The line with kaminari listed as a dependency in Gemfile is a temporary fix to a
|
|
123
123
|
[problem](https://github.com/amatsuda/kaminari/pull/322) in the current release of kaminari.
|
124
124
|
Technically you should not have to list kaminari, which is a dependency of blacklight and sufia.
|
125
125
|
|
126
|
-
#### Bundler
|
127
|
-
|
128
|
-
Users have reported problems with the initial `bundle install` command, seeing an error such as:
|
129
|
-
|
130
|
-
```
|
131
|
-
Bundler could not find compatible versions for gem "bootstrap-sass":
|
132
|
-
In Gemfile:
|
133
|
-
sufia (~> 4.0.0) ruby depends on
|
134
|
-
bootstrap-sass (< 3.2) ruby
|
135
|
-
|
136
|
-
sufia (~> 4.0.0) ruby depends on
|
137
|
-
bootstrap-sass (3.2.0.2)
|
138
|
-
```
|
139
|
-
|
140
|
-
The solution is to update your bundler gem to the latest version.
|
141
|
-
|
142
126
|
### Proxies and Transfers
|
143
127
|
|
144
128
|
To add proxies and transfers to your Sufia 4-based app, run the 'sufia:models:proxies' generator and then run 'rake db:migrate'.
|
@@ -181,7 +165,7 @@ The generator will create a configuration file at _config/analytics.yml_. Edit
|
|
181
165
|
* An application name (you can make this up)
|
182
166
|
* An application version (you can make this up)
|
183
167
|
|
184
|
-
Lastly, you will need to set `config.analytics = true` in _config/initializers/sufia.rb_ and ensure that the OAuth client email
|
168
|
+
Lastly, you will need to set `config.analytics = true` and `config.analytic_start_date` in _config/initializers/sufia.rb_ and ensure that the OAuth client email
|
185
169
|
has the proper access within your Google Analyics account. To do so, go to the _Admin_ tab for your Google Analytics account.
|
186
170
|
Click on _User Management_, in the _Account_ column, and add "Read & Analyze" permissions for the OAuth client email address.
|
187
171
|
|
@@ -265,7 +249,11 @@ This information is for people who want to modify the engine itself, not an appl
|
|
265
249
|
### run the tests
|
266
250
|
|
267
251
|
```
|
268
|
-
rake
|
252
|
+
rake jetty:start
|
253
|
+
redis-server
|
254
|
+
rake engine_cart:clean
|
255
|
+
rake engine_cart:generate
|
256
|
+
rake spec
|
269
257
|
```
|
270
258
|
|
271
259
|
### Change validation behavior
|
data/SUFIA_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.3.1
|
Binary file
|
@@ -51,7 +51,12 @@
|
|
51
51
|
//= require sufia/batch
|
52
52
|
|
53
53
|
//= require hydra_collections
|
54
|
-
|
54
|
+
|
55
|
+
//
|
56
|
+
// For Browse-everything until https://github.com/projecthydra-labs/browse-everything/issues/85 is resolved:
|
57
|
+
//= require jquery.treetable
|
58
|
+
//= require browse_everything/behavior
|
59
|
+
//
|
55
60
|
//= require jquery.blacklightTagCloud
|
56
61
|
//= require sufia/tagcloud
|
57
62
|
//= require nestable
|
@@ -9,33 +9,9 @@
|
|
9
9
|
*/
|
10
10
|
|
11
11
|
Blacklight.onLoad(function() {
|
12
|
-
// input for uids - attach function to verify uid
|
13
|
-
$('#new_user_name_skel').on('blur', function() {
|
14
|
-
// clear out any existing messages
|
15
|
-
$('#directory_user_result').html('');
|
16
|
-
var un = $('#new_user_name_skel').val();
|
17
|
-
var perm = $('#new_user_permission_skel').val();
|
18
|
-
if ( $.trim(un).length == 0 ) {
|
19
|
-
return;
|
20
|
-
}
|
21
|
-
$.ajax( {
|
22
|
-
url: "/directory/user/" + un,
|
23
|
-
success: function( data ) {
|
24
|
-
if (data != null) {
|
25
|
-
if (!data.length) {
|
26
|
-
$('#directory_user_result').html('User id ('+un+ ') does not exist.');
|
27
|
-
$('#new_user_name_skel').select();
|
28
|
-
$('#new_user_permission_skel').val('none');
|
29
|
-
return;
|
30
|
-
}
|
31
|
-
else {
|
32
|
-
$('#new_user_permission_skel').focus();
|
33
|
-
}
|
34
|
-
}
|
35
|
-
}
|
36
|
-
});
|
37
12
|
|
38
|
-
|
13
|
+
// Attach the user search select2 box to the permission form
|
14
|
+
$("#new_user_name_skel").userSearch();
|
39
15
|
|
40
16
|
// add button for new user
|
41
17
|
$('#add_new_user_skel').on('click', function() {
|
@@ -8,6 +8,7 @@
|
|
8
8
|
*= require nestable
|
9
9
|
*/
|
10
10
|
|
11
|
+
@import "bootstrap-sprockets";
|
11
12
|
@import 'bootstrap';
|
12
13
|
@import 'blacklight/blacklight';
|
13
14
|
@import "browse_everything";
|
@@ -34,6 +35,11 @@
|
|
34
35
|
padding-top: 10px;
|
35
36
|
}
|
36
37
|
|
38
|
+
.profile img.orcid {
|
39
|
+
float: left;
|
40
|
+
margin-right: 2px;
|
41
|
+
}
|
42
|
+
|
37
43
|
/* This class is to workaround an issue in which Bootstrap requires a div to display a tooltip
|
38
44
|
* on a disabled button. Using a span instead of a div would be ideal but unfortunately it does
|
39
45
|
* not render the tooltip correctly in all browsers (e.g. in Chrome the tooltip is detected in
|
@@ -18,6 +18,16 @@
|
|
18
18
|
background-color: $badge-background-color;
|
19
19
|
color: $badge-font-color;
|
20
20
|
}
|
21
|
+
.badge-optional {
|
22
|
+
background-color: $badge-optional-background-color;
|
23
|
+
border-radius: 2px;
|
24
|
+
color: $badge-font-color;
|
25
|
+
padding: 0 .25em;
|
26
|
+
}
|
27
|
+
.views-downloads-dashboard {
|
28
|
+
list-style-type: none;
|
29
|
+
padding-left: 0;
|
30
|
+
}
|
21
31
|
.panel-default > .panel-heading {
|
22
32
|
background-color: $panel-background-color;
|
23
33
|
}
|
@@ -23,6 +23,7 @@ $teal: #2CAEB7;
|
|
23
23
|
$vermilion: #F30;
|
24
24
|
|
25
25
|
$badge-background-color: $highlight-yellow;
|
26
|
+
$badge-optional-background-color: $gray-medium;
|
26
27
|
$badge-font-color: $classic-white;
|
27
28
|
$content-wrapper-background-color: $cream-light;
|
28
29
|
$dashboard-background-color: $classic-white;
|
@@ -1,5 +1,9 @@
|
|
1
1
|
module Sufia
|
2
2
|
module SufiaHelperBehavior
|
3
|
+
def orcid_label(style_class='')
|
4
|
+
"#{image_tag 'orcid.png', { alt: t('sufia.user_profile.orcid.alt'), class: style_class }} #{t('sufia.user_profile.orcid.label')}".html_safe
|
5
|
+
end
|
6
|
+
|
3
7
|
def error_messages_for(object)
|
4
8
|
if object.try(:errors) and object.errors.full_messages.any?
|
5
9
|
content_tag(:div, class: 'alert alert-block alert-error validation-errors') do
|
@@ -164,6 +168,13 @@ module Sufia
|
|
164
168
|
end
|
165
169
|
end
|
166
170
|
|
171
|
+
def user_display_name_and_key(user_key)
|
172
|
+
user = ::User.find_by_user_key(user_key)
|
173
|
+
return user_key if user.nil?
|
174
|
+
|
175
|
+
user.respond_to?(:name) ? "#{user.name} (#{user_key})" : user_key
|
176
|
+
end
|
177
|
+
|
167
178
|
private
|
168
179
|
|
169
180
|
def search_action_for_dashboard
|
@@ -17,7 +17,10 @@ class FeaturedWorkList
|
|
17
17
|
return @works if @works
|
18
18
|
@works = FeaturedWork.all
|
19
19
|
add_solr_document_to_works
|
20
|
-
@works
|
20
|
+
@works = @works.reject do |work|
|
21
|
+
work.destroy if work.generic_file_solr_document.blank?
|
22
|
+
work.generic_file_solr_document.blank?
|
23
|
+
end
|
21
24
|
end
|
22
25
|
|
23
26
|
private
|
@@ -16,8 +16,8 @@
|
|
16
16
|
|
17
17
|
<%= render partial: 'generic_files/permission_form', formats: [:html], locals: { gf: @generic_file, batch: @batch } %>
|
18
18
|
|
19
|
-
<div class="
|
20
|
-
<%= button_tag '<i class="glyphicon glyphicon-floppy-disk"></i> Save'.html_safe, type: 'submit', class: 'btn btn-primary
|
19
|
+
<div class="action-button" id="permissions_submit">
|
20
|
+
<%= button_tag '<i class="glyphicon glyphicon-floppy-disk"></i> Save'.html_safe, type: 'submit', class: 'btn btn-primary',
|
21
21
|
onclick: "confirmation_needed = false;", id: "upload_submit", name: "update_permission" %>
|
22
22
|
</div>
|
23
23
|
|
@@ -1,7 +1,9 @@
|
|
1
|
-
<div class="dropdown" >
|
2
|
-
<%= check_box_tag 'check_all', 'yes', @all_checked,
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<div class="dropdown batch_document_selector_all" >
|
2
|
+
<%= check_box_tag 'check_all', 'yes', @all_checked, disabled: @disable_select_all %>
|
3
|
+
<% if !@disable_select_all %>
|
4
|
+
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-cog" title="click for selection options"></span></a>
|
5
|
+
<ul class="dropdown-menu">
|
6
|
+
<%= render partial:"#{controller_name}/batch_edits_actions" %>
|
7
|
+
</ul>
|
8
|
+
<% end %>
|
7
9
|
</div>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<% end %>
|
11
11
|
|
12
12
|
</div><!-- /well -->
|
13
|
-
<div class="
|
13
|
+
<div class="action-button">
|
14
14
|
<%= f.button '<i class="glyphicon glyphicon-floppy-disk"></i> Save Descriptions'.html_safe, type: 'submit', class: 'btn btn-primary',
|
15
15
|
onclick: "confirmation_needed = false;", id: "upload_submit", name: "update_descriptions" %>
|
16
16
|
</div>
|
@@ -1,11 +1,20 @@
|
|
1
1
|
<div class="panel panel-default">
|
2
2
|
<div class="panel-heading dashboard-panel">
|
3
3
|
<h3 class="panel-title"><%= t("sufia.dashboard.stats.heading") %></h3></div>
|
4
|
+
|
4
5
|
<table class="table table-condensed">
|
5
6
|
<tr>
|
6
7
|
<td><span class="badge"><%= number_of_files %></span></td>
|
7
|
-
|
8
|
+
|
9
|
+
<td>
|
10
|
+
<%= t("sufia.dashboard.stats.files") %>
|
11
|
+
<ul class="views-downloads-dashboard">
|
12
|
+
<li><span class="badge-optional"><%= @user.total_file_views %></span> <%= t("sufia.dashboard.stats.file_views").pluralize(@user.total_file_views) %></li>
|
13
|
+
<li><span class="badge-optional"><%= @user.total_file_downloads %></span> <%= t("sufia.dashboard.stats.file_downloads").pluralize(@user.total_file_downloads) %></li>
|
14
|
+
</ul>
|
15
|
+
</td>
|
8
16
|
</tr>
|
17
|
+
|
9
18
|
<tr>
|
10
19
|
<td><span class="badge"><%= number_of_collections %></span></td>
|
11
20
|
<td><%= t("sufia.dashboard.stats.collections") %></td>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<% end %>
|
13
13
|
|
14
14
|
</div><!-- /well -->
|
15
|
-
<div>
|
15
|
+
<div class="action-button">
|
16
16
|
<%= f.button '<i class="glyphicon glyphicon-floppy-disk"></i> Save Descriptions'.html_safe, type: 'submit', class: 'btn btn-primary', onclick: "confirmation_needed = false;", id: "upload_submit", name: "update_descriptions" %>
|
17
17
|
</div>
|
18
18
|
<% end %>
|
@@ -2,8 +2,8 @@
|
|
2
2
|
<%= form_for @generic_file, url: sufia.generic_file_path(@generic_file), html: {multipart: true, class: 'form-horizontal', id: 'permission'} do |f| %>
|
3
3
|
<%= hidden_field_tag('redirect_tab', 'permissions') %>
|
4
4
|
<%= render partial: "generic_files/permission_form", locals: { gf: @generic_file, f: f } %>
|
5
|
-
<div class="
|
6
|
-
<%= button_tag '<i class="glyphicon glyphicon-floppy-disk"></i> Save'.html_safe, type: 'submit', class: 'btn btn-primary
|
5
|
+
<div class="action-button" id="permissions_submit">
|
6
|
+
<%= button_tag '<i class="glyphicon glyphicon-floppy-disk"></i> Save'.html_safe, type: 'submit', class: 'btn btn-primary', onclick: "confirmation_needed = false;", id: "upload_submit", name: "update_permission" %>
|
7
7
|
</div>
|
8
8
|
<% end %>
|
9
9
|
</div><!-- /#permissions_display -->
|
@@ -53,12 +53,10 @@
|
|
53
53
|
<div class="form-group">
|
54
54
|
<div id="new-user">
|
55
55
|
<p class="col-sm-12">Enter <%=t('sufia.account_label') %> (one at a time)</p>
|
56
|
-
<p class="sr-only">Use the add button to give access to one <%=t('sufia.account_label') %> at a time (it will be added to the list below).</p>
|
56
|
+
<p class="sr-only">Use the add button to give access to one <%=t('sufia.account_label') %> at a time (it will be added to the list below). Select the user, by name or <%=t('sufia.account_label') %>. Then select the access level you wish to grant and click on Add this <%= t('sufia.account_label') %> to complete adding the permission.</p>
|
57
57
|
<div class="col-sm-5">
|
58
|
-
<
|
59
|
-
|
60
|
-
<%= text_field_tag 'new_user_name_skel', nil, class: "form-control" %><span class="input-group-addon"><%=t('sufia.directory.suffix') %></span>
|
61
|
-
</div>
|
58
|
+
<label for="new_user_name_skel" class="sr-only"><%= t('sufia.account_label') %> (without the <%= t('sufia.directory.suffix') %> part)</label>
|
59
|
+
<%= text_field_tag 'new_user_name_skel', nil %>
|
62
60
|
</div>
|
63
61
|
<div class="col-sm-4">
|
64
62
|
<label for="new_user_permission_skel" class="sr-only">Access type to grant</label>
|
@@ -116,7 +114,7 @@
|
|
116
114
|
<% next if permission[:name].downcase == 'registered' %>
|
117
115
|
<% next if permission[:name].downcase == depositor %>
|
118
116
|
<tr>
|
119
|
-
<td><%= label_tag "generic_file[permissions][#{permission[:type]}][#{permission[:name]}]", permission[:name], class: "control-label" %></td>
|
117
|
+
<td><%= label_tag "generic_file[permissions][#{permission[:type]}][#{permission[:name]}]", user_display_name_and_key(permission[:name]), class: "control-label" %></td>
|
120
118
|
<td>
|
121
119
|
<div class="col-sm-8">
|
122
120
|
<%= select_tag "generic_file[permissions][#{permission[:type]}][#{permission[:name]}]", options_for_select(Sufia.config.permission_levels, permission[:access]), class: 'form-control select_perm' %>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<p id="upload_field">
|
11
11
|
<%= file_field_tag "filedata" %>
|
12
12
|
</p>
|
13
|
-
<%= f.button '<i class="glyphicon glyphicon-upload"></i> Upload New Version'.html_safe, name: "update_versioning", id: "upload_submit", onclick: "confirmation_needed = false;", class: "btn btn-primary
|
13
|
+
<%= f.button '<i class="glyphicon glyphicon-upload"></i> Upload New Version'.html_safe, name: "update_versioning", id: "upload_submit", onclick: "confirmation_needed = false;", class: "btn btn-primary" %>
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
<hr />
|
@@ -27,7 +27,7 @@
|
|
27
27
|
</div>
|
28
28
|
<% end %>
|
29
29
|
<div id="save_version_note" class="alert hide">You must click "Save Revision" to revert a previous version of this file</div>
|
30
|
-
<%= f.button '<i class="glyphicon glyphicon-save"></i> Save Revision'.html_safe, type: 'submit', class: 'btn btn-primary
|
30
|
+
<%= f.button '<i class="glyphicon glyphicon-save"></i> Save Revision'.html_safe, type: 'submit', class: 'btn btn-primary', onclick: "confirmation_needed = false;", name: "revert_submit", id: "revert_submit" %>
|
31
31
|
<% end %>
|
32
32
|
</div> <!-- /well -->
|
33
33
|
</div> <!-- /row -->
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% record.contributor.each do |contributor| %>
|
2
|
-
<span itemprop="contributor" itemscope itemtype="http://schema.org/
|
2
|
+
<span itemprop="contributor" itemscope itemtype="http://schema.org/Person">
|
3
3
|
<span itemprop="name"><%= link_to_field('contributor', contributor) %></span>
|
4
4
|
</span>
|
5
5
|
<br />
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% record.creator.each do |creator| %>
|
2
|
-
<span itemprop="creator" itemscope itemtype="http://schema.org/
|
2
|
+
<span itemprop="creator" itemscope itemtype="http://schema.org/Person">
|
3
3
|
<span itemprop="name"><%= link_to_facet(creator, Solrizer.solr_name("desc_metadata__creator", :facetable)) %></span>
|
4
4
|
</span>
|
5
5
|
<br />
|
@@ -1,14 +1,31 @@
|
|
1
1
|
<dl id="user_info" class="row">
|
2
|
+
|
3
|
+
<% if user.orcid.present? %>
|
4
|
+
<dt class="col-xs-5"><%= orcid_label('orcid') %></dt>
|
5
|
+
<dd class="col-xs-7"><%= link_to user.orcid, user.orcid, { target: '_blank' } %></dd>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<% if user.facebook_handle.present? %>
|
2
9
|
<dt class="col-xs-5"><i class="fa fa-facebook"></i> Facebook Handle</dt>
|
3
10
|
<dd class="col-xs-7"><%= link_to user.facebook_handle, "http://facebook.com/#{user.facebook_handle}", {target:'_blank'} %></dd>
|
11
|
+
<% end %>
|
4
12
|
|
13
|
+
<% if user.twitter_handle.present? %>
|
5
14
|
<dt class="col-xs-5"><i class="fa fa-twitter"></i> Twitter Handle</dt>
|
6
15
|
<dd class="col-xs-7"><%= link_to user.twitter_handle, "http://twitter.com/#{user.twitter_handle}", {target:'_blank'} %></dd>
|
7
|
-
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<% if user.googleplus_handle.present? %>
|
8
19
|
<dt class="col-xs-5"><i class="fa fa-google-plus"></i> Google+ Handle</dt>
|
9
20
|
<dd class="col-xs-7"><%= link_to user.googleplus_handle, "http://google.com/+#{user.googleplus_handle}", {target:'_blank'} %></dd>
|
10
|
-
|
11
|
-
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<% if user.linkedin_handle.present? %>
|
24
|
+
<dt class="col-xs-5"><i class="fa fa-linkedin"></i> LinkedIn</dt>
|
25
|
+
<dd class="col-xs-7"><%= link_to "#{@linkedInUrl}", "#{@linkedInUrl}", { target: '_blank' } %></dd>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<dt class="col-xs-5"><i class="fa fa-envelope"></i> Email</dt>
|
12
29
|
<dd class="col-xs-7"><%= mail_to user.email %></dd>
|
13
30
|
|
14
31
|
<% if user.chat_id %>
|