sufia 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/Gemfile +2 -1
  2. data/README.md +6 -2
  3. data/app/assets/javascripts/sufia.js +1 -0
  4. data/app/assets/javascripts/sufia/trophy.js +26 -0
  5. data/app/assets/stylesheets/sufia.css.scss +1 -0
  6. data/app/assets/stylesheets/trophy.css +7 -0
  7. data/app/controllers/batch_controller.rb +1 -1
  8. data/app/controllers/batch_edits_controller.rb +3 -3
  9. data/app/controllers/single_use_link_controller.rb +9 -17
  10. data/app/controllers/users_controller.rb +33 -4
  11. data/app/helpers/generic_file_helper.rb +57 -5
  12. data/{lib/devise/models/http_header_authenticatable.rb → app/helpers/trophy_helper.rb} +11 -13
  13. data/app/models/datastreams/batch_rdf_datastream.rb +0 -1
  14. data/app/models/datastreams/generic_file_rdf_datastream.rb +0 -1
  15. data/app/models/trophy.rb +12 -0
  16. data/app/views/_user_util_links.html.erb +1 -1
  17. data/app/views/batch/edit.html.erb +2 -2
  18. data/app/views/batch_edits/{_delete_selected → _delete_selected.html.erb} +1 -1
  19. data/app/views/batch_edits/_metadata.html.erb +16 -15
  20. data/app/views/batch_edits/edit.html.erb +15 -23
  21. data/app/views/catalog/_recent_document.html.erb +2 -5
  22. data/app/views/dashboard/_index_partials/_default_group.html.erb +1 -1
  23. data/app/views/dashboard/_index_partials/_list_files.html.erb +7 -3
  24. data/app/views/dashboard/index.html.erb +7 -7
  25. data/app/views/error/404.html.erb +1 -1
  26. data/app/views/error/500.html.erb +1 -1
  27. data/app/views/generic_files/_descriptions.html.erb +3 -18
  28. data/app/views/generic_files/_field_form.html.erb +17 -0
  29. data/app/views/generic_files/_rights_modal.html.erb +1 -1
  30. data/app/views/generic_files/edit_fields/_default.html.erb +7 -0
  31. data/app/views/generic_files/edit_fields/_description.html.erb +6 -0
  32. data/app/views/generic_files/edit_fields/_rights.html.erb +8 -0
  33. data/app/views/generic_files/edit_fields/_suffix.html.erb +9 -0
  34. data/app/views/generic_files/edit_fields/_type.html.erb +9 -0
  35. data/app/views/single_use_link/show.html.erb +5 -11
  36. data/app/views/static/versions.html.erb +14 -0
  37. data/app/views/users/_trophy_edit.html.erb +21 -0
  38. data/app/views/users/edit.html.erb +3 -0
  39. data/app/views/users/index.html.erb +1 -1
  40. data/app/views/users/show.html.erb +9 -2
  41. data/config/locales/sufia.en.yml +24 -0
  42. data/config/routes.rb +8 -6
  43. data/features/support/cleanup.rb +2 -2
  44. data/lib/generators/sufia/sufia_generator.rb +1 -1
  45. data/lib/generators/sufia/templates/config/sufia.rb +0 -37
  46. data/lib/generators/sufia/templates/migrations/create_trophies.rb +10 -0
  47. data/lib/sufia/downloads_controller_behavior.rb +7 -9
  48. data/lib/sufia/files_controller_behavior.rb +4 -4
  49. data/lib/sufia/generic_file.rb +21 -27
  50. data/lib/sufia/jobs/batch_update_job.rb +1 -1
  51. data/lib/sufia/user.rb +23 -1
  52. data/lib/sufia/version.rb +1 -1
  53. data/lib/tasks/fixtures.rake +2 -3
  54. data/spec/controllers/generic_files_controller_spec.rb +7 -0
  55. data/spec/controllers/single_use_link_controller_spec.rb +0 -2
  56. data/spec/controllers/users_controller_spec.rb +28 -2
  57. data/spec/helpers/generic_file_helper_spec.rb +21 -0
  58. data/spec/models/generic_file_spec.rb +21 -5
  59. data/spec/models/trophy_spec.rb +26 -0
  60. data/spec/models/user_spec.rb +2 -2
  61. data/spec/routing/route_spec.rb +11 -11
  62. data/spec/support/Gemfile +2 -4
  63. data/sufia.gemspec +1 -0
  64. metadata +35 -15
  65. data/app/controllers/sessions_controller.rb +0 -30
  66. data/app/views/batch/_metadata.html.erb +0 -195
  67. data/app/views/generic_files/_field_form +0 -46
  68. data/lib/devise/strategies/http_header_authenticatable.rb +0 -43
  69. data/lib/generators/sufia/templates/config/devise.rb +0 -222
  70. data/lib/redirect_to_web_access_failure.rb +0 -27
  71. data/lib/sufia/http_header_auth.rb +0 -60
  72. data/spec/config/host_to_vhost_spec.rb +0 -38
  73. data/spec/controllers/sessions_controller_spec.rb +0 -44
