sufia 4.0.0.beta4 → 4.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -1
  3. data/Gemfile +1 -1
  4. data/History.md +325 -0
  5. data/RELEASING.md +1 -0
  6. data/SUFIA_VERSION +1 -1
  7. data/app/assets/javascripts/sufia.js +2 -2
  8. data/app/assets/javascripts/sufia/batch_edit.js +2 -2
  9. data/app/assets/javascripts/sufia/batch_select_all.js +7 -7
  10. data/app/assets/stylesheets/{dashboard.css.scss → file-listing.css.scss} +7 -1
  11. data/app/assets/stylesheets/styles.css.scss +23 -0
  12. data/app/assets/stylesheets/sufia.css.scss +5 -1
  13. data/app/controllers/concerns/sufia/catalog.rb +4 -4
  14. data/app/controllers/concerns/sufia/controller.rb +0 -4
  15. data/app/controllers/concerns/sufia/my_controller_behavior.rb +1 -5
  16. data/app/controllers/my/collections_controller.rb +7 -0
  17. data/app/controllers/my/files_controller.rb +7 -0
  18. data/app/controllers/my/highlights_controller.rb +7 -0
  19. data/app/controllers/my/shares_controller.rb +7 -0
  20. data/app/helpers/sufia/records_helper_behavior.rb +1 -1
  21. data/app/helpers/sufia/sufia_helper_behavior.rb +2 -2
  22. data/app/models/concerns/sufia/solr_document_behavior.rb +10 -0
  23. data/app/views/_user_util_links.html.erb +1 -1
  24. data/app/views/advanced/index.html.erb +10 -13
  25. data/app/views/batch/_edit.js.erb +15 -0
  26. data/app/views/batch/_metadata.html.erb +1 -1
  27. data/app/views/batch/edit.html.erb +10 -25
  28. data/app/views/batch_edits/_batch_edits_actions.html.erb +1 -1
  29. data/app/views/batch_edits/_check_all.html.erb +1 -1
  30. data/app/views/batch_edits/edit.html.erb +3 -3
  31. data/app/views/catalog/_document_list.html.erb +6 -1
  32. data/app/views/catalog/index.html.erb +34 -21
  33. data/app/views/collections/_action_menu.html.erb +5 -5
  34. data/app/views/collections/_batch_edits_actions.html.erb +1 -1
  35. data/app/views/collections/_collection.html.erb +36 -0
  36. data/app/views/collections/_document_list.html.erb +2 -2
  37. data/app/views/collections/_edit_descriptions.html.erb +1 -1
  38. data/app/views/collections/_form.html.erb +11 -8
  39. data/app/views/collections/_search_collection_dashboard_form.html.erb +1 -1
  40. data/app/views/collections/_sort_and_per_page.html.erb +1 -1
  41. data/app/views/dashboard/index.html.erb +1 -1
  42. data/app/views/generic_files/_descriptions.html.erb +1 -1
  43. data/app/views/generic_files/_edit.js.erb +22 -0
  44. data/app/views/generic_files/_extra_fields_modal.html.erb +18 -14
  45. data/app/views/generic_files/_generic_file.html.erb +36 -0
  46. data/app/views/generic_files/_media_display.html.erb +4 -0
  47. data/app/views/generic_files/_permission.html.erb +1 -1
  48. data/app/views/generic_files/_permission_form.html.erb +40 -36
  49. data/app/views/generic_files/_rights_modal.html.erb +37 -33
  50. data/app/views/generic_files/edit.html.erb +13 -30
  51. data/app/views/generic_files/new.html.erb +3 -3
  52. data/app/views/generic_files/show.html.erb +3 -7
  53. data/app/views/generic_files/stats.html.erb +1 -1
  54. data/app/views/generic_files/upload/_form_fields.html.erb +4 -4
  55. data/app/views/generic_files/upload/_local_file_import_chooser.html.erb +2 -2
  56. data/app/views/generic_files/upload/_script_templates.html.erb +2 -2
  57. data/app/views/homepage/_home_content.html.erb +2 -2
  58. data/app/views/homepage/_home_header.html.erb +1 -1
  59. data/app/views/homepage/_sortable_featured.html.erb +1 -1
  60. data/app/views/layouts/_head_tag_content.html.erb +1 -10
  61. data/app/views/layouts/error.html.erb +0 -9
  62. data/app/views/layouts/homepage.html.erb +1 -1
  63. data/app/views/layouts/sufia-dashboard.html.erb +6 -6
  64. data/app/views/layouts/sufia-one-column.html.erb +2 -2
  65. data/app/views/layouts/sufia-two-column.html.erb +2 -2
  66. data/app/views/mailbox/_notifications.html.erb +1 -1
  67. data/app/views/mailbox/index.html.erb +1 -1
  68. data/app/views/my/_batch_edits_actions.html.erb +1 -1
  69. data/app/views/my/_collection_action_menu.html.erb +4 -4
  70. data/app/views/my/_did_you_mean.html.erb +2 -7
  71. data/app/views/my/_document_list.html.erb +1 -1
  72. data/app/views/my/_facet_layout.html.erb +10 -9
  73. data/app/views/my/_facet_limit.html.erb +9 -9
  74. data/app/views/my/_facet_pagination.html.erb +14 -17
  75. data/app/views/my/_facet_selected.html.erb +1 -1
  76. data/app/views/my/_facets.html.erb +20 -7
  77. data/app/views/my/_index_partials/_default_group.html.erb +4 -4
  78. data/app/views/my/_index_partials/_list_collections.html.erb +1 -1
  79. data/app/views/my/_index_partials/_list_files.html.erb +2 -2
  80. data/app/views/my/_results_pagination.html.erb +7 -4
  81. data/app/views/my/_sort_and_per_page.html.erb +5 -8
  82. data/app/views/my/facet.html.erb +2 -5
  83. data/app/views/my/index.html.erb +1 -1
  84. data/app/views/single_use_links/new_download.html.erb +1 -1
  85. data/app/views/users/_contributions.html.erb +3 -3
  86. data/app/views/users/_profile_tabs.html.erb +3 -3
  87. data/app/views/users/_social_media_info.html.erb +3 -3
  88. data/app/views/users/_trophy_edit.html.erb +2 -2
  89. data/app/views/users/_user_info.html.erb +4 -4
  90. data/app/views/users/edit.html.erb +5 -10
  91. data/app/views/users/show.html.erb +16 -21
  92. data/config/locales/sufia.en.yml +7 -6
  93. data/config/routes.rb +25 -32
  94. data/lib/generators/sufia/sufia_generator.rb +1 -1
  95. data/lib/generators/sufia/upgrade400_generator.rb +87 -0
  96. data/lib/sufia/version.rb +1 -1
  97. data/spec/controllers/catalog_controller_spec.rb +22 -0
  98. data/spec/features/browse_dashboard_files_spec.rb +22 -11
  99. data/spec/features/catalog_search_spec.rb +99 -0
  100. data/spec/features/collection_spec.rb +1 -1
  101. data/spec/helpers/records_helper_spec.rb +1 -1
  102. data/spec/helpers/sufia_helper_spec.rb +4 -3
  103. data/spec/models/generic_file_spec.rb +7 -3
  104. data/spec/models/solr_document_spec.rb +27 -9
  105. data/spec/services/noid_spec.rb +16 -0
  106. data/spec/spec_helper.rb +1 -1
  107. data/spec/views/batch/edit.html.erb_spec.rb +34 -0
  108. data/spec/views/my/facet.html.erb_spec.rb +34 -0
  109. data/sufia-models/app/models/concerns/sufia/generic_file/mime_types.rb +1 -1
  110. data/sufia-models/app/services/sufia/noid.rb +2 -5
  111. data/sufia-models/lib/generators/sufia/models/upgrade400_generator.rb +78 -0
  112. data/sufia-models/lib/sufia/models/engine.rb +1 -1
  113. data/sufia-models/lib/sufia/models/version.rb +1 -1
  114. data/sufia-models/sufia-models.gemspec +3 -3
  115. data/sufia.gemspec +1 -1
  116. data/tasks/sufia-dev.rake +1 -1
  117. metadata +24 -54
  118. data/.gitmodules +0 -4
  119. data/Releasing_sufia.md +0 -6
  120. data/UpgradeGuide.md +0 -3
  121. data/app/views/catalog/_bookmark_control.html.erb +0 -24
  122. data/app/views/catalog/_citation.html.erb +0 -11
  123. data/app/views/catalog/_constraints.html.erb +0 -6
  124. data/app/views/catalog/_constraints_element.html.erb +0 -20
  125. data/app/views/catalog/_did_you_mean.html.erb +0 -10
  126. data/app/views/catalog/_document.html.erb +0 -19
  127. data/app/views/catalog/_email_form.html.erb +0 -11
  128. data/app/views/catalog/_facet_layout.html.erb +0 -12
  129. data/app/views/catalog/_facet_selected.html.erb +0 -12
  130. data/app/views/catalog/_facets.html.erb +0 -7
  131. data/app/views/catalog/_folder_control.html.erb +0 -11
  132. data/app/views/catalog/_index_default.html.erb +0 -11
  133. data/app/views/catalog/_index_header_default.html.erb +0 -20
  134. data/app/views/catalog/_index_partials/_default_group.html.erb +0 -7
  135. data/app/views/catalog/_index_partials/_list_files.html.erb +0 -37
  136. data/app/views/catalog/_marc_view.html.erb +0 -33
  137. data/app/views/catalog/_opensearch_response_metadata.html.erb +0 -2
  138. data/app/views/catalog/_previous_next_doc.html.erb +0 -6
  139. data/app/views/catalog/_refworks_form.html.erb +0 -7
  140. data/app/views/catalog/_results_pagination.html.erb +0 -6
  141. data/app/views/catalog/_show_default.html.erb +0 -9
  142. data/app/views/catalog/_show_sidebar.html.erb +0 -1
  143. data/app/views/catalog/_show_tools.html.erb +0 -46
  144. data/app/views/catalog/_sms_form.html.erb +0 -21
  145. data/app/views/catalog/_sort_and_per_page.html.erb +0 -9
  146. data/app/views/catalog/about.html.erb +0 -0
  147. data/app/views/catalog/citation.html.erb +0 -1
  148. data/app/views/catalog/email.erb +0 -1
  149. data/app/views/catalog/endnote.endnote.erb +0 -1
  150. data/app/views/catalog/index.atom.builder +0 -109
  151. data/app/views/catalog/index.rss.builder +0 -19
  152. data/app/views/catalog/librarian_view.html.erb +0 -3
  153. data/app/views/catalog/opensearch.json.erb +0 -0
  154. data/app/views/catalog/opensearch.xml.builder +0 -10
  155. data/app/views/catalog/send_email_record.erb +0 -0
  156. data/app/views/catalog/show.endnote.erb +0 -1
  157. data/app/views/catalog/show.html.erb +0 -40
  158. data/app/views/catalog/show.refworks.erb +0 -1
  159. data/app/views/catalog/sms.erb +0 -1
  160. data/app/views/collections/_button_for_creating_empty_collection.html.erb +0 -3
  161. data/spec/views/my/facet_limit.html.erb_spec.rb +0 -15
@@ -0,0 +1,36 @@
1
+ <li>
2
+ <h2>
3
+ <%= link_to collection.title_or_label, [collections, collection] %>
4
+ </h2>
5
+ <table class="table">
6
+ <tr>
7
+ <td rowspan="6" class="span20">
8
+ <%= link_to [collections, collection] do %>
9
+ <%= image_tag "folder.png", { width: 150 } %>
10
+ <% end %>
11
+ </td>
12
+ <th><h4>Title:</h4></th>
13
+ <td><%= collection.title %></td>
14
+ </tr>
15
+ <tr>
16
+ <th><h4>Depositor:<h4></div>
17
+ <td><%= link_to_profile collection.depositor("no depositor value") %></td>
18
+ </tr>
19
+ <tr>
20
+ <th><h4>Creator:</h4></th>
21
+ <td><%= collection.creator %></td>
22
+ </tr>
23
+ <tr>
24
+ <th><h4>Description:</h4></th>
25
+ <td><%= iconify_auto_link(collection.description) %></th>
26
+ </tr>
27
+ <tr>
28
+ <th><h4>Keywords:</h4></th>
29
+ <td><%= collection.tags.join(', ') %></td>
30
+ </tr>
31
+ <tr>
32
+ <th><h4>Date Uploaded:</h4></th>
33
+ <td><%= collection.date_uploaded %></td>
34
+ </tr>
35
+ </table>
36
+ </li>
@@ -6,5 +6,5 @@
6
6
  <% if params[:action] == "edit" %>
