-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from nebulab/elia/dev-support-updates
Update to the latest solidus-dev-support templates + UI improvements
- Loading branch information
Showing
19 changed files
with
91 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,6 @@ pkg | |
spec/dummy | ||
spec/examples.txt | ||
/sandbox | ||
.rvmrc | ||
.ruby-version | ||
.ruby-gemset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
--color | ||
--format documentation | ||
--require spec_helper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,2 @@ | ||
require: | ||
- solidus_dev_support/rubocop | ||
|
||
Metrics/LineLength: | ||
Enabled: true | ||
Max: 120 | ||
|
||
Rails/ApplicationJob: | ||
Enabled: false | ||
|
||
Rails/SkipsModelValidations: | ||
Exclude: | ||
- db/migrate/**/* | ||
- spec/**/* | ||
- sandbox/**/* | ||
|
||
RSpec/LetSetup: | ||
Enabled: false | ||
|
||
RSpec/MultipleExpectations: | ||
# Default is 1 | ||
Max: 5 | ||
|
||
RSpec/NestedGroups: | ||
# Default is 3 | ||
Max: 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
app/overrides/spree/admin/shared/_menu/add_importer_admin_menu_links.html.erb.deface
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
app/views/spree/admin/solidus_importer/imports/_form.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div class="row"> | ||
<div class="col-4"> | ||
<div class="field"> | ||
<%= f.label :import_type %><br> | ||
<%= f.select :import_type, [nil] + @import_types %> | ||
</div> | ||
</div> | ||
<div class="col-3"> | ||
<div class="field"> | ||
<%= f.label :file %><br> | ||
<%= f.file_field :file %> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 8 additions & 23 deletions
31
app/views/spree/admin/solidus_importer/imports/new.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,13 @@ | ||
<% | ||
admin_layout('full-width') | ||
admin_breadcrumb( | ||
t('spree.solidus_importer.title'), | ||
link_to(t('spree.solidus_importer.imports'), admin_solidus_importer_imports_path) | ||
) | ||
%> | ||
<% admin_breadcrumb t('spree.solidus_importer.title'), link_to(t('spree.solidus_importer.imports'), admin_solidus_importer_imports_path) %> | ||
<%= form_for [:admin, @import], method: :post, html: { multipart: true } do |f| %> | ||
<div data-hook="admin_solidus_importer_import_form_fields"> | ||
<div class="row"> | ||
<div class="col-6"> | ||
<%= f.label :file %><br> | ||
<%= f.file_field :file %> | ||
<fieldset> | ||
<% @import_types.each do |type| %> | ||
<label> | ||
<%= f.radio_button :import_type, type %> | ||
<%= t(type, scope: 'spree.solidus_importer.import_types') %> | ||
</label> | ||
<% end %> | ||
<%= f.button t('spree.admin.solidus_importer.create'), class: 'btn btn-primary' %> | ||
</fieldset> | ||
</div> | ||
<fieldset class="no-border-top"> | ||
<%= render partial: 'spree/shared/error_messages', locals: { target: @import } %> | ||
<%= render partial: 'form', locals: { f: f } %> | ||
|
||
<div class="form-buttons filter-actions actions" data-hook="buttons"> | ||
<%= f.submit t('spree.actions.create'), class: 'btn btn-primary' %> | ||
</div> | ||
</div> | ||
</fieldset> | ||
<% end %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,7 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# frozen_string_literal: true | ||
|
||
app_root = 'spec/dummy' | ||
|
||
unless File.exist? "#{app_root}/bin/rails" | ||
system "bin/rake", app_root or begin # rubocop:disable Style/AndOr | ||
warn "Automatic creation of the dummy app failed" | ||
exit 1 | ||
end | ||
if %w[g generate].include? ARGV.first | ||
exec "#{__dir__}/rails-engine", *ARGV | ||
else | ||
exec "#{__dir__}/rails-sandbox", *ARGV | ||
end | ||
|
||
Dir.chdir app_root | ||
exec 'bin/rails', *ARGV |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
Spree::Backend::Config.configure do |config| | ||
config.menu_items << config.class::MenuItem.new( | ||
:imports, | ||
'download', | ||
condition: -> { can?(:admin, Spree::Product) }, | ||
label: :importer, | ||
url: :admin_solidus_importer_imports_path | ||
) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters