[PATCH conductor] BZ#789363 Add appropriate Titles to the layout

tsedovic at redhat.com tsedovic at redhat.com
Fri Feb 17 16:10:40 UTC 2012


From: Tomas Sedovic <tomas at sedovic.cz>

https://bugzilla.redhat.com/show_bug.cgi?id=789363

Our <title> tag is no longer static. It now changes according to the page that
we display.
---
 src/app/controllers/application_controller.rb      |    6 +++++-
 src/app/controllers/catalogs_controller.rb         |    4 ++++
 src/app/controllers/deployments_controller.rb      |    4 ++++
 .../controllers/hardware_profiles_controller.rb    |    8 ++++++++
 src/app/controllers/permissions_controller.rb      |    1 +
 src/app/controllers/pool_families_controller.rb    |    4 ++++
 src/app/controllers/pools_controller.rb            |    3 +++
 .../controllers/provider_accounts_controller.rb    |    3 +++
 src/app/controllers/provider_realms_controller.rb  |    1 +
 src/app/controllers/providers_controller.rb        |    2 ++
 src/app/controllers/realm_mappings_controller.rb   |    1 +
 src/app/controllers/realms_controller.rb           |    6 ++++--
 src/app/controllers/users_controller.rb            |    4 ++++
 src/app/views/catalogs/edit.html.haml              |    2 +-
 src/app/views/catalogs/new.html.haml               |    2 +-
 src/app/views/catalogs/show.html.haml              |    2 +-
 src/app/views/deployments/_header_show.html.haml   |    3 +--
 src/app/views/deployments/_launch_new.html.haml    |    2 +-
 .../views/deployments/launch_time_params.html.haml |    2 +-
 src/app/views/hardware_profiles/edit.html.haml     |    2 +-
 src/app/views/hardware_profiles/new.html.haml      |    2 +-
 src/app/views/hardware_profiles/show.html.haml     |    2 +-
 src/app/views/layouts/application.html.haml        |    2 +-
 src/app/views/permissions/_new.html.haml           |    2 +-
 src/app/views/pool_families/_list.html.haml        |    2 +-
 src/app/views/pool_families/edit.html.haml         |    2 +-
 src/app/views/pool_families/new.html.haml          |    2 +-
 src/app/views/pool_families/show.html.haml         |    2 +-
 src/app/views/pools/_edit.html.haml                |    4 +---
 src/app/views/pools/_header_index.html.haml        |    2 +-
 src/app/views/pools/_header_show.html.haml         |    3 +--
 src/app/views/pools/_new.html.haml                 |    2 +-
 src/app/views/provider_accounts/edit.html.haml     |    4 +---
 src/app/views/provider_accounts/new.html.haml      |    2 +-
 src/app/views/provider_accounts/show.html.haml     |    4 +---
 src/app/views/provider_realms/show.html.haml       |    2 +-
 src/app/views/providers/new.html.haml              |    2 +-
 src/app/views/realm_mappings/new.html.haml         |    2 +-
 src/app/views/realms/edit.html.haml                |    2 +-
 src/app/views/realms/new.html.haml                 |    2 +-
 src/app/views/realms/show.html.haml                |    2 +-
 src/app/views/users/_list.html.haml                |    2 +-
 src/app/views/users/edit.html.haml                 |    2 +-
 src/app/views/users/new.html.haml                  |    2 +-
 src/app/views/users/show.html.haml                 |    2 +-
 src/config/locales/en.yml                          |   12 +++++++++---
 46 files changed, 85 insertions(+), 46 deletions(-)

diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
index 7f74a81..3361142 100644
--- a/src/app/controllers/application_controller.rb
+++ b/src/app/controllers/application_controller.rb
@@ -23,7 +23,7 @@ class ApplicationController < ActionController::Base
   # FIXME: not sure what we're doing aobut service layer w/ deltacloud
   include ApplicationService
   helper_method :current_user, :filter_view?
-  before_filter :read_breadcrumbs, :set_locale
+  before_filter :read_breadcrumbs, :set_locale, :set_default_title
 
   # General error handlers, must be in order from least specific
   # to most specific
@@ -355,6 +355,10 @@ class ApplicationController < ActionController::Base
     (ordered_languages & I18n.available_locales).first
   end
 
+  def set_default_title
+    @title = t 'layout.appname'
+  end
+
   def redirect_to_original(extended_params = {})
     path = params[:current_path]
     # In cases when current_path contains prefix like '/conductor' recognize_path fails.
diff --git a/src/app/controllers/catalogs_controller.rb b/src/app/controllers/catalogs_controller.rb
index 706e9ca..2848288 100644
--- a/src/app/controllers/catalogs_controller.rb
+++ b/src/app/controllers/catalogs_controller.rb
@@ -18,6 +18,7 @@ class CatalogsController < ApplicationController
   before_filter :require_user
 
   def index
+    @title = t('catalogs.catalogs')
     clear_breadcrumbs
     @catalogs = Catalog.apply_filters(:preset_filter_id => params[:catalogs_preset_filter], :search_filter => params[:catalogs_search]).list_for_user(current_user, Privilege::VIEW)
     save_breadcrumb(catalogs_path(:viewstate => @viewstate ? @viewstate.id : nil))
@@ -32,11 +33,13 @@ class CatalogsController < ApplicationController
   def new
     require_privilege(Privilege::CREATE, Catalog)
     @catalog = Catalog.new(params[:catalog]) # ...when should there be params on new?
+    @title = t'catalogs.new.add_catalog'
     load_pools
   end
 
   def show
     @catalog = Catalog.find(params[:id])
+    @title = @catalog.name
     @deployables = @catalog.deployables.list_for_user(current_user, Privilege::VIEW).apply_filters(:preset_filter_id => params[:catalog_entries_preset_filter], :search_filter => params[:catalog_entries_search])
     require_privilege(Privilege::VIEW, @catalog)
     save_breadcrumb(catalog_path(@catalog), @catalog.name)
@@ -62,6 +65,7 @@ class CatalogsController < ApplicationController
 
   def edit
     @catalog = Catalog.find(params[:id])
+    @title = t('catalogs.edit.edit_catalog')
     load_pools
     require_privilege(Privilege::MODIFY, @catalog)
   end
diff --git a/src/app/controllers/deployments_controller.rb b/src/app/controllers/deployments_controller.rb
index e36c483..588e88e 100644
--- a/src/app/controllers/deployments_controller.rb
+++ b/src/app/controllers/deployments_controller.rb
@@ -37,6 +37,7 @@ class DeploymentsController < ApplicationController
 
   # It is expected that params[:pool_id] will be set on requests into this method
   def launch_new
+    @title = t 'deployments.new_deployment'
     @pool = Pool.find(params[:pool_id]) or raise "Invalid pool"
     require_privilege(Privilege::CREATE, Deployment, @pool)
     unless @pool.enabled
@@ -56,6 +57,7 @@ class DeploymentsController < ApplicationController
 
 
   def launch_time_params
+    @title = t 'deployments.new_deployment'
     unless params.has_key?(:deployable_id)
       flash[:error] = t('deployments.flash.warning.deployable_not_selected')
       redirect_to launch_new_deployments_path(:pool_id => params[:deployment][:pool_id]) and return
@@ -85,6 +87,7 @@ class DeploymentsController < ApplicationController
   end
 
   def overview
+    @title = t 'deployments.new_deployment'
     @deployment = Deployment.new(params[:deployment])
     @pool = @deployment.pool
     init_new_deployment_attrs
@@ -175,6 +178,7 @@ class DeploymentsController < ApplicationController
 
   def show
     @deployment = Deployment.find(params[:id])
+    @title = t('deployments.show.name', :name => @deployment.name)
     require_privilege(Privilege::VIEW, @deployment)
     init_new_deployment_attrs
     save_breadcrumb(deployment_path(@deployment, :viewstate => viewstate_id), @deployment.name)
diff --git a/src/app/controllers/hardware_profiles_controller.rb b/src/app/controllers/hardware_profiles_controller.rb
index 7a9e363..db94433 100644
--- a/src/app/controllers/hardware_profiles_controller.rb
+++ b/src/app/controllers/hardware_profiles_controller.rb
@@ -22,6 +22,7 @@ class HardwareProfilesController < ApplicationController
   before_filter :setup_hardware_profile, :only => [:new, :create, :edit, :update]
 
   def index
+    @title = t('hardware_profiles.hardware_profiles')
     clear_breadcrumbs
     save_breadcrumb(hardware_profiles_path)
     @params = params
@@ -43,6 +44,11 @@ class HardwareProfilesController < ApplicationController
   def show
     @hardware_profile = HardwareProfile.find(params[:id].to_a.first)
     require_privilege(Privilege::VIEW, @hardware_profile)
+    @title = if @hardware_profile.provider_hardware_profile?
+               t('hardware_profiles.show.backend_hwp', :name => @hardware_profile.name)
+             else
+               t('hardware_profiles.show.frontend_hwp', :name => @hardware_profile.name)
+             end
 
     @tab_captions = [t('hardware_profiles.tab_captions.properties'), t('hardware_profiles.tab_captions.history'), t('hardware_profiles.tab_captions.matching_provider_hwp')]
     @details_tab = params[:details_tab].blank? ? 'properties' : params[:details_tab]
@@ -63,6 +69,7 @@ class HardwareProfilesController < ApplicationController
 
   def new
     require_privilege(Privilege::CREATE, HardwareProfile)
+    @title = t'hardware_profiles.new.new_hwp'
 
     respond_to do |format|
       format.html { render :action => 'new'}
@@ -108,6 +115,7 @@ class HardwareProfilesController < ApplicationController
       @hardware_profile = HardwareProfile.find(params[:id])
     end
     require_privilege(Privilege::MODIFY, @hardware_profile)
+    @title = @hardware_profile.name.titlecase
     if @hardware_profile.provider_hardware_profile?
       flash[:warning] = t "hardware_profiles.flash.warning.cannot_edit_backend_hwp"
       redirect_to hardware_profile_path(@hardware_profile)
diff --git a/src/app/controllers/permissions_controller.rb b/src/app/controllers/permissions_controller.rb
index 3423923..ede9bb8 100644
--- a/src/app/controllers/permissions_controller.rb
+++ b/src/app/controllers/permissions_controller.rb
@@ -30,6 +30,7 @@ class PermissionsController < ApplicationController
 
   def new
     set_permission_object
+    @title = t'permissions.form.grant_access'
     @users = User.all
     @roles = Role.find_all_by_scope(@permission_object.class.name)
     if @permission_object == BasePermissionObject.general_permission_scope
diff --git a/src/app/controllers/pool_families_controller.rb b/src/app/controllers/pool_families_controller.rb
index d9398ed..7e33977 100644
--- a/src/app/controllers/pool_families_controller.rb
+++ b/src/app/controllers/pool_families_controller.rb
@@ -23,6 +23,7 @@ class PoolFamiliesController < ApplicationController
   before_filter :load_tab_captions_and_details_tab, :only => [:show]
 
   def index
+    @title = t("pool_families.pool_families")
     clear_breadcrumbs
     save_breadcrumb(pool_families_path)
     set_admin_environments_tabs 'pool_families'
@@ -33,6 +34,7 @@ class PoolFamiliesController < ApplicationController
   end
 
   def new
+    @title = t("pool_families.index.new_pool_family")
     require_privilege(Privilege::CREATE, PoolFamily)
     @pool_family = PoolFamily.new(:quota => Quota.new)
   end
@@ -54,6 +56,7 @@ class PoolFamiliesController < ApplicationController
   def edit
     @pool_family = PoolFamily.find(params[:id])
     require_privilege(Privilege::MODIFY, @pool_family)
+    @title = @pool_family.name
     @pool_family.quota ||= Quota.new
   end
 
@@ -72,6 +75,7 @@ class PoolFamiliesController < ApplicationController
 
   def show
     @pool_family = PoolFamily.find(params[:id])
+    @title = @pool_family.name
     save_breadcrumb(pool_family_path(@pool_family), @pool_family.name)
     require_privilege(Privilege::VIEW, @pool_family)
     @images = Aeolus::Image::Warehouse::Image.by_environment(@pool_family.name)
diff --git a/src/app/controllers/pools_controller.rb b/src/app/controllers/pools_controller.rb
index cb5b1d7..a3fde4c 100644
--- a/src/app/controllers/pools_controller.rb
+++ b/src/app/controllers/pools_controller.rb
@@ -81,6 +81,7 @@ class PoolsController < ApplicationController
 
   def show
     @pool = Pool.find(params[:id])
+    @title = t('pools.header_show.pool_name', :name => @pool.name)
     save_breadcrumb(pool_path(@pool, :viewstate => viewstate_id), @pool.name)
     require_privilege(Privilege::VIEW, @pool)
     @statistics = @pool.statistics(current_user)
@@ -110,6 +111,7 @@ class PoolsController < ApplicationController
 
   def new
     require_privilege(Privilege::CREATE, Pool)
+    @title = t('pools.create_new_pool')
     @pool = Pool.new
     @pool.pool_family = PoolFamily.find(params[:pool_family_id]) unless params[:pool_family_id].blank?
     @quota = Quota.new
@@ -144,6 +146,7 @@ class PoolsController < ApplicationController
 
   def edit
     @pool = Pool.find(params[:id])
+    @title = t('pools.edit_pool', :pool => @pool.name)
     require_privilege(Privilege::MODIFY, @pool)
     @quota = @pool.quota
     respond_to do |format|
diff --git a/src/app/controllers/provider_accounts_controller.rb b/src/app/controllers/provider_accounts_controller.rb
index e71ea28..f9f5f2d 100644
--- a/src/app/controllers/provider_accounts_controller.rb
+++ b/src/app/controllers/provider_accounts_controller.rb
@@ -33,6 +33,7 @@ class ProviderAccountsController < ApplicationController
   def show
     @tab_captions = [t('provider_accounts.tab_captions.properties'), t('provider_accounts.tab_captions.credentials'), t('provider_accounts.tab_captions.history'), t('provider_accounts.tab_captions.permissions')]
     @provider_account = ProviderAccount.find(params[:id])
+    @title = t('provider_accounts.show.account', :name => @provider_account.name)
     @provider = Provider.find(params[:provider_id])
     @realms = @provider_account.realms
     @account_id = @provider_account.credentials_hash['account_id']
@@ -57,6 +58,7 @@ class ProviderAccountsController < ApplicationController
 
   def new
     @provider_account = ProviderAccount.new
+    @title = t'provider_accounts.new.new_provider_account'
     @quota = Quota.new
     @providers = Provider.all
     if @providers.empty?
@@ -103,6 +105,7 @@ class ProviderAccountsController < ApplicationController
 
   def edit
     @provider_account = ProviderAccount.find(params[:id])
+    @title = t('provider_accounts.edit.account', :name => @provider_account.name)
     @provider = Provider.find(params[:provider_id])
     @selected_provider = @provider_account.provider
     @quota = @provider_account.quota
diff --git a/src/app/controllers/provider_realms_controller.rb b/src/app/controllers/provider_realms_controller.rb
index 66f29ea..bf9f9a4 100644
--- a/src/app/controllers/provider_realms_controller.rb
+++ b/src/app/controllers/provider_realms_controller.rb
@@ -30,6 +30,7 @@ class ProviderRealmsController < ApplicationController
 
   def show
     @realm = Realm.find(params[:id])