@@ -13,12 +13,10 @@
13
13
 
14
14
  // initialize popover helpers
15
15
  $("a[rel=popover]").popover();
16
- <% @terms.each do |t| %>
17
- <% key = t.to_s.split("generic_file__").last %>
18
- <% vals = @show_file.send(key) %>
16
+ <% @terms.each do |term| %>
17
+ <% vals = @show_file.send(term) %>
19
18
  <% next if vals.blank? %>
20
- <% vals = [vals] unless vals.is_a?(Array) %>
21
- $("#<%='generic_file_'+key%>").autocomplete({"source":["<%=vals.join(",")%>"]});
19
+ $("#<%='generic_file_'+term.to_s%>").autocomplete({"source":["<%=vals.join(",")%>"]});
22
20
 
23
21
  <% end %>
24
22
 
@@ -253,18 +251,12 @@ h2 small {
253
251
  <div class="well active" id="descriptions_display">
254
252
  <table class="table table-striped"><!-- class="verticalheadings"> -->
255
253
  <tbody>
256
- <% @terms.each do |t| %>
257
- <% next if t.empty? %>
258
- <% key = t.to_s.split("generic_file__").last %>
259
- <% next unless @generic_file.respond_to?(key) %>
260
- <% label = GenericFile::get_label(key) %>
261
- <% vals = @show_file.send(key) %>
262
- <% # not an arry lets just shove it in one %>
263
- <% vals = [vals] unless vals.is_a?(Array) %>
264
- <tr id='row_<%=key%>' class="expandable">
254
+ <% @terms.each do |term| %>
255
+ <% vals = @show_file.send(term) %>
256
+ <tr id='row_<%=term.to_s%>' class="expandable">
265
257
  <th width="20%">
266
- <a class="accordion-toggle grey" data-toggle="collapse" data-parent="#row_<%=key%>" href="#collapse_<%=key%>">
267
- <%=label%>&nbsp;<i class="toggle icon-chevron-right grey"></i>
258
+ <a class="accordion-toggle grey" data-toggle="collapse" data-parent="#row_<%=term.to_s%>" href="#collapse_<%=term.to_s%>">
259
+ <%=get_label(term)%>&nbsp;<i class="toggle icon-chevron-right grey"></i>
268
260
  </a>
269
261
  </th>
270
262
  <!--td width="30%" class="scrollx" id="data_<%= key%>">
@@ -274,15 +266,15 @@ h2 small {
274
266
  </td -->
275
267
  <td width="50%" class="scrolly">
276
268
 
277
- <div id="collapse_<%=key%>" class="accordion-body collapse scrolly">
278
- <%= form_for @generic_file, :url=>batch_edits_path, :method=>:put, :remote => true, :html => { :id=>"form_"+key, :class=>"ajax-form"} do |f| %>
269
+ <div id="collapse_<%=term.to_s%>" class="accordion-body collapse scrolly">
270
+ <%= form_for @generic_file, :url=>batch_edits_path, :method=>:put, :remote => true, :html => { :id=>"form_"+term.to_s, :class=>"ajax-form"} do |f| %>
279
271
  <%= hidden_field_tag('update_type', 'update') %>
280
- <%= hidden_field_tag('key', key) %>
281
- <%= render :partial => "generic_files/field_form", :locals => { :generic_file => @show_file, :f =>f, :render_req => false, :key => key } %>
272
+ <%= hidden_field_tag('key', term.to_s) %>
273
+ <%= render :partial => "generic_files/field_form", :locals => { :generic_file => @show_file, :f =>f, :render_req => false, :key => term } %>
282
274
  <div class="row">
283
- <%= f.submit "Save changes", :class=>'btn btn-primary field-save' , :id=>key+'_save'%>
284
- <a class="accordion-toggle btn" data-toggle="collapse" data-parent="#row_<%=key%>" href="#collapse_<%=key%>">Cancel </a>
285
- <div id="status_<%=key%>" class="status fleft"></div>
275
+ <%= f.submit "Save changes", :class=>'btn btn-primary field-save' , :id=>term.to_s+'_save'%>
276
+ <a class="accordion-toggle btn" data-toggle="collapse" data-parent="#row_<%=term.to_s%>" href="#collapse_<%=term.to_s%>">Cancel </a>
277
+ <div id="status_<%=term.to_s%>" class="status fleft"></div>
286
278
  </div>
287
279
  <% end %>
288
280
  </div>
@@ -2,6 +2,7 @@
2
2
  <%- filename = render_document_show_field_value(:document=>recent_document, :field=>"label_t") -%>
3
3
  <%- title = render_document_show_field_value(:document=>recent_document, :field=>"generic_file__title_t") -%>
4
4
  <%- title = filename if title.empty? -%>
5
+ <%- short_title = truncate(title, :length => 28, :separator => ' ') -%>
5
6
  <%- depositor = get_depositor_from_document(recent_document) -%>
6
7
  <tr>
7
8
  <% if display_thumbs %>
@@ -9,11 +10,7 @@
9
10
  <% end %>
10
11
  <td>
11
12
  <h3>
12
- <% if title.length > 25 %>
13
- <%= link_to "#{title[0..24]}...", sufia.generic_file_path(recent_document.fetch(:noid_s, :id)), :title => title %>
14
- <% else %>
15
- <%= link_to title, sufia.generic_file_path(recent_document.fetch(:noid_s, :id)), :title => title %>
16
- <% end %>
13
+ <%= link_to short_title, sufia.generic_file_path(recent_document.fetch(:noid_s, :id)), :title => title %>
17
14
 
18
15
  <% if display_access %>
19
16
  <% if !recent_document[:read_access_group_t].blank? and recent_document[:read_access_group_t].include?('registered') %>
@@ -15,7 +15,7 @@ limitations under the License.
15
15
  %>
16
16
 
17
17
  <table class="table table-striped">
18
- <caption class="accessible-hidden">Listing of files you have deposited in ScholarSphere</caption>
18
+ <caption class="accessible-hidden">Listing of files you have deposited in <%= t('sufia.product_name') %></caption>
19
19
  <% unless params[:display_type] == 'list' %>
20
20
  <thead>
21
21
  <tr>
@@ -25,10 +25,12 @@ on element ids -->
25
25
  <td width="1%">
26
26
  <% if gf.processing? %>
27
27
  <i class="icon-magic icon-large <%= 'ss-'+gf.batch.noid%>"/>
28
+ <% elsif gf.depositor != @user.user_key %>
29
+ <i class="icon-gift icon-large"/>
28
30
  <% end %>
29
31
  </td>
30
32
  <td width="37%">
31
- <a href="" title="Click for more details"><i id="expand_<%= noid.gsub(":", "_") %>" class="icon-plus icon-large fleft"></i></a>
33
+ <a href="" title="Click for more details"><i id="expand_<%= noid.gsub(":", "_") %>" class="icon-plus icon-large fleft"></i></a>&nbsp;
32
34
  <%= render :partial => 'dashboard/_index_partials/thumbnail_display', :locals => {:document=>document} %>
33
35
  <span class=center><%= link_to render_document_show_field_value(:document=>document, :field=>document.title_or_label), sufia.generic_file_path(noid), :id => "src_copy_link#{noid}" %> <br /></span>
34
36
  </td>
@@ -48,7 +50,9 @@ on element ids -->
48
50
  </span>&nbsp;&nbsp;&nbsp;
49
51
  <%= link_to raw('<i class="icon-pencil icon-large"></i>'), sufia.edit_generic_file_path(noid), :class=> 'itemicon itemedit', :title => 'Edit File' %>&nbsp;&nbsp;&nbsp;
50
52
  <%= link_to raw('<i class="icon-download-alt icon-large"></i>'), sufia.download_path(noid), :class=> 'itemicon itemdownload', :title => 'Download File', :target => '_new' %>&nbsp;&nbsp;&nbsp;
51
- <%= link_to raw('<i class="icon-trash icon-large"></i>'), sufia.generic_file_path(noid), :class=> 'itemicon itemtrash', :title => 'Delete File', :method => :delete, :data => { :confirm => 'Deleting a file from ScholarSphere is permanent. Click OK to delete this file from ScholarSphere, or Cancel to cancel this operation'} %>&nbsp;&nbsp;&nbsp;
53
+ <%= link_to raw('<i class="icon-trash icon-large"></i>'), sufia.generic_file_path(noid), :class=> 'itemicon itemtrash', :title => 'Delete File', :method => :delete, :data => { :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"} %>&nbsp;&nbsp;&nbsp;
54
+
55
+ <%= display_trophy_link(@user, noid) %>&nbsp;&nbsp;&nbsp;
52
56
  </td>
53
57
  </tr>
54
58
  <tr class="hide" id="detail_<%= noid.gsub(":", "_") %>"> <!-- document detail"> -->
@@ -64,7 +68,7 @@ on element ids -->
64
68
  </tr>
65
69
  <tr>
66
70
  <td colspan="2"><strong>Edit Access: </strong>
67
- <% if !document[:edit_access_group_t].nil? %>
71
+ <% if !document[:edit_access_group_t].nil?%>
68
72
  Groups: <%= render_document_show_field_value(:document=>document, :field=>"edit_access_group_t") %>
69
73
  <br />
70
74
  <% end %>
@@ -83,17 +83,18 @@ limitations under the License.
83
83
  return false;
84
84
  });
85
85
  }
