from_hyrax 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/from_hyrax_controller.rb +1 -1
- data/app/views/from_hyrax/index.html.erb +2 -0
- data/app/views/from_hyrax/new.html.erb +2 -0
- data/lib/from_hyrax/version.rb +1 -1
- data/lib/generators/install/install_generator.rb +13 -1
- data/lib/generators/install/templates/views/_curation_sidebar.erb +21 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e286d5954d4a51100a4a74fe6942c08f4a1d4680e3dfd14975e8475af5ed4dcb
|
4
|
+
data.tar.gz: f81201be4ad0f828a7e7b5dab70ac6fbc27a7cf4bedf7690562da384c1b85c9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bd516ce63247af57f67ef212933551ee02ed334e168693ed39940091773add0222ec7df674522fda555dadb529838492d283c8154744c2f31343c2b31a11f6f
|
7
|
+
data.tar.gz: '008c46dfd73c82ee5ed95cc7e4ca64d1fab5d7456f6d0b409313f6ce7c8b962972c8e75ebe1a93aec839901cc17e72223deeb83f79c55fa59f1aa582a7b75c0e'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class FromHyraxController < Spotlight::ApplicationController
|
2
|
-
layout '
|
2
|
+
layout 'spotlight/spotlight'
|
3
3
|
before_action :authenticate_user!, except: :receive
|
4
4
|
protect_from_forgery with: :exception
|
5
5
|
skip_before_action :verify_authenticity_token, only: :receive
|
data/lib/from_hyrax/version.rb
CHANGED
@@ -1,7 +1,19 @@
|
|
1
|
-
class
|
1
|
+
class FromHyrax::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/from_hyrax.yml', 'config/from_hyrax.yml') unless File.file?('config/from_hyrax.yml')
|
6
6
|
end
|
7
|
+
|
8
|
+
def inject_dashboard_link
|
9
|
+
file_path = 'app/views/spotlight/shared/_curation_sidebar.html.erb'
|
10
|
+
if File.file?(file_path)
|
11
|
+
insert_into_file file_path, before: /[ \t]*<% if can\? :tag, current_exhibit %>/m do
|
12
|
+
" \n<%= nav_link t(:'Hyrax Transfer'), main_app.from_hyrax_index_path(current_exhibit) %>\n"
|
13
|
+
end
|
14
|
+
else
|
15
|
+
copy_file 'views/_curation_sidebar.html.erb', file_path
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
7
19
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<h3 class="nav-heading h4"><%= t(:'spotlight.curation.sidebar.header') %></h3>
|
2
|
+
|
3
|
+
<ul class="nav sidenav flex-column">
|
4
|
+
<%= nav_link t(:'spotlight.curation.sidebar.items'), spotlight.admin_exhibit_catalog_path(current_exhibit) %>
|
5
|
+
<%= nav_link t(:'Hyrax Transfer'), main_app.from_hyrax_index_path(current_exhibit) %>
|
6
|
+
<% if can? :tag, current_exhibit %>
|
7
|
+
<%= nav_link t(:'spotlight.curation.sidebar.tags'), spotlight.exhibit_tags_path(current_exhibit) %>
|
8
|
+
<% end %>
|
9
|
+
<% if can? :manage, Spotlight::Search.new(exhibit: current_exhibit) %>
|
10
|
+
<%= nav_link t(:'spotlight.curation.sidebar.browse'), spotlight.exhibit_searches_path(current_exhibit) %>
|
11
|
+
<% end %>
|
12
|
+
<% if can? :manage, Spotlight::FeaturePage.new(exhibit: current_exhibit) or can? :manage, current_exhibit.home_page %>
|
13
|
+
<%= nav_link t(:'spotlight.curation.sidebar.feature_pages'), spotlight.exhibit_feature_pages_path(current_exhibit), 'data-no-turbolink' => true %>
|
14
|
+
<% end %>
|
15
|
+
<% if can? :manage, Spotlight::AboutPage.new(exhibit: current_exhibit) %>
|
16
|
+
<%= nav_link t(:'spotlight.curation.sidebar.about_pages'), spotlight.exhibit_about_pages_path(current_exhibit), 'data-no-turbolink' => true %>
|
17
|
+
<% end %>
|
18
|
+
<% if (can? :manage, current_exhibit.translations.first_or_initialize) && current_exhibit.languages.any? %>
|
19
|
+
<%= nav_link t(:'spotlight.curation.sidebar.translations'), spotlight.edit_exhibit_translations_path(current_exhibit), 'data-no-turbolink' => true %>
|
20
|
+
<% end %>
|
21
|
+
</ul>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: from_hyrax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
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
|
+
date: 2020-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- lib/from_hyrax/version.rb
|
71
71
|
- lib/generators/install/install_generator.rb
|
72
72
|
- lib/generators/install/templates/config/from_hyrax.yml
|
73
|
+
- lib/generators/install/templates/views/_curation_sidebar.erb
|
73
74
|
- lib/tasks/from_hyrax_tasks.rake
|
74
75
|
homepage: https://github.com/sephirothkod/from_hyrax
|
75
76
|
licenses:
|