+    @title = @realm.name
 
     @tab_captions = [t('realms.tab_captions.properties'), t('realms.tab_captions.mapping')]
     @details_tab = params[:details_tab].blank? ? 'properties' : params[:details_tab]
diff --git a/src/app/controllers/providers_controller.rb b/src/app/controllers/providers_controller.rb
index 969281c..340955d 100644
--- a/src/app/controllers/providers_controller.rb
+++ b/src/app/controllers/providers_controller.rb
@@ -45,10 +45,12 @@ class ProvidersController < ApplicationController
     require_privilege(Privilege::CREATE, Provider)
     @provider = Provider.new
     @provider.url = Provider::DEFAULT_DELTACLOUD_URL
+    @title = t("providers.new.new_provider")
   end
 
   def edit
     @provider = Provider.find_by_id(params[:id])
+    @title = t 'cloud_providers'
     session[:current_provider_id] = @provider.id
     require_privilege(Privilege::MODIFY, @provider)
 
diff --git a/src/app/controllers/realm_mappings_controller.rb b/src/app/controllers/realm_mappings_controller.rb
index c8d040b..e57c8a0 100644
--- a/src/app/controllers/realm_mappings_controller.rb
+++ b/src/app/controllers/realm_mappings_controller.rb
@@ -19,6 +19,7 @@ class RealmMappingsController < ApplicationController
 
   def new
     require_privilege(Privilege::MODIFY, Realm)
+    @title = t'realm_mappings.new.create_new'
     @realm_target = RealmBackendTarget.new(:frontend_realm_id => params[:frontend_realm_id], :realm_or_provider_type => params[:realm_or_provider_type])
     load_backend_targets
   end
diff --git a/src/app/controllers/realms_controller.rb b/src/app/controllers/realms_controller.rb
index 9748451..6ba29b6 100644
--- a/src/app/controllers/realms_controller.rb
+++ b/src/app/controllers/realms_controller.rb
@@ -19,6 +19,7 @@ class RealmsController < ApplicationController
   before_filter :load_realms, :only =>[:index, :show]
 
   def index
+    @title = t('realms.realms')
     clear_breadcrumbs
     save_breadcrumb(realms_path)
     set_admin_content_tabs 'realms'
@@ -30,7 +31,7 @@ class RealmsController < ApplicationController
 
   def new
     require_privilege(Privilege::CREATE, Realm)
-    #@provider = Provider.find(params[:provider_id])
+    @title = t 'realms.new.create_realm'
     @realm = FrontendRealm.new
     load_backend_realms
   end
@@ -38,6 +39,7 @@ class RealmsController < ApplicationController
   def edit
     require_privilege(Privilege::MODIFY, Realm)
     @realm = FrontendRealm.find(params[:id])
+    @title = @realm.name
     load_backend_realms
   end
 
@@ -108,7 +110,7 @@ class RealmsController < ApplicationController
 
   def show
     @realm = FrontendRealm.find(params[:id])
-
+    @title = @realm.name
     @tab_captions = [t('realms.tab_captions.properties'), t('realms.tab_captions.mapping')]
     @details_tab = params[:details_tab].blank? ? 'properties' : params[:details_tab]
 
diff --git a/src/app/controllers/users_controller.rb b/src/app/controllers/users_controller.rb
index e44c6c2..493fb4d 100644
--- a/src/app/controllers/users_controller.rb
+++ b/src/app/controllers/users_controller.rb
@@ -22,6 +22,7 @@ class UsersController < ApplicationController
     if !check_privilege(Privilege::VIEW, User)
       redirect_to account_url and return
     end
+    @title = t'users.users'
     clear_breadcrumbs
     save_breadcrumb(users_path)
     set_admin_users_tabs 'users'
@@ -36,6 +37,7 @@ class UsersController < ApplicationController
 
   def new
     require_privilege(Privilege::CREATE, User) unless current_user.nil?
+    @title = t'users.new.new_user'
     @user = User.new
     @user.quota = Quota.new
   end
@@ -66,6 +68,7 @@ class UsersController < ApplicationController
   def show
     @user = params[:id] ? User.find(params[:id]) : current_user
     require_privilege(Privilege::VIEW, User) unless current_user == @user
+    @title = @user.name
     @quota_resources = @user.quota.quota_resources
     save_breadcrumb(user_path(@user), @user.name)
     @tab_captions = ['Properties']
@@ -84,6 +87,7 @@ class UsersController < ApplicationController
   def edit
     @user = params[:id] ? User.find(params[:id]) : current_user
     require_privilege(Privilege::MODIFY, User) unless @user == current_user
+    @title = t'users.edit.edit_user'
   end
 
   def update
diff --git a/src/app/views/catalogs/edit.html.haml b/src/app/views/catalogs/edit.html.haml
index 17009fc..4653e1f 100644
--- a/src/app/views/catalogs/edit.html.haml
+++ b/src/app/views/catalogs/edit.html.haml
@@ -8,7 +8,7 @@
 
 %section.admin-content-section.user
   %header
-    %h2=t('catalogs.edit.edit_catalog')
+    %h2= @title
 
   .content
     = form_for @catalog, :url => catalog_path(@catalog), :html => { :method => :put, :class => 'generic' } do |f|