86
+
87
+ // hide or show the batch update buttons file selections
88
+ $(".batch_toggle").bind('click', function(e) {
89
+ e.preventDefault();
90
+ toggleButtons();
91
+ });
86
92
  });
87
93
 
88
94
 
89
95
  // hide or show the batch update buttons on page startup
90
96
  toggleButtons(<%= !@empty_batch %>);
91
97
 
92
- // hide or show the batch update buttons file selections
93
- $(".batch_toggle").bind('click', function(e) {
94
- e.preventDefault();
95
- toggleButtons();
96
- });
97
98
 
98
99
  $('#documents').batchEdit();
99
100
 
@@ -157,6 +158,7 @@ z-index:1;
157
158
 
158
159
  <% @page_title = application_name + " Dashboard" %>
159
160
 
161
+ <div class="accessible-hidden" id="current_user"><%=@user.user_key%></div>
160
162
  <div class="row">
161
163
  <%= render :partial => 'search_form' %>
162
164
  <h2 class="heading1">My Dashboard</h2>
@@ -183,5 +185,3 @@ z-index:1;
183
185
 
184
186
  <%= render 'results_pagination' %>
185
187
  <%= render :partial => 'users/activity_log', :locals => {:events => @events} %>
186
-
187
- <span id="single_clippy" class="clippy hidden" data-text="This is a test"></span> <i class="icon-link over" onlick="alert('abc');"></i>
@@ -24,7 +24,7 @@ limitations under the License.
24
24
  <div class="column second">
25
25
  <h1>Not found</h1>
26
26
  <p>
27
- ScholarSphere could not locate the requested resource. We
27
+ <%= t('sufia.product_name') %> could not locate the requested resource. We
28
28
  apologize for the inconvenience. You might be interested in using
29
29
  <a href="/contact/">the contact form</a> to report the
30
30
  error, or <a href="/help/">the help page</a> for looking up
@@ -16,7 +16,7 @@ limitations under the License.
16
16
 
17
17
  <h1>System Error</h1>
18
18
  <p>
19
- ScholarSphere tried to process your request but encountered
19
+ <%= t('sufia.product_name') %> tried to process your request but encountered
20
20
  an error. We apologize for the inconvenience and will resolve
21
21
  the error soon. You might be interested in using
22
22
  <a href="/contact/">the contact form</a> to report this
@@ -20,24 +20,9 @@ limitations under the License.
20
20
  <h2 class="non lower">Descriptions <small class="pull-right"><span class="error">*</span> indicates required fields</small> </h2>
21
21
  <div class="well">
22
22
 
23
- <div class="control-group">
24
- <%= f.label :resource_type, "Resource Types", :class=>"control-label", :for=>"resource_type" %>
25
- <div class="controls">
26
- <p class="help-block">You may select multiple types to apply<p>
27
- <%= f.select "resource_type", options_for_select(Sufia::Engine.config.resource_types.keys, @generic_file.resource_type.to_a), {}, {:multiple=>true, :size=>7} %>
28
- <a href="#" id="generic_file_resource_type_help" rel="popover" data-content="<%= Sufia::Engine.config.metadata_help['generic_file_resource_type'] %>" data-original-title="Resource Type"><i class="icon-question-sign icon-large"></i></a>
29
- </div>
30
- </div><!-- /control-group -->
31
-
32
- <% @terms.each do |t| %>
33
- <% next if t.empty? %>
34
- <% key = t.to_s.split("generic_file__").last %>
35
- <%# consider these fields to be uneditable via the web form %>
36
- <% next if ['part_of', 'date_modified', 'date_uploaded', 'format', 'resource_type'].include?(key) %>
37
- <% logger.info "!!!! Generic file has no method #{key}" unless @generic_file.respond_to?(key) %>
38
- <% if @generic_file.respond_to?(key) %>
39
- <%= render :partial => "generic_files/field_form", :locals => { :generic_file => @generic_file, :f =>f, :render_req => true, :key => key } %>
40
- <% end %>
23
+ <%= render :partial=>'generic_files/edit_fields/type', :locals => {f:f} %>
24
+ <% @terms.each do |term| %>
25
+ <%= render :partial => "generic_files/field_form", :locals => { :generic_file => @generic_file, :f =>f, :render_req => true, :key => term } %>
41
26
  <% end %>
