浏览代码

[editor] Link to the new Pig editor in the menu

Romain Rigaux 9 年之前
父节点
当前提交
e7516c3c1c

+ 4 - 0
desktop/core/src/desktop/templates/common_header.mako

@@ -441,7 +441,11 @@ from django.utils.translation import ugettext as _
              % endif
            % endif
            % if 'pig' in apps:
+             % if USE_NEW_EDITOR.get():
+             <li><a href="${ url('notebook:editor') }?type=pig"><img src="${ static(apps['pig'].icon_path) }" class="app-icon"/> ${_('Pig')}</a></li>
+             % else:
              <li><a href="/${apps['pig'].display_name}"><img src="${ static(apps['pig'].icon_path) }" class="app-icon"/> ${_('Pig')}</a></li>
+             % endif
            % endif
            % if 'jobsub' in apps:
              <li><a href="/${apps['jobsub'].display_name}"><img src="${ static(apps['jobsub'].icon_path) }" class="app-icon"/> ${_('Job Designer')}</a></li>

+ 3 - 0
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -225,6 +225,9 @@ ${ require.config() }
               % elif editor_type == 'rdbms':
                 <img src="${ static('rdbms/art/icon_rdbms_48.png') }" class="app-icon" />
                 DB Query
+              % elif editor_type == 'pig':
+                <img src="${ static('pig/art/icon_pig_48.png') }" class="app-icon" />
+                Pig
               % else:
                 <img src="${ static('beeswax/art/icon_beeswax_48.png') }" class="app-icon" />
                 Hive