to_spotlight 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0396d6c1545a7b42c6bc1598868019d0ff55e8a51c423e0657cbcfc6829902bd'
4
- data.tar.gz: 0eee8724658d6492ef2ae51f4b5ec4462555b1bf448f2f8087e9ae35d0af5603
3
+ metadata.gz: 070111e1947b8dfc8761c5733c4e896f196be0e2e35a2d6705a3966fc03d0ced
4
+ data.tar.gz: 259d653332a734d74c82fcf49ec532803c39c868bf0217bcaea6a429d9c519aa
5
5
  SHA512:
6
- metadata.gz: b74723ef303d5eaea2c5ca9953a88a88679048d1fdea86f759768b9bcf274a1c1ae35a55ca7625549767c018ff66ba18a856441ac057d2c133f52e845e885b4d
7
- data.tar.gz: 0c41425fae0466f948a186426f732952308396fdbe572aef830a61bbffe7025c75ad1a736e30f8f3f1cdaa8ad45cbaa3464af020271f6af80052a88f50e7caeb
6
+ metadata.gz: e1295991e10c234798c3b25d8260af0a5f750b1929103d5a7631b6722134c4a63bbac936f491135ff31b0ef86687e360422fcfce2330b8cf702cc17f3cab9e1d
7
+ data.tar.gz: 1758daf976e1710b890caf97524744c8643c4dd6bd8e839007fc4e69a80d05c301dc5b41c5a6867a5857a9b7b7fbad655d877781ee06e2d5a10654fcba91eadf
@@ -1,6 +1,6 @@
1
1
  Rails.application.routes.draw do
2
2
  get '/to_spotlight/api/:request_type' => 'to_spotlight/spotlight_transfer#api', as: 'to_spotlight_api'
3
3
  post '/to_spotlight/receive' => 'to_spotlight/spotlight_transfer#receive'
4
- get '/to_spotlight' => 'to_spotlight/spotlight_transfer#index'
4
+ get '/to_spotlight' => 'to_spotlight/spotlight_transfer#index', as: 'to_spotlight_index'
5
5
  post '/to_spotlight/approve' => 'to_spotlight/spotlight_transfer#approve'
6
6
  end
@@ -1,7 +1,21 @@
1
- class CdmMigrator::InstallGenerator < Rails::Generators::Base
1
+ class ToSpotlight::InstallGenerator < Rails::Generators::Base
2
2
  source_root File.expand_path('../templates', __FILE__)
3
3
 
4
4
  def inject_content_dm_yml
5
5
  copy_file('config/to_spotlight.yml', 'config/to_spotlight.yml') unless File.file?('config/to_spotlight.yml')
6
6
  end
7
+
8
+ def inject_dashboard_link
9
+ file_path = 'app/views/hyrax/dashboard/sidebar/_tasks.html.erb'
10
+ if File.file?(file_path)
11
+ insert_into_file file_path, before: /[ \t]*<% if can\? :manage, User %>/m do
12
+ " \n<% if can? :review, :submissions %>\n" \
13
+ " <%= menu.nav_link(main_app.to_spotlight_index_path) do %>\n" \
14
+ " <span class=\"fa fa-flag\" aria-hidden=\"true\"></span> <span class=\"sidebar-action-text\"><%= t('Spotlight Transfers') %></span>\n" \
15
+ " <% end %>\n\n"
16
+ end
17
+ else
18
+ copy_file 'sidebar/_tasks.html.erb', 'app/views/hyrax/dashboard/sidebar/_tasks.html.erb'
19
+ end
20
+ end
7
21
  end
@@ -0,0 +1,41 @@
1
+ <li class="h5"><%= t('hyrax.admin.sidebar.tasks') %></li>
2
+
3
+ <% if can? :review, :submissions %>
4
+ <%= menu.nav_link(hyrax.admin_workflows_path) do %>
5
+ <span class="fa fa-flag" aria-hidden="true"></span>
6
+ <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.workflow_review') %></span>
7
+ <% end %>
8
+ <% end %>
9
+
10
+ <% if can? :review, :submissions %>
11
+ <%= menu.nav_link(main_app.to_spotlight_index_path) do %>
12
+ <span class="fa fa-flag" aria-hidden="true"></span>
13
+ <span class="sidebar-action-text"><%= t('Spotlight Transfers') %></span>
14
+ <% end %>
15
+ <% end %>
16
+
17
+ <% if can? :manage, User %>
18
+ <%= menu.nav_link(hyrax.admin_users_path) do %>
19
+ <span class="fa fa-user" aria-hidden="true"></span>
20
+ <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.users') %></span>
21
+ <% end %>
22
+ <% end %>
23
+
24
+ <% if can? :manage, Hyku::Group %>
25
+ <%= menu.nav_link(main_app.admin_groups_path) do %>
26
+ <span class="fa fa-users"></span>
27
+ <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.manage_groups') %></span>
28
+ <% end %>
29
+ <% end %>
30
+
31
+ <% if can? :read, :admin_dashboard %>
32
+ <%= menu.nav_link(hyrax.embargoes_path) do %>
33
+ <span class="fa fa-flag" aria-hidden="true"></span>
34
+ <span class="sidebar-action-text"><%= t('hyrax.embargoes.index.manage_embargoes') %></span>
35
+ <% end %>
36
+
37
+ <%= menu.nav_link(hyrax.leases_path) do %>
38
+ <span class="fa fa-flag" aria-hidden="true"></span>
39
+ <span class="sidebar-action-text"><%= t('hyrax.leases.index.manage_leases') %></span>
40
+ <% end %>
41
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module ToSpotlight
2
- VERSION = '0.2.6'.freeze
2
+ VERSION = '0.2.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_spotlight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - sephirothkod
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-11 00:00:00.000000000 Z
11
+ date: 2020-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -71,6 +71,7 @@ files:
71
71
  - db/migrate/20200310153953_create_to_spotlight_spotlight_transfers.rb
72
72
  - lib/generators/install/install_generator.rb
73
73
  - lib/generators/install/templates/config/to_spotlight.yml
74
+ - lib/generators/install/templates/sidebar/_tasks.html.erb
74
75
  - lib/tasks/to_spotlight_tasks.rake
75
76
  - lib/to_spotlight.rb
76
77
  - lib/to_spotlight/engine.rb