---
src/app/stylesheets/custom.scss | 1 +
src/app/views/providers/_section_header.haml | 5 +-
src/app/views/providers/edit.haml | 71 +++++++++++++++-----------
src/app/views/providers/new.haml | 2 -
4 files changed, 45 insertions(+), 34 deletions(-)
diff --git a/src/app/stylesheets/custom.scss b/src/app/stylesheets/custom.scss
index 1bd31b6..2f5de61 100644
--- a/src/app/stylesheets/custom.scss
+++ b/src/app/stylesheets/custom.scss
@@ -5,6 +5,7 @@ header.admin-page-header .roundbutton{
font-weight: bold;
padding: 3px 10px;
-webkit-border-radius: 12px; -moz-border-radius: 12px; border-radius: 12px;
+ border: none;
&.green{
background: green;
diff --git a/src/app/views/providers/_section_header.haml
b/src/app/views/providers/_section_header.haml
index dd3e530..5410299 100644
--- a/src/app/views/providers/_section_header.haml
+++ b/src/app/views/providers/_section_header.haml
@@ -10,5 +10,6 @@
- @providers.each do |provider|
%li= link_to provider.name, edit_provider_path(provider)
- = link_to "on/off"
- = #button_to "on/off", edit_provider_path(@provider, :provider =>
{:enabled => "#{!(a)provider.enabled}"}), :method => :post, :confirm =>
"Disabling provider forces all instances to stop", :class =>
"roundbutton #{(a)provider.enabled ? 'green' : ''}"
+ = form_for @provider, :url => provider_path(@provider), :html => { :method
=> :put, :class => 'generic' } do |f|
+ = f.hidden_field :enabled, :value => true
+ = f.submit "on/off", :class => "roundbutton #{(a)provider.enabled ?
'green' : ''}"
diff --git a/src/app/views/providers/edit.haml b/src/app/views/providers/edit.haml
index 1b84e04..0ae9eea 100644
--- a/src/app/views/providers/edit.haml
+++ b/src/app/views/providers/edit.haml
@@ -1,33 +1,44 @@
= render :partial => 'layouts/admin_nav'
= render :partial => 'section_header'
-%section.admin-content-section.provider
- %header
- %h2
- Alerts
- .content
- unimplemented
-%section.admin-content-section.provider
- %header
- %h2
- Activity
- .content
- unimplemented
-%section.admin-content-section
- %header#tab-container-1
- %h2 Settings
- %nav.faceted
- %ul#tab-container-1-nav
- - @tabs.each do |tab|
- %li
- %a{ :href => url_for(:details_tab => tab[:id], :only_tab => true),
:id => "details_#{tab[:id]}", :class => "#{'active' if
@details_tab[:id] == tab[:id]} show"}
- = tab[:name]
- -if tab[:count]
- %span.label.badge.count.dark=tab[:count]
- .section-controls
- #obj_actions.button-container
- .button-group
- = pretty_filter_toggle(edit_provider_path(@provider, :view =>
'pretty', :details_tab => @details_tab[:id]), edit_provider_path(@provider,
:view => 'filter', :details_tab => @details_tab[:id]))
- .content.collapsible.toggle-view.pools#tab
- %ul.deployable-cards
- = render :partial => @view
+- if @provider.enabled
+ %section.admin-content-section.provider
+ %header
+ %h2
+ Alerts
+ .content
+ unimplemented
+ %section.admin-content-section.provider
+ %header
+ %h2
+ Activity
+ .content
+ unimplemented
+ %section.admin-content-section
+ %header#tab-container-1
+ %h2 Settings
+ %nav.faceted
+ %ul#tab-container-1-nav
+ - @tabs.each do |tab|
+ %li
+ %a{ :href => url_for(:details_tab => tab[:id], :only_tab => true),
:id => "details_#{tab[:id]}", :class => "#{'active' if
@details_tab[:id] == tab[:id]} show"}
+ = tab[:name]
+ -if tab[:count]
+ %span.label.badge.count.dark=tab[:count]
+ .section-controls
+ #obj_actions.button-container
+ .button-group
+ = pretty_filter_toggle(edit_provider_path(@provider, :view =>
'pretty', :details_tab => @details_tab[:id]), edit_provider_path(@provider,
:view => 'filter', :details_tab => @details_tab[:id]))
+ .content.collapsible.toggle-view.pools#tab
+ %ul.deployable-cards
+ = render :partial => @view
+- else
+ %section.admin-content-section
+ %header
+ %h2 Provider is disabled.
+ %p.centered
+ The provider "
+ = @provider.name
+ " is currently
+ %strong disabled.
+ To enable and configure provider, click the slide switch in the upper-right-hand
corner of this window.
diff --git a/src/app/views/providers/new.haml b/src/app/views/providers/new.haml
index 9348886..7588548 100644
--- a/src/app/views/providers/new.haml
+++ b/src/app/views/providers/new.haml
@@ -11,8 +11,6 @@
- @providers.each do |provider|
%li= link_to provider.name, edit_provider_path(provider)
- = link_to "on/off"
-
%section.admin-content-section.users
%header
%h2 Settings
--
1.7.6