diff --git a/src/app/views/catalogs/new.html.haml b/src/app/views/catalogs/new.html.haml
index d293ee0..13c988f 100644
--- a/src/app/views/catalogs/new.html.haml
+++ b/src/app/views/catalogs/new.html.haml
@@ -2,7 +2,7 @@
 
 %header.admin-page-header
   %header
-  %h1=t'catalogs.new.add_catalog'
+  %h1= @title
   #obj_actions
     = t'return_to'
     = link_to t("catalogs.catalogs"), catalogs_path, :class => 'rounded-link'
diff --git a/src/app/views/catalogs/show.html.haml b/src/app/views/catalogs/show.html.haml
index b633c6d..0ee2fe7 100644
--- a/src/app/views/catalogs/show.html.haml
+++ b/src/app/views/catalogs/show.html.haml
@@ -1,6 +1,6 @@
 = render :partial => 'layouts/admin_nav'
 %header.admin-page-header
-  %h1{:class => controller.controller_name}= @catalog.name
+  %h1{:class => controller.controller_name}= @title
   #obj_actions.button-container
     - if check_privilege(Privilege::CREATE, Catalog)
       = link_to t('catalogs.new_catalog'), new_catalog_url, :class => 'button primary', :id => 'new_catalog_button'
diff --git a/src/app/views/deployments/_header_show.html.haml b/src/app/views/deployments/_header_show.html.haml
index 46e525e..391bc6f 100644
--- a/src/app/views/deployments/_header_show.html.haml
+++ b/src/app/views/deployments/_header_show.html.haml
@@ -1,6 +1,5 @@
 %header.page-header
-  %h1.deployments
-    = [@deployment.name, t("deployments.deployment")].join(' ')
+  %h1.deployments= @title
   #obj_actions.button-container
     .button-group
       - if check_privilege(Privilege::MODIFY, @deployment)
diff --git a/src/app/views/deployments/_launch_new.html.haml b/src/app/views/deployments/_launch_new.html.haml
index 467d257..ef18898 100644
--- a/src/app/views/deployments/_launch_new.html.haml
+++ b/src/app/views/deployments/_launch_new.html.haml
@@ -2,7 +2,7 @@
   = render :partial => '/layouts/new_notification'
 %header.page-header
   %h1.deployments
-    =t 'deployments.new_deployment'
+    = @title
     %span= t('deployments.launch_new.to_pool', :name => "#{@pool.name.capitalize}")
   #obj_actions.button-container
     = link_to t('cancel'), pool_path(@pool), :class => 'button danger', :id => 'cancel_deployment_button'
diff --git a/src/app/views/deployments/launch_time_params.html.haml b/src/app/views/deployments/launch_time_params.html.haml
index f342256..7b98ca3 100644
--- a/src/app/views/deployments/launch_time_params.html.haml
+++ b/src/app/views/deployments/launch_time_params.html.haml
@@ -1,7 +1,7 @@
 = render :partial => 'layouts/nav_history'
 %header.page-header
   %h1.deployments
-    = [@deployment.pool.name, "Pool"].join(' ')
+    = t('pools.header_show.pool_name', :name => @deployment.pool.name)
   .corner &nbsp;
 
 %section.content-section.deployments.launch-time-params
diff --git a/src/app/views/hardware_profiles/edit.html.haml b/src/app/views/hardware_profiles/edit.html.haml
index eaf6b53..8a24948 100644
--- a/src/app/views/hardware_profiles/edit.html.haml
+++ b/src/app/views/hardware_profiles/edit.html.haml
@@ -1,7 +1,7 @@
 = render :partial => 'layouts/admin_nav'
 
 %header.admin-page-header
-  %h1{:class => controller.controller_name}= @hardware_profile.name.titlecase
+  %h1{:class => controller.controller_name}= @title
   #obj_actions.button-container
     = link_to t('hardware_profiles.list.new_hardware'), hardware_profile_url, :class => 'button primary', :id => 'new_user_button'
     %div.button-group
diff --git a/src/app/views/hardware_profiles/new.html.haml b/src/app/views/hardware_profiles/new.html.haml
index 92d2962..58a7692 100644
--- a/src/app/views/hardware_profiles/new.html.haml
+++ b/src/app/views/hardware_profiles/new.html.haml
@@ -2,7 +2,7 @@
 
 %header.admin-page-header
   %header
-  %h1=t'hardware_profiles.new.new_hwp'
+  %h1= @title
   #obj_actions
     = t'return_to'
     = link_to t('hardware_profiles.hardware_profiles'), hardware_profiles_path, :class => 'rounded-link'
diff --git a/src/app/views/hardware_profiles/show.html.haml b/src/app/views/hardware_profiles/show.html.haml
index 5b73086..3415bce 100644
--- a/src/app/views/hardware_profiles/show.html.haml
+++ b/src/app/views/hardware_profiles/show.html.haml
@@ -1,6 +1,6 @@
 = render :partial => 'layouts/admin_nav'
 %header.admin-page-header
-  %h1{:class => controller.controller_name}= @hardware_profile.name + " (" + (@hardware_profile.provider_id.nil? ? "Front End" : "Provider" ) + ")"
+  %h1{:class => controller.controller_name}= @title
   #obj_actions.button-container
     - if check_privilege(Privilege::CREATE, HardwareProfile)
       = link_to t('hardware_profiles.list.new_hardware'), new_hardware_profile_url, :class => 'button primary', :id => 'new_role_button'
