Skip to content

Commit

Permalink
Assign the buttons ending with _new or _discover to their new button …
Browse files Browse the repository at this point in the history
…classes

(cherry picked from commit a5e6ea690bb3163285a4e471640272efd9f37d40)
  • Loading branch information
Attila Vecerek committed Feb 28, 2017
1 parent 6b2a3e5 commit b65f1e8
Show file tree
Hide file tree
Showing 48 changed files with 135 additions and 54 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
class ApplicationHelper::Toolbar::ArbitrationProfilesCenter < ApplicationHelper::Toolbar::Basic
button_group('arbitration_profile_cloud_vmdb', [
select(
:arbitration_profile_vmdb_choice,
'fa fa-cog fa-lg',
t = N_('Configuration'),
t,
:items => [
button(
:arbitration_profile_new,
'pficon pficon-edit fa-lg',
N_('Add a new Arbitration Profile'),
N_('Add a new Arbitration Profile'),
:klass => ApplicationHelper::Button::ButtonNewDiscover),
button(
:arbitration_profile_edit,
'pficon pficon-edit fa-lg',
N_('Select a single Arbitration Profile to edit'),
N_('Edit Selected Arbitration Profile'),
:url_parms => "main_div",
:enabled => false,
:onwhen => "1"),
button(
:arbitration_profile_delete,
'pficon pficon-delete fa-lg',
N_('Remove selected Arbitration Profiles from the VMDB'),
N_('Remove Arbitration Profiles from the VMDB'),
:url_parms => "main_div",
# rubocop:disable LineLength
:confirm => N_("Warning: The selected Cloud Providers and ALL of their components will be permanently removed from the Virtual Management Database. Are you sure you want to remove the selected Cloud Providers?"),
:enabled => false,
:onwhen => "1+"),
]
),
]
)
end
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ class ApplicationHelper::Toolbar::CatalogitemButtonSetCenter < ApplicationHelper
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a new Button Group'),
t,
:klass => ApplicationHelper::Button::CatalogItemButton),
:klass => ApplicationHelper::Button::CatalogItemButtonNew),
button(
:ab_button_new,
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a new Button'),
t,
:klass => ApplicationHelper::Button::CatalogItemButton),
:klass => ApplicationHelper::Button::CatalogItemButtonNew),
button(
:ab_group_reorder,
'pficon pficon-edit fa-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ApplicationHelper::Toolbar::CatalogitemButtonsCenter < ApplicationHelper::
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a new Button'),
t,
:klass => ApplicationHelper::Button::CatalogItemButton),
:klass => ApplicationHelper::Button::CatalogItemButtonNew),
button(
:ab_group_delete,
'pficon pficon-delete fa-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class ApplicationHelper::Toolbar::CloudNetworksCenter < ApplicationHelper::Toolb
:cloud_network_new,
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a new Cloud Network'),
t),
t,
:klass => ApplicationHelper::Button::ButtonNewDiscover),
separator,
# TODO: Restore when cross controllers show_list issue fully in place
# https://github.com/ManageIQ/manageiq/pull/12551
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class ApplicationHelper::Toolbar::CloudTenantsCenter < ApplicationHelper::Toolba
:cloud_tenant_new,
'pficon pficon-edit fa-lg',
t = N_('Create Cloud Tenant'),
t),
t,
:klass => ApplicationHelper::Button::ButtonNewDiscover),
button(
:cloud_tenant_edit,
'pficon pficon-edit fa-lg',
Expand Down
3 changes: 2 additions & 1 deletion app/helpers/application_helper/toolbar/conditions_center.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class ApplicationHelper::Toolbar::ConditionsCenter < ApplicationHelper::Toolbar:
}
end
end,
t),
t,
:klass => ApplicationHelper::Button::ButtonNewDiscover),
]
),
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class ApplicationHelper::Toolbar::CustomButtonSetCenter < ApplicationHelper::Too
:ab_group_new,
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a new Button Group'),
t),
t,
:klass => ApplicationHelper::Button::ButtonNewDiscover),
button(
:ab_button_new,
'pficon pficon-add-circle-o fa-lg',
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper/toolbar/dialogs_center.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ApplicationHelper::Toolbar::DialogsCenter < ApplicationHelper::Toolbar::Ba
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a new Dialog'),
t,
:klass => ApplicationHelper::Button::DialogAction),
:klass => ApplicationHelper::Button::DialogNew),
button(
:dialog_edit,
'pficon pficon-edit fa-lg',
Expand Down
7 changes: 7 additions & 0 deletions app/helpers/application_helper/toolbar/ems_cloud_center.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ class ApplicationHelper::Toolbar::EmsCloudCenter < ApplicationHelper::Toolbar::B
t,
:url_parms => "&refresh=y",
:confirm => N_("Warning: This Cloud Provider and ALL of its components will be permanently removed!")),
separator,
button(
:arbitration_profile_new,
'pficon pficon-edit fa-lg',
t = N_('Add a new Arbitration Profile to this Cloud Provider'),
t,
:klass => ApplicationHelper::Button::ButtonNewDiscover),
]
),
])
Expand Down
6 changes: 4 additions & 2 deletions app/helpers/application_helper/toolbar/ems_clouds_center.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ class ApplicationHelper::Toolbar::EmsCloudsCenter < ApplicationHelper::Toolbar::
t = N_('Discover Cloud Providers'),
t,
:url => "/discover",
:url_parms => "?discover_type=ems"),
:url_parms => "?discover_type=ems",
:klass => ApplicationHelper::Button::ButtonNewDiscover),
separator,
button(
:ems_cloud_new,
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New Cloud Provider'),
t,
:url => "/new"),
:url => "/new",
:klass => ApplicationHelper::Button::ButtonNewDiscover),
button(
:ems_cloud_edit,
'pficon pficon-edit fa-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class ApplicationHelper::Toolbar::EmsContainersCenter < ApplicationHelper::Toolb
'pficon pficon-add-circle-o fa-lg',
t = N_('Add Existing Containers Provider'),
t,
:url => "/new"),
:url => "/new",
:klass => ApplicationHelper::Button::ButtonNewDiscover),
button(
:ems_container_deployment,
'pficon pficon-add-circle-o fa-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class ApplicationHelper::Toolbar::EmsDatawarehousesCenter < ApplicationHelper::T
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New Datawarehouse Provider'),
t,
:url => "/new"),
:url => "/new",
:klass => ApplicationHelper::Button::ButtonNewDiscover),
button(
:ems_datawarehouse_edit,
'pficon pficon-edit fa-lg',
Expand Down
6 changes: 4 additions & 2 deletions app/helpers/application_helper/toolbar/ems_infras_center.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ class ApplicationHelper::Toolbar::EmsInfrasCenter < ApplicationHelper::Toolbar::
t = N_('Discover Infrastructure Providers'),
t,
:url => "/discover",
:url_parms => "?discover_type=ems"),
:url_parms => "?discover_type=ems",
:klass => ApplicationHelper::Button::ButtonNewDiscover),
separator,
button(
:ems_infra_new,
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New Infrastructure Provider'),
t,
:url => "/new"),
:url => "/new",
:klass => ApplicationHelper::Button::ButtonNewDiscover),
button(
:ems_infra_edit,
'pficon pficon-edit fa-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class ApplicationHelper::Toolbar::EmsMiddlewaresCenter < ApplicationHelper::Tool
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New Middleware Provider'),
t,
:url => "/new"),
:url => "/new",
:klass => ApplicationHelper::Button::ButtonNewDiscover),
button(
:ems_middleware_edit,
'pficon pficon-edit fa-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ApplicationHelper::Toolbar::EmsNetworksCenter < ApplicationHelper::Toolbar
t = N_('Add a New Network Provider'),
t,
:url => "/new",
:klass => ApplicationHelper::Button::EmsNetwork),
:klass => ApplicationHelper::Button::EmsNetworkNew),
button(
:ems_network_edit,
'pficon pficon-edit fa-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class ApplicationHelper::Toolbar::HostAggregatesCenter < ApplicationHelper::Tool
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New Host Aggregate'),
t,
:url => "/new"),
:url => "/new",
:klass => ApplicationHelper::Button::ButtonNewDiscover),
button(
:host_aggregate_edit,
'pficon pficon-edit fa-lg',
Expand Down
9 changes: 6 additions & 3 deletions app/helpers/application_helper/toolbar/hosts_center.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,16 @@ class ApplicationHelper::Toolbar::HostsCenter < ApplicationHelper::Toolbar::Basi
t = N_('Discover items'),
t,
:url => "/discover",
:url_parms => "?discover_type=hosts"),
:url_parms => "?discover_type=hosts",
:klass => ApplicationHelper::Button::ButtonNewDiscover),
separator,
button(
:host_new,
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New item'),
t,
:url => "/new"),
:url => "/new",
:klass => ApplicationHelper::Button::ButtonNewDiscover),
button(
:host_edit,
'pficon pficon-edit fa-lg',
Expand Down Expand Up @@ -160,7 +162,8 @@ class ApplicationHelper::Toolbar::HostsCenter < ApplicationHelper::Toolbar::Basi
N_('Provision items'),
:url_parms => "main_div",
:enabled => false,
:onwhen => "1+"),
:onwhen => "1+",
:klass => ApplicationHelper::Button::ButtonNewDiscover),
]
),
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class ApplicationHelper::Toolbar::IsoDatastoresCenter < ApplicationHelper::Toolb
:iso_datastore_new,
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New ISO Datastore'),
t),
t,
:klass => ApplicationHelper::Button::ButtonNewDiscover),
button(
:iso_datastore_delete,
'pficon pficon-delete fa-lg',
Expand Down
3 changes: 2 additions & 1 deletion app/helpers/application_helper/toolbar/miq_actions_center.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class ApplicationHelper::Toolbar::MiqActionsCenter < ApplicationHelper::Toolbar:
:action_new,
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a new Action'),
t),
t,
:klass => ApplicationHelper::Button::ButtonNewDiscover),
]
),
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ApplicationHelper::Toolbar::MiqAeDomainCenter < ApplicationHelper::Toolbar
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New Namespace'),
t,
:klass => ApplicationHelper::Button::MiqAeDefault),
:klass => ApplicationHelper::Button::MiqAeNew),
button(
:miq_ae_namespace_edit,
'pficon pficon-edit fa-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ApplicationHelper::Toolbar::MiqAeDomainsCenter < ApplicationHelper::Toolba
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New Domain'),
t,
:klass => ApplicationHelper::Button::MiqAeDefaultNoRecord),
:klass => ApplicationHelper::Button::MiqAeDefaultNoRecordNew),
button(
:miq_ae_domain_edit,
'pficon pficon-edit fa-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ApplicationHelper::Toolbar::MiqAeInstancesCenter < ApplicationHelper::Tool
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New Instance'),
t,
:klass => ApplicationHelper::Button::MiqAeDefault),
:klass => ApplicationHelper::Button::MiqAeNew),
button(
:miq_ae_instance_edit,
'pficon pficon-edit fa-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ApplicationHelper::Toolbar::MiqAeMethodsCenter < ApplicationHelper::Toolba
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New Method'),
t,
:klass => ApplicationHelper::Button::MiqAeDefault),
:klass => ApplicationHelper::Button::MiqAeNew),
button(
:miq_ae_method_edit,
'pficon pficon-edit fa-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ class ApplicationHelper::Toolbar::MiqAeNamespaceCenter < ApplicationHelper::Tool
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New Namespace'),
t,
:klass => ApplicationHelper::Button::MiqAeDefault),
:klass => ApplicationHelper::Button::MiqAeNew),
button(
:miq_ae_class_new,
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New Class'),
t,
:klass => ApplicationHelper::Button::MiqAeDefault),
:klass => ApplicationHelper::Button::MiqAeNew),
button(
:miq_ae_item_edit,
'pficon pficon-edit fa-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class ApplicationHelper::Toolbar::MiqAlertProfilesCenter < ApplicationHelper::To
t = proc do
_('Add a New %{alert_profile_type} Alert Profile') % {:alert_profile_type => ui_lookup(:model => @sb[:folder])}
end,
t),
t,
:klass => ApplicationHelper::Button::ButtonNewDiscover),
]
),
])
Expand Down
3 changes: 2 additions & 1 deletion app/helpers/application_helper/toolbar/miq_alerts_center.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class ApplicationHelper::Toolbar::MiqAlertsCenter < ApplicationHelper::Toolbar::
:alert_new,
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New Alert'),
t),
t,
:klass => ApplicationHelper::Button::ButtonNewDiscover),
]
),
])
Expand Down
3 changes: 2 additions & 1 deletion app/helpers/application_helper/toolbar/miq_dialogs_center.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class ApplicationHelper::Toolbar::MiqDialogsCenter < ApplicationHelper::Toolbar:
:old_dialogs_new,
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a new Dialog'),
t),
t,
:klass => ApplicationHelper::Button::ButtonNewDiscover),
button(
:old_dialogs_edit,
'pficon pficon-edit fa-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class ApplicationHelper::Toolbar::MiqPoliciesCenter < ApplicationHelper::Toolbar
}
end,
t,
:url_parms => "?typ=basic"),
:url_parms => "?typ=basic",
:klass => ApplicationHelper::Button::ButtonNewDiscover),
]
),
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class ApplicationHelper::Toolbar::MiqPolicyProfilesCenter < ApplicationHelper::T
:profile_new,
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a New Policy Profile'),
t),
t,
:klass => ApplicationHelper::Button::ButtonNewDiscover),
]
),
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ApplicationHelper::Toolbar::MiqReportCenter < ApplicationHelper::Toolbar::
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a new Report'),
t,
:klass => ApplicationHelper::Button::MiqReportAction),
:klass => ApplicationHelper::Button::MiqReportNew),
button(
:miq_report_edit,
'pficon pficon-edit fa-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ApplicationHelper::Toolbar::MiqReportsCenter < ApplicationHelper::Toolbar:
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a new Report'),
t,
:klass => ApplicationHelper::Button::MiqReportAction),
:klass => ApplicationHelper::Button::MiqReportNew),
]
),
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class ApplicationHelper::Toolbar::MiqWidgetSetsCenter < ApplicationHelper::Toolb
:db_new,
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a new Dashboard'),
t),
t,
:klass => ApplicationHelper::Button::ButtonNewDiscover),
separator,
button(
:db_seq_edit,
Expand Down
Loading

0 comments on commit b65f1e8

Please sign in to comment.