From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/controllers/deployables_controller.rb | 2 +-
src/app/views/deployables/_new.html.haml | 18 +++++++++---------
.../controllers/deployables_controller_spec.rb | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/app/controllers/deployables_controller.rb
b/src/app/controllers/deployables_controller.rb
index 05473b2..cc77bbb 100644
--- a/src/app/controllers/deployables_controller.rb
+++ b/src/app/controllers/deployables_controller.rb
@@ -138,7 +138,7 @@ class DeployablesController < ApplicationController
if params[:edit_xml]
redirect_to edit_polymorphic_path([(a)selected_catalogs.first, @deployable],
:edit_xml =>true)
else
- redirect_to polymorphic_path([(a)selected_catalogs.first, Deployable])
+ redirect_to catalog_path((a)selected_catalogs.first)
end
end
rescue => e
diff --git a/src/app/views/deployables/_new.html.haml
b/src/app/views/deployables/_new.html.haml
index c503fd8..b1764cb 100644
--- a/src/app/views/deployables/_new.html.haml
+++ b/src/app/views/deployables/_new.html.haml
@@ -4,16 +4,16 @@
%header
%h2=t'catalog_entries.new.add_catalog_entry'
-%section.admin-content-section.image-upload
- %nav#image-upload-tabs.faceted
- %ul.tabs
- %li
- = link_to t('catalog_entries.new.upload'),
new_polymorphic_path([@catalog, Deployable]), :id => "upload", :class =>
"#{'active' if @form_option == 'upload'}"
- %li
- = link_to t('catalog_entries.new.from_url'),
new_polymorphic_path([@catalog, Deployable], :from_url => true), :id =>
"from_url", :class => "#{'active' if @form_option ==
'from_url'}"
+ .content
+ %nav#image-upload-tabs.faceted
+ %ul.tabs
+ %li
+ = link_to t('catalog_entries.new.upload'),
new_polymorphic_path([@catalog, Deployable]), :id => "upload", :class =>
"#{'active' if @form_option == 'upload'}"
+ %li
+ = link_to t('catalog_entries.new.from_url'),
new_polymorphic_path([@catalog, Deployable], :from_url => true), :id =>
"from_url", :class => "#{'active' if @form_option ==
'from_url'}"
- .form_option
- = render :partial => @form_option
+ .form_option
+ = render :partial => @form_option
:javascript
$(document).ready(function() {
diff --git a/src/spec/controllers/deployables_controller_spec.rb
b/src/spec/controllers/deployables_controller_spec.rb
index fedb66a..9861cc4 100644
--- a/src/spec/controllers/deployables_controller_spec.rb
+++ b/src/spec/controllers/deployables_controller_spec.rb
@@ -38,7 +38,7 @@ describe DeployablesController do
catalog = FactoryGirl.create(:catalog)
mock_warden(@admin)
post(:create, :create_from_image => @image.id, :deployable => {:name =>
@image.name}, :hardware_profile => hw_profile.id, :catalog_id => catalog.id)
- response.should redirect_to(catalog_deployables_url(catalog.id))
+ response.should redirect_to(catalog_url(catalog.id))
end
end
--
1.7.7.4
Show replies by date