diff --git a/src/app/views/layouts/application.html.haml b/src/app/views/layouts/application.html.haml
index f81093a..12e4064 100644
--- a/src/app/views/layouts/application.html.haml
+++ b/src/app/views/layouts/application.html.haml
@@ -2,7 +2,7 @@
 %html{"xml:lang" => "en", :lang => "en"}
   %head
     %meta{:charset => 'utf-8'}/
-    %title Aeolus Conductor
+    %title= @title
     %link{:rel =>  'shortcut icon', :href => '/favicon.ico'}
     = stylesheet_link_tag '/stylesheets/reset.css'
     = stylesheet_link_tag '/stylesheets/960.css'
diff --git a/src/app/views/permissions/_new.html.haml b/src/app/views/permissions/_new.html.haml
index 4c9ec68..3e100df 100644
--- a/src/app/views/permissions/_new.html.haml
+++ b/src/app/views/permissions/_new.html.haml
@@ -1,5 +1,5 @@
 %header.admin-page-header
-  %h1{:class => controller.controller_name}= t'permissions.form.grant_access'
+  %h1{:class => controller.controller_name}= @title
   #obj_actions.button-group
     = t'return_to'
     = link_to @return_text, @return_path, :class => 'rounded-link', :id => 'new_pool_button'
diff --git a/src/app/views/pool_families/_list.html.haml b/src/app/views/pool_families/_list.html.haml
index 40ca206..891828d 100644
--- a/src/app/views/pool_families/_list.html.haml
+++ b/src/app/views/pool_families/_list.html.haml
@@ -1,5 +1,5 @@
 %header
-  %h2.pools= t("pool_families.pool_families")
+  %h2.pools= @title
   .section-controls
     #obj_actions
       - if check_privilege(Privilege::CREATE, PoolFamily)
diff --git a/src/app/views/pool_families/edit.html.haml b/src/app/views/pool_families/edit.html.haml
index ebfa9a4..df62d05 100644
--- a/src/app/views/pool_families/edit.html.haml
+++ b/src/app/views/pool_families/edit.html.haml
@@ -1,7 +1,7 @@
 = render :partial => 'layouts/admin_nav'
 
 %header.admin-page-header
-  %h1= @pool_family.name
+  %h1= @title
   #obj_actions
     = t("pool_families.edit.return_to")
     = link_to t("pool_families.new.environments"), pool_families_path, :class => 'rounded-link'
diff --git a/src/app/views/pool_families/new.html.haml b/src/app/views/pool_families/new.html.haml
index 594c8d7..a09a862 100644
--- a/src/app/views/pool_families/new.html.haml
+++ b/src/app/views/pool_families/new.html.haml
@@ -1,6 +1,6 @@
 = render :partial => 'layouts/admin_nav'
 %header.admin-page-header
-  %h1= t("pool_families.index.new_pool_family")
+  %h1= @title
   #obj_actions
     = t("return_to")
     = link_to t("pool_families.new.environments"), pool_families_path, :class => 'rounded-link'
diff --git a/src/app/views/pool_families/show.html.haml b/src/app/views/pool_families/show.html.haml
index 40fd972..f1bb2ac 100644
--- a/src/app/views/pool_families/show.html.haml
+++ b/src/app/views/pool_families/show.html.haml
@@ -1,6 +1,6 @@
 = render :partial => 'layouts/admin_nav'
 %header.admin-page-header
-  %h1= @pool_family.name
+  %h1= @title
   #obj_actions.button-container
     .button-group
       = link_to t('edit'), edit_pool_family_path(@pool_family), :class => 'button pill'
diff --git a/src/app/views/pools/_edit.html.haml b/src/app/views/pools/_edit.html.haml
index 8de5245..3e4c302 100644
--- a/src/app/views/pools/_edit.html.haml
+++ b/src/app/views/pools/_edit.html.haml
@@ -9,9 +9,7 @@
 
 %section.content-section.user
   %header
-    %h2
-      =t'pools.edit_pool'
-      = @pool.name
+    %h2= @title
 
   .content
     = render :partial => 'form'
diff --git a/src/app/views/pools/_header_index.html.haml b/src/app/views/pools/_header_index.html.haml
index 1f5943f..cb7f0de 100644
--- a/src/app/views/pools/_header_index.html.haml
+++ b/src/app/views/pools/_header_index.html.haml
@@ -1,5 +1,5 @@
 %header.page-header
-  %h1.section-index=t 'pools.index.overview'
+  %h1.section-index= t 'pools.index.overview'
   #obj_actions.button-container
     .button-group
       = pretty_filter_toggle(pools_path(:view => 'pretty'), pools_path(:view => 'filter'))
diff --git a/src/app/views/pools/_header_show.html.haml b/src/app/views/pools/_header_show.html.haml
index ac9d8be..bd20688 100644
--- a/src/app/views/pools/_header_show.html.haml
+++ b/src/app/views/pools/_header_show.html.haml
@@ -1,6 +1,5 @@
 %header.page-header