42
27
 
43
28
  </div><!-- /well -->
@@ -0,0 +1,17 @@
1
+ <% render_req ||= true # render_req is true for single file edit, false for batch edit%>
2
+ <div class="control-group">
3
+ <% vals = generic_file.send(key) %>
4
+ <%# if vals is empty we create an one element array to loop over for output %>
5
+ <% vals = [''] if vals.count == 0 %>
6
+
7
+ <% if render_req && required?(key) %>
8
+ <% tmp = '<span class="error">*</span>' + get_label(key) %>
9
+ <%= f.label key, tmp.html_safe, :class=>"control-label" %>
10
+ <% else %>
11
+ <%= f.label key, get_label(key), :class=>"control-label"%>
12
+ <% end %>
13
+
14
+ <% vals.each_with_index do |v, index| %>
15
+ <%= render_edit_field_partial(key, f:f, v: v, index: index, render_req: render_req) %>
16
+ <% end %>
17
+ </div><!-- /control-group -->
@@ -21,7 +21,7 @@ limitations under the License.
21
21
  <div class="modal hide fade" id="rightsModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
22
22
  <div class="modal-header">
23
23
  <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
24
- <h2 id="rightsModallLabel">ScholarSphere License Descriptions</h2>
24
+ <h2 id="rightsModallLabel"><%= t('sufia.product_name') %> License Descriptions</h2>
25
25
  </div>
26
26
  <div class="modal-body" aria-hidden="true">
27
27
  <p>Creative Commons licenses can take the following combinations, which is what a depositor sees on the page where metadata (descriptions) are entered. Via the drop-down menu, the depositor may select any of the following licenses (these are all described at "About the Licenses" on the Creative Commons site):
