瀏覽代碼

[core] Rename Pig to Pig Editor in admin wizard

Romain Rigaux 12 年之前
父節點
當前提交
a8ba24f8e4

+ 1 - 1
apps/about/src/about/templates/admin_wizard.mako

@@ -96,7 +96,7 @@ ${ commonheader(_('About Hue'), "quick_start", user, "100px") | n,unicode }
         % if 'pig' in app_names:
           <li>
             <a href="#" class="installBtn" data-loading-text="${ _('Installing...') }" data-url="${ url('pig:install_examples') }">
-             <i class="icon-download-alt"></i> Pig
+             <i class="icon-download-alt"></i> ${ apps['pig'].nice_name }
             </a>
           </li>
         % endif

+ 2 - 1
apps/about/src/about/views.py

@@ -29,6 +29,7 @@ def admin_wizard(request):
   return render('admin_wizard.mako', request, {
       'version': settings.HUE_DESKTOP_VERSION,
       'check_config': check_config(request),
-      'app_names': app_names
+      'apps': dict([(app.name, app) for app in apps]),
+      'app_names': app_names,
   })
 

+ 3 - 7
desktop/core/src/desktop/templates/home.mako

@@ -21,12 +21,8 @@
 ${ commonheader(_('Home'), "home", user) | n,unicode }
 
 
-<%def name="app_link(current_app, label, extra_path = '')">
-  %for app in apps:
-    %if app == current_app:
-      <li><a href="/${app}${extra_path}"><i class="icon-double-angle-right"></i> ${label}</a></li>
-    %endif
-  %endfor
+<%def name="app_link(app, label=None, extra_path = '')">
+  <li><a href="/${ app }${ extra_path }"><i class="icon-double-angle-right"></i> ${ label is not None and label or apps[app].nice_name }</a></li>
 </%def>
 
 
@@ -55,7 +51,7 @@ ${ commonheader(_('Home'), "home", user) | n,unicode }
           <ul>
             ${ app_link("beeswax", _('Hive')) }
             ${ app_link("impala", _('Impala')) }
-            ${ app_link("pig", _('Pig')) }
+            ${ app_link("pig") }
             ${ app_link("shell", _('Shell')) }
           </ul>
         </div>