-  %h1.pools
-    = t('.pool_name', :name => @pool.name)
+  %h1.pools= @title
   #obj_actions.button-container
     - if check_privilege(Privilege::CREATE, Deployment, @pool)
       = link_to t('deployments.new_deployment'), launch_new_deployments_path(:pool_id => @pool.id), :class => 'button primary', :id => 'new_deployment_button'
diff --git a/src/app/views/pools/_new.html.haml b/src/app/views/pools/_new.html.haml
index de87f0d..f7cebab 100644
--- a/src/app/views/pools/_new.html.haml
+++ b/src/app/views/pools/_new.html.haml
@@ -2,7 +2,7 @@
 
 %section.content-section.pools
   %header
-    %h2=t('pools.create_new_pool')
+    %h2= @title
 
   .content
     = render :partial => 'form'
diff --git a/src/app/views/provider_accounts/edit.html.haml b/src/app/views/provider_accounts/edit.html.haml
index 8854e88..6be5684 100644
--- a/src/app/views/provider_accounts/edit.html.haml
+++ b/src/app/views/provider_accounts/edit.html.haml
@@ -1,8 +1,6 @@
 = render :partial => 'layouts/admin_nav'
 %header.admin-page-header
-  %h1
-    =t'provider_accounts.edit.account'
-    = @provider_account.name
+  %h1= @title
   #obj_actions
     =t'return_to'
     = link_to t('provider_accounts.new.cloud_providers'), edit_provider_path(@provider, :details_tab => 'accounts'), :class => 'rounded-link'
diff --git a/src/app/views/provider_accounts/new.html.haml b/src/app/views/provider_accounts/new.html.haml
index 652cb6b..77460c4 100644
--- a/src/app/views/provider_accounts/new.html.haml
+++ b/src/app/views/provider_accounts/new.html.haml
@@ -1,6 +1,6 @@
 = render :partial => 'layouts/admin_nav'
 %header.admin-page-header
-  %h1=t'provider_accounts.new.new_provider_account'
+  %h1= @title
   #obj_actions
     = t'return_to'
     = link_to t('provider_accounts.new.cloud_providers'), edit_provider_path(@provider, :details_tab => 'accounts'), :class => 'rounded-link'
diff --git a/src/app/views/provider_accounts/show.html.haml b/src/app/views/provider_accounts/show.html.haml
index acffbce..18e8b3d 100644
--- a/src/app/views/provider_accounts/show.html.haml
+++ b/src/app/views/provider_accounts/show.html.haml
@@ -1,8 +1,6 @@
 = render :partial => 'layouts/admin_nav'
 %header.admin-page-header
-  %h1
-    =t'provider_accounts.show.account'
-    = @provider_account.name
+  %h1= @title
   #obj_actions
     =t'return_to'
     = link_to t('provider_accounts.new.cloud_providers'), edit_provider_path(@provider, :details_tab => 'accounts'), :class => 'rounded-link'
diff --git a/src/app/views/provider_realms/show.html.haml b/src/app/views/provider_realms/show.html.haml
index afa895a..f8fdee9 100644
--- a/src/app/views/provider_realms/show.html.haml
+++ b/src/app/views/provider_realms/show.html.haml
@@ -1,6 +1,6 @@
 = render :partial => 'layouts/admin_nav'
 %header.admin-page-header
-  %h1{:class => controller.controller_name}= @realm.name
+  %h1{:class => controller.controller_name}= @title
 
 - unless @realm.available
   %section.admin-content-section
diff --git a/src/app/views/providers/new.html.haml b/src/app/views/providers/new.html.haml
index 290100d..27edfbb 100644
--- a/src/app/views/providers/new.html.haml
+++ b/src/app/views/providers/new.html.haml
@@ -1,6 +1,6 @@
 = render :partial => 'layouts/admin_nav'
 %header.admin-page-header
-  %h1= @provider.name.blank? ? t("providers.new.new_provider") : @provider.name
+  %h1= @title
   #obj_actions
     %span.label.light Choose a provider:
     %ul#provider_select
diff --git a/src/app/views/realm_mappings/new.html.haml b/src/app/views/realm_mappings/new.html.haml
index fb1e340..f65943d 100644
--- a/src/app/views/realm_mappings/new.html.haml
+++ b/src/app/views/realm_mappings/new.html.haml
@@ -1,7 +1,7 @@
 = render :partial => 'layouts/admin_nav'
 %header.admin-page-header
   %header
-    %h1= t'realm_mappings.new.create_new'
+    %h1= @title
 
 %section.admin-content-section
   - if @realm_target.errors.any?
diff --git a/src/app/views/realms/edit.html.haml b/src/app/views/realms/edit.html.haml
index f4af283..3f613a5 100644
--- a/src/app/views/realms/edit.html.haml
+++ b/src/app/views/realms/edit.html.haml
@@ -1,7 +1,7 @@
 = render :partial => 'layouts/admin_nav'
 
 %header.admin-page-header
-  %h1{:class => controller.controller_name}= @realm.name
+  %h1{:class => controller.controller_name}= @title
   #obj_actions.button-container
     = link_to t('realms.new_realm'), new_realm_url, :class => 'button primary', :id => 'new_user_button'
     %div.button-group