7
7
  <%= render partial:'my/_index_partials/default_group', locals:{documents: documents, docs:documents} %>
8
8
  <% else %>
9
- <%= render partial:'catalog/_index_partials/default_group', locals:{documents: documents, docs:documents} %>
10
- <% end %>
9
+ <%= render 'catalog/document_list', documents: documents %>
10
+ <% end %>
@@ -12,7 +12,7 @@
12
12
  </div><!-- /well -->
13
13
  <div class="row">
14
14
  <div class="form-actions">
15
- <%= f.button '<i class="icon-save"></i> Save Descriptions'.html_safe, type: 'submit', class: 'btn-primary',
15
+ <%= f.button '<i class="glyphicon glyphicon-floppy-disk"></i> Save Descriptions'.html_safe, type: 'submit', class: 'btn-primary',
16
16
  onclick: "confirmation_needed = false;", id: "upload_submit", name: "update_descriptions" %>
17
17
  </div>
18
18
  </div>
@@ -13,12 +13,15 @@
13
13
  <input type="hidden" name="batch_document_ids[]" value="<%= batch_item %>"/>
14
14
  <% end %>
15
15
  <% end %>
16
- <%= f.actions do %>
17
- <% if params[:action] == "new" %>
18
- <%= f.submit 'Create Collection' %>
19
- <% else %>
20
- <%= f.submit 'Update Collection' %>
21
- <% end %>
22
- <%= f.cancel %>
23
- <% end %>
16
+
17
+ <div class="form-actions">
18
+ <div class="primary-actions">
19
+ <% if params[:action] == "new" %>
20
+ <%= f.primary 'Create Collection' %>
21
+ <% else %>
22
+ <%= f.primary 'Update Collection' %>
23
+ <% end %>
24
+ <%= link_to t(:'helpers.action.cancel'), main_app.root_path, class: 'btn btn-link' %>
25
+ </div>
26
+ </div>
24
27
  <% end %>
@@ -5,6 +5,6 @@
5
5
  <%= text_field_tag :cq, params[:cq], class: "collection-query", placeholder: "Search Collection", size: '30', type: "search", id: "collection_search" %>
6
6
  <%= hidden_field_tag :sort, params[:sort], id: 'collection_sort' %>
