[PATCH conductor] BZ795691 Fix and unify return to links
jtomasek at redhat.com
jtomasek at redhat.com
Tue Feb 21 12:44:37 UTC 2012
From: Jiri Tomasek <jtomasek at redhat.com>
---
src/app/stylesheets/layout.scss | 28 +++++++++----------
src/app/views/catalogs/new.html.haml | 5 ++-
src/app/views/hardware_profiles/new.html.haml | 5 ++-
src/app/views/images/edit_xml.html.haml | 5 ++-
src/app/views/images/import.html.haml | 5 ++-
src/app/views/images/new.html.haml | 5 ++-
src/app/views/images/overview.html.haml | 5 ++-
src/app/views/images/show.html.haml | 6 ++--
src/app/views/permissions/_new.html.haml | 5 ++-
src/app/views/pool_families/_pools.html.haml | 2 +-
.../pool_families/add_provider_accounts.html.haml | 5 +--
src/app/views/pool_families/edit.html.haml | 5 ++-
src/app/views/pool_families/new.html.haml | 5 ++-
src/app/views/provider_accounts/edit.html.haml | 5 ++-
src/app/views/provider_accounts/new.html.haml | 5 ++-
src/app/views/provider_accounts/show.html.haml | 5 ++-
src/app/views/provider_realms/show.html.haml | 4 +-
src/app/views/realms/new.html.haml | 5 ++-
src/app/views/settings/self_service.html.haml | 5 ++-
src/app/views/users/_section_header.html.haml | 9 +++---
src/app/views/users/edit.html.haml | 5 ++-
src/app/views/users/new.html.haml | 5 ++-
src/app/views/users/show.html.haml | 5 ++-
23 files changed, 77 insertions(+), 62 deletions(-)
diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index b067af2..6ad0810 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -644,7 +644,7 @@ http://github.com/necolas/css3-github-buttons
.button + .button,
.button + .button-group,
.button-group + .button,
-.rounded-link + .button-group,
+.return_to + .button-group,
.button-group + .button-group {
margin-left: 15px;
}
@@ -1352,24 +1352,22 @@ header.admin-page-header{
border-color: #fff;
}
- .rounded-link{
+ div.return_to{
@include display_inline_block;
- margin: -3px 0px 0px 0px;
- background: #cccccc;
- color: black;
- text-decoration: none;
- font-weight: bold;
- padding: 3px 6px;
- -webkit-border-radius: 12px; -moz-border-radius: 12px; border-radius: 12px;
- border: none;
- }
+ padding: 0.5em 0em;
- span.return_to{
- @include display_inline_block;
- line-height: 15px;
- padding: 5px 5px;
+ a{
+ background: #cccccc;
+ color: black;
+ text-decoration: none;
+ font-weight: bold;
+ padding: 3px 6px;
+ -webkit-border-radius: 12px; -moz-border-radius: 12px; border-radius: 12px;
+ border: none;
+ }
}
+
ul#provider_select{
@include display_inline_block;
list-style-type: none;
diff --git a/src/app/views/catalogs/new.html.haml b/src/app/views/catalogs/new.html.haml
index d293ee0..8ad7f2d 100644
--- a/src/app/views/catalogs/new.html.haml
+++ b/src/app/views/catalogs/new.html.haml
@@ -4,8 +4,9 @@
%header
%h1=t'catalogs.new.add_catalog'
#obj_actions
- = t'return_to'
- = link_to t("catalogs.catalogs"), catalogs_path, :class => 'rounded-link'
+ .return_to
+ = t'return_to'
+ = link_to t("catalogs.catalogs"), catalogs_path
%section.admin-content-section
= form_for @catalog, :url => catalogs_path, :html => {:class => 'generic'} do |f|
diff --git a/src/app/views/hardware_profiles/new.html.haml b/src/app/views/hardware_profiles/new.html.haml
index 92d2962..b60db27 100644
--- a/src/app/views/hardware_profiles/new.html.haml
+++ b/src/app/views/hardware_profiles/new.html.haml
@@ -4,8 +4,9 @@
%header
%h1=t'hardware_profiles.new.new_hwp'
#obj_actions
- = t'return_to'
- = link_to t('hardware_profiles.hardware_profiles'), hardware_profiles_path, :class => 'rounded-link'
+ .return_to
+ = t'return_to'
+ = link_to t('hardware_profiles.hardware_profiles'), hardware_profiles_path
%section.admin-content-section
= form_for @hardware_profile, :url => hardware_profiles_path, :html => { :multipart => true } do |hwp_form|
diff --git a/src/app/views/images/edit_xml.html.haml b/src/app/views/images/edit_xml.html.haml
index ce330e3..d8e4978 100644
--- a/src/app/views/images/edit_xml.html.haml
+++ b/src/app/views/images/edit_xml.html.haml
@@ -2,8 +2,9 @@
%header.admin-page-header
%h1.images= @name
#obj_actions.button-container
- = t :return_to
- = link_to t('images.environment', :environment => @environment.name), pool_family_path(@environment), :class => 'rounded-link'
+ .return_to
+ = t :return_to
+ = link_to t('images.environment', :environment => @environment.name), pool_family_path(@environment)
%section.admin-content-section
%header
diff --git a/src/app/views/images/import.html.haml b/src/app/views/images/import.html.haml
index f725b74..e83fa2f 100644
--- a/src/app/views/images/import.html.haml
+++ b/src/app/views/images/import.html.haml
@@ -2,8 +2,9 @@
%header.admin-page-header
%h1.images= t('.import_image')
#obj_actions.button-container
- = t :return_to
- = link_to t('images.environment', :environment => @environment.name), pool_family_path(@environment), :class => 'rounded-link'
+ .return_to
+ = t :return_to
+ = link_to t('images.environment', :environment => @environment.name), pool_family_path(@environment)
%section.admin-content-section.image-import
diff --git a/src/app/views/images/new.html.haml b/src/app/views/images/new.html.haml
index 838bb63..90a348d 100644
--- a/src/app/views/images/new.html.haml
+++ b/src/app/views/images/new.html.haml
@@ -2,8 +2,9 @@
%header.admin-page-header
%h1.images= t('.new_image')
#obj_actions.button-container
- = t :return_to
- = link_to t('images.environment', :environment => @environment.name), pool_family_path(@environment), :class => 'rounded-link'
+ .return_to
+ = t(:return_to)
+ = link_to t('images.environment', :environment => @environment.name), pool_family_path(@environment)
%section.admin-content-section
.content
diff --git a/src/app/views/images/overview.html.haml b/src/app/views/images/overview.html.haml
index 0b716a1..f5f9256 100644
--- a/src/app/views/images/overview.html.haml
+++ b/src/app/views/images/overview.html.haml
@@ -2,8 +2,9 @@
%header.admin-page-header
%h1.images= @name
#obj_actions.button-container
- = t :return_to
- = link_to t('images.environment', :environment => @environment.name), pool_family_path(@environment), :class => 'rounded-link'
+ .return_to
+ = t :return_to
+ = link_to t('images.environment', :environment => @environment.name), pool_family_path(@environment)
%section.admin-content-section
.content
diff --git a/src/app/views/images/show.html.haml b/src/app/views/images/show.html.haml
index edcd57a..82c00f5 100644
--- a/src/app/views/images/show.html.haml
+++ b/src/app/views/images/show.html.haml
@@ -2,15 +2,15 @@
%header.admin-page-header
%h1{:class => controller.controller_name}= @image.imported? ? @image.name + " (Imported)" : @image.name
#obj_actions.button-container.images
- %span.return_to
+ .return_to
=t'return_to'
- = link_to t('images.index.images'), images_path, :class => 'rounded-link'
+ = link_to t('images.index.images'), images_path
- if check_privilege(Privilege::USE, PoolFamily)
.button-group
- if @environment
= link_to t('.new_deployable_from_image'), new_deployable_path(:create_from_image => @image.id), :class => 'button pill'
- unless @image.imported?
- = link_to t('.template_xml'), template_image_path(@image.uuid), :class => 'button'
+ = link_to t('.template_xml'), template_image_path(@image.uuid), :class => 'button pill'
= button_to t("delete"), image_path(@image.id), :method => 'delete', :confirm => "Are you sure you want to delete?", :class => 'button pill danger', :id => 'delete'
%section.admin-content-section
diff --git a/src/app/views/permissions/_new.html.haml b/src/app/views/permissions/_new.html.haml
index 4c9ec68..355802e 100644
--- a/src/app/views/permissions/_new.html.haml
+++ b/src/app/views/permissions/_new.html.haml
@@ -1,8 +1,9 @@
%header.admin-page-header
%h1{:class => controller.controller_name}= t'permissions.form.grant_access'
#obj_actions.button-group
- = t'return_to'
- = link_to @return_text, @return_path, :class => 'rounded-link', :id => 'new_pool_button'
+ .return_to
+ = t'return_to'
+ = link_to @return_text, @return_path, :id => 'new_pool_button'
%section.admin-content-section.pools
.align-center
diff --git a/src/app/views/pool_families/_pools.html.haml b/src/app/views/pool_families/_pools.html.haml
index e9b03d0..9e5cff0 100644
--- a/src/app/views/pool_families/_pools.html.haml
+++ b/src/app/views/pool_families/_pools.html.haml
@@ -10,4 +10,4 @@
%td{:class => 'center'}= pool_stats[:used_quota]
%td{:class => 'center'}= pool_stats[:available_quota].nil? ? raw('∞') : pool_stats[:available_quota]
%td= link_to pool.catalogs.first.name, catalog_path(pool.catalogs.first) if pool.catalogs.any?
- %td= link_to t(:edit), edit_pool_path(pool), :class => 'rounded-link'
+ %td= link_to t(:edit), edit_pool_path(pool)
diff --git a/src/app/views/pool_families/add_provider_accounts.html.haml b/src/app/views/pool_families/add_provider_accounts.html.haml
index 13fab24..dc1166a 100644
--- a/src/app/views/pool_families/add_provider_accounts.html.haml
+++ b/src/app/views/pool_families/add_provider_accounts.html.haml
@@ -2,10 +2,9 @@
%header.admin-page-header
%h1= @pool_family.name
#obj_actions.button-container
- .button-group
+ .return_to
= t'return_to'
- = link_to @pool_family.name, pool_family_path(@pool_family, :details_tab => 'provider_accounts'), :class => 'rounded-link', :id => 'new_pool_button'
- .corner
+ = link_to @pool_family.name, pool_family_path(@pool_family, :details_tab => 'provider_accounts'), :id => 'new_pool_button'
%section.admin-content-section.pool_families
%h3= t("pool_families.choose_provider_accounts")
diff --git a/src/app/views/pool_families/edit.html.haml b/src/app/views/pool_families/edit.html.haml
index ebfa9a4..ad115fa 100644
--- a/src/app/views/pool_families/edit.html.haml
+++ b/src/app/views/pool_families/edit.html.haml
@@ -3,8 +3,9 @@
%header.admin-page-header
%h1= @pool_family.name
#obj_actions
- = t("pool_families.edit.return_to")
- = link_to t("pool_families.new.environments"), pool_families_path, :class => 'rounded-link'
+ .return_to
+ = t("return_to")
+ = link_to t("pool_families.new.environments"), pool_families_path
%section.admin-content-section.pool_family
%header
diff --git a/src/app/views/pool_families/new.html.haml b/src/app/views/pool_families/new.html.haml
index 594c8d7..8cefebe 100644
--- a/src/app/views/pool_families/new.html.haml
+++ b/src/app/views/pool_families/new.html.haml
@@ -2,8 +2,9 @@
%header.admin-page-header
%h1= t("pool_families.index.new_pool_family")
#obj_actions
- = t("return_to")
- = link_to t("pool_families.new.environments"), pool_families_path, :class => 'rounded-link'
+ .return_to
+ = t("return_to")
+ = link_to t("pool_families.new.environments"), pool_families_path
%section.admin-content-section.pool_family
.content
diff --git a/src/app/views/provider_accounts/edit.html.haml b/src/app/views/provider_accounts/edit.html.haml
index 8854e88..9889559 100644
--- a/src/app/views/provider_accounts/edit.html.haml
+++ b/src/app/views/provider_accounts/edit.html.haml
@@ -4,8 +4,9 @@
=t'provider_accounts.edit.account'
= @provider_account.name
#obj_actions
- =t'return_to'
- = link_to t('provider_accounts.new.cloud_providers'), edit_provider_path(@provider, :details_tab => 'accounts'), :class => 'rounded-link'
+ .return_to
+ =t'return_to'
+ = link_to t('provider_accounts.new.cloud_providers'), edit_provider_path(@provider, :details_tab => 'accounts')
%section.admin-content-section
%header
diff --git a/src/app/views/provider_accounts/new.html.haml b/src/app/views/provider_accounts/new.html.haml
index 652cb6b..3dc383a 100644
--- a/src/app/views/provider_accounts/new.html.haml
+++ b/src/app/views/provider_accounts/new.html.haml
@@ -2,8 +2,9 @@
%header.admin-page-header
%h1=t'provider_accounts.new.new_provider_account'
#obj_actions
- = t'return_to'
- = link_to t('provider_accounts.new.cloud_providers'), edit_provider_path(@provider, :details_tab => 'accounts'), :class => 'rounded-link'
+ .return_to
+ = t'return_to'
+ = link_to t('provider_accounts.new.cloud_providers'), edit_provider_path(@provider, :details_tab => 'accounts')
%section.admin-content-section.provider_accounts
.content
diff --git a/src/app/views/provider_accounts/show.html.haml b/src/app/views/provider_accounts/show.html.haml
index acffbce..ef2cf8c 100644
--- a/src/app/views/provider_accounts/show.html.haml
+++ b/src/app/views/provider_accounts/show.html.haml
@@ -4,8 +4,9 @@
=t'provider_accounts.show.account'
= @provider_account.name
#obj_actions
- =t'return_to'
- = link_to t('provider_accounts.new.cloud_providers'), edit_provider_path(@provider, :details_tab => 'accounts'), :class => 'rounded-link'
+ .return_to
+ =t'return_to'
+ = link_to t('provider_accounts.new.cloud_providers'), edit_provider_path(@provider, :details_tab => 'accounts')
%section.admin-content-section
%header
diff --git a/src/app/views/provider_realms/show.html.haml b/src/app/views/provider_realms/show.html.haml
index e4183c1..eda527e 100644
--- a/src/app/views/provider_realms/show.html.haml
+++ b/src/app/views/provider_realms/show.html.haml
@@ -2,9 +2,9 @@
%header.admin-page-header
%h1{:class => controller.controller_name}= @realm.name
#obj_actions.button_container
- .button-group
+ .return_to
= t('return_to')
- = link_to t('provider_realms'), edit_provider_path(@realm.provider, :details_tab => 'realms', :only_tab => true), :class => 'rounded-link', :id => 'back_to_provider_realms_button'
+ = link_to t('provider_realms'), edit_provider_path(@realm.provider, :details_tab => 'realms', :only_tab => true), :id => 'back_to_provider_realms_button'
- unless @realm.available
%section.admin-content-section
%header.align-center
diff --git a/src/app/views/realms/new.html.haml b/src/app/views/realms/new.html.haml
index 1182260..60427f4 100644
--- a/src/app/views/realms/new.html.haml
+++ b/src/app/views/realms/new.html.haml
@@ -2,8 +2,9 @@
%header.admin-page-header
%h1=t 'realms.new.create_realm'
#obj_actions
- Return to:
- = link_to t('realms.realms'), realms_path, :class => 'rounded-link'
+ .return_to
+ =t'return_to'
+ = link_to t('realms.realms'), realms_path
%section.admin-content-section.users
.content
diff --git a/src/app/views/settings/self_service.html.haml b/src/app/views/settings/self_service.html.haml
index 2567883..2dedda4 100644
--- a/src/app/views/settings/self_service.html.haml
+++ b/src/app/views/settings/self_service.html.haml
@@ -2,8 +2,9 @@
%header.admin-page-header
%h1{:class => controller.controller_name}=t '.self_service_settings'
#obj_actions.button-group
- = t 'return_to'
- = link_to "Settings", settings_path, :class => 'rounded-link'
+ .return_to
+ = t 'return_to'
+ = link_to "Settings", settings_path
%section.admin-content-section
%header
diff --git a/src/app/views/users/_section_header.html.haml b/src/app/views/users/_section_header.html.haml
index eabd1e4..0744b50 100644
--- a/src/app/views/users/_section_header.html.haml
+++ b/src/app/views/users/_section_header.html.haml
@@ -1,7 +1,8 @@
%header.admin-page-header
#obj_actions
- =t'users.quick_jump'
- = link_to 'Groups', "#groups", :class => 'rounded-link'
- = link_to 'Users', "#users", :class => 'rounded-link'
- = link_to 'Roles', "#roles", :class => 'rounded-link'
+ .return_to
+ =t'users.quick_jump'
+ = link_to 'Groups', "#groups"
+ = link_to 'Users', "#users"
+ = link_to 'Roles', "#roles"
.clear
diff --git a/src/app/views/users/edit.html.haml b/src/app/views/users/edit.html.haml
index ccf75e2..293c10c 100644
--- a/src/app/views/users/edit.html.haml
+++ b/src/app/views/users/edit.html.haml
@@ -5,8 +5,9 @@
- else
%h1.users=t'users.edit.edit_account'
#obj_actions
- =t'users.return_to'
- = link_to "#{t'users.users'}", users_path, :class => 'rounded-link'
+ .return_to
+ =t'users.return_to'
+ = link_to "#{t'users.users'}", users_path
%section.admin-content-section.user
.content
diff --git a/src/app/views/users/new.html.haml b/src/app/views/users/new.html.haml
index 6a981be..d8a18ba 100644
--- a/src/app/views/users/new.html.haml
+++ b/src/app/views/users/new.html.haml
@@ -2,8 +2,9 @@
%header.admin-page-header
%h1.users=t'users.new.new_user'
#obj_actions
- =t'users.return_to'
- = link_to "#{t'users.users'}", users_path, :class => 'rounded-link'
+ .return_to
+ =t'return_to'
+ = link_to "#{t'users.users'}", users_path
%section.admin-content-section.users
.content
diff --git a/src/app/views/users/show.html.haml b/src/app/views/users/show.html.haml
index af56aab..a344558 100644
--- a/src/app/views/users/show.html.haml
+++ b/src/app/views/users/show.html.haml
@@ -1,8 +1,9 @@
= render :partial => 'layouts/admin_nav'
%header.admin-page-header
#obj_actions
- =t'users.return_to'
- = link_to t('users.users'), users_path, :class => 'rounded-link'
+ .return_to
+ =t'return_to'
+ = link_to t('users.users'), users_path
%section.admin-content-section.user
.content
--
1.7.7.6
More information about the aeolus-devel
mailing list