diff --git a/src/app/views/realms/new.html.haml b/src/app/views/realms/new.html.haml
index 1182260..2289ea3 100644
--- a/src/app/views/realms/new.html.haml
+++ b/src/app/views/realms/new.html.haml
@@ -1,6 +1,6 @@
 = render :partial => 'layouts/admin_nav'
 %header.admin-page-header
-  %h1=t 'realms.new.create_realm'
+  %h1= @title
   #obj_actions
     Return to:
     = link_to t('realms.realms'), realms_path, :class => 'rounded-link'
diff --git a/src/app/views/realms/show.html.haml b/src/app/views/realms/show.html.haml
index 4e06c68..b3ef52d 100644
--- a/src/app/views/realms/show.html.haml
+++ b/src/app/views/realms/show.html.haml
@@ -1,6 +1,6 @@
 = render :partial => 'layouts/admin_nav'
 %header.admin-page-header
-  %h1{:class => controller.controller_name}= @realm.name
+  %h1{:class => controller.controller_name}= @title
   #obj_actions.button-container
     - if check_privilege(Privilege::CREATE, Realm)
       = link_to t('realms.new_realm'), new_realm_url, :class => 'button primary', :id => 'new_realm_button'
diff --git a/src/app/views/users/_list.html.haml b/src/app/views/users/_list.html.haml
index decfe2b..5978181 100644
--- a/src/app/views/users/_list.html.haml
+++ b/src/app/views/users/_list.html.haml
@@ -1,5 +1,5 @@
 %header
-  %h2#users.users=t'users.users'
+  %h2#users.users= @title
   .section-controls
     #obj_actions
       = link_to "", new_user_path, :class => 'add-user-button', :id => 'add_user_button'
diff --git a/src/app/views/users/edit.html.haml b/src/app/views/users/edit.html.haml
index ccf75e2..ed99fe2 100644
--- a/src/app/views/users/edit.html.haml
+++ b/src/app/views/users/edit.html.haml
@@ -1,7 +1,7 @@
 = render :partial => 'layouts/admin_nav'
 %header.admin-page-header
   - if check_privilege(Privilege::MODIFY, User)
-    %h1.users=t'users.edit.edit_user'
+    %h1.users= @title
   - else
     %h1.users=t'users.edit.edit_account'
   #obj_actions
diff --git a/src/app/views/users/new.html.haml b/src/app/views/users/new.html.haml
index 6a981be..b3f8186 100644
--- a/src/app/views/users/new.html.haml
+++ b/src/app/views/users/new.html.haml
@@ -1,6 +1,6 @@
 = render :partial => 'layouts/admin_nav'
 %header.admin-page-header
-  %h1.users=t'users.new.new_user'
+  %h1.users= @title
   #obj_actions
     =t'users.return_to'
     = link_to "#{t'users.users'}", users_path, :class => 'rounded-link'
diff --git a/src/app/views/users/show.html.haml b/src/app/views/users/show.html.haml
index af56aab..dd90fd5 100644
--- a/src/app/views/users/show.html.haml
+++ b/src/app/views/users/show.html.haml
@@ -8,7 +8,7 @@
   .content
     #user_card.user_stats_card
       %header.user-card-header
-        %h2= @user.name
+        %h2= @title
       .user-card-content
         %dl
           %dt=t'users.show.e-mail'
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index f471d78..b46998f 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -1,5 +1,6 @@
 en:
   layout:
+    appname: Aeolus Conductor
     copyright: "Copyright &copy; 2009-2012 Red Hat, Inc."
     dashboard: Dashboard
   datetime:
@@ -179,6 +180,7 @@ en:
       pending: Some (but not all) instances are running
       stopped: No instances are currently running
     launch_time_params:
+      title: "Launch-time parameters"
       configure_launch_time_params: "Configure launch-time parameters for your deployment:"
       finalize: Finalize
       reference: "Reference to %{assembly}'s return parameter: %{parameter}"
@@ -205,6 +207,8 @@ en:
       ram: RAM
       arch: ARCH
       deployable_xml: Deployable XML
+    show:
+      name: %{name} Deployment
     new:
       launch: Launch this deployment
       deployable_definition: Deployable definition
@@ -408,7 +412,7 @@ en:
     pool: Pool
     pools: Pools
     new_pool: New Pool
-    edit_pool: Edit Pool
+    edit_pool: Edit Pool %{pool}
     create_new_pool: Create New Pool
     index:
       pool_name: Pool name
@@ -510,6 +514,8 @@ en:
     new:
       new_hwp: New Hardware Profile
     show:
+      frontend_hwp: %{name} (Front End)
+      backend_hwp: %{name} (Provider)
       matching_hwp: Matching Provider Hardware Profiles
     flash:
       notice:
@@ -1052,11 +1058,11 @@ en:
     edit:
       edit_provider_account: Edit Provider Account
       required_field: Required field.
-      account: "Account:"
+      account: "Edit Account: %{name}"
       delete_account: Delete Account
       file_already_uploaded: "Already uploaded. Reupload?"
     show:
-      account: "Account:"
+      account: "Account: %{name}"
       test_connection: Test Connection
     form:
       provider_accounts: Provider Accounts
-- 
1.7.6.5




More information about the aeolus-devel mailing list