7
7
  <%= render_hash_as_hidden_fields(params_for_search.except(:cq, :sort, :qt, :page)) %>
8
- <button type="submit" class="btn btn-primary" id="collection_submit"><i class="icon-search"></i> Go</button>
8
+ <button type="submit" class="btn btn-primary" id="collection_submit"><i class="glyphicon glyphicon-search"></i> Go</button>
9
9
  <% end %>
10
10
  </div>
@@ -21,7 +21,7 @@
21
21
  <% end %>
22
22
  <%= render_hash_as_hidden_fields(params_for_search.except(:per_page, :sort)) %>
23
23
  &nbsp;&nbsp;&nbsp;
24
- <button class="btn btn-primary"><i class="icon-refresh"></i> Refresh</button>
24
+ <button class="btn btn-primary"><i class="glyphicon glyphicon-refresh"></i> Refresh</button>
25
25
  <%= render 'view_type_group' %>
26
26
  <% end %>
27
27
  <% end unless sort_fields.empty? %>
@@ -16,7 +16,7 @@
16
16
  </div>
17
17
  <div class="col-xs-4 heading-tile">
18
18
  <span class="glyphicon glyphicon-folder-open"></span>
19
- <%= link_to t("sufia.dashboard.create_collection"), collections.new_collection_path %>
19
+ <%= link_to t("sufia.dashboard.create_collection"), collections.new_collection_path, id: "hydra-collection-add" %>
20
20
  </div>
21
21
  <div class="col-xs-4 heading-tile">
22
22
  <span class="glyphicon glyphicon-eye-open"></span>
@@ -14,7 +14,7 @@
14
14
  </div><!-- /well -->
15
15
  <div class="row">
16
16
  <div class="form-actions">
17
- <%= f.button '<i class="icon-save"></i> Save Descriptions'.html_safe, type: 'submit', class: 'btn-primary', onclick: "confirmation_needed = false;", id: "upload_submit", name: "update_descriptions" %>
17
+ <%= f.button '<i class="glyphicon glyphicon-floppy-disk"></i> Save Descriptions'.html_safe, type: 'submit', class: 'btn-primary', onclick: "confirmation_needed = false;", id: "upload_submit", name: "update_descriptions" %>
18
18
  </div>
19
19
  </div>
20
20
  <% end %>
@@ -0,0 +1,22 @@
1
+ if (navigator.userAgent.match("MSIE"))
2
+ $("form").validate();
3
+
4
+ initialize_audio();
5
+
6
+ $('input[name=revision]:radio').on('click', function() {
7
+ $('#save_version_note').fadeIn('slow');
8
+ });
9
+
10
+ confirmation_needed = false;
11
+ window.onbeforeunload = confirmExit;
12
+
13
+ function confirmExit(){
14
+ if(confirmation_needed) {
15
+ // if you return a string it will be displayed in between "don't navigate away"
16
+ // and "click Ok to navigate away or cancel to stay put" in the confirm dialog
17
+ return "Your metadata has not been saved.";
18
+ }
19
+ }
20
+
21
+ // only valid for perm tab
22
+ set_access_levels();
@@ -1,21 +1,25 @@
1
1
  <div class="modal-div extra_tag">
2
2
  <% label = name.to_s.titleize %>
3
3
  <!-- Button to trigger modal -->
4
- <a href="#extraFieldsModal_<%=name %>" role="button" class="btn btn-warning fright vmiddle" data-toggle="modal">Additional <%= label %> <i class="icon-plus-sign icon-large"></i></a>
4
+ <a href="#extraFieldsModal_<%=name %>" role="button" class="btn btn-warning fright vmiddle" data-toggle="modal">Additional <%= label %> <i class="glyphicon glyphicon-plus large-icon"></i></a>
5
5
  <!-- Modal -->
6
- <div class="modal hide" id="extraFieldsModal_<%=name %>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
7
- <div class="modal-header">
8
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
9
- <h2 id="extraFieldsModal_<%=name %>_Label">Additional <%= label %>(s)</h2>
10
- </div>
11
- <div class="modal-body" aria-hidden="true">
12
- <% values[start..values.length].each do |value| %>
13
- <% next if value.empty? %>
14
- <%= "#{value.truncate(250)}" %><br />
15
- <% end %>
16
- </div>
17
- <div class="modal-footer">
18
- <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Close</button>
6
+ <div class="modal fade" id="extraFieldsModal_<%=name %>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
7
+ <div class="modal-dialog">
8
+ <div class="modal-content">
9
+ <div class="modal-header">
10
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
11
+ <h2 id="extraFieldsModal_<%=name %>_Label">Additional <%= label %>(s)</h2>
12
+ </div>
13
+ <div class="modal-body">
14
+ <% values[start..values.length].each do |value| %>
15
+ <% next if value.empty? %>
16
+ <%= "#{value.truncate(250)}" %><br />
17
+ <% end %>
18
+ </div>
19
+ <div class="modal-footer">
20
+ <button class="btn btn-primary" data-dismiss="modal">Close</button>
21
+ </div>
22
+ </div>
19
23
  </div>