@@ -0,0 +1,7 @@
1
+ <div class="controls" <% if index == 0 %> id="additional_<%= key.to_s %>_clone" <% end %>>
2
+ <% required = render_req && (index == 0) && required?(key) %>
3
+ <%= f.text_field :title, :name=>"generic_file[#{key.to_s}][]", :id => "generic_file_"+key.to_s, :value=>v, :class => "input-large", :required => required %>
4
+ <%= render :partial=>"generic_files/edit_fields/suffix", :locals=>{key: key, index: index} %>
5
+ </div><!-- /controls -->
6
+ <div id="additional_<%= key %>_elements"></div>
7
+
@@ -0,0 +1,6 @@
1
+ <div class="controls" <% if index == 0%> id="additional_<%= key.to_s %>_clone" <% end %>>
2
+ <%= f.text_area :description, :name=>"generic_file[#{key.to_s}][]", :id => "generic_file_"+key.to_s, :value=>v, :class => "input-large" %>
3
+ <%= render :partial=>"generic_files/edit_fields/suffix", :locals=>{key: key, index: index} %>
4
+ </div><!-- /controls -->
5
+ <div id="additional_<%= key %>_elements"></div>
6
+
@@ -0,0 +1,8 @@
1
+ <div class="controls" <% if index == 0%> id="additional_<%= key.to_s %>_clone" <% end %>>
2
+ <% choices = Sufia::Engine.config.cc_licenses %>
3
+ <% choices = {""=>""}.merge(choices) %>
4
+ <%= f.select "rights", options_for_select(choices, v) %>
5
+ <%= render :partial=>"generic_files/edit_fields/suffix", :locals=>{key: key, index: index} %>
6
+ </div><!-- /controls -->
7
+ <div id="additional_<%= key %>_elements"></div>
8
+
@@ -0,0 +1,9 @@
1
+ <% if index == 0 %>
2
+ <%= add_field(key) %>
3
+ &nbsp;
4
+ <%= help_icon(key) %>
5
+ <%= render :partial => "generic_files/rights_modal" if key == "rights" %>
6
+ <% else %>
7
+ <%= subtract_field(key) %>
8
+ <% end %>
9
+
@@ -0,0 +1,9 @@
1
+ <div class="control-group">
2
+ <%= f.label :resource_type, "Resource Types", :class=>"control-label", :for=>"resource_type" %>
3
+ <div class="controls">
4
+ <p class="help-block">You may select multiple types to apply<p>
5
+ <%= f.select "resource_type", options_for_select(Sufia::Engine.config.resource_types.keys, @generic_file.resource_type.to_a), {}, {:multiple=>true, :size=>7} %>
6
+ <%= help_icon(:resource_type) %>
7
+ </div>
8
+ </div><!-- /control-group -->
9
+
@@ -9,17 +9,11 @@
9
9
  <div class="well active" id="descriptions_display">
10
10
  <table class="table table-striped"><!-- class="verticalheadings"> -->
11
11
  <tbody>
12
- <% @terms.each do |t| %>
13
- <% next if t.empty? %>
14
- <% key = t.to_s.split("generic_file__").last %>
15
- <% next unless @generic_file.respond_to?(key) %>
16
- <% label = GenericFile::get_label(key) %>
17
- <% vals = @generic_file.send(key) %>
18
- <% # not an arry lets just shove it in one %>
19
- <% vals = [vals] unless vals.is_a?(Array) %>
20
- <tr id='row_<%=key%>' class="expandable">
12
+ <% @terms.each do |term| %>
13
+ <% vals = @generic_file.send(term) %>
14
+ <tr id='row_<%=term.to_s%>' class="expandable">
21
15
  <th width="20%">
22
- <%=label%>
16
+ <%=get_label(term)%>
23
17
  </th>
24
18
  <td>
25
19
  <% vals.each do |val| %>
@@ -30,4 +24,4 @@
30
24
  <% end %>
31
25
  </tbody></table> <!-- class="verticalheadings"> -->