20
24
  </div>
21
25
  </div>
@@ -0,0 +1,36 @@
1
+ <li>
2
+ <h2>
3
+ <%= link_to generic_file.title_or_label, sufia.generic_file_path(generic_file) %>
4
+ <small>[<%= link_to 'Download', sufia.download_path(generic_file), target: '_new' %>]</small>
5
+ </h2>
6
+ <table class="table">
7
+ <tr>
8
+ <td rowspan="6" class="span20">
9
+ <%= render_thumbnail_tag generic_file, { width: 150 } %>
10
+ </td>
11
+ <th><h4>Title:</h4></th>
12
+ <td><%= generic_file.title %></td>
13
+ </tr>
14
+ <tr>
15
+ <th><h4>Depositor:<h4></div>
16
+ <td><%= link_to_profile generic_file.depositor("no depositor value") %></td>
17
+ </tr>
18
+ <tr>
19
+ <th><h4>Creator:</h4></th>
20
+ <td><%= generic_file.creator %></td>
21
+ </tr>
22
+ <tr>
23
+ <th><h4>Description:</h4></th>
24
+ <td><%= iconify_auto_link(generic_file.description) %></th>
25
+ </tr>
26
+ <tr>
27
+ <th><h4>Keywords:</h4></th>
28
+ <td><%= generic_file.tags.join(', ') %></td>
29
+ </tr>
30
+ <tr>
31
+ <th><h4>Date Uploaded:</h4></th>
32
+ <td><%= generic_file.date_uploaded %></td>
33
+ </tr>
34
+ </table>
35
+ </li>
36
+
@@ -22,6 +22,10 @@
22
22
 
23
23
  <%= render_download_icon "Download the full-sized PDF" %>
24
24
 
25
+ <% elsif @generic_file.office_document?%>
26
+
27
+ <%= render_download_icon "Download the full-sized Document" %>
28
+
25
29
  <% else %>
26
30
 
27
31
  <%= render_download_icon %>
@@ -3,7 +3,7 @@
3
3
  <%= hidden_field_tag('redirect_tab', 'permissions') %>
4
4
  <%= render partial: "generic_files/permission_form", locals: { gf: @generic_file, f: f } %>
5
5
  <div class="row form-actions" id="permissions_submit">
6
- <%= button_tag '<i class="icon-save"></i> Save'.html_safe, type: 'submit', class: 'btn-primary btn-large', onclick: "confirmation_needed = false;", id: "upload_submit", name: "update_permission" %>
6
+ <%= button_tag '<i class="glyphicon glyphicon-floppy-disk"></i> Save'.html_safe, type: 'submit', class: 'btn-primary btn-large', onclick: "confirmation_needed = false;", id: "upload_submit", name: "update_permission" %>
7
7
  </div>
8
8
  <% end %>
9
9
  </div><!-- /#permissions_display -->
@@ -13,45 +13,49 @@
13
13
  <div class="row">
14
14
  <p class="pull-right">
15
15
  <!-- Button to trigger modal -->
16
- <a href="#myModal" role="button" class="btn btn-warning" data-toggle="modal">What's this <i class="glyphicon glyphicon-question-sign icon-large"></i></a>
16
+ <a href="#myModal" role="button" class="btn btn-warning" data-toggle="modal">What's this <i class="glyphicon glyphicon-question-sign large-icon"></i></a>
17
17
  <!-- Modal -->
18
- <div class="modal hide" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
19
- <div class="modal-header">
20
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
21
- <h2 id="myModalLabel"><%=t('sufia.product_name') %> Permissions</h2>
22
- </div>
23
- <div class="modal-body">
24
- <h3>Visibility</h3>
25
- <p>This setting will determine who can view your file, and the associated metadata. Setting
26
- the visibility to <span class="label label-success">Open Access</span> will allow your content to be discovered in Google and viewed by anyone.
27
- The visibility setting <span class="label label-info"><%=t('sufia.institution_name') %></span> will only allow users who are logged into <%=t('sufia.product_name') %>
28
- (via WebAccess) to view the content. Files that are marked <span class="label label-important">Private</span> are only able to be viewed
29
- by users and/or groups that have been given specific access in the &quot;Share With&quot; section.
30
- </p>
18
+ <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
19
+ <div class="modal-dialog">
20
+ <div class="modal-content">
21
+ <div class="modal-header">
22
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
23
+ <h2 id="myModalLabel"><%=t('sufia.product_name') %> Permissions</h2>
24
+ </div>
25
+ <div class="modal-body">
26
+ <h3>Visibility</h3>
27
+ <p>This setting will determine who can view your file, and the associated metadata. Setting
28
+ the visibility to <span class="label label-success">Open Access</span> will allow your content to be discovered in Google and viewed by anyone.
29
+ The visibility setting <span class="label label-info"><%=t('sufia.institution_name') %></span> will only allow users who are logged into <%=t('sufia.product_name') %>
30
+ (via WebAccess) to view the content. Files that are marked <span class="label label-important">Private</span> are only able to be viewed
31
+ by users and/or groups that have been given specific access in the &quot;Share With&quot; section.
32
+ </p>
31
33
 
32
- <p>
33
- Permissions in <%=t('sufia.product_name') %> are hierarchical. This means that you cannot set the visibility of a file to <span class="label label-success">Open Access</span> or
34
- <span class="label label-info"><%=t('sufia.institution_name') %></span> and simultaneously try to restrict the access of a single user. However, you may mark the visibility of
35
- a file as <span class="label label-danger">Private</span> and then grant access to particular users and/or groups for that file in the &quot;Share With&quot;
36
- section.
37
- </p>
34
+ <p>
35
+ Permissions in <%=t('sufia.product_name') %> are hierarchical. This means that you cannot set the visibility of a file to <span class="label label-success">Open Access</span> or
36
+ <span class="label label-info"><%=t('sufia.institution_name') %></span> and simultaneously try to restrict the access of a single user. However, you may mark the visibility of
37
+ a file as <span class="label label-danger">Private</span> and then grant access to particular users and/or groups for that file in the &quot;Share With&quot;
38
+ section.
39
+ </p>
38
40
 
39
- <h3>Share With</h3>
40
- <p>You may grant &quot;View/Download&quot; or &quot;Edit&quot; access for specific users and/or groups to files. Enter
41
- a valid <%=t('sufia.account_name') %>, one at a time, select the access level for that user and click
42
- <button class="btn btn-mini btn-inverse" onclick="return false;"><i class="icon-plus-sign" ></i>Add</button>.
43
- </p>
41
+ <h3>Share With</h3>
42
+ <p>You may grant &quot;View/Download&quot; or &quot;Edit&quot; access for specific users and/or groups to files. Enter
43
+ a valid <%=t('sufia.account_name') %>, one at a time, select the access level for that user and click
44
+ <button class="btn btn-mini btn-inverse" onclick="return false;"><i class="glyphicon glyphicon-plus" ></i>Add</button>.
45
+ </p>
44
46
 
45
- <%= render partial: 'generic_files/groups_description' %>
47
+ <%= render partial: 'generic_files/groups_description' %>
46
48
 
47
- <h3>Permission Definitions</h3>
48
- <p>
49
- <strong>View/Download:</strong> this file (both contents and metadata) is accessible from within <%=t('sufia.product_name') %>.<br />
50
- <strong>Edit:</strong> this file (both contents and metadata) can be edited. You may only grant this permission to <%=t('sufia.institution_name') %> users and/or groups.
51
- </p>
52
- </div>
53
- <div class="modal-footer">
54
- <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Close</button>
49
+ <h3>Permission Definitions</h3>
50
+ <p>
51
+ <strong>View/Download:</strong> this file (both contents and metadata) is accessible from within <%=t('sufia.product_name') %>.<br />
52
+ <strong>Edit:</strong> this file (both contents and metadata) can be edited. You may only grant this permission to <%=t('sufia.institution_name') %> users and/or groups.
53
+ </p>
54
+ </div>
55
+ <div class="modal-footer">
56
+ <button class="btn btn-primary" data-dismiss="modal">Close</button>
57
+ </div>
58
+ </div>
55
59
  </div>
56
60
  </div>
57
61
  </p>
@@ -79,7 +83,7 @@
79
83
  <p class="help-block">Enter <%=t('sufia.account_label') %> (one at a time)</p>
80
84
  <%= text_field_tag 'new_user_name_skel', nil, class: "span29" %><span class="add-on"><%=t('sufia.directory.suffix') %></span>
81
85
  <%= select_tag 'new_user_permission_skel', options_for_select(Sufia.config.permission_levels), class: 'span17' %>
82
- <button class="btn btn-mini btn-inverse" id="add_new_user_skel"><i class="icon-plus-sign"></i> Add</button>
86
+ <button class="btn btn-mini btn-inverse" id="add_new_user_skel"><i class="glyphicon glyphicon-plus"></i> Add</button>
83
87
  <br /> <span id="directory_user_result"></span>
84
88
  </div>
85
89
  </div>
@@ -89,7 +93,7 @@
89
93
  <div class="input-append">
90
94
  <%= select_tag 'new_group_name_skel', options_for_select(["Select a group"] + current_user.groups), class: 'span38' %>
91
95
  <%= select_tag 'new_group_permission_skel', options_for_select(Sufia.config.permission_levels), class: 'span17' %>
92
- <button class="btn btn-mini btn-inverse" id="add_new_group_skel" ><i class="icon-plus-sign"></i> Add</button>
96
+ <button class="btn btn-mini btn-inverse" id="add_new_group_skel" ><i class="glyphicon glyphicon-plus"></i> Add</button>
93
97
  <br /><span id="directory_group_result"></span>
94
98
  </div>
95
99
  </div>
@@ -1,39 +1,43 @@
1
1
  <div class="modal-div">
2
2
  <!-- Button to trigger modal -->