32
26
  </div><!-- /well -->
33
- </div>
27
+ </div>
@@ -16,6 +16,20 @@ limitations under the License.
16
16
 
17
17
  <h1>Versions</h1>
18
18
  <h3>Version <%= Sufia::Engine::config.scholarsphere_version %> (<%= Sufia::Engine::config.scholarsphere_release_date %>)</h3>
19
+ <p>
20
+ <ul>
21
+ <li>ScholarSphere version is in the footer (linked to new features).</li>
22
+ <li>Users have the ability to make their social accounts visible from their profile page in ScholarSphere.</li>
23
+ <li>Users have access to the list of users in the ScholarSphere system by clicking the View Users from their profile page.</li>
24
+ <li>Users can highlight up to five files from their dashboard, and have them display on their profile page.</li>
25
+ <li>Users can view highlighted files and remove the highlight file designations on their profile page.</li>
26
+ <li>Single Use Links are available from the dashboard.</li>
27
+ <li>Titles of Recently Added files on the Home page are truncated at word boundaries when needed and when possible.</li>
28
+ <li>Following and Follower Users are displayed with an icon and a textual user name.</li>
29
+ </ul>
30
+ </p>
31
+
32
+ <h3>Version v1.2.0 (Nov 7, 2012)</h3>
19
33
  <p>
20
34
  <ul>
21
35
  <li>Added batch edit and delete</li>
@@ -0,0 +1,21 @@
1
+ <div class="control-label">
2
+ <i class="icon-trophy trophy-on" ></i> Remove Highlight Designation
3
+ <a href="#" id="remove_trophy_help" rel="popover" data-content="If you would like to remove a highlight designation, check the box and save your profile." data-original-title="Remove Highlight Designation"><i class="icon-question-sign icon-large"></i></a>
4
+ </div>
5
+ <div class="control-group">
6
+ <dl>
7
+ <% trophies.each do |t| %>
8
+ <dd>
9
+ <div class="controls">
10
+ <%= link_to display_title(t), sufia.generic_file_path(t) %>
11
+ <label class="checkbox fleft">
12
+ <%= check_box_tag "remove_trophy_#{t.id}" %> Yes &nbsp;
13
+ </label>
14
+ </div>
15
+ </dd>
16
+ <br/>
17
+ <% end %>
18
+ </dl>
19
+ </div>
20
+
21
+
@@ -74,6 +74,9 @@ $("a[rel=popover]").popover();
74
74
  </div>
75
75
  </div>
76
76
 
77
+ <%= render :partial => 'trophy_edit', :locals => {:trophies => @trophies} %>
78
+
79
+
77
80
  <div class="form-actions">
78
81
  <%= f.button '<i class="icon-save"></i> Save Profile'.html_safe, :type => 'submit', :class => "btn-primary btn-large" %>
79
82
  </div>
@@ -16,7 +16,7 @@ limitations under the License.
16
16
 
17
17
  <div id="search" class="row">
18
18
  <%= render :partial => 'search_form' %>
19
- <h1>ScholarSphere Users</h1>
19
+ <h1><%= t('sufia.product_name') %> Users</h1>
20
20
  </div>
21
21
  <div id="Data">
22
22
  <table class="table table-striped">
@@ -30,6 +30,7 @@ limitations under the License.
30
30
  <% else %>
31
31
  <a class="btn btn-primary" href="<%= sufia.follow_user_path(@user.to_s) %>"><i class="icon-eye-open"></i> Follow</a>
32
32
  <% end %>
33
+ <a class="btn btn-primary" href="<%= sufia.profiles_path %>"><i class="icon-globe"></i> View Users</a>
33
34
  </span>
34
35
  </h1>
35
36
  <dl>
@@ -37,6 +38,10 @@ limitations under the License.
37
38
  <dd><%= @user.created_at.to_date.to_formatted_s(:long_ordinal) %></dd>
38
39
  <dt><i class="icon-folder-open"></i> Deposited Files</dt>
39
40
  <dd><%= link_to_field('depositor', @user.to_s, GenericFile.find(:depositor_t => @user.to_s).count) %></dd>