3
- <a href="#rightsModal" role="button" class="btn btn-warning fright" data-toggle="modal">License Descriptions <i class="glyphicon glyphicon-question-sign icon-large"></i></a>
3
+ <a href="#rightsModal" role="button" class="btn btn-warning fright" data-toggle="modal">License Descriptions <i class="glyphicon glyphicon-question-sign large-icon"></i></a>
4
4
  <!-- Modal -->
5
- <div class="modal hide" id="rightsModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
6
- <div class="modal-header">
7
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
8
- <h2 id="rightsModallLabel"><%= t('sufia.product_name') %> License Descriptions</h2>
9
- </div>
10
- <div class="modal-body" aria-hidden="true">
11
- <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):
12
- </p> <ul>
13
- <li><b>Attribution 3.0: CC BY</b><br/>
14
- With this license you allow others to "distribute, remix, tweak, and build" on your deposited content - including for commercial purposes - provided they attribute you as the original creator.</li>
15
- <li><b>Attribution-Share-Alike 3.0: CC BY-SA</b> <br/>
16
- With this license you allow others to "remix, tweak, and build" on your deposited content, including for commercial uses, provided they attribute you as the original creator AND incorporate the same level of licensing (i.e., CC BY-SA) for the newly resulting creation. "All new works based on yours will carry the same license, so any derivatives will also allow commercial use."</li>
17
- <li><b>Attribution-NoDerivs 3.0: CC BY-ND </b><br/>
18
- With this license you permit "redistribution, commercial and non-commercial," provided the content remains unaltered and intact (i.e., whole) and provided you are attributed as the original creator.</li>
19
- <li><b>Attribution-Non-Commercial 3.0: CC BY-NC</b><br/>
20
- With this license you allow others to "remix, tweak, and build" on your content in non-commercial ways. While they must credit you as the original creator and while the remixed, tweaked, or expanded upon content must remain non-commercial, they do not have to apply identical license terms on the new content.</li>
21
- <li><b>Attribution-NonCommercial-NoDerivs 3.0 CC BY-NC-ND</b><br/>
22
- With this license you share your work with others and allow them to download your work, provided they attribute you as the creator and refrain from changing the content in any way and from using it for commercial means. </li>
23
- <li><b>Attribution-Non-Commercial-Share-Alike 3.0: CC BY-NC-SA</b><br/>
24
- With this license you allow others to "remix, tweak, and build" on your content in non-commercial ways, provided they give you credit (as the original creator) and also apply the same license level to the newly resulting creations.</li>
25
- <li><b>Attribution-Non-Commercial-Share-Alike-NoDerivs 3.0: CC BY-NC-SA-ND</b><br/>
26
- With this license you share your work with others and allow them to download it, provided they attribute you as the creator; they must also refrain from changing the content in any way and from using it for commercial means. </li>
27
- <li><b>Public Domain Mark 1.0 </b><br/>
28
- When content is in the public domain, it has no known copyright owner. </li>
29
- <li><b>CC0 1.0 Universal </b><br/>
30
- With this license you are waiving your rights as copyright owner to the content you upload. This means your content may be distributed and reused without attribution, without restriction. CC0 is a license that one applies to one's own work; rarely does one apply it to another's work, unless one has the appropriate rights to do so.</li>
31
- </ul>
32
- </p>
33
- <p> Please note: Another license option that is listed is <b>"All rights reserved."</b> With this license you - as the copyright holder - reserve all rights held under copyright law, such as for distribution and creation of derivative works. This means that no one can use your content in a work - such as a presentation or article - or create derivatives from it without your permission.</p>
34
- </div>
35
- <div class="modal-footer">
36
- <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Close</button>
5
+ <div class="modal fade" id="rightsModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
6
+ <div class="modal-dialog">
7
+ <div class="modal-content">
8
+ <div class="modal-header">
9
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
10
+ <h2 id="rightsModallLabel"><%= t('sufia.product_name') %> License Descriptions</h2>
11
+ </div>
12
+ <div class="modal-body">
13
+ <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):
14
+ </p> <ul>
15
+ <li><b>Attribution 3.0: CC BY</b><br/>
16
+ With this license you allow others to "distribute, remix, tweak, and build" on your deposited content - including for commercial purposes - provided they attribute you as the original creator.</li>
17
+ <li><b>Attribution-Share-Alike 3.0: CC BY-SA</b> <br/>
18
+ With this license you allow others to "remix, tweak, and build" on your deposited content, including for commercial uses, provided they attribute you as the original creator AND incorporate the same level of licensing (i.e., CC BY-SA) for the newly resulting creation. "All new works based on yours will carry the same license, so any derivatives will also allow commercial use."</li>
19
+ <li><b>Attribution-NoDerivs 3.0: CC BY-ND </b><br/>
20
+ With this license you permit "redistribution, commercial and non-commercial," provided the content remains unaltered and intact (i.e., whole) and provided you are attributed as the original creator.</li>
21
+ <li><b>Attribution-Non-Commercial 3.0: CC BY-NC</b><br/>
22
+ With this license you allow others to "remix, tweak, and build" on your content in non-commercial ways. While they must credit you as the original creator and while the remixed, tweaked, or expanded upon content must remain non-commercial, they do not have to apply identical license terms on the new content.</li>
23
+ <li><b>Attribution-NonCommercial-NoDerivs 3.0 CC BY-NC-ND</b><br/>
24
+ With this license you share your work with others and allow them to download your work, provided they attribute you as the creator and refrain from changing the content in any way and from using it for commercial means. </li>
25
+ <li><b>Attribution-Non-Commercial-Share-Alike 3.0: CC BY-NC-SA</b><br/>
26
+ With this license you allow others to "remix, tweak, and build" on your content in non-commercial ways, provided they give you credit (as the original creator) and also apply the same license level to the newly resulting creations.</li>
27
+ <li><b>Attribution-Non-Commercial-Share-Alike-NoDerivs 3.0: CC BY-NC-SA-ND</b><br/>
28
+ With this license you share your work with others and allow them to download it, provided they attribute you as the creator; they must also refrain from changing the content in any way and from using it for commercial means. </li>
29
+ <li><b>Public Domain Mark 1.0 </b><br/>
30
+ When content is in the public domain, it has no known copyright owner. </li>
31
+ <li><b>CC0 1.0 Universal </b><br/>
32
+ With this license you are waiving your rights as copyright owner to the content you upload. This means your content may be distributed and reused without attribution, without restriction. CC0 is a license that one applies to one's own work; rarely does one apply it to another's work, unless one has the appropriate rights to do so.</li>
33
+ </ul>
34
+ </p>
35
+ <p> Please note: Another license option that is listed is <b>"All rights reserved."</b> With this license you - as the copyright holder - reserve all rights held under copyright law, such as for distribution and creation of derivative works. This means that no one can use your content in a work - such as a presentation or article - or create derivatives from it without your permission.</p>
36
+ </div>
37
+ <div class="modal-footer">
38
+ <button class="btn btn-primary" data-dismiss="modal">Close</button>
39
+ </div>
40
+ </div>
37
41
  </div>