41
+ <dt><i class="icon-trophy trophy-on" ></i> Highlighted Files</dt>
42
+ <% @trophies.each do |t| %>
43
+ <dd> <%= link_to display_title(t), sufia.generic_file_path(t) %></dd>
44
+ <% end %>
40
45
  </dl>
41
46
 
42
47
  <hr />
@@ -48,7 +53,8 @@ limitations under the License.
48
53
  <ul class="thumbnails">
49
54
  <% @followers.each do |f| %>
50
55
  <li class="span8">
51
- <%= link_to(image_tag(f.avatar.url(:thumb)), sufia.profile_path(f.login), { :title => f.name } ) %>
56
+ <%= link_to(image_tag(f.avatar.url(:thumb)), sufia.profile_path(f.user_key), { :title => f.name } ) %>
57
+ <%= link_to(f.name, sufia.profile_path(f.user_key), { :title => f.name } ) %>
52
58
  <li>
53
59
  <% end %>
54
60
  </ul>
@@ -59,7 +65,8 @@ limitations under the License.
59
65
  <ul class="thumbnails">
60
66
  <% @following.each do |f| %>
61
67
  <li class="span8">
62
- <%= link_to(image_tag(f.avatar.url(:thumb)), sufia.profile_path(f.login), { :title => f.name } ) %>
68
+ <%= link_to(image_tag(f.avatar.url(:thumb)), sufia.profile_path(f.user_key), { :title => f.name } ) %>
69
+ <%= link_to(f.name, sufia.profile_path(f.user_key), { :title => f.name } ) %>
63
70
  <li>
64
71
  <% end %>
65
72
  </ul>
@@ -12,4 +12,28 @@ en:
12
12
  q:
13
13
  label: "Search Scholarsphere"
14
14
  placeholder: "Type keywords in here"
15
+
16
+ field_label:
17
+ based_near: "Location"
18
+ description: "Abstract or Summary"
19
+ tag: "Keyword"
20
+ date_created: "Date Created"
21
+ related_url: "Related URL"
22
+
23
+ metadata_help:
24
+ resource_type: "Pre-defined categories to describe the type of file content being uploaded, such as \"article\" or \"dataset.\" More than one type may be selected."
25
+ title: "A name for the file to aid in identifying it. Defaults to the file name, though a more descriptive title is encouraged. <em>This is a required field</em>."
26
+ tag: "Words or phrases you select to describe what the file is about. These are used to search for content. <em>This is a required field</em>."
27
+ subject: "Headings or index terms describing what the file is about; these <em>do</em> need to conform to an existing vocabulary. Currently ScholarSphere supports Library of Congress Subject Headings."
28
+ creator: "The person or group responsible for the file being uploaded. Usually this is the author of the content. Personal names should be entered with the last name first, e.g. \"Smith, John.\" <em>This is a required field</em>."
29
+ related_url: "A link to a website or other specific content (audio, video, PDF document) related to the file. An example is the URL of a research project from which the file was derived."
30
+ based_near: "A place name related to the file, such as its site of publication, or the city, state, or country the file's contents are about. Calls upon the GeoNames web service (<a href=\"http://www.geonames.org\">http://www.geonames.org</a>)."
31
+ contributor: "A person or group you want to recognize for playing a role in the creation of the file, but not the primary role. If there is a specific role you would like noted, include it in parentheses, e.g. \"Jones, Mary (advisor).\""
32
+ date_created: "The date on which the file was generated. Dates are accepted in the form YYYY-MM-DD, e.g. 1776-07-04."
33
+ description: "Free-text notes about the file itself. Examples include abstracts of a paper, citation information for a journal article, or a tag indicating a larger collection to which the file belongs."
34
+ identifier: "A unique handle describing the file. An example would be a DOI for a journal article, or an ISBN or OCLC number for a book."
35
+ language: " The language of the file content."
36
+ publisher: "The person or group making the file available. Generally this is Penn State or the Penn State University Libraries."
37
+ rights: "Licensing and distribution information governing access to the file. Select from the provided drop-down list. <em>This is a required field</em>."
38
+
15
39