38
42
  </div>
39
43
  </div>
@@ -1,32 +1,9 @@
1
- <% content_for :local_js do %>
2
- if (navigator.userAgent.match("MSIE")){
3
- $("form").validate();
4
- }
5
- initialize_audio();
6
-
7
- $('input[name=revision]:radio').on('click', function() {
8
- $('#save_version_note').fadeIn('slow');
9
- });
10
-
11
- confirmation_needed = false;
12
- window.onbeforeunload = confirmExit;
13
- function confirmExit(){
14
- if(confirmation_needed){
15
- // if you return a string it will be displayed in between "don't navigate away"
16
- // and "click Ok to navigate away or cancel to stay put" in the confirm dialog
17
- return "Your metadata has not been saved.";
18
- }
19
- }
20
- // only valid for perm tab
21
- set_access_levels();
22
-
23
- // initialize popover helpers
24
- $("a[rel=popover]").popover({ html: true });
25
-
1
+ <%= javascript_tag do %>
2
+ <%= render partial: "edit", formats: [:js] %>
26
3
  <% end %>
27
4
 
28
- <%= render partial: 'breadcrumbs' %>
29
- <h1 class="lower">Edit <%= @generic_file %></h1>
5
+ <%= render partial: 'breadcrumbs' %>
6
+ <h1 class="lower">Edit <%= @generic_file %></h1>
30
7
 
31
8
  <div class="row">
32
9
  <div class="col-xs-12 col-sm-4">
@@ -35,9 +12,15 @@ $("a[rel=popover]").popover({ html: true });
35
12
  <div class="col-xs-12 col-sm-8">
36
13
  <%= link_to "&lt;&lt;Browse view".html_safe, sufia.generic_file_path(@generic_file) %>
37
14
  <ul class="nav nav-tabs">
38
- <li id="edit_descriptions_link" class="active"><a href="#descriptions_display" data-toggle="tab"><i class="glyphicon glyphicon-tags"></i> Descriptions</a></li>
39
- <li id="edit_versioning_link"><a href="#versioning_display" data-toggle="tab"><i class="glyphicon glyphicon-sitemap"></i> Versions</a></li>
40
- <li id="edit_permissions_link"><a href="#permissions_display" data-toggle="tab"><i class="glyphicon glyphicon-key"></i> Permissions</a></li>
15
+ <li id="edit_descriptions_link" class="active">
16
+ <a href="#descriptions_display" data-toggle="tab"><i class="glyphicon glyphicon-tags"></i> Descriptions</a>
17
+ </li>
18
+ <li id="edit_versioning_link">
19
+ <a href="#versioning_display" data-toggle="tab"><i class="glyphicon glyphicon-sitemap"></i> Versions</a>
20
+ </li>
21
+ <li id="edit_permissions_link"><a href="#permissions_display" data-toggle="tab">
22
+ <i class="glyphicon glyphicon-key"></i> Permissions</a>
23
+ </li>
41
24
  </ul>
42
25
  <div class="tab-content">
43
26
  <%= render partial: "descriptions", locals: { generic_file: @generic_file } %>