Index: galaxy-central/database/files/000/dataset_1.dat
===================================================================
--- galaxy-central/database/files/000/dataset_1.dat (revision 3)
+++ galaxy-central/database/files/000/dataset_1.dat (revision 3)
@@ -0,0 +1,2 @@
+1	gene1
+2	gene2
Index: galaxy-central/database/files/000/dataset_2.dat
===================================================================
--- galaxy-central/database/files/000/dataset_2.dat (revision 3)
+++ galaxy-central/database/files/000/dataset_2.dat (revision 3)
@@ -0,0 +1,2 @@
+chr1	gene1
+chr2	gene2
Index: galaxy-central/database/compiled_templates/tool_executed.mako.py
===================================================================
--- galaxy-central/database/compiled_templates/tool_executed.mako.py (revision 3)
+++ galaxy-central/database/compiled_templates/tool_executed.mako.py (revision 3)
@@ -0,0 +1,68 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1287725813.3330619
+_template_filename='templates/tool_executed.mako'
+_template_uri='tool_executed.mako'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = []
+
+
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        h = context.get('h', UNDEFINED)
+        tool = context.get('tool', UNDEFINED)
+        trans = context.get('trans', UNDEFINED)
+        out_data = context.get('out_data', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 1
+        __M_writer(u'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<html>\n\n<head>\n<title>Galaxy</title>\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n<link href="')
+        # SOURCE LINE 7
+        __M_writer(unicode(h.url_for('/static/style/base.css')))
+        __M_writer(u'" rel="stylesheet" type="text/css" />\n<script type="text/javascript">\n  var inside_galaxy_frameset = false;\n\n  if ( parent.frames && parent.frames.galaxy_history ) {\n      parent.frames.galaxy_history.location.href="')
+        # SOURCE LINE 12
+        __M_writer(unicode(h.url_for( controller='root', action='history' )))
+        __M_writer(u'";\n      inside_galaxy_frameset = true;\n  }\n\n')
+        # SOURCE LINE 16
+        if trans.user:  
+            # SOURCE LINE 17
+            __M_writer(u'      if (inside_galaxy_frameset)\n      {\n            parent.frames.galaxy_tools.update_recently_used();\n      }\n')
+        # SOURCE LINE 22
+        __M_writer(u'  \n  if ( parent.handle_minwidth_hint ) {\n      parent.handle_minwidth_hint( -1 );\n  }\n\n  function main() {\n    // If called from outside the galaxy frameset, redirect there\n')
+        # SOURCE LINE 29
+        if tool.options.refresh:
+            # SOURCE LINE 30
+            __M_writer(u'      if ( ! inside_galaxy_frameset ) {\n        setTimeout( "refresh()", 1000 );\n        document.getElementById( "refresh_message" ).style.display = "block";\n      }\n')
+        # SOURCE LINE 35
+        __M_writer(u"  }\n\n  function refresh() {\n    top.location.href = '")
+        # SOURCE LINE 38
+        __M_writer(unicode(h.url_for( "/" )))
+        __M_writer(u'\';\n  }  \n\n</script>\n\n</head>\n\n<body onLoad="main()">\n\n<div class="donemessagelarge">\n\n<p>The following job has been successfully added to the queue:</p>\n\n')
+        # SOURCE LINE 51
+        for data in out_data.values():
+            # SOURCE LINE 52
+            __M_writer(u'   <div style="padding: 10px"><b> ')
+            __M_writer(unicode(data.hid))
+            __M_writer(u': ')
+            __M_writer(unicode(data.name))
+            __M_writer(u'</b></div>\n')
+        # SOURCE LINE 54
+        __M_writer(u"\n<p>\nYou can check the status of queued jobs and view the resulting \ndata by refreshing the <b>History</b> pane. When the job has been run\nthe status will change from 'running' to 'finished' if completed \nsuccessfully or 'error' if problems were encountered.\n</p>\n\n")
+        # SOURCE LINE 62
+        if tool.options.refresh:
+            # SOURCE LINE 63
+            __M_writer(u'<p id="refresh_message" style="display: none;">You are now being redirected back to <a href="')
+            __M_writer(unicode(h.url_for( '/' )))
+            __M_writer(u'">Galaxy</a></div>\n')
+        # SOURCE LINE 65
+        __M_writer(u'\n</div>\n\n</body>\n\n</html>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
Index: galaxy-central/database/compiled_templates/message.mako.py
===================================================================
--- galaxy-central/database/compiled_templates/message.mako.py (revision 3)
+++ galaxy-central/database/compiled_templates/message.mako.py (revision 3)
@@ -0,0 +1,220 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1287725818.341774
+_template_filename=u'templates/message.mako'
+_template_uri=u'/message.mako'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['body', 'render_msg', 'center_panel', 'init', 'render_large_message', 'javascripts']
+
+
+# SOURCE LINE 1
+
+def inherit(context):
+    if context.get('use_panels'):
+        if context.get('webapp'):
+            webapp = context.get('webapp')
+        else:
+            webapp = 'galaxy'
+        return '/webapps/%s/base_panels.mako' % webapp
+    else:
+        return '/base.mako'
+
+
+def _mako_get_namespace(context, name):
+    try:
+        return context.namespaces[(__name__, name)]
+    except KeyError:
+        _mako_generate_namespaces(context)
+        return context.namespaces[(__name__, name)]
+def _mako_generate_namespaces(context):
+    pass
+def _mako_inherit(template, context):
+    _mako_generate_namespaces(context)
+    return runtime._inherit_from(context, (inherit(context)), _template_uri)
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        n_ = context.get('n_', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 11
+        __M_writer(u'\n')
+        # SOURCE LINE 12
+        __M_writer(u'\n')
+        # SOURCE LINE 13
+        _=n_ 
+        
+        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['_'] if __M_key in __M_locals_builtin()]))
+        __M_writer(u'\n\n')
+        # SOURCE LINE 22
+        __M_writer(u'\n\n')
+        # SOURCE LINE 66
+        __M_writer(u'\n\n')
+        # SOURCE LINE 71
+        __M_writer(u'\n')
+        # SOURCE LINE 74
+        __M_writer(u'\n\n')
+        # SOURCE LINE 78
+        __M_writer(u'\n\n')
+        # SOURCE LINE 83
+        __M_writer(u'\n\n')
+        # SOURCE LINE 89
+        __M_writer(u'\n\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_body(context):
+    context.caller_stack._push_frame()
+    try:
+        status = context.get('status', UNDEFINED)
+        message = context.get('message', UNDEFINED)
+        def render_large_message(message,status):
+            return render_render_large_message(context,message,status)
+        __M_writer = context.writer()
+        # SOURCE LINE 76
+        __M_writer(u'\n    ')
+        # SOURCE LINE 77
+        __M_writer(unicode(render_large_message( message, status )))
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_render_msg(context,msg,status='done'):
+    context.caller_stack._push_frame()
+    try:
+        _ = context.get('_', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 86
+        __M_writer(u'\n    <div class="')
+        # SOURCE LINE 87
+        __M_writer(unicode(status))
+        __M_writer(u'message">')
+        __M_writer(unicode(_(msg)))
+        __M_writer(u'</div>\n    <br/>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_center_panel(context):
+    context.caller_stack._push_frame()
+    try:
+        status = context.get('status', UNDEFINED)
+        message = context.get('message', UNDEFINED)
+        def render_large_message(message,status):
+            return render_render_large_message(context,message,status)
+        __M_writer = context.writer()
+        # SOURCE LINE 72
+        __M_writer(u'\n    ')
+        # SOURCE LINE 73
+        __M_writer(unicode(render_large_message( message, status )))
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_init(context):
+    context.caller_stack._push_frame()
+    try:
+        self = context.get('self', UNDEFINED)
+        active_view = context.get('active_view', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 15
+        __M_writer(u'\n')
+        # SOURCE LINE 16
+
+        self.has_left_panel=False
+        self.has_right_panel=False
+        self.active_view=active_view
+        self.message_box_visible=False
+        
+        
+        # SOURCE LINE 21
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_render_large_message(context,message,status):
+    context.caller_stack._push_frame()
+    try:
+        _ = context.get('_', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 81
+        __M_writer(u'\n    <div class="')
+        # SOURCE LINE 82
+        __M_writer(unicode(status))
+        __M_writer(u'messagelarge" style="margin: 1em">')
+        __M_writer(unicode(_(message)))
+        __M_writer(u'</div>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_javascripts(context):
+    context.caller_stack._push_frame()
+    try:
+        parent = context.get('parent', UNDEFINED)
+        int = context.get('int', UNDEFINED)
+        h = context.get('h', UNDEFINED)
+        app = context.get('app', UNDEFINED)
+        refresh_frames = context.get('refresh_frames', UNDEFINED)
+        trans = context.get('trans', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 24
+        __M_writer(u'\n    ')
+        # SOURCE LINE 25
+        __M_writer(unicode(parent.javascripts()))
+        __M_writer(u'\n    <script type="text/javascript">\n')
+        # SOURCE LINE 27
+        if 'masthead' in refresh_frames:
+            # SOURCE LINE 34
+            __M_writer(u'            \n')
+            # SOURCE LINE 36
+            __M_writer(u'            if ( parent.user_changed ) {\n')
+            # SOURCE LINE 37
+            if trans.user:
+                # SOURCE LINE 38
+                __M_writer(u'                    parent.user_changed( "')
+                __M_writer(unicode(trans.user.email))
+                __M_writer(u'", ')
+                __M_writer(unicode(int( app.config.is_admin_user( trans.user ) )))
+                __M_writer(u' );\n')
+                # SOURCE LINE 39
+            else:
+                # SOURCE LINE 40
+                __M_writer(u'                    parent.user_changed( null, false );\n')
+            # SOURCE LINE 42
+            __M_writer(u'            }\n')
+        # SOURCE LINE 44
+        if 'history' in refresh_frames:
+            # SOURCE LINE 45
+            __M_writer(u'            if ( parent.frames && parent.frames.galaxy_history ) {\n                parent.frames.galaxy_history.location.href="')
+            # SOURCE LINE 46
+            __M_writer(unicode(h.url_for( controller='root', action='history')))
+            __M_writer(u'";\n                if ( parent.force_right_panel ) {\n                    parent.force_right_panel( \'show\' );\n                }\n            }\n')
+        # SOURCE LINE 52
+        if 'tools' in refresh_frames:
+            # SOURCE LINE 53
+            __M_writer(u'            if ( parent.frames && parent.frames.galaxy_tools ) {\n                parent.frames.galaxy_tools.location.href="')
+            # SOURCE LINE 54
+            __M_writer(unicode(h.url_for( controller='root', action='tool_menu')))
+            __M_writer(u'";\n                if ( parent.force_left_panel ) {\n                    parent.force_left_panel( \'show\' );\n                }\n            }\n')
+        # SOURCE LINE 60
+        __M_writer(u'\n        if ( parent.handle_minwidth_hint )\n        {\n            parent.handle_minwidth_hint( -1 );\n        }\n    </script>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
Index: galaxy-central/database/compiled_templates/webapps/galaxy/base_panels.mako.py
===================================================================
--- galaxy-central/database/compiled_templates/webapps/galaxy/base_panels.mako.py (revision 3)
+++ galaxy-central/database/compiled_templates/webapps/galaxy/base_panels.mako.py (revision 3)
@@ -0,0 +1,298 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1287725326.7917881
+_template_filename=u'templates/webapps/galaxy/base_panels.mako'
+_template_uri=u'/webapps/galaxy/base_panels.mako'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['masthead', 'title']
+
+
+def _mako_get_namespace(context, name):
+    try:
+        return context.namespaces[(__name__, name)]
+    except KeyError:
+        _mako_generate_namespaces(context)
+        return context.namespaces[(__name__, name)]
+def _mako_generate_namespaces(context):
+    pass
+def _mako_inherit(template, context):
+    _mako_generate_namespaces(context)
+    return runtime._inherit_from(context, u'/base_panels.mako', _template_uri)
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        __M_writer = context.writer()
+        # SOURCE LINE 1
+        __M_writer(u'\n\n')
+        # SOURCE LINE 4
+        __M_writer(u'\n\n')
+        # SOURCE LINE 172
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_masthead(context):
+    context.caller_stack._push_frame()
+    try:
+        h = context.get('h', UNDEFINED)
+        app = context.get('app', UNDEFINED)
+        trans = context.get('trans', UNDEFINED)
+        def tab(id,display,href,target='_parent',visible=True,extra_class='',menu_options=None):
+            context.caller_stack._push_frame()
+            try:
+                self = context.get('self', UNDEFINED)
+                len = context.get('len', UNDEFINED)
+                __M_writer = context.writer()
+                # SOURCE LINE 15
+                __M_writer(u'\n')
+                # SOURCE LINE 18
+                __M_writer(u'    \n        ')
+                # SOURCE LINE 19
+
+                cls = "tab"
+                if extra_class:
+                    cls += " " + extra_class
+                if self.active_view == id:
+                    cls += " active"
+                style = ""
+                if not visible:
+                    style = "display: none;"
+                
+                
+                # SOURCE LINE 28
+                __M_writer(u'\n        <td class="')
+                # SOURCE LINE 29
+                __M_writer(unicode(cls))
+                __M_writer(u'" style="')
+                __M_writer(unicode(style))
+                __M_writer(u'">\n')
+                # SOURCE LINE 30
+                if href:
+                    # SOURCE LINE 31
+                    __M_writer(u'                <a target="')
+                    __M_writer(unicode(target))
+                    __M_writer(u'" href="')
+                    __M_writer(unicode(href))
+                    __M_writer(u'">')
+                    __M_writer(unicode(display))
+                    __M_writer(u'</a>\n')
+                    # SOURCE LINE 32
+                else:
+                    # SOURCE LINE 33
+                    __M_writer(u'                <a>')
+                    __M_writer(unicode(display))
+                    __M_writer(u'</a>\n')
+                # SOURCE LINE 35
+                if menu_options:
+                    # SOURCE LINE 36
+                    __M_writer(u'                <div class="submenu">\n                <ul>\n')
+                    # SOURCE LINE 38
+                    for menu_item in menu_options:
+                        # SOURCE LINE 39
+                        __M_writer(u'                        <li>\n')
+                        # SOURCE LINE 40
+                        if not menu_item:
+                            # SOURCE LINE 41
+                            __M_writer(u'                            <hr style="color: inherit; background-color: gray"/></li>\n')
+                            # SOURCE LINE 42
+                        else:
+                            # SOURCE LINE 43
+                            if len ( menu_item ) == 1:
+                                # SOURCE LINE 44
+                                __M_writer(u'                                ')
+                                __M_writer(unicode(menu_item[0]))
+                                __M_writer(u'\n')
+                                # SOURCE LINE 45
+                            elif len ( menu_item ) == 2:
+                                # SOURCE LINE 46
+                                __M_writer(u'                                ')
+                                name, link = menu_item 
+                                
+                                __M_writer(u'\n                                <a href="')
+                                # SOURCE LINE 47
+                                __M_writer(unicode(link))
+                                __M_writer(u'">')
+                                __M_writer(unicode(name))
+                                __M_writer(u'</a></li>\n')
+                                # SOURCE LINE 48
+                            else:
+                                # SOURCE LINE 49
+                                __M_writer(u'                                ')
+                                name, link, target = menu_item 
+                                
+                                __M_writer(u'\n                                <a target="')
+                                # SOURCE LINE 50
+                                __M_writer(unicode(target))
+                                __M_writer(u'" href="')
+                                __M_writer(unicode(link))
+                                __M_writer(u'">')
+                                __M_writer(unicode(name))
+                                __M_writer(u'</a></li>\n')
+                    # SOURCE LINE 54
+                    __M_writer(u'                </ul>\n                </div>\n')
+                # SOURCE LINE 57
+                __M_writer(u'        </td>\n    ')
+                return ''
+            finally:
+                context.caller_stack._pop_frame()
+        __M_writer = context.writer()
+        # SOURCE LINE 7
+        __M_writer(u'\n\n')
+        # SOURCE LINE 10
+        __M_writer(u'    <div style="position: absolute; top: 0; left: 0; width: 100%; text-align: center">\n    \n    <table class="tab-group" border="0" cellspacing="0" style="margin: auto;">\n    <tr>\n    \n    ')
+        # SOURCE LINE 58
+        __M_writer(u'\n    \n\n')
+        # SOURCE LINE 62
+        __M_writer(u'    ')
+        __M_writer(unicode(tab( "analysis", "Analyze Data", h.url_for( controller='/root', action='index' ) )))
+        __M_writer(u'\n    \n')
+        # SOURCE LINE 65
+        __M_writer(u'    ')
+        __M_writer(unicode(tab( "workflow", "Workflow", h.url_for( controller='/workflow', action='index' ) )))
+        __M_writer(u'\n    \n')
+        # SOURCE LINE 68
+        __M_writer(u'    ')
+
+        menu_options = [ 
+                        [ 'Data Libraries', h.url_for( controller='/library', action='index') ],
+                        None,
+                        [ 'Published Histories', h.url_for( controller='/history', action='list_published' ) ],
+                        [ 'Published Workflows', h.url_for( controller='/workflow', action='list_published' ) ],
+                        [ 'Published Visualizations', h.url_for( controller='/visualization', action='list_published' ) ],
+                        [ 'Published Pages', h.url_for( controller='/page', action='list_published' ) ]
+                       ]
+        tab( "shared", "Shared Data", h.url_for( controller='/library', action='index'), menu_options=menu_options )
+            
+        
+        # SOURCE LINE 78
+        __M_writer(u'\n    \n')
+        # SOURCE LINE 81
+        __M_writer(u'    ')
+
+        menu_options = [
+                         [ 'Sequencing Requests', h.url_for( controller='/requests', action='index' ) ],
+                         [ 'Find Samples', h.url_for( controller='/requests', action='find_samples_index' ) ],
+                         [ 'Help', app.config.get( "lims_doc_url", "http://main.g2.bx.psu.edu/u/rkchak/p/sts" ), "galaxy_main" ]
+                       ]
+        tab( "lab", "Lab", None, menu_options=menu_options, visible=( trans.user and trans.user.requests ) )
+            
+        
+        # SOURCE LINE 88
+        __M_writer(u'\n\n')
+        # SOURCE LINE 91
+        if app.config.get_bool( 'enable_tracks', False ):
+            # SOURCE LINE 92
+            __M_writer(u'        ')
+
+            menu_options = [
+                             ['New Track Browser', h.url_for( controller='/tracks', action='index' ) ],
+                             ['Saved Visualizations', h.url_for( controller='/visualization', action='list' ) ]
+                           ]
+            tab( "visualization", "Visualization", h.url_for( controller='/visualization', action='list'), menu_options=menu_options )
+                    
+            
+            # SOURCE LINE 98
+            __M_writer(u'\n')
+        # SOURCE LINE 100
+        __M_writer(u'\n')
+        # SOURCE LINE 102
+        __M_writer(u'    ')
+        __M_writer(unicode(tab( "admin", "Admin", h.url_for( controller='/admin', action='index' ), extra_class="admin-only", visible=( trans.user and app.config.is_admin_user( trans.user ) ) )))
+        __M_writer(u'\n    \n')
+        # SOURCE LINE 105
+        __M_writer(u'    ')
+
+        menu_options = [
+                            ['Email comments, bug reports, or suggestions', app.config.get( "bugs_email", "mailto:galaxy-bugs@bx.psu.edu"  ) ],
+                            ['Galaxy Wiki', app.config.get( "wiki_url", "http://bitbucket.org/galaxy/galaxy-central/wiki" ), "_blank" ],
+                            ['Video tutorials (screencasts)', app.config.get( "screencasts_url", "http://galaxycast.org" ), "_blank" ],
+                            ['How to Cite Galaxy', app.config.get( "screencasts_url", "http://bitbucket.org/galaxy/galaxy-central/wiki/Citations" ), "_blank" ]
+                        ]
+        tab( "help", "Help", None, menu_options=menu_options)
+            
+        
+        # SOURCE LINE 113
+        __M_writer(u'\n    \n')
+        # SOURCE LINE 116
+        __M_writer(u'    ')
+  
+        # Menu for user who is not logged in.
+        menu_options = [ [ "Login", h.url_for( controller='/user', action='login' ), "galaxy_main" ] ]
+        if app.config.allow_user_creation:
+            menu_options.append( [ "Register", h.url_for( controller='/user', action='create' ), "galaxy_main" ] ) 
+        extra_class = "loggedout-only"
+        visible = ( trans.user == None )
+        tab( "user", "User", None, visible=visible, menu_options=menu_options )
+        
+        # Menu for user who is logged in.
+        if trans.user:
+            email = trans.user.email
+        else:
+            email = ""
+        menu_options = [ [ '<li>Logged in as <span id="user-email">%s</span></li>' %  email ] ]
+        if app.config.use_remote_user:
+            if app.config.remote_user_logout_href:
+                menu_options.append( [ 'Logout', app.config.remote_user_logout_href, "galaxy_main" ] )
+        else:
+            menu_options.append( [ 'Preferences', h.url_for( controller='/user', action='index' ), "galaxy_main" ] )
+            if app.config.get_bool( 'enable_tracks', False ):
+                menu_options.append( [ 'Custom Builds', h.url_for( controller='/user', action='dbkeys' ), "galaxy_main" ] )
+            if app.config.require_login:
+                logout_url = h.url_for( controller='/root', action='index', m_c='user', m_a='logout' )
+            else:
+                logout_url = h.url_for( controller='/user', action='logout' )
+            menu_options.append( [ 'Logout', logout_url, "_top" ] )
+            menu_options.append( None )
+        menu_options.append( [ 'Saved Histories', h.url_for( controller='/history', action='list' ), "galaxy_main" ] )
+        menu_options.append( [ 'Saved Datasets', h.url_for( controller='/dataset', action='list' ), "galaxy_main" ] )
+        if app.config.get_bool( 'enable_pages', False ):
+            menu_options.append( [ 'Saved Pages', h.url_for( controller='/page', action='list' ), "_top" ] )
+        if app.config.enable_api:
+            menu_options.append( [ 'API Keys', h.url_for( controller='/user', action='api_keys' ), "galaxy_main" ] )
+            
+        extra_class = "loggedin-only"
+        visible = ( trans.user != None )
+        tab( "user", "User", None, visible=visible, menu_options=menu_options )
+            
+        
+        # SOURCE LINE 154
+        __M_writer(u'\n    \n    </tr>\n    </table>\n    \n    </div>\n    \n')
+        # SOURCE LINE 162
+        __M_writer(u'    <div class="title" style="position: absolute; top: 0; left: 0;">\n        <a href="')
+        # SOURCE LINE 163
+        __M_writer(unicode(app.config.get( 'logo_url', '/' )))
+        __M_writer(u'">\n        <img border="0" src="')
+        # SOURCE LINE 164
+        __M_writer(unicode(h.url_for('/static/images/galaxyIcon_noText.png')))
+        __M_writer(u'" style="width: 26px; vertical-align: top;">\n        Galaxy\n')
+        # SOURCE LINE 166
+        if app.config.brand:
+            # SOURCE LINE 167
+            __M_writer(u"            <span class='brand'>/ ")
+            __M_writer(unicode(app.config.brand))
+            __M_writer(u'</span>\n')
+        # SOURCE LINE 169
+        __M_writer(u'        </a>\n    </div>\n    \n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_title(context):
+    context.caller_stack._push_frame()
+    try:
+        __M_writer = context.writer()
+        # SOURCE LINE 4
+        __M_writer(u'Galaxy')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
Index: galaxy-central/database/compiled_templates/root/index.mako.py
===================================================================
--- galaxy-central/database/compiled_templates/root/index.mako.py (revision 3)
+++ galaxy-central/database/compiled_templates/root/index.mako.py (revision 3)
@@ -0,0 +1,259 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1287725326.7005551
+_template_filename='templates/root/index.mako'
+_template_uri='root/index.mako'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['init', 'left_panel', 'center_panel', 'late_javascripts', 'right_panel']
+
+
+def _mako_get_namespace(context, name):
+    try:
+        return context.namespaces[(__name__, name)]
+    except KeyError:
+        _mako_generate_namespaces(context)
+        return context.namespaces[(__name__, name)]
+def _mako_generate_namespaces(context):
+    pass
+def _mako_inherit(template, context):
+    _mako_generate_namespaces(context)
+    return runtime._inherit_from(context, u'/webapps/galaxy/base_panels.mako', _template_uri)
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        __M_writer = context.writer()
+        # SOURCE LINE 1
+        __M_writer(u'\n\n')
+        # SOURCE LINE 156
+        __M_writer(u'\n\n')
+        # SOURCE LINE 176
+        __M_writer(u'\n\n')
+        # SOURCE LINE 190
+        __M_writer(u'\n\n')
+        # SOURCE LINE 212
+        __M_writer(u'\n\n')
+        # SOURCE LINE 226
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_init(context):
+    context.caller_stack._push_frame()
+    try:
+        self = context.get('self', UNDEFINED)
+        trans = context.get('trans', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 158
+        __M_writer(u'\n')
+        # SOURCE LINE 159
+
+        if trans.app.config.cloud_controller_instance:
+                self.has_left_panel=False
+                self.has_right_panel=False
+                self.active_view="cloud"
+        else:
+                self.has_left_panel=True
+                self.has_right_panel=True
+                self.active_view="analysis"
+        
+        
+        # SOURCE LINE 168
+        __M_writer(u'\n')
+        # SOURCE LINE 169
+        if trans.app.config.require_login and not trans.user:
+            # SOURCE LINE 170
+            __M_writer(u'    <script type="text/javascript">\n        if ( window != top ) {\n            top.location.href = location.href;\n        }\n    </script>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_left_panel(context):
+    context.caller_stack._push_frame()
+    try:
+        h = context.get('h', UNDEFINED)
+        _ = context.get('_', UNDEFINED)
+        n_ = context.get('n_', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 178
+        __M_writer(u'\n    <div class="unified-panel-header" unselectable="on">\n        <div class=\'unified-panel-header-inner\'>\n            <div style="float: right">\n                <a class=\'panel-header-button popup\' id="tools-options-button" href="#">')
+        # SOURCE LINE 182
+        __M_writer(unicode(_('Options')))
+        __M_writer(u'</a>\n            </div>\n            ')
+        # SOURCE LINE 184
+        __M_writer(unicode(n_('Tools')))
+        __M_writer(u'\n        </div>\n    </div>\n    <div class="unified-panel-body" style="overflow: hidden;">\n        <iframe name="galaxy_tools" id="galaxy_tools" src="')
+        # SOURCE LINE 188
+        __M_writer(unicode(h.url_for( controller='root', action='tool_menu' )))
+        __M_writer(u'" frameborder="0" style="position: absolute; margin: 0; border: 0 none; height: 100%; width: 100%;"> </iframe>\n    </div>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_center_panel(context):
+    context.caller_stack._push_frame()
+    try:
+        tool_id = context.get('tool_id', UNDEFINED)
+        m_c = context.get('m_c', UNDEFINED)
+        h = context.get('h', UNDEFINED)
+        m_a = context.get('m_a', UNDEFINED)
+        workflow_id = context.get('workflow_id', UNDEFINED)
+        trans = context.get('trans', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 192
+        __M_writer(u'\n\n')
+        # SOURCE LINE 195
+        __M_writer(u'    ')
+
+        if trans.app.config.require_login and not trans.user:
+            center_url = h.url_for( controller='user', action='login' )
+        elif tool_id is not None:
+            center_url = h.url_for( 'tool_runner', tool_id=tool_id, from_noframe=True )
+        elif workflow_id is not None:
+            center_url = h.url_for( controller='workflow', action='run', id=workflow_id )
+        elif m_c is not None:
+            center_url = h.url_for( controller=m_c, action=m_a )
+        elif trans.app.config.cloud_controller_instance:
+            center_url = h.url_for( controller='cloud', action='list' )
+        else:
+            center_url = h.url_for( '/static/welcome.html' )
+        
+        
+        # SOURCE LINE 208
+        __M_writer(u'\n    \n    <iframe name="galaxy_main" id="galaxy_main" frameborder="0" style="position: absolute; width: 100%; height: 100%;" src="')
+        # SOURCE LINE 210
+        __M_writer(unicode(center_url))
+        __M_writer(u'"> </iframe>\n\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_late_javascripts(context):
+    context.caller_stack._push_frame()
+    try:
+        h = context.get('h', UNDEFINED)
+        trans = context.get('trans', UNDEFINED)
+        parent = context.get('parent', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 3
+        __M_writer(u'\n    ')
+        # SOURCE LINE 4
+        __M_writer(unicode(parent.late_javascripts()))
+        __M_writer(u'\n    <script type="text/javascript">\n    // Set up GalaxyAsync object.\n    var galaxy_async = new GalaxyAsync();\n    galaxy_async.set_func_url(galaxy_async.set_user_pref, "')
+        # SOURCE LINE 8
+        __M_writer(unicode(h.url_for( controller='user', action='set_user_pref_async' )))
+        __M_writer(u'");\n    \n    $(function(){\n        // Init history options.\n        $("#history-options-button").css( "position", "relative" );\n        make_popupmenu( $("#history-options-button"), {\n            "History Lists": null,\n            "Saved Histories": function() {\n                galaxy_main.location = "')
+        # SOURCE LINE 16
+        __M_writer(unicode(h.url_for( controller='history', action='list')))
+        __M_writer(u'";\n            },\n            "Histories Shared with Me": function() {\n                galaxy_main.location = "')
+        # SOURCE LINE 19
+        __M_writer(unicode(h.url_for( controller='history', action='list_shared')))
+        __M_writer(u'";\n            },\n            "Current History": null,\n            "Create New": function() {\n                galaxy_history.location = "')
+        # SOURCE LINE 23
+        __M_writer(unicode(h.url_for( controller='root', action='history_new' )))
+        __M_writer(u'";\n            },\n            "Clone": function() {\n                galaxy_main.location = "')
+        # SOURCE LINE 26
+        __M_writer(unicode(h.url_for( controller='history', action='clone')))
+        __M_writer(u'";\n            },\n            "Share or Publish": function() {\n                galaxy_main.location = "')
+        # SOURCE LINE 29
+        __M_writer(unicode(h.url_for( controller='history', action='sharing' )))
+        __M_writer(u'";\n            },\n            "Extract Workflow": function() {\n                galaxy_main.location = "')
+        # SOURCE LINE 32
+        __M_writer(unicode(h.url_for( controller='workflow', action='build_from_current_history' )))
+        __M_writer(u'";\n            },\n            "Dataset Security": function() {\n                galaxy_main.location = "')
+        # SOURCE LINE 35
+        __M_writer(unicode(h.url_for( controller='root', action='history_set_default_permissions' )))
+        __M_writer(u'";\n            },\n            "Show Deleted Datasets": function() {\n                galaxy_history.location = "')
+        # SOURCE LINE 38
+        __M_writer(unicode(h.url_for( controller='root', action='history', show_deleted=True)))
+        __M_writer(u'";\n            },\n            "Show Hidden Datasets": function() {\n                galaxy_history.location = "')
+        # SOURCE LINE 41
+        __M_writer(unicode(h.url_for( controller='root', action='history', show_hidden=True)))
+        __M_writer(u'";\n            },\n            "Show structure": function() {\n                galaxy_main.location = "')
+        # SOURCE LINE 44
+        __M_writer(unicode(h.url_for( controller='history', action='display_structured' )))
+        __M_writer(u'";\n            },\n            "Export to File": function() {\n                galaxy_main.location = "')
+        # SOURCE LINE 47
+        __M_writer(unicode(h.url_for( controller='history', action='export_archive' )))
+        __M_writer(u'";\n            },\n            "Delete": function()\n            {\n                if ( confirm( "Really delete the current history?" ) )\n                {\n                    galaxy_main.location = "')
+        # SOURCE LINE 53
+        __M_writer(unicode(h.url_for( controller='history', action='delete_current' )))
+        __M_writer(u'";\n                }\n            },\n')
+        # SOURCE LINE 60
+        __M_writer(u'        });\n        \n        // Init tool options.\n        make_popupmenu( $("#tools-options-button"), {\n')
+        # SOURCE LINE 65
+        if trans.app.toolbox_search.enabled:
+            # SOURCE LINE 66
+            __M_writer(u'                ')
+ 
+            show_tool_search = False
+            if trans.user:
+                show_tool_search = trans.user.preferences.get( "show_tool_search", "False" )
+                
+            if show_tool_search == "True":
+                initial_text = "Hide Search"
+            else:
+                initial_text = "Search Tools"
+                            
+            
+            # SOURCE LINE 75
+            __M_writer(u'\n                "')
+            # SOURCE LINE 76
+            __M_writer(unicode(initial_text))
+            __M_writer(u'": function() {\n                    // Show/hide menu and update vars, user preferences.\n                    var menu = $("#galaxy_tools").contents().find(\'#tool-search\');\n                    if (menu.is(":visible"))\n                    {\n                        // Hide menu.\n                        pref_value = "False";\n                        menu_option_text = "Search Tools";\n                        menu.toggle();\n                        \n                        // Reset search.\n                        reset_tool_search(true);\n                    }\n                    else\n                    {\n                        // Show menu.\n                        pref_value = "True";\n                        menu_option_text = "Hide Search";\n                        menu.toggle();\n                    }\n            \n                    // Update menu option.\n                    $("#tools-options-button-menu").find("li").eq(0).text(menu_option_text);\n            \n                    galaxy_async.set_user_pref("show_tool_search", pref_value);\n                },\n')
+        # SOURCE LINE 104
+        if trans.user:
+            # SOURCE LINE 105
+            __M_writer(u'                ')
+
+            if trans.user.preferences.get( 'show_recently_used_menu', 'False' ) == 'True':
+                action = "Hide"
+            else:
+                action = "Show"
+                            
+            
+            # SOURCE LINE 110
+            __M_writer(u'\n                "')
+            # SOURCE LINE 111
+            __M_writer(unicode(action))
+            __M_writer(u' Recently Used": function() {\n                    // Show/hide menu.\n                    var ru_menu = $(\'#galaxy_tools\').contents().find(\'#recently_used_wrapper\');\n                    var ru_menu_body = ru_menu.find(".toolSectionBody");\n                    var pref_value = null;\n                    var menu_option_text = null;\n                    if (ru_menu.hasClass("user_pref_visible"))\n                    {\n                        // Hide menu.\n                        ru_menu_body.slideUp();\n                        ru_menu.slideUp();\n                        \n                        // Set vars used below and in tool menu frame.\n                        pref_value = "False";\n                        menu_option_text = "Show Recently Used";\n                    }\n                    else\n                    {\n                        // "Show" menu.\n                        if (!$(\'#galaxy_tools\').contents().find(\'#tool-search-query\').hasClass("search_active"))\n                            // Default.\n                            ru_menu.slideDown();\n                        else\n                            // Search active: tf there are matching tools in RU menu, show menu.\n                            if ( ru_menu.find(".toolTitle.search_match").length != 0 )\n                            {\n                                ru_menu.slideDown();\n                                ru_menu_body.slideDown();\n                            }\n                        \n                        // Set vars used below and in tool menu frame.\n                        pref_value = "True";\n                        menu_option_text = "Hide Recently Used";\n                    }\n                 \n                    // Update menu class and option.\n                    ru_menu.toggleClass("user_pref_hidden user_pref_visible");\n                    $("#tools-options-button-menu").find("li").eq(1).text(menu_option_text);\n\n                    galaxy_async.set_user_pref("show_recently_used_menu", pref_value);\n                }\n')
+        # SOURCE LINE 153
+        __M_writer(u'        });\n    });\n    </script>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_right_panel(context):
+    context.caller_stack._push_frame()
+    try:
+        h = context.get('h', UNDEFINED)
+        _ = context.get('_', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 214
+        __M_writer(u'\n    <div class="unified-panel-header" unselectable="on">\n        <div class="unified-panel-header-inner">\n            <div style="float: right">\n                <a id="history-options-button" class=\'panel-header-button popup\' href="')
+        # SOURCE LINE 218
+        __M_writer(unicode(h.url_for( controller='root', action='history_options' )))
+        __M_writer(u'" target="galaxy_main">')
+        __M_writer(unicode(_('Options')))
+        __M_writer(u'</a>\n            </div>\n            <div class="panel-header-text">')
+        # SOURCE LINE 220
+        __M_writer(unicode(_('History')))
+        __M_writer(u'</div>\n        </div>\n    </div>\n    <div class="unified-panel-body" style="overflow: hidden;">\n        <iframe name="galaxy_history" width="100%" height="100%" frameborder="0" style="position: absolute; margin: 0; border: 0 none; height: 100%;" src="')
+        # SOURCE LINE 224
+        __M_writer(unicode(h.url_for( controller='root', action='history' )))
+        __M_writer(u'"></iframe>\n    </div>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
Index: galaxy-central/database/compiled_templates/root/history_common.mako.py
===================================================================
--- galaxy-central/database/compiled_templates/root/history_common.mako.py (revision 3)
+++ galaxy-central/database/compiled_templates/root/history_common.mako.py (revision 3)
@@ -0,0 +1,410 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1287725327.4199979
+_template_filename=u'templates/root/history_common.mako'
+_template_uri=u'root/history_common.mako'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['render_dataset']
+
+
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        n_ = context.get('n_', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 1
+        _=n_ 
+        
+        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['_'] if __M_key in __M_locals_builtin()]))
+        __M_writer(u'\n')
+        # SOURCE LINE 208
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_render_dataset(context,data,hid,show_deleted_on_refresh=False,for_editing=True):
+    context.caller_stack._push_frame()
+    try:
+        h = context.get('h', UNDEFINED)
+        app = context.get('app', UNDEFINED)
+        def render_dataset(data,hid,show_deleted_on_refresh=False,for_editing=True):
+            return render_render_dataset(context,data,hid,show_deleted_on_refresh,for_editing)
+        request = context.get('request', UNDEFINED)
+        len = context.get('len', UNDEFINED)
+        enumerate = context.get('enumerate', UNDEFINED)
+        trans = context.get('trans', UNDEFINED)
+        _ = context.get('_', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 3
+        __M_writer(u'\n    <a name="')
+        # SOURCE LINE 4
+        __M_writer(unicode(trans.security.encode_id( data.id )))
+        __M_writer(u'"></a>\n    ')
+        # SOURCE LINE 5
+
+        if data.state in ['no state','',None]:
+            data_state = "queued"
+        else:
+            data_state = data.state
+        current_user_roles = trans.get_current_user_roles()
+            
+        
+        # SOURCE LINE 11
+        __M_writer(u'\n')
+        # SOURCE LINE 12
+        if not trans.user_is_admin() and not trans.app.security_agent.can_access_dataset( current_user_roles, data.dataset ):
+            # SOURCE LINE 13
+            __M_writer(u'        <div class="historyItemWrapper historyItem historyItem-')
+            __M_writer(unicode(data_state))
+            __M_writer(u' historyItem-noPermission" id="historyItem-')
+            __M_writer(unicode(data.id))
+            __M_writer(u'">\n')
+            # SOURCE LINE 14
+        else:
+            # SOURCE LINE 15
+            __M_writer(u'        <div class="historyItemWrapper historyItem historyItem-')
+            __M_writer(unicode(data_state))
+            __M_writer(u'" id="historyItem-')
+            __M_writer(unicode(data.id))
+            __M_writer(u'">\n')
+        # SOURCE LINE 17
+        __M_writer(u'        \n')
+        # SOURCE LINE 18
+        if data.deleted:
+            # SOURCE LINE 19
+            __M_writer(u'        <div class="warningmessagesmall">\n            <strong>This dataset has been deleted. Click <a href="')
+            # SOURCE LINE 20
+            __M_writer(unicode(h.url_for( controller='dataset', action='undelete', id=data.id )))
+            __M_writer(u'" class="historyItemUndelete" id="historyItemUndeleter-')
+            __M_writer(unicode(data.id))
+            __M_writer(u'" target="galaxy_history">here</a> to undelete.</strong>\n        </div>\n')
+        # SOURCE LINE 23
+        __M_writer(u'\n')
+        # SOURCE LINE 24
+        if data.visible is False:
+            # SOURCE LINE 25
+            __M_writer(u'        <div class="warningmessagesmall">\n            <strong>This dataset has been hidden. Click <a href="')
+            # SOURCE LINE 26
+            __M_writer(unicode(h.url_for( controller='dataset', action='unhide', id=data.id )))
+            __M_writer(u'" class="historyItemUnhide" id="historyItemUnhider-')
+            __M_writer(unicode(data.id))
+            __M_writer(u'" target="galaxy_history">here</a> to unhide.</strong>\n        </div>\n')
+        # SOURCE LINE 29
+        __M_writer(u'\n\n')
+        # SOURCE LINE 32
+        __M_writer(u'    <div style="overflow: hidden;" class="historyItemTitleBar">     \n        <div class="historyItemButtons">\n')
+        # SOURCE LINE 34
+        if data_state == "upload":
+            # SOURCE LINE 38
+            __M_writer(u"                <img title='Display Data' class='icon-button display_disabled' />\n")
+            # SOURCE LINE 39
+            if for_editing:
+                # SOURCE LINE 40
+                __M_writer(u"                    <img title='Edit Attributes' class='icon-button edit_disabled' />\n")
+            # SOURCE LINE 42
+        else:
+            # SOURCE LINE 43
+            __M_writer(u'                ')
+ 
+            dataset_id = trans.security.encode_id( data.id )
+            if for_editing:
+                display_url = h.url_for( controller='dataset', action='display', dataset_id=dataset_id, preview=True, filename='' )
+            else:
+                # Get URL for display only.
+                if data.history.user and data.history.user.username:
+                    display_url = h.url_for( controller='dataset', action='display_by_username_and_slug',
+                                             username=data.history.user.username, slug=dataset_id )
+                else:
+                    # HACK: revert to for_editing display URL when there is no user/username. This should only happen when
+                    # there's no user/username because dataset is being displayed by history/view after error reported.
+                    # There are no security concerns here because both dataset/display and dataset/display_by_username_and_slug
+                    # check user permissions (to the same degree) before displaying.
+                    display_url = h.url_for( controller='dataset', action='display', dataset_id=dataset_id, preview=True, filename='' )
+                            
+            
+            # SOURCE LINE 58
+            __M_writer(u'\n                <a class="icon-button display tooltip" title="Display data in browser" href="')
+            # SOURCE LINE 59
+            __M_writer(unicode(display_url))
+            __M_writer(u'"\n')
+            # SOURCE LINE 60
+            if for_editing:
+                # SOURCE LINE 61
+                __M_writer(u'                    target="galaxy_main"\n')
+            # SOURCE LINE 63
+            __M_writer(u'                ></a>\n')
+            # SOURCE LINE 64
+            if for_editing:
+                # SOURCE LINE 65
+                __M_writer(u'                    <a class="icon-button edit tooltip" title="Edit attributes" href="')
+                __M_writer(unicode(h.url_for( controller='root', action='edit', id=data.id )))
+                __M_writer(u'" target="galaxy_main"></a>\n')
+        # SOURCE LINE 68
+        if for_editing:
+            # SOURCE LINE 69
+            __M_writer(u'                <a class="icon-button delete tooltip" title="Delete" href="')
+            __M_writer(unicode(h.url_for( action='delete', id=data.id, show_deleted_on_refresh=show_deleted_on_refresh )))
+            __M_writer(u'" id="historyItemDeleter-')
+            __M_writer(unicode(data.id))
+            __M_writer(u'"></a>\n')
+        # SOURCE LINE 71
+        __M_writer(u'        </div>\n        <span class="state-icon"></span>\n        <span class="historyItemTitle">')
+        # SOURCE LINE 73
+        __M_writer(unicode(hid))
+        __M_writer(u': ')
+        __M_writer(unicode(data.display_name()))
+        __M_writer(u'</span>\n    </div>\n        \n')
+        # SOURCE LINE 77
+        __M_writer(u'    \n    <div id="info')
+        # SOURCE LINE 78
+        __M_writer(unicode(data.id))
+        __M_writer(u'" class="historyItemBody">\n')
+        # SOURCE LINE 79
+        if not trans.user_is_admin() and not trans.app.security_agent.can_access_dataset( current_user_roles, data.dataset ):
+            # SOURCE LINE 80
+            __M_writer(u'            <div>You do not have permission to view this dataset.</div>\n')
+            # SOURCE LINE 81
+        elif data_state == "upload":
+            # SOURCE LINE 82
+            __M_writer(u'            <div>Dataset is uploading</div>\n')
+            # SOURCE LINE 83
+        elif data_state == "queued":
+            # SOURCE LINE 84
+            __M_writer(u'            <div>')
+            __M_writer(unicode(_('Job is waiting to run')))
+            __M_writer(u'</div>\n')
+            # SOURCE LINE 85
+        elif data_state == "running":
+            # SOURCE LINE 86
+            __M_writer(u'            <div>')
+            __M_writer(unicode(_('Job is currently running')))
+            __M_writer(u'</div>\n')
+            # SOURCE LINE 87
+        elif data_state == "error":
+            # SOURCE LINE 88
+            __M_writer(u'            <div>\n                An error occurred running this job: <i>')
+            # SOURCE LINE 89
+            __M_writer(unicode(data.display_info().strip()))
+            __M_writer(u'</i>\n            </div>\n            <div>\n                <a href="')
+            # SOURCE LINE 92
+            __M_writer(unicode(h.url_for( controller='dataset', action='errors', id=data.id )))
+            __M_writer(u'" target="galaxy_main" title="View or report this error" class="icon-button bug tooltip"></a>\n                <a href="')
+            # SOURCE LINE 93
+            __M_writer(unicode(h.url_for( controller='tool_runner', action='rerun', id=data.id )))
+            __M_writer(u'" target="galaxy_main" title="Run this job again" class="icon-button arrow-circle tooltip"></a>\n            </div>\n')
+            # SOURCE LINE 95
+        elif data_state == "discarded":
+            # SOURCE LINE 96
+            __M_writer(u'            <div>\n                The job creating this dataset was cancelled before completion.\n            </div>\n')
+            # SOURCE LINE 99
+        elif data_state == 'setting_metadata':
+            # SOURCE LINE 100
+            __M_writer(u'            <div>')
+            __M_writer(unicode(_('Metadata is being Auto-Detected.')))
+            __M_writer(u'</div>\n')
+            # SOURCE LINE 101
+        elif data_state == "empty":
+            # SOURCE LINE 102
+            __M_writer(u'            <div>')
+            __M_writer(unicode(_('No data: ')))
+            __M_writer(u'<i>')
+            __M_writer(unicode(data.display_info()))
+            __M_writer(u'</i></div>\n')
+            # SOURCE LINE 103
+        elif data_state in [ "ok", "failed_metadata" ]:
+            # SOURCE LINE 104
+            if data_state == "failed_metadata":
+                # SOURCE LINE 105
+                __M_writer(u'                <div class="warningmessagesmall" style="margin: 4px 0 4px 0">\n                    An error occurred setting the metadata for this dataset.  You may be able to <a href="')
+                # SOURCE LINE 106
+                __M_writer(unicode(h.url_for( controller='root', action='edit', id=data.id )))
+                __M_writer(u'" target="galaxy_main">set it manually or retry auto-detection</a>.\n                </div>\n')
+            # SOURCE LINE 109
+            __M_writer(u'            <div>\n                ')
+            # SOURCE LINE 110
+            __M_writer(unicode(data.blurb))
+            __M_writer(u',\n                format: <span class="')
+            # SOURCE LINE 111
+            __M_writer(unicode(data.ext))
+            __M_writer(u'">')
+            __M_writer(unicode(data.ext))
+            __M_writer(u'</span>, \n                database:\n')
+            # SOURCE LINE 113
+            if data.dbkey == '?':
+                # SOURCE LINE 114
+                __M_writer(u'                    <a href="')
+                __M_writer(unicode(h.url_for( controller='root', action='edit', id=data.id )))
+                __M_writer(u'" target="galaxy_main">')
+                __M_writer(unicode(_(data.dbkey)))
+                __M_writer(u'</a>\n')
+                # SOURCE LINE 115
+            else:
+                # SOURCE LINE 116
+                __M_writer(u'                    <span class="')
+                __M_writer(unicode(data.dbkey))
+                __M_writer(u'">')
+                __M_writer(unicode(_(data.dbkey)))
+                __M_writer(u'</span>\n')
+            # SOURCE LINE 118
+            __M_writer(u'            </div>\n            <div class="info">')
+            # SOURCE LINE 119
+            __M_writer(unicode(_('Info: ')))
+            __M_writer(unicode(data.display_info()))
+            __M_writer(u'</div>\n            <div> \n                ')
+            # SOURCE LINE 121
+            dataset_id=trans.security.encode_id( data.id ) 
+            
+            __M_writer(u'\n')
+            # SOURCE LINE 122
+            if data.has_data():
+                # SOURCE LINE 123
+                __M_writer(u'                    <a href="')
+                __M_writer(unicode(h.url_for( controller='dataset', action='display', dataset_id=dataset_id, to_ext=data.ext )))
+                __M_writer(u'" title="Save" class="icon-button disk tooltip"></a>\n')
+                # SOURCE LINE 124
+                if for_editing:
+                    # SOURCE LINE 125
+                    __M_writer(u'                        <a href="')
+                    __M_writer(unicode(h.url_for( controller='tool_runner', action='rerun', id=data.id )))
+                    __M_writer(u'" target="galaxy_main" title="Run this job again" class="icon-button arrow-circle tooltip"></a>\n')
+                    # SOURCE LINE 126
+                    if app.config.get_bool( 'enable_tracks', False ) and data.ext in app.datatypes_registry.get_available_tracks():
+                        # SOURCE LINE 127
+                        __M_writer(u'                            <a data-url="')
+                        __M_writer(unicode(h.url_for( controller='tracks', action='list_tracks' )))
+                        __M_writer(u'" class="icon-button vis-chart tooltip trackster-add"\n                                action-url="')
+                        # SOURCE LINE 128
+                        __M_writer(unicode(h.url_for( controller='tracks', action='browser', dataset_id=dataset_id)))
+                        __M_writer(u'"\n                                new-url="')
+                        # SOURCE LINE 129
+                        __M_writer(unicode(h.url_for( controller='tracks', action='index', dataset_id=dataset_id, default_dbkey=data.dbkey)))
+                        __M_writer(u'" title="Visualize in Trackster"></a>\n')
+                    # SOURCE LINE 131
+                    if trans.user:
+                        # SOURCE LINE 132
+                        __M_writer(u'                            <div style="float: right">\n                                <a href="')
+                        # SOURCE LINE 133
+                        __M_writer(unicode(h.url_for( controller='tag', action='retag', item_class=data.__class__.__name__, item_id=dataset_id )))
+                        __M_writer(u'" target="galaxy_main" title="Edit dataset tags" class="icon-button tags tooltip"></a>\n                                <a href="')
+                        # SOURCE LINE 134
+                        __M_writer(unicode(h.url_for( controller='dataset', action='annotate', id=dataset_id )))
+                        __M_writer(u'" target="galaxy_main" title="Edit dataset annotation" class="icon-button annotate tooltip"></a>\n                            </div>\n                            <div style="clear: both"></div>\n                            <div class="tag-area" style="display: none">\n                                <strong>Tags:</strong>\n                                <div class="tag-elt"></div>\n                            </div>\n                            <div id="')
+                        # SOURCE LINE 141
+                        __M_writer(unicode(dataset_id))
+                        __M_writer(u'-annotation-area" class="annotation-area" style="display: none">\n                                <strong>Annotation:</strong>\n                                <div id="')
+                        # SOURCE LINE 143
+                        __M_writer(unicode(dataset_id))
+                        __M_writer(u'-annotation-elt" style="margin: 1px 0px 1px 0px" class="annotation-elt tooltip editable-text" title="Edit dataset annotation"></div>\n                            </div>\n                            \n')
+                    # SOURCE LINE 147
+                else:
+                    # SOURCE LINE 150
+                    __M_writer(u'                        <div style="clear: both"></div>\n')
+                # SOURCE LINE 152
+                __M_writer(u'    \t\t        <div style="clear: both"></div>\n')
+                # SOURCE LINE 153
+                for display_app in data.datatype.get_display_types():
+                    # SOURCE LINE 154
+                    __M_writer(u'                        ')
+                    target_frame, display_links = data.datatype.get_display_links( data, display_app, app, request.base ) 
+                    
+                    __M_writer(u'\n')
+                    # SOURCE LINE 155
+                    if len( display_links ) > 0:
+                        # SOURCE LINE 156
+                        __M_writer(u'                            | ')
+                        __M_writer(unicode(data.datatype.get_display_label(display_app)))
+                        __M_writer(u'\n')
+                        # SOURCE LINE 157
+                        for display_name, display_link in display_links:
+                            # SOURCE LINE 158
+                            __M_writer(u'                                <a target="')
+                            __M_writer(unicode(target_frame))
+                            __M_writer(u'" href="')
+                            __M_writer(unicode(display_link))
+                            __M_writer(u'">')
+                            __M_writer(unicode(_(display_name)))
+                            __M_writer(u'</a> \n')
+                # SOURCE LINE 162
+                for display_app in data.get_display_applications( trans ).itervalues():
+                    # SOURCE LINE 163
+                    __M_writer(u'                        | ')
+                    __M_writer(unicode(display_app.name))
+                    __M_writer(u' \n')
+                    # SOURCE LINE 164
+                    for link_app in display_app.links.itervalues():
+                        # SOURCE LINE 165
+                        __M_writer(u'                            <a target="')
+                        __M_writer(unicode(link_app.url.get( 'target_frame', '_blank' )))
+                        __M_writer(u'" href="')
+                        __M_writer(unicode(link_app.get_display_url( data, trans )))
+                        __M_writer(u'">')
+                        __M_writer(unicode(_(link_app.name)))
+                        __M_writer(u'</a> \n')
+                # SOURCE LINE 168
+            elif for_editing:
+                # SOURCE LINE 169
+                __M_writer(u'                    <a href="')
+                __M_writer(unicode(h.url_for( controller='tool_runner', action='rerun', id=data.id )))
+                __M_writer(u'" target="galaxy_main" title="Run this job again" class="icon-button arrow-circle tooltip"></a>\n')
+            # SOURCE LINE 171
+            __M_writer(u'    \n                </div>\n')
+            # SOURCE LINE 173
+            if data.peek != "no peek":
+                # SOURCE LINE 174
+                __M_writer(u'                    <div><pre id="peek')
+                __M_writer(unicode(data.id))
+                __M_writer(u'" class="peek">')
+                __M_writer(unicode(_(data.display_peek())))
+                __M_writer(u'</pre></div>\n')
+            # SOURCE LINE 176
+        else:
+            # SOURCE LINE 177
+            __M_writer(u'            <div>')
+            __M_writer(unicode(_('Error: unknown dataset state "%s".') % data_state))
+            __M_writer(u'</div>\n')
+        # SOURCE LINE 179
+        __M_writer(u'           \n')
+        # SOURCE LINE 181
+        __M_writer(u'                          \n')
+        # SOURCE LINE 182
+        if len( data.children ) > 0:
+            # SOURCE LINE 185
+            __M_writer(u'            ')
+
+            children = []
+            for child in data.children:
+                if child.visible:
+                    children.append( child )
+            
+            
+            # SOURCE LINE 190
+            __M_writer(u'\n')
+            # SOURCE LINE 191
+            if len( children ) > 0:
+                # SOURCE LINE 192
+                __M_writer(u'                <div>\n                    There are ')
+                # SOURCE LINE 193
+                __M_writer(unicode(len( children )))
+                __M_writer(u' secondary datasets.\n')
+                # SOURCE LINE 194
+                for idx, child in enumerate(children):
+                    # SOURCE LINE 195
+                    __M_writer(u'                        ')
+                    __M_writer(unicode(render_dataset( child, idx + 1, show_deleted_on_refresh = show_deleted_on_refresh )))
+                    __M_writer(u'\n')
+                # SOURCE LINE 197
+                __M_writer(u'                </div>\n')
+        # SOURCE LINE 200
+        __M_writer(u'\n    <div style="clear: both;"></div>\n\n    </div>\n        \n        \n    </div>\n\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
Index: galaxy-central/database/compiled_templates/root/history_item.mako.py
===================================================================
--- galaxy-central/database/compiled_templates/root/history_item.mako.py (revision 3)
+++ galaxy-central/database/compiled_templates/root/history_item.mako.py (revision 3)
@@ -0,0 +1,43 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1287725817.5901711
+_template_filename='templates/root/history_item.mako'
+_template_uri='root/history_item.mako'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = []
+
+
+def _mako_get_namespace(context, name):
+    try:
+        return context.namespaces[(__name__, name)]
+    except KeyError:
+        _mako_generate_namespaces(context)
+        return context.namespaces[(__name__, name)]
+def _mako_generate_namespaces(context):
+    # SOURCE LINE 1
+    ns = runtime.Namespace('__anon_0x10aacc110', context._clean_inheritance_tokens(), templateuri=u'history_common.mako', callables=None, calling_uri=_template_uri, module=None)
+    context.namespaces[(__name__, '__anon_0x10aacc110')] = ns
+
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        _import_ns = {}
+        _mako_get_namespace(context, '__anon_0x10aacc110')._populate(_import_ns, [u'render_dataset'])
+        hid = _import_ns.get('hid', context.get('hid', UNDEFINED))
+        data = _import_ns.get('data', context.get('data', UNDEFINED))
+        render_dataset = _import_ns.get('render_dataset', context.get('render_dataset', UNDEFINED))
+        __M_writer = context.writer()
+        __M_writer(u'\n\n')
+        # SOURCE LINE 3
+        __M_writer(unicode(render_dataset( data, hid )))
+        __M_writer(u'    \n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
Index: galaxy-central/database/compiled_templates/root/history.mako.py
===================================================================
--- galaxy-central/database/compiled_templates/root/history.mako.py (revision 3)
+++ galaxy-central/database/compiled_templates/root/history.mako.py (revision 3)
@@ -0,0 +1,245 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1287725327.3004439
+_template_filename='templates/root/history.mako'
+_template_uri='root/history.mako'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = []
+
+
+def _mako_get_namespace(context, name):
+    try:
+        return context.namespaces[(__name__, name)]
+    except KeyError:
+        _mako_generate_namespaces(context)
+        return context.namespaces[(__name__, name)]
+def _mako_generate_namespaces(context):
+    # SOURCE LINE 364
+    ns = runtime.Namespace('__anon_0x110c0db10', context._clean_inheritance_tokens(), templateuri=u'../tagging_common.mako', callables=None, calling_uri=_template_uri, module=None)
+    context.namespaces[(__name__, '__anon_0x110c0db10')] = ns
+
+    # SOURCE LINE 365
+    ns = runtime.Namespace('__anon_0x110c0dc10', context._clean_inheritance_tokens(), templateuri=u'history_common.mako', callables=None, calling_uri=_template_uri, module=None)
+    context.namespaces[(__name__, '__anon_0x110c0dc10')] = ns
+
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        _import_ns = {}
+        _mako_get_namespace(context, '__anon_0x110c0db10')._populate(_import_ns, [u'render_individual_tagging_element'])
+        _mako_get_namespace(context, '__anon_0x110c0dc10')._populate(_import_ns, [u'render_dataset'])
+        datasets = _import_ns.get('datasets', context.get('datasets', UNDEFINED))
+        show_deleted = _import_ns.get('show_deleted', context.get('show_deleted', UNDEFINED))
+        h = _import_ns.get('h', context.get('h', UNDEFINED))
+        reversed = _import_ns.get('reversed', context.get('reversed', UNDEFINED))
+        render_dataset = _import_ns.get('render_dataset', context.get('render_dataset', UNDEFINED))
+        trans = _import_ns.get('trans', context.get('trans', UNDEFINED))
+        dict = _import_ns.get('dict', context.get('dict', UNDEFINED))
+        show_hidden = _import_ns.get('show_hidden', context.get('show_hidden', UNDEFINED))
+        render_individual_tagging_element = _import_ns.get('render_individual_tagging_element', context.get('render_individual_tagging_element', UNDEFINED))
+        n_ = _import_ns.get('n_', context.get('n_', UNDEFINED))
+        hda_id = _import_ns.get('hda_id', context.get('hda_id', UNDEFINED))
+        bool = _import_ns.get('bool', context.get('bool', UNDEFINED))
+        annotation = _import_ns.get('annotation', context.get('annotation', UNDEFINED))
+        history = _import_ns.get('history', context.get('history', UNDEFINED))
+        __M_writer = context.writer()
+        # SOURCE LINE 1
+        _=n_ 
+        
+        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['_'] if __M_key in __M_locals_builtin()]))
+        __M_writer(u'\n<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\n<html>\n\n<head>\n<title>')
+        # SOURCE LINE 7
+        __M_writer(unicode(_('Galaxy History')))
+        __M_writer(u'</title>\n\n')
+        # SOURCE LINE 10
+        if bool( [ data for data in history.active_datasets if data.state in ['running', 'queued', '', None ] ] ):
+            # SOURCE LINE 11
+            __M_writer(u'<!-- running: do not change this comment, used by TwillTestCase.wait -->\n')
+        # SOURCE LINE 13
+        __M_writer(u'\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n<meta http-equiv="Pragma" content="no-cache">\n\n')
+        # SOURCE LINE 17
+        __M_writer(unicode(h.css( "base", "history", "autocomplete_tagging" )))
+        __M_writer(u'\n')
+        # SOURCE LINE 18
+        __M_writer(unicode(h.js( "jquery", "jquery.tipsy", "galaxy.base", "json2", "class", "jquery.jstore", "jquery.autocomplete", "autocomplete_tagging" )))
+        __M_writer(u'\n\n<script type="text/javascript">\n\n')
+        # SOURCE LINE 22
+        TERMINAL_STATES = ["ok", "error", "empty", "deleted", "discarded", "failed_metadata"] 
+        
+        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['TERMINAL_STATES'] if __M_key in __M_locals_builtin()]))
+        __M_writer(u'\nTERMINAL_STATES = ')
+        # SOURCE LINE 23
+        __M_writer(unicode( h.to_json_string(TERMINAL_STATES) ))
+        __M_writer(u';\n\n$(function() {\n    var historywrapper = $("div.historyItemWrapper");\n    init_history_items(historywrapper);\n    historywrapper.each( function() {\n        // Delete link\n        $(this).find( "div.historyItemButtons > .delete" ).each( function() {\n            var data_id = this.id.split( "-" )[1];\n            $(this).click( function() {\n                $( \'#historyItem-\' + data_id + "> div.historyItemTitleBar" ).addClass( "spinner" );\n                $.ajax({\n                    url: "')
+        # SOURCE LINE 35
+        __M_writer(unicode(h.url_for( action='delete_async', id='XXX' )))
+        __M_writer(u'".replace( \'XXX\', data_id ),\n                    error: function() { alert( "Delete failed" ); },\n                    success: function(msg) {\n                        if (msg === "OK") {\n')
+        # SOURCE LINE 39
+        if show_deleted:
+            # SOURCE LINE 40
+            __M_writer(u'                            var to_update = {};\n                            to_update[data_id] = "none";\n                            updater( to_update );\n')
+            # SOURCE LINE 43
+        else:
+            # SOURCE LINE 44
+            __M_writer(u'                            $( "#historyItem-" + data_id ).fadeOut( "fast", function() {\n                                $( "#historyItemContainer-" + data_id ).remove();\n                                if ( $( "div.historyItemContainer" ).length < 1 ) {\n                                    $( "#emptyHistoryMessage" ).show();\n                                }\n                            });\n')
+        # SOURCE LINE 51
+        __M_writer(u'                            $(".tipsy").remove();\n                        } else {\n                            alert( "Delete failed" );\n                        }\n                    }\n                });\n                return false;\n            });\n        });\n        // Undelete link\n        $(this).find( "a.historyItemUndelete" ).each( function() {\n            var data_id = this.id.split( "-" )[1];\n            $(this).click( function() {\n                $( \'#historyItem-\' + data_id + " > div.historyItemTitleBar" ).addClass( "spinner" );\n                $.ajax({\n                    url: "')
+        # SOURCE LINE 66
+        __M_writer(unicode(h.url_for( controller='dataset', action='undelete_async', id='XXX' )))
+        __M_writer(u'".replace( \'XXX\', data_id ),\n                    error: function() { alert( "Undelete failed" ) },\n                    success: function() {\n                        var to_update = {};\n                        to_update[data_id] = "none";\n                        updater( to_update );\n                    }\n                });\n                return false;\n            });\n        });\n\n        // Tag handling.\n        $(this).find( "a.icon-button.tags").each( function() {\n            // Use links parameters but custom URL as ajax URL.\n            $(this).click( function() {\n                // Get tag area, tag element.\n                var history_item = $(this).parents(".historyItem");\n                var tag_area = history_item.find(".tag-area");\n                var tag_elt = history_item.find(".tag-elt");\n\n                // Show or hide tag area; if showing tag area and it\'s empty, fill it.\n                if ( tag_area.is( ":hidden" ) ) {\n                    if (!tag_elt.html()) {\n                        // Need to fill tag element.\n                        var href_parms = $(this).attr("href").split("?")[1];\n                        var ajax_url = "')
+        # SOURCE LINE 92
+        __M_writer(unicode(h.url_for( controller='tag', action='get_tagging_elt_async' )))
+        __M_writer(u'?" + href_parms;\n                        $.ajax({\n                            url: ajax_url,\n                            error: function() { alert( "Tagging failed" ) },\n                            success: function(tag_elt_html) {\n                                tag_elt.html(tag_elt_html);\n                                tag_elt.find(".tooltip").tipsy( { gravity: \'s\' } );\n                                tag_area.slideDown("fast");\n                            }\n                        });\n                    } else {\n                        // Tag element is filled; show.\n                        tag_area.slideDown("fast");\n                    }\n                } else {\n                    // Hide.\n                    tag_area.slideUp("fast");\n                }\n                return false;        \n            });\n        });\n\n        // Annotation handling.\n        $(this).find( "a.icon-button.annotate").each( function() {\n            // Use links parameters but custom URL as ajax URL.\n            $(this).click( function() {\n                // Get tag area, tag element.\n                var history_item = $(this).parents(".historyItem");\n                var annotation_area = history_item.find(".annotation-area");\n                var annotation_elt = history_item.find(".annotation-elt");\n\n                // Show or hide annotation area; if showing annotation area and it\'s empty, fill it.\n                if ( annotation_area.is( ":hidden" ) ) {\n                    if (!annotation_elt.html()) {\n                        // Need to fill annotation element.\n                        var href_parms = $(this).attr("href").split("?")[1];\n                        var ajax_url = "')
+        # SOURCE LINE 128
+        __M_writer(unicode(h.url_for( controller='dataset', action='get_annotation_async' )))
+        __M_writer(u'?" + href_parms;\n                        $.ajax({\n                            url: ajax_url,\n                            error: function() { alert( "Annotations failed" ) },\n                            success: function(annotation) {\n                                if (annotation == "") {\n                                    annotation = "<em>Describe or add notes to dataset</em>";\n                                }\n                                annotation_elt.html(annotation);\n                                annotation_area.find(".tooltip").tipsy( { gravity: \'s\' } );\n                                async_save_text(\n                                    annotation_elt.attr("id"), annotation_elt.attr("id"),\n                                    "')
+        # SOURCE LINE 140
+        __M_writer(unicode(h.url_for( controller="/dataset", action="annotate_async")))
+        __M_writer(u'?" + href_parms,\n                                    "new_annotation", 18, true, 4);\n                                annotation_area.slideDown("fast");\n                            }\n                        });\n                    } else {\n                        // Annotation element is filled; show.\n                        annotation_area.slideDown("fast");\n                    }\n                } else {\n                    // Hide.\n                    annotation_area.slideUp("fast");\n                }\n                return false;        \n            });\n        });\n    });\n    \n    // Trackster links\n    function init_trackster_links() {\n        $("a.trackster").live( "click", function() {\n            var link = $(this),\n                hid = link.attr("id").split("_")[1]; // visualize_{id}\n\n            $.ajax({\n                url: "')
+        # SOURCE LINE 165
+        __M_writer(unicode(h.url_for( controller='tracks', action='list_tracks' )))
+        __M_writer(u'",\n                data: {\'hid\': hid},\n                error: function() { alert( "Visualization error" ); },\n                success: function(html) {\n                    show_modal("Add Track &mdash; Select Dataset(s)", html, {\n                        "New Browser": function() {\n                            hide_modal();\n                        },\n                        "Insert": function() {\n                            hide_modal();\n                        },\n                        "Cancel": function() {\n                            hide_modal();\n                        }\n                    });\n                }\n            });\n        });    \n    }\n    \n    init_trackster_links();\n    \n    // History rename functionality.\n    async_save_text("history-name-container", "history-name", "')
+        # SOURCE LINE 188
+        __M_writer(unicode(h.url_for( controller="/history", action="rename_async", id=trans.security.encode_id(history.id) )))
+        __M_writer(u'", "new_name", 18);\n    \n    // History tagging functionality.\n    var historyTagArea = $(\'#history-tag-area\');\n    $(\'#history-tag\').click( function() {\n        if ( historyTagArea.is( ":hidden" ) ) {\n            historyTagArea.slideDown("fast");\n        } else {\n            historyTagArea.slideUp("fast");\n        }\n        return false;\n    });\n    \n    // History annotation functionality.\n    var historyAnnotationArea = $(\'#history-annotation-area\');\n    $(\'#history-annotate\').click( function() {\n        if ( historyAnnotationArea.is( ":hidden" ) ) {\n            historyAnnotationArea.slideDown("fast");\n        } else {\n            historyAnnotationArea.slideUp("fast");\n        }\n        return false;\n    });\n    async_save_text("history-annotation-container", "history-annotation", "')
+        # SOURCE LINE 211
+        __M_writer(unicode(h.url_for( controller="/history", action="annotate_async", id=trans.security.encode_id(history.id) )))
+        __M_writer(u'", "new_annotation", 18, true, 4);\n    \n    // Updater\n    updater(\n        ')
+        # SOURCE LINE 215
+        __M_writer(unicode( h.to_json_string( dict([(data.id, data.state) for data in reversed( datasets ) if data.visible and data.state not in TERMINAL_STATES]) ) ))
+        __M_writer(u'\n    );\n    \n    // Navigate to a dataset.\n')
+        # SOURCE LINE 219
+        if hda_id:
+            # SOURCE LINE 220
+            __M_writer(u'        self.location = "#')
+            __M_writer(unicode(hda_id))
+            __M_writer(u'";\n')
+        # SOURCE LINE 222
+        __M_writer(u'});\n\n// Looks for changes in dataset state using an async request. Keeps\n// calling itself (via setTimeout) until all datasets are in a terminal\n// state.\nvar updater = function ( tracked_datasets ) {\n    // Check if there are any items left to track\n    var empty = true;\n    for ( i in tracked_datasets ) {\n        empty = false;\n        break;\n    }\n    if ( !empty ) {\n        setTimeout( function() { updater_callback( tracked_datasets ) }, 4000 );\n    }\n};\nvar updater_callback = function ( tracked_datasets ) {\n    // Build request data\n    var ids = [],\n        states = [],\n        force_history_refresh = false;\n        \n    $.each( tracked_datasets, function ( id, state ) {\n        ids.push( id );\n        states.push( state );\n    });\n    // Make ajax call\n    $.ajax( {\n        type: "POST",\n        url: "')
+        # SOURCE LINE 251
+        __M_writer(unicode(h.url_for( controller='root', action='history_item_updates' )))
+        __M_writer(u'",\n        dataType: "json",\n        data: { ids: ids.join( "," ), states: states.join( "," ) },\n        success : function ( data ) {\n            $.each( data, function( id, val ) {\n                // Replace HTML\n                var container = $("#historyItemContainer-" + id);\n                container.html( val.html );\n                init_history_items( $("div.historyItemWrapper"), "noinit" );\n                // If new state is terminal, stop tracking\n                if (TERMINAL_STATES.indexOf(val.state) !== -1) {\n                    if ( val.force_history_refresh ){\n                        force_history_refresh = true;\n                    }\n                    delete tracked_datasets[ parseInt(id) ];\n                } else {\n                    tracked_datasets[ parseInt(id) ] = val.state;\n                }\n            });\n            if ( force_history_refresh ) {\n                parent.frames.galaxy_history.location.reload();\n            } else {\n                // Keep going (if there are still any items to track)\n                updater( tracked_datasets ); \n            }\n        },\n        error: function() {\n            // Just retry, like the old method, should try to be smarter\n            updater( tracked_datasets );\n        }\n    });\n};\n\n</script>\n\n<style>\n.historyItemBody {\n    display: none;\n}\ndiv.form-row {\n    padding: 5px 5px 5px 0px;\n}\n#top-links {\n    margin-bottom: 15px;\n}\n#history-name-container {\n    display: inline-block;\n    color: gray;\n    font-weight: bold;\n}\n.editable-text {\n    border: solid transparent 1px;\n    padding: 3px;\n    margin: -4px;\n}\n</style>\n\n<noscript>\n<style>\n.historyItemBody {\n    display: block;\n}\n</style>\n</noscript>\n\n</head>\n\n<body class="historyPage">\n<div id="top-links" class="historyLinks">\n    \n    <a title="')
+        # SOURCE LINE 321
+        __M_writer(unicode(_('refresh')))
+        __M_writer(u'" class="icon-button arrow-circle tooltip" href="')
+        __M_writer(unicode(h.url_for('history', show_deleted=show_deleted)))
+        __M_writer(u'"></a>\n    <a title=\'')
+        # SOURCE LINE 322
+        __M_writer(unicode(_('collapse all')))
+        __M_writer(u'\' class=\'icon-button toggle tooltip\' href=\'#\' style="display: none;"></a>\n    \n')
+        # SOURCE LINE 324
+        if trans.get_user():
+            # SOURCE LINE 325
+            __M_writer(u'    <div style="width: 40px; float: right; white-space: nowrap;">\n        <a id="history-tag" title="Edit history tags" class="icon-button tags tooltip" target="galaxy_main" href="')
+            # SOURCE LINE 326
+            __M_writer(unicode(h.url_for( controller='history', action='tag' )))
+            __M_writer(u'"></a>\n        <a id="history-annotate" title="Edit history annotation" class="icon-button annotate tooltip" target="galaxy_main" href="')
+            # SOURCE LINE 327
+            __M_writer(unicode(h.url_for( controller='history', action='annotate' )))
+            __M_writer(u'"></a>\n    </div>\n')
+        # SOURCE LINE 330
+        __M_writer(u'\n</div>\n\n<div style="clear: both;"></div>\n\n')
+        # SOURCE LINE 335
+        if show_deleted:
+            # SOURCE LINE 336
+            __M_writer(u'<div class="historyLinks">\n    <a href="')
+            # SOURCE LINE 337
+            __M_writer(unicode(h.url_for('history', show_deleted=False)))
+            __M_writer(u'">')
+            __M_writer(unicode(_('hide deleted')))
+            __M_writer(u'</a>\n</div>\n')
+        # SOURCE LINE 340
+        __M_writer(u'\n')
+        # SOURCE LINE 341
+        if show_hidden:
+            # SOURCE LINE 342
+            __M_writer(u'<div class="historyLinks">\n    <a href="')
+            # SOURCE LINE 343
+            __M_writer(unicode(h.url_for('history', show_hidden=False)))
+            __M_writer(u'">')
+            __M_writer(unicode(_('hide hidden')))
+            __M_writer(u'</a>\n</div>\n')
+        # SOURCE LINE 346
+        __M_writer(u'\n<div id="history-name-area" class="historyLinks">\n    \n')
+        # SOURCE LINE 349
+        if trans.get_user():
+            # SOURCE LINE 350
+            __M_writer(u'    <div id="history-name-container">\n        <div id="history-name" class="tooltip editable-text" title="Click to rename history">')
+            # SOURCE LINE 351
+            __M_writer(filters.html_escape(unicode(history.get_display_name() )))
+            __M_writer(u'</div>\n    </div>\n')
+        # SOURCE LINE 354
+        __M_writer(u'                               \n</div>\n\n')
+        # SOURCE LINE 357
+        if history.deleted:
+            # SOURCE LINE 358
+            __M_writer(u'    <div class="warningmessagesmall">\n        ')
+            # SOURCE LINE 359
+            __M_writer(unicode(_('You are currently viewing a deleted history!')))
+            __M_writer(u'\n    </div>\n    <p></p>\n')
+        # SOURCE LINE 363
+        __M_writer(u'\n')
+        # SOURCE LINE 364
+        __M_writer(u'\n')
+        # SOURCE LINE 365
+        __M_writer(u'\n\n')
+        # SOURCE LINE 367
+        if trans.get_user() is not None:
+            # SOURCE LINE 368
+            __M_writer(u'    <div style="margin: 0px 5px 10px 5px">\n')
+            # SOURCE LINE 370
+            __M_writer(u'        <div id="history-tag-area" style="display: none">\n            <b>Tags:</b>\n            ')
+            # SOURCE LINE 372
+            __M_writer(unicode(render_individual_tagging_element(user=trans.get_user(), tagged_item=history, elt_context="history.mako", use_toggle_link=False, input_size="20")))
+            __M_writer(u'\n        </div>\n    \n')
+            # SOURCE LINE 376
+            __M_writer(u'        <div id="history-annotation-area" style="display: none">\n   \t        <b>Annotation / Notes:</b>\n   \t        <div id="history-annotation-container">\n\t\t    <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">\n')
+            # SOURCE LINE 380
+            if annotation:
+                # SOURCE LINE 381
+                __M_writer(u'                    ')
+                __M_writer(filters.html_escape(unicode(h.to_unicode( annotation ) )))
+                __M_writer(u'\n')
+                # SOURCE LINE 382
+            else:
+                # SOURCE LINE 383
+                __M_writer(u'                    <em>Describe or add notes to history</em>\n')
+            # SOURCE LINE 385
+            __M_writer(u'\t\t    </div>\n            </div>\n        </div>\n        \n    </div>\n')
+        # SOURCE LINE 391
+        __M_writer(u'\n')
+        # SOURCE LINE 392
+        if not datasets:
+            # SOURCE LINE 393
+            __M_writer(u'\n    <div class="infomessagesmall" id="emptyHistoryMessage">\n\n')
+            # SOURCE LINE 396
+        else:    
+            # SOURCE LINE 397
+            __M_writer(u'\n')
+            # SOURCE LINE 399
+            for data in reversed( datasets ):
+                # SOURCE LINE 400
+                if data.visible or show_hidden:
+                    # SOURCE LINE 401
+                    __M_writer(u'            <div class="historyItemContainer" id="historyItemContainer-')
+                    __M_writer(unicode(data.id))
+                    __M_writer(u'">\n                ')
+                    # SOURCE LINE 402
+                    __M_writer(unicode(render_dataset( data, data.hid, show_deleted_on_refresh = show_deleted, for_editing = True )))
+                    __M_writer(u'\n            </div>\n')
+            # SOURCE LINE 406
+            __M_writer(u'\n    <div class="infomessagesmall" id="emptyHistoryMessage" style="display:none;">\n')
+        # SOURCE LINE 409
+        __M_writer(u'        ')
+        __M_writer(unicode(_("Your history is empty. Click 'Get Data' on the left pane to start")))
+        __M_writer(u'\n    </div>\n\n</body>\n</html>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
Index: galaxy-central/database/compiled_templates/root/tool_menu.mako.py
===================================================================
--- galaxy-central/database/compiled_templates/root/tool_menu.mako.py (revision 3)
+++ galaxy-central/database/compiled_templates/root/tool_menu.mako.py (revision 3)
@@ -0,0 +1,333 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1287725327.091922
+_template_filename='templates/root/tool_menu.mako'
+_template_uri='/root/tool_menu.mako'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['render_label', 'render_tool', 'render_workflow']
+
+
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        _ = context.get('_', UNDEFINED)
+        h = context.get('h', UNDEFINED)
+        def render_label(label):
+            return render_render_label(context.locals_(__M_locals),label)
+        t = context.get('t', UNDEFINED)
+        str = context.get('str', UNDEFINED)
+        recent_tools = context.get('recent_tools', UNDEFINED)
+        toolbox = context.get('toolbox', UNDEFINED)
+        trans = context.get('trans', UNDEFINED)
+        def render_tool(tool,section):
+            return render_render_tool(context.locals_(__M_locals),tool,section)
+        def render_workflow(key,workflow,section):
+            return render_render_workflow(context.locals_(__M_locals),key,workflow,section)
+        __M_writer = context.writer()
+        # SOURCE LINE 25
+        __M_writer(u'\n\n')
+        # SOURCE LINE 37
+        __M_writer(u'\n\n')
+        # SOURCE LINE 44
+        __M_writer(u'\n\n<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<html>\n    <head>\n        <title>')
+        # SOURCE LINE 49
+        __M_writer(unicode(_('Galaxy Tools')))
+        __M_writer(u'</title>\n        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n        <link href="')
+        # SOURCE LINE 51
+        __M_writer(unicode(h.url_for('/static/style/base.css')))
+        __M_writer(u'" rel="stylesheet" type="text/css" />\n        <link href="')
+        # SOURCE LINE 52
+        __M_writer(unicode(h.url_for('/static/style/tool_menu.css')))
+        __M_writer(u'" rel="stylesheet" type="text/css" />\n\n')
+        # SOURCE LINE 55
+        __M_writer(u'        ')
+        __M_writer(unicode(h.js( "jquery", "galaxy.base", "json2" )))
+        __M_writer(u'\n\n        <script type="text/javascript">\n            // Set up GalaxyAsync object.\n            var galaxy_async = new GalaxyAsync(')
+        # SOURCE LINE 59
+        __M_writer(unicode(str(trans.app.config.log_actions).lower()))
+        __M_writer(u');\n            galaxy_async.set_func_url(galaxy_async.log_user_action, "')
+        # SOURCE LINE 60
+        __M_writer(unicode(h.url_for( controller='user', action='log_user_action_async' )))
+        __M_writer(u'");\n        \n            $(document).ready(function() { \n                // Init showing/hiding of tool sections.\n                $( "div.toolSectionBody" ).hide();\n                $( "div.toolSectionTitle > span" ).wrap( "<a href=\'#\'></a>" )\n                var last_expanded = null;\n                $( "div.toolSectionTitle" ).each( function() { \n                   var body = $(this).next( "div.toolSectionBody" );\n                   $(this).click( function() {\n                       if ( body.is( ":hidden" ) ) {\n                            if ( last_expanded ) {\n                                last_expanded.slideUp( "fast" );\n                            }\n                            last_expanded = body;\n                            body.slideDown( "fast" );\n                       }\n                       else {\n                           body.slideUp( "fast" );\n                           last_expanded = null;\n                       }\n                       return false;\n                   });\n                });\n                \n                // Log clicks on tools.\n                $("div.toolTitle > a").click( function() \n                {\n                    var tool_title = $(this).attr(\'id\').split("-")[1];\n                    var section_title = $(this).parents("div.toolSectionWrapper").find("div.toolSectionTitle").text().trim();\n                    var search_active = $(this).parents("div.toolTitle").hasClass("search_match");\n                    \n                    // Log action.\n                    galaxy_async.log_user_action("tool_menu_click." + tool_title, section_title, \n                                                    JSON.stringify({"search_active" : search_active}));\n                });\n                \n                $( "a[minsizehint]" ).click( function() {\n                    if ( parent.handle_minwidth_hint ) {\n                        parent.handle_minwidth_hint( $(this).attr( "minsizehint" ) );\n                    }\n                });\n                \n                // Init searching.\n                $("#tool-search-query").click( function (){\n                    $(this).focus();\n                    $(this).select();\n                })\n                .keyup( function () {\n                    // Remove italics.\n                    $(this).css("font-style", "normal");\n                    \n                    // Don\'t update if same value as last time\n                    if ( this.value.length < 3 ) {\n                        reset_tool_search(false);\n                    } else if ( this.value != this.lastValue ) {\n                        // Add class to denote that searching is active.\n                        $(this).addClass("search_active");\n                        // input.addClass(config.loadingClass);\n                        // Add \'*\' to facilitate partial matching.\n                        var q = this.value + \'*\';\n                        // Stop previous ajax-request\n                        if (this.timer) {\n                            clearTimeout(this.timer);\n                        }\n                        // Start a new ajax-request in X ms\n                        $("#search-spinner").show();\n                        this.timer = setTimeout(function () {\n                            $.get("')
+        # SOURCE LINE 128
+        __M_writer(unicode(h.url_for( controller='root', action='tool_search' )))
+        __M_writer(u'", { query: q }, function (data) {\n                                // input.removeClass(config.loadingClass);\n                                // Show live-search if results and search-term aren\'t empty\n                                $("#search-no-results").hide();\n                                // Hide all tool sections.\n                                $(".toolSectionWrapper").hide();\n                                // This hides all tools but not workflows link (which is in a .toolTitle div).\n                                $(".toolSectionWrapper").find(".toolTitle").hide();\n                                if ( data.length != 0 ) {\n                                    // Map tool ids to element ids and join them.\n                                    var s = $.map( data, function( n, i ) { return "#link-" + n; } ).join( ", " );\n                                    \n                                    // First pass to show matching tools and their parents.\n                                    $(s).each( function() {\n                                        // Add class to denote match.\n                                        $(this).parent().addClass("search_match");\n                                        if ($(this).parents("#recently_used_wrapper").length == 0)\n                                            // Default behavior.\n                                            $(this).parent().show().parent().parent().show().parent().show();\n                                        else if ($(this).parents(".user_pref_visible").length != 0)\n                                            // RU menu is visible, so filter it as normal.\n                                            $(this).parent().show().parent().parent().show().parent().show();\n                                        else \n                                        {\n                                            // RU menu is not visible, so set up classes and visibility so that if menu shown matching is \n                                            // aleady in place.\n                                            $(this).parent().show();\n                                        }\n                                    });\n                                    \n                                    // Hide labels that have no visible children.\n                                    $(".toolPanelLabel").each( function() {\n                                       var this_label = $(this);                                   \n                                       var next = this_label.next();\n                                       var no_visible_tools = true;\n                                       // Look through tools following label and, if none are visible, hide label.\n                                       while (next.length != 0 && next.hasClass("toolTitle"))\n                                       {\n                                           if (next.is(":visible"))\n                                           {\n                                               no_visible_tools = false;\n                                               break;\n                                           }\n                                           else\n                                               next = next.next();\n                                        }\n                                        if (no_visible_tools)\n                                            this_label.hide();\n                                    });\n                                } else {\n                                    $("#search-no-results").show();\n                                }\n                                $("#search-spinner").hide();\n                            }, "json" );\n                        }, 200 );\n                    }\n                    this.lastValue = this.value;\n                });                \n            });            \n\n            // Update recently used tools menu. Function inserts a new item and removes the last item.\n            function update_recently_used()\n            {\n                $.ajax({\n                    url: "')
+        # SOURCE LINE 192
+        __M_writer(unicode(h.url_for( controller='/user', action='get_most_recently_used_tool_async' )))
+        __M_writer(u'",\n                    dataType: \'json\',\n                    error: function() { \n                        // console.log( "Failed to update recently used list." );\n                    },\n                    success: function(new_tool_info) {\n                        var recently_used_elts = $("#recently_used").find(".toolTitle");\n                        var first_elt = $(recently_used_elts.first());\n                        var found_in_list = false;\n            \n                        // Look for new tool in current list. If found, rearrange list to move tool to top.\n                        recently_used_elts.each( function(index) {\n                            var anchor = $(this).find("a");\n                            var tool_id = anchor.attr("id").split("-")[1];\n                            if (tool_id == new_tool_info.id)\n                            {\n                                found_in_list = true;\n                    \n                                // If tool is first, do nothing.\n                                if (index == 0)\n                                    return;\n                                else \n                                {\n                                    // Tool not first; reorder.\n                                    $(this).remove();\n                                    first_elt.before($(this));\n                                }\n                            }\n                        });\n            \n                        // If tool not in list, create new element, remove last element, and put new element first in list.\n                        if (!found_in_list)\n                        {\n                            new_tool_elt = $("<div class=\'toolTitle\'> ')
+        # SOURCE LINE 226
+        __M_writer(u'                                                <a id=\'link-" + new_tool_info.id + "\' href=\'" + new_tool_info.link + "\' target=\'" + \n                                                new_tool_info.target + "\' minsizehint=\'" + new_tool_info.minsizehint + "\'>" +\n                                                new_tool_info.name + "</a> " + new_tool_info.description + " ')
+        # SOURCE LINE 229
+        __M_writer(u'                                              </div>");\n                            recently_used_elts.last().remove();\n                            recently_used_elts.first().before(new_tool_elt);                            \n                        }\n                    }\n                });                \n            }\n        </script>\n    </head>\n\n    <body class="toolMenuPage">\n        <div class="toolMenu">\n            \n')
+        # SOURCE LINE 243
+        __M_writer(u'                ')
+
+        show_tool_search = False
+        if trans.user:
+            show_tool_search = trans.user.preferences.get( "show_tool_search", "False" )
+        
+        if show_tool_search == "True":
+            display = "block"
+        else:
+            display = "none"
+                        
+        
+        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['display','show_tool_search'] if __M_key in __M_locals_builtin()]))
+        # SOURCE LINE 252
+        __M_writer(u'\n                <div id="tool-search" style="padding-bottom: 5px; position: relative; display: ')
+        # SOURCE LINE 253
+        __M_writer(unicode(display))
+        __M_writer(u'; width: 100%">\n                    <input type="text" name="query" value="search tools" id="tool-search-query" style="width: 100%; font-style:italic; font-size: inherit"/>\n                    <img src="')
+        # SOURCE LINE 255
+        __M_writer(unicode(h.url_for('/static/images/loading_small_white_bg.gif')))
+        __M_writer(u'" id="search-spinner" style="display: none; position: absolute; right: 0; top: 5px;"/>\n                </div>\n                \n')
+        # SOURCE LINE 259
+        if trans.user:
+            # SOURCE LINE 260
+            __M_writer(u'                    ')
+
+            if trans.user.preferences.get( 'show_recently_used_menu', 'False' ) == 'True':
+                display = "block"
+                pref_class = "user_pref_visible"
+            else:
+                display = "none"
+                pref_class = "user_pref_hidden"
+            
+            
+            __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['pref_class','display'] if __M_key in __M_locals_builtin()]))
+            # SOURCE LINE 267
+            __M_writer(u'\n                    <div class="toolSectionWrapper ')
+            # SOURCE LINE 268
+            __M_writer(unicode(pref_class))
+            __M_writer(u'" id="recently_used_wrapper" \n                            style="display: ')
+            # SOURCE LINE 269
+            __M_writer(unicode(display))
+            __M_writer(u'; padding-bottom: 5px">\n                        <div class="toolSectionTitle">\n                            <span>Recently Used</span>\n                        </div>\n                        <div id="recently_used" class="toolSectionBody">\n                            <div class="toolSectionBg">\n')
+            # SOURCE LINE 275
+            for tool in recent_tools:
+                # SOURCE LINE 276
+                __M_writer(u'                                    ')
+                __M_writer(unicode(render_tool( tool, True )))
+                __M_writer(u'\n')
+            # SOURCE LINE 278
+            __M_writer(u'                            </div>\n                        </div>\n                        <div class="toolSectionPad"></div>\n                    </div>\n')
+        # SOURCE LINE 283
+        __M_writer(u'                \n')
+        # SOURCE LINE 285
+        for key, val in toolbox.tool_panel.items():
+            # SOURCE LINE 286
+            __M_writer(u'                    <div class="toolSectionWrapper">\n')
+            # SOURCE LINE 287
+            if key.startswith( 'tool' ):
+                # SOURCE LINE 288
+                __M_writer(u'                        ')
+                __M_writer(unicode(render_tool( val, False )))
+                __M_writer(u'\n')
+                # SOURCE LINE 289
+            elif key.startswith( 'workflow' ):
+                # SOURCE LINE 290
+                __M_writer(u'                        ')
+                __M_writer(unicode(render_workflow( key, val, False )))
+                __M_writer(u'\n')
+                # SOURCE LINE 291
+            elif key.startswith( 'section' ):
+                # SOURCE LINE 292
+                __M_writer(u'                        ')
+                section = val 
+                
+                __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['section'] if __M_key in __M_locals_builtin()]))
+                __M_writer(u'\n                        <div class="toolSectionTitle" id="title_')
+                # SOURCE LINE 293
+                __M_writer(unicode(section.id))
+                __M_writer(u'">\n                            <span>')
+                # SOURCE LINE 294
+                __M_writer(unicode(section.name))
+                __M_writer(u'</span>\n                        </div>\n                        <div id="')
+                # SOURCE LINE 296
+                __M_writer(unicode(section.id))
+                __M_writer(u'" class="toolSectionBody">\n                            <div class="toolSectionBg">\n')
+                # SOURCE LINE 298
+                for section_key, section_val in section.elems.items():
+                    # SOURCE LINE 299
+                    if section_key.startswith( 'tool' ):
+                        # SOURCE LINE 300
+                        __M_writer(u'                                        ')
+                        __M_writer(unicode(render_tool( section_val, True )))
+                        __M_writer(u'\n')
+                        # SOURCE LINE 301
+                    elif section_key.startswith( 'workflow' ):
+                        # SOURCE LINE 302
+                        __M_writer(u'                                        ')
+                        __M_writer(unicode(render_workflow( section_key, section_val, True )))
+                        __M_writer(u'\n')
+                        # SOURCE LINE 303
+                    elif section_key.startswith( 'label' ):
+                        # SOURCE LINE 304
+                        __M_writer(u'                                        ')
+                        __M_writer(unicode(render_label( section_val )))
+                        __M_writer(u'\n')
+                # SOURCE LINE 307
+                __M_writer(u'                            </div>\n                        </div>\n')
+                # SOURCE LINE 309
+            elif key.startswith( 'label' ):
+                # SOURCE LINE 310
+                __M_writer(u'                        ')
+                __M_writer(unicode(render_label( val )))
+                __M_writer(u'\n')
+            # SOURCE LINE 312
+            __M_writer(u'                    <div class="toolSectionPad"></div>\n                    </div>\n')
+        # SOURCE LINE 315
+        __M_writer(u'                \n')
+        # SOURCE LINE 317
+        __M_writer(u'                <div id="search-no-results" style="display: none; padding-top: 5px">\n                    <em><strong>Search did not match any tools.</strong></em>\n                </div>\n                \n')
+        # SOURCE LINE 324
+        __M_writer(u'                \n')
+        # SOURCE LINE 325
+        if t.user:
+            # SOURCE LINE 326
+            __M_writer(u'                    <div class="toolSectionPad"></div>\n                    <div class="toolSectionPad"></div>\n                    <div class="toolSectionTitle" id="title_XXinternalXXworkflow">\n                      <span>Workflows</span>\n                    </div>\n                    <div id="XXinternalXXworkflow" class="toolSectionBody">\n                        <div class="toolSectionBg">\n')
+            # SOURCE LINE 333
+            if t.user.stored_workflow_menu_entries:
+                # SOURCE LINE 334
+                for m in t.user.stored_workflow_menu_entries:
+                    # SOURCE LINE 335
+                    __M_writer(u'                                    <div class="toolTitle">\n                                        <a href="')
+                    # SOURCE LINE 336
+                    __M_writer(unicode(h.url_for( controller='workflow', action='run', id=trans.security.encode_id(m.stored_workflow_id) )))
+                    __M_writer(u'" target="galaxy_main">')
+                    __M_writer(unicode(m.stored_workflow.name))
+                    __M_writer(u'</a>\n                                    </div>\n')
+            # SOURCE LINE 340
+            __M_writer(u'                            <div class="toolTitle">\n                                <a href="')
+            # SOURCE LINE 341
+            __M_writer(unicode(h.url_for( controller='workflow', action='list_for_run')))
+            __M_writer(u'" target="galaxy_main">All workflows</a>\n                            </div>\n                        </div>\n                    </div>\n')
+        # SOURCE LINE 346
+        __M_writer(u'                \n            </div>\n        </div>\n    </body>\n</html>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_render_label(context,label):
+    context.caller_stack._push_frame()
+    try:
+        __M_writer = context.writer()
+        # SOURCE LINE 40
+        __M_writer(u'\n    <div class="toolPanelLabel" id="title_')
+        # SOURCE LINE 41
+        __M_writer(unicode(label.id))
+        __M_writer(u'">\n        <span>')
+        # SOURCE LINE 42
+        __M_writer(unicode(label.text))
+        __M_writer(u'</span>\n    </div>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_render_tool(context,tool,section):
+    context.caller_stack._push_frame()
+    try:
+        h = context.get('h', UNDEFINED)
+        t = context.get('t', UNDEFINED)
+        _ = context.get('_', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 2
+        __M_writer(u'\n')
+        # SOURCE LINE 3
+        if not tool.hidden:
+            # SOURCE LINE 4
+            if section:
+                # SOURCE LINE 5
+                __M_writer(u'            <div class="toolTitle">\n')
+                # SOURCE LINE 6
+            else:
+                # SOURCE LINE 7
+                __M_writer(u'            <div class="toolTitleNoSection">\n')
+            # SOURCE LINE 9
+            __M_writer(u'            ')
+
+            if tool.input_required:
+                link = h.url_for( controller='tool_runner', tool_id=tool.id )
+            else:
+                link = h.url_for( tool.action, ** tool.get_static_param_values( t ) )
+                        
+            
+            # SOURCE LINE 14
+            __M_writer(u'\n')
+            # SOURCE LINE 18
+            if tool.name:
+                # SOURCE LINE 19
+                __M_writer(u'                <a id="link-')
+                __M_writer(unicode(tool.id))
+                __M_writer(u'" href="')
+                __M_writer(unicode(link))
+                __M_writer(u'" target=')
+                __M_writer(unicode(tool.target))
+                __M_writer(u' minsizehint="')
+                __M_writer(unicode(tool.uihints.get( 'minwidth', -1 )))
+                __M_writer(u'">')
+                __M_writer(unicode(_(tool.name)))
+                __M_writer(u'</a> ')
+                __M_writer(unicode(tool.description))
+                __M_writer(u' \n')
+                # SOURCE LINE 20
+            else:
+                # SOURCE LINE 21
+                __M_writer(u'                <a id="link-')
+                __M_writer(unicode(tool.id))
+                __M_writer(u'" href="')
+                __M_writer(unicode(link))
+                __M_writer(u'" target=')
+                __M_writer(unicode(tool.target))
+                __M_writer(u' minsizehint="')
+                __M_writer(unicode(tool.uihints.get( 'minwidth', -1 )))
+                __M_writer(u'">')
+                __M_writer(unicode(tool.description))
+                __M_writer(u'</a>\n')
+            # SOURCE LINE 23
+            __M_writer(u'        </div>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_render_workflow(context,key,workflow,section):
+    context.caller_stack._push_frame()
+    try:
+        h = context.get('h', UNDEFINED)
+        _ = context.get('_', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 28
+        __M_writer(u'\n')
+        # SOURCE LINE 29
+        if section:
+            # SOURCE LINE 30
+            __M_writer(u'        <div class="toolTitle">\n')
+            # SOURCE LINE 31
+        else:
+            # SOURCE LINE 32
+            __M_writer(u'        <div class="toolTitleNoSection">\n')
+        # SOURCE LINE 34
+        __M_writer(u'        ')
+        encoded_id = key.lstrip( 'workflow_' ) 
+        
+        __M_writer(u'\n        <a id="link-')
+        # SOURCE LINE 35
+        __M_writer(unicode(workflow.id))
+        __M_writer(u'" href="')
+        __M_writer(unicode( h.url_for( controller='workflow', action='run', id=encoded_id, check_user=False )))
+        __M_writer(u'" target="_parent"}">')
+        __M_writer(unicode(_(workflow.name)))
+        __M_writer(u'</a>\n    </div>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
Index: galaxy-central/database/compiled_templates/dataset/edit_attributes.mako.py
===================================================================
--- galaxy-central/database/compiled_templates/dataset/edit_attributes.mako.py (revision 3)
+++ galaxy-central/database/compiled_templates/dataset/edit_attributes.mako.py (revision 3)
@@ -0,0 +1,337 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1287725818.302273
+_template_filename='templates/dataset/edit_attributes.mako'
+_template_uri='/dataset/edit_attributes.mako'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['stylesheets', 'datatype', 'javascripts', 'title']
+
+
+def _mako_get_namespace(context, name):
+    try:
+        return context.namespaces[(__name__, name)]
+    except KeyError:
+        _mako_generate_namespaces(context)
+        return context.namespaces[(__name__, name)]
+def _mako_generate_namespaces(context):
+    # SOURCE LINE 163
+    ns = runtime.Namespace('__anon_0x10ab4e150', context._clean_inheritance_tokens(), templateuri=u'/dataset/security_common.mako', callables=None, calling_uri=_template_uri, module=None)
+    context.namespaces[(__name__, '__anon_0x10ab4e150')] = ns
+
+    # SOURCE LINE 2
+    ns = runtime.Namespace('__anon_0x10aad7dd0', context._clean_inheritance_tokens(), templateuri=u'/message.mako', callables=None, calling_uri=_template_uri, module=None)
+    context.namespaces[(__name__, '__anon_0x10aad7dd0')] = ns
+
+def _mako_inherit(template, context):
+    _mako_generate_namespaces(context)
+    return runtime._inherit_from(context, u'/base.mako', _template_uri)
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        _import_ns = {}
+        _mako_get_namespace(context, '__anon_0x10ab4e150')._populate(_import_ns, [u'render_permission_form'])
+        _mako_get_namespace(context, '__anon_0x10aad7dd0')._populate(_import_ns, [u'render_msg'])
+        status = _import_ns.get('status', context.get('status', UNDEFINED))
+        render_permission_form = _import_ns.get('render_permission_form', context.get('render_permission_form', UNDEFINED))
+        render_msg = _import_ns.get('render_msg', context.get('render_msg', UNDEFINED))
+        all_roles = _import_ns.get('all_roles', context.get('all_roles', UNDEFINED))
+        data_annotation = _import_ns.get('data_annotation', context.get('data_annotation', UNDEFINED))
+        def datatype(dataset,datatypes):
+            return render_datatype(context.locals_(__M_locals),dataset,datatypes)
+        h = _import_ns.get('h', context.get('h', UNDEFINED))
+        current_user_roles = _import_ns.get('current_user_roles', context.get('current_user_roles', UNDEFINED))
+        len = _import_ns.get('len', context.get('len', UNDEFINED))
+        message = _import_ns.get('message', context.get('message', UNDEFINED))
+        trans = _import_ns.get('trans', context.get('trans', UNDEFINED))
+        data = _import_ns.get('data', context.get('data', UNDEFINED))
+        datatypes = _import_ns.get('datatypes', context.get('datatypes', UNDEFINED))
+        _ = _import_ns.get('_', context.get('_', UNDEFINED))
+        __M_writer = context.writer()
+        # SOURCE LINE 1
+        __M_writer(u'\n')
+        # SOURCE LINE 2
+        __M_writer(u'\n\n')
+        # SOURCE LINE 4
+        __M_writer(u'\n\n')
+        # SOURCE LINE 8
+        __M_writer(u'\n\n')
+        # SOURCE LINE 13
+        __M_writer(u'\n\n')
+        # SOURCE LINE 25
+        __M_writer(u'\n\n')
+        # SOURCE LINE 27
+        if message:
+            # SOURCE LINE 28
+            __M_writer(u'    ')
+            __M_writer(unicode(render_msg( message, status )))
+            __M_writer(u'\n')
+        # SOURCE LINE 30
+        __M_writer(u'\n<div class="toolForm">\n    <div class="toolFormTitle">')
+        # SOURCE LINE 32
+        __M_writer(unicode(_('Edit Attributes')))
+        __M_writer(u'</div>\n    <div class="toolFormBody">\n        <form name="edit_attributes" action="')
+        # SOURCE LINE 34
+        __M_writer(unicode(h.url_for( controller='root', action='edit' )))
+        __M_writer(u'" method="post">\n            <input type="hidden" name="id" value="')
+        # SOURCE LINE 35
+        __M_writer(unicode(data.id))
+        __M_writer(u'"/>\n            <div class="form-row">\n                <label>\n                    Name:\n                </label>\n                <div style="float: left; width: 250px; margin-right: 10px;">\n                    <input type="text" name="name" value="')
+        # SOURCE LINE 41
+        __M_writer(unicode(data.get_display_name()))
+        __M_writer(u'" size="40"/>\n                </div>\n                <div style="clear: both"></div>\n            </div>\n            <div class="form-row">\n                <label>\n                    Info:\n                </label>\n                <div style="float: left; width: 250px; margin-right: 10px;">\n                    <input type="text" name="info" value="')
+        # SOURCE LINE 50
+        __M_writer(unicode(data.info))
+        __M_writer(u'" size="40"/>\n                </div>\n                <div style="clear: both"></div>\n            </div>\n')
+        # SOURCE LINE 54
+        if trans.get_user() is not None:
+            # SOURCE LINE 55
+            __M_writer(u'                <div class="form-row">                    \n                    <label>\n                        Annotation / Notes:\n                    </label>\n                    <div style="float: left; width: 250px; margin-right: 10px;">\n                        <textarea name="annotation" cols="40" rows="2">')
+            # SOURCE LINE 60
+            __M_writer(unicode(data_annotation))
+            __M_writer(u'</textarea>\n                    </div>\n                    <div style="clear: both"></div>\n                    <div class="toolParamHelp">Add an annotation or notes to a dataset; annotations are available when a history is viewed.</div>\n                </div>\n')
+        # SOURCE LINE 66
+        for name, spec in data.metadata.spec.items():
+            # SOURCE LINE 67
+            if spec.visible:
+                # SOURCE LINE 68
+                __M_writer(u'                    <div class="form-row">\n                        <label>\n                            ')
+                # SOURCE LINE 70
+                __M_writer(unicode(spec.desc))
+                __M_writer(u':\n                        </label>\n                        <div style="float: left; width: 250px; margin-right: 10px;">\n                            ')
+                # SOURCE LINE 73
+                __M_writer(unicode(data.metadata.get_html_by_name( name, trans=trans )))
+                __M_writer(u'\n                        </div>\n                        <div style="clear: both"></div>\n                    </div>\n')
+        # SOURCE LINE 79
+        __M_writer(u'            <div class="form-row">\n                <input type="submit" name="save" value="')
+        # SOURCE LINE 80
+        __M_writer(unicode(_('Save')))
+        __M_writer(u'"/>\n            </div>\n        </form>\n        <form name="auto_detect" action="')
+        # SOURCE LINE 83
+        __M_writer(unicode(h.url_for( controller='root', action='edit' )))
+        __M_writer(u'" method="post">\n            <input type="hidden" name="id" value="')
+        # SOURCE LINE 84
+        __M_writer(unicode(data.id))
+        __M_writer(u'"/>\n            <div class="form-row">\n                <div style="float: left; width: 250px; margin-right: 10px;">\n                    <input type="submit" name="detect" value="')
+        # SOURCE LINE 87
+        __M_writer(unicode(_('Auto-detect')))
+        __M_writer(u'"/>\n                </div>\n                <div class="toolParamHelp" style="clear: both;">\n                    This will inspect the dataset and attempt to correct the above column values if they are not accurate.\n                </div>\n            </div>\n        </form>\n')
+        # SOURCE LINE 94
+        if data.missing_meta():
+            # SOURCE LINE 95
+            __M_writer(u'            <div class="form-row">\n                <div class="errormessagesmall">')
+            # SOURCE LINE 96
+            __M_writer(unicode(_('Required metadata values are missing. Some of these values may not be editable by the user. Selecting "Auto-detect" will attempt to fix these values.')))
+            __M_writer(u'</div>\n            </div>\n')
+        # SOURCE LINE 99
+        __M_writer(u'    </div>\n</div>\n<p />\n')
+        # SOURCE LINE 102
+        converters = data.get_converter_types() 
+        
+        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['converters'] if __M_key in __M_locals_builtin()]))
+        __M_writer(u'\n')
+        # SOURCE LINE 103
+        if len( converters ) > 0:
+            # SOURCE LINE 104
+            __M_writer(u'    <div class="toolForm">\n        <div class="toolFormTitle">')
+            # SOURCE LINE 105
+            __M_writer(unicode(_('Convert to new format')))
+            __M_writer(u'</div>\n        <div class="toolFormBody">\n            <form name="convert_data" action="')
+            # SOURCE LINE 107
+            __M_writer(unicode(h.url_for( controller='root', action='edit' )))
+            __M_writer(u'" method="post">\n                <input type="hidden" name="id" value="')
+            # SOURCE LINE 108
+            __M_writer(unicode(data.id))
+            __M_writer(u'"/>\n                <div class="form-row">\n                    <div style="float: left; width: 250px; margin-right: 10px;">\n                        <select name="target_type">\n')
+            # SOURCE LINE 112
+            for key, value in converters.items():
+                # SOURCE LINE 113
+                __M_writer(u'                                <option value="')
+                __M_writer(unicode(key))
+                __M_writer(u'">')
+                __M_writer(unicode(value.name))
+                __M_writer(u'</option>\n')
+            # SOURCE LINE 115
+            __M_writer(u'                        </select>\n                    </div>\n                    <div class="toolParamHelp" style="clear: both;">\n                        This will create a new dataset with the contents of this dataset converted to a new format. \n                    </div>\n                    <div style="clear: both"></div>\n                </div>\n                <div class="form-row">\n                    <input type="submit" name="convert_data" value="')
+            # SOURCE LINE 123
+            __M_writer(unicode(_('Convert')))
+            __M_writer(u'"/>\n                </div>\n            </form>\n        </div>\n    </div>\n    <p />\n')
+        # SOURCE LINE 130
+        __M_writer(u'\n<div class="toolForm">\n    <div class="toolFormTitle">')
+        # SOURCE LINE 132
+        __M_writer(unicode(_('Change data type')))
+        __M_writer(u'</div>\n    <div class="toolFormBody">\n')
+        # SOURCE LINE 134
+        if data.datatype.allow_datatype_change:
+            # SOURCE LINE 135
+            __M_writer(u'            <form name="change_datatype" action="')
+            __M_writer(unicode(h.url_for( controller='root', action='edit' )))
+            __M_writer(u'" method="post">\n                <input type="hidden" name="id" value="')
+            # SOURCE LINE 136
+            __M_writer(unicode(data.id))
+            __M_writer(u'"/>\n                <div class="form-row">\n                    <label>\n                        ')
+            # SOURCE LINE 139
+            __M_writer(unicode(_('New Type')))
+            __M_writer(u':\n                    </label>\n                    <div style="float: left; width: 250px; margin-right: 10px;">\n                        ')
+            # SOURCE LINE 142
+            __M_writer(unicode(datatype( data, datatypes )))
+            __M_writer(u'\n                    </div>\n                    <div class="toolParamHelp" style="clear: both;">\n                        ')
+            # SOURCE LINE 145
+            __M_writer(unicode(_('This will change the datatype of the existing dataset but <i>not</i> modify its contents. Use this if Galaxy has incorrectly guessed the type of your dataset.')))
+            __M_writer(u'\n                    </div>\n                    <div style="clear: both"></div>\n                </div>\n                <div class="form-row">\n                    <input type="submit" name="change" value="')
+            # SOURCE LINE 150
+            __M_writer(unicode(_('Save')))
+            __M_writer(u'"/>\n                </div>\n            </form>\n')
+            # SOURCE LINE 153
+        else:
+            # SOURCE LINE 154
+            __M_writer(u'            <div class="form-row">\n                <div class="warningmessagesmall">')
+            # SOURCE LINE 155
+            __M_writer(unicode(_('Changing the datatype of this dataset is not allowed.')))
+            __M_writer(u'</div>\n            </div>\n')
+        # SOURCE LINE 158
+        __M_writer(u'    </div>\n</div>\n<p />\n\n')
+        # SOURCE LINE 162
+        if trans.app.security_agent.can_manage_dataset( current_user_roles, data.dataset ):
+            # SOURCE LINE 163
+            __M_writer(u'    ')
+            __M_writer(u'\n    ')
+            # SOURCE LINE 164
+            __M_writer(unicode(render_permission_form( data.dataset, data.get_display_name(), h.url_for( controller='root', action='edit', id=data.id ), all_roles )))
+            __M_writer(u'\n')
+            # SOURCE LINE 165
+        elif trans.user:
+            # SOURCE LINE 166
+            __M_writer(u'    <div class="toolForm">\n        <div class="toolFormTitle">View Permissions</div>\n        <div class="toolFormBody">\n            <div class="form-row">\n')
+            # SOURCE LINE 170
+            if data.dataset.actions:
+                # SOURCE LINE 171
+                __M_writer(u'                    <ul>\n')
+                # SOURCE LINE 172
+                for action, roles in trans.app.security_agent.get_permissions( data.dataset ).items():
+                    # SOURCE LINE 173
+                    if roles:
+                        # SOURCE LINE 174
+                        __M_writer(u'                                <li>')
+                        __M_writer(unicode(action.description))
+                        __M_writer(u'</li>\n                                <ul>\n')
+                        # SOURCE LINE 176
+                        for role in roles:
+                            # SOURCE LINE 177
+                            __M_writer(u'                                        <li>')
+                            __M_writer(unicode(role.name))
+                            __M_writer(u'</li>\n')
+                        # SOURCE LINE 179
+                        __M_writer(u'                                </ul>\n')
+                # SOURCE LINE 182
+                __M_writer(u'                    </ul>\n')
+                # SOURCE LINE 183
+            else:
+                # SOURCE LINE 184
+                __M_writer(u'                    <p>This dataset is accessible by everyone (it is public).</p>\n')
+            # SOURCE LINE 186
+            __M_writer(u'            </div>\n        </div>\n    </div>\n')
+        # SOURCE LINE 190
+        __M_writer(u'<p/>\n<div class="toolForm">\n    <div class="toolFormTitle">Copy History Item</div>\n        <div class="toolFormBody">\n            <form name="copy_hda" action="')
+        # SOURCE LINE 194
+        __M_writer(unicode(h.url_for( controller='dataset', action='copy_datasets', source_dataset_ids=data.id, target_history_ids=data.history_id )))
+        __M_writer(u'" method="post">\n                <div class="form-row">\n                    <input type="submit" name="change" value="Copy history item"/>\n                    <div class="toolParamHelp" style="clear: both;">\n                        Make a copy of this history item in your current history or any of your active histories.\n                    </div>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_stylesheets(context):
+    context.caller_stack._push_frame()
+    try:
+        _import_ns = {}
+        _mako_get_namespace(context, '__anon_0x10ab4e150')._populate(_import_ns, [u'render_permission_form'])
+        _mako_get_namespace(context, '__anon_0x10aad7dd0')._populate(_import_ns, [u'render_msg'])
+        h = _import_ns.get('h', context.get('h', UNDEFINED))
+        __M_writer = context.writer()
+        # SOURCE LINE 6
+        __M_writer(u'\n    ')
+        # SOURCE LINE 7
+        __M_writer(unicode(h.css( "base", "autocomplete_tagging" )))
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_datatype(context,dataset,datatypes):
+    context.caller_stack._push_frame()
+    try:
+        _import_ns = {}
+        _mako_get_namespace(context, '__anon_0x10ab4e150')._populate(_import_ns, [u'render_permission_form'])
+        _mako_get_namespace(context, '__anon_0x10aad7dd0')._populate(_import_ns, [u'render_msg'])
+        _ = _import_ns.get('_', context.get('_', UNDEFINED))
+        __M_writer = context.writer()
+        # SOURCE LINE 15
+        __M_writer(u'\n    <select name="datatype">\n')
+        # SOURCE LINE 17
+        for ext in datatypes:
+            # SOURCE LINE 18
+            if dataset.ext == ext:
+                # SOURCE LINE 19
+                __M_writer(u'                <option value="')
+                __M_writer(unicode(ext))
+                __M_writer(u'" selected="yes">')
+                __M_writer(unicode(_(ext)))
+                __M_writer(u'</option>\n')
+                # SOURCE LINE 20
+            else:
+                # SOURCE LINE 21
+                __M_writer(u'                <option value="')
+                __M_writer(unicode(ext))
+                __M_writer(u'">')
+                __M_writer(unicode(_(ext)))
+                __M_writer(u'</option>\n')
+        # SOURCE LINE 24
+        __M_writer(u'    </select>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_javascripts(context):
+    context.caller_stack._push_frame()
+    try:
+        _import_ns = {}
+        _mako_get_namespace(context, '__anon_0x10ab4e150')._populate(_import_ns, [u'render_permission_form'])
+        _mako_get_namespace(context, '__anon_0x10aad7dd0')._populate(_import_ns, [u'render_msg'])
+        h = _import_ns.get('h', context.get('h', UNDEFINED))
+        parent = _import_ns.get('parent', context.get('parent', UNDEFINED))
+        __M_writer = context.writer()
+        # SOURCE LINE 10
+        __M_writer(u'\n    ')
+        # SOURCE LINE 11
+        __M_writer(unicode(parent.javascripts()))
+        __M_writer(u'\n    ')
+        # SOURCE LINE 12
+        __M_writer(unicode(h.js( "galaxy.base", "jquery.autocomplete", "autocomplete_tagging" )))
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_title(context):
+    context.caller_stack._push_frame()
+    try:
+        _import_ns = {}
+        _mako_get_namespace(context, '__anon_0x10ab4e150')._populate(_import_ns, [u'render_permission_form'])
+        _mako_get_namespace(context, '__anon_0x10aad7dd0')._populate(_import_ns, [u'render_msg'])
+        _ = _import_ns.get('_', context.get('_', UNDEFINED))
+        __M_writer = context.writer()
+        # SOURCE LINE 4
+        __M_writer(unicode(_('Edit Dataset Attributes')))
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
Index: galaxy-central/database/compiled_templates/dataset/security_common.mako.py
===================================================================
--- galaxy-central/database/compiled_templates/dataset/security_common.mako.py (revision 3)
+++ galaxy-central/database/compiled_templates/dataset/security_common.mako.py (revision 3)
@@ -0,0 +1,180 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1287725818.3254099
+_template_filename=u'templates/dataset/security_common.mako'
+_template_uri=u'/dataset/security_common.mako'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['render_permission_form', 'render_select']
+
+
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        __M_writer = context.writer()
+        # SOURCE LINE 37
+        __M_writer(u'\n\n')
+        # SOURCE LINE 123
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_render_permission_form(context,obj,obj_name,form_url,all_roles,do_not_render=[]):
+    context.caller_stack._push_frame()
+    try:
+        trans = context.get('trans', UNDEFINED)
+        def render_select(current_actions,action_key,action,all_roles):
+            return render_render_select(context,current_actions,action_key,action,all_roles)
+        isinstance = context.get('isinstance', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 40
+        __M_writer(u'\n    ')
+        # SOURCE LINE 41
+
+        if isinstance( obj, trans.app.model.User ):
+            current_actions = obj.default_permissions
+            permitted_actions = trans.app.model.Dataset.permitted_actions.items()
+            obj_str = 'user %s' % obj_name
+            obj_type = 'dataset'
+        elif isinstance( obj, trans.app.model.History ):
+            current_actions = obj.default_permissions
+            permitted_actions = trans.app.model.Dataset.permitted_actions.items()
+            obj_str = 'history %s' % obj_name
+            obj_type = 'dataset'
+        elif isinstance( obj, trans.app.model.Dataset ):
+            current_actions = obj.actions
+            permitted_actions = trans.app.model.Dataset.permitted_actions.items()
+            obj_str = obj_name
+            obj_type = 'dataset'
+        elif isinstance( obj, trans.app.model.LibraryDatasetDatasetAssociation ):
+            current_actions = obj.actions + obj.dataset.actions
+            permitted_actions = trans.app.model.Dataset.permitted_actions.items() + trans.app.model.Library.permitted_actions.items()
+            obj_str = obj_name
+            obj_type = 'dataset'
+        elif isinstance( obj, trans.app.model.Library ):
+            current_actions = obj.actions
+            permitted_actions = trans.app.model.Library.permitted_actions.items()
+            obj_str = 'library %s' % obj_name
+            obj_type = 'library'
+        elif isinstance( obj, trans.app.model.LibraryDataset ):
+            current_actions = obj.actions
+            permitted_actions = trans.app.model.Library.permitted_actions.items()
+            obj_str = 'library dataset %s' % obj_name
+            obj_type = 'library'
+        elif isinstance( obj, trans.app.model.LibraryFolder ):
+            current_actions = obj.actions
+            permitted_actions = trans.app.model.Library.permitted_actions.items()
+            obj_str = 'library folder %s' % obj_name
+            obj_type = 'library'
+        else:
+            current_actions = []
+            permitted_actions = {}.items()
+            obj_str = 'unknown object %s' %obj_name
+            obj_type = ''
+            
+        
+        # SOURCE LINE 82
+        __M_writer(u'\n    <script type="text/javascript">\n        $( document ).ready( function () {\n            $( \'.role_add_button\' ).click( function() {\n                var action = this.id.substring( 0, this.id.lastIndexOf( \'_add_button\' ) )\n                var in_select = \'#\' + action + \'_in_select\';\n                var out_select = \'#\' + action + \'_out_select\';\n                return !$( out_select + \' option:selected\' ).remove().appendTo( in_select );\n            });\n            $( \'.role_remove_button\' ).click( function() {\n                var action = this.id.substring( 0, this.id.lastIndexOf( \'_remove_button\' ) )\n                var in_select = \'#\' + action + \'_in_select\';\n                var out_select = \'#\' + action + \'_out_select\';\n                return !$( in_select + \' option:selected\' ).remove().appendTo( out_select );\n            });\n            $( \'form#edit_role_associations\' ).submit( function() {\n                $( \'.in_select option\' ).each(function( i ) {\n                    $( this ).attr( "selected", "selected" );\n                });\n            });\n        });\n    </script>\n    <div class="toolForm">\n        <div class="toolFormTitle">Manage ')
+        # SOURCE LINE 105
+        __M_writer(unicode(obj_type))
+        __M_writer(u' permissions on ')
+        __M_writer(unicode(obj_str))
+        __M_writer(u'</div>\n        <div class="toolFormBody">\n            <form name="edit_role_associations" id="edit_role_associations" action="')
+        # SOURCE LINE 107
+        __M_writer(unicode(form_url))
+        __M_writer(u'" method="post">\n                <div class="form-row"></div>\n')
+        # SOURCE LINE 109
+        for k, v in permitted_actions:
+            # SOURCE LINE 110
+            if k not in do_not_render:
+                # SOURCE LINE 111
+                __M_writer(u'                        <div class="form-row">\n                            ')
+                # SOURCE LINE 112
+                __M_writer(unicode(render_select( current_actions, k, v, all_roles )))
+                __M_writer(u'\n                        </div>\n')
+        # SOURCE LINE 116
+        __M_writer(u'                <div class="form-row">\n                    <input type="submit" name="update_roles_button" value="Save"/>\n                </div>\n            </form>\n        </div>\n    </div>\n    <p/>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_render_select(context,current_actions,action_key,action,all_roles):
+    context.caller_stack._push_frame()
+    try:
+        filter = context.get('filter', UNDEFINED)
+        x = context.get('x', UNDEFINED)
+        trans = context.get('trans', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 1
+        __M_writer(u'\n    ')
+        # SOURCE LINE 2
+
+        import sets
+        in_roles = sets.Set()
+        for a in current_actions:
+            if a.action == action.action:
+                in_roles.add( a.role )
+        out_roles = filter( lambda x: x not in in_roles, all_roles )
+            
+        
+        # SOURCE LINE 9
+        __M_writer(u'\n    <p>\n        <b>')
+        # SOURCE LINE 11
+        __M_writer(unicode(action.action))
+        __M_writer(u':</b> ')
+        __M_writer(unicode(action.description))
+        __M_writer(u'\n')
+        # SOURCE LINE 12
+        if action == trans.app.security_agent.permitted_actions.DATASET_ACCESS:
+            # SOURCE LINE 13
+            __M_writer(u'            <br/>\n            NOTE: Users must have every role associated with this dataset in order to access it\n')
+        # SOURCE LINE 16
+        __M_writer(u'    </p>\n    <div style="width: 100%; white-space: nowrap;">\n        <div style="float: left; width: 50%;">\n            Roles associated:<br/>\n            <select name="')
+        # SOURCE LINE 20
+        __M_writer(unicode(action_key))
+        __M_writer(u'_in" id="')
+        __M_writer(unicode(action_key))
+        __M_writer(u'_in_select" class="in_select" style="max-width: 98%; width: 98%; height: 150px; font-size: 100%;" multiple>\n')
+        # SOURCE LINE 21
+        for role in in_roles:
+            # SOURCE LINE 22
+            __M_writer(u'                    <option value="')
+            __M_writer(unicode(role.id))
+            __M_writer(u'">')
+            __M_writer(unicode(role.name))
+            __M_writer(u'</option>\n')
+        # SOURCE LINE 24
+        __M_writer(u'            </select> <br/>\n            <div style="width: 98%; text-align: right"><input type="submit" id="')
+        # SOURCE LINE 25
+        __M_writer(unicode(action_key))
+        __M_writer(u'_remove_button" class="role_remove_button" value=">>"/></div>\n        </div>\n        <div style="width: 50%;">\n            Roles not associated:<br/>\n            <select name="')
+        # SOURCE LINE 29
+        __M_writer(unicode(action_key))
+        __M_writer(u'_out" id="')
+        __M_writer(unicode(action_key))
+        __M_writer(u'_out_select" style="max-width: 98%; width: 98%; height: 150px; font-size: 100%;" multiple>\n')
+        # SOURCE LINE 30
+        for role in out_roles:
+            # SOURCE LINE 31
+            __M_writer(u'                    <option value="')
+            __M_writer(unicode(role.id))
+            __M_writer(u'">')
+            __M_writer(unicode(role.name))
+            __M_writer(u'</option>\n')
+        # SOURCE LINE 33
+        __M_writer(u'            </select> <br/>\n            <input type="submit" id="')
+        # SOURCE LINE 34
+        __M_writer(unicode(action_key))
+        __M_writer(u'_add_button" class="role_add_button" value="<<"/>\n        </div>\n    </div>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
Index: galaxy-central/database/compiled_templates/tagging_common.mako.py
===================================================================
--- galaxy-central/database/compiled_templates/tagging_common.mako.py (revision 3)
+++ galaxy-central/database/compiled_templates/tagging_common.mako.py (revision 3)
@@ -0,0 +1,311 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1287725327.3571129
+_template_filename=u'templates/tagging_common.mako'
+_template_uri=u'root/../tagging_common.mako'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['render_tagging_element_html', 'render_individual_tagging_element', 'render_community_tagging_element']
+
+
+# SOURCE LINE 1
+ 
+from cgi import escape 
+from galaxy.web.framework.helpers import iff
+from random import random
+from sys import maxint
+from math import floor
+from galaxy.model import Tag, ItemTagAssociation
+
+
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        in_form = context.get('in_form', UNDEFINED)
+        def render_community_tagging_element(tagged_item=None,elt_context=None,use_toggle_link=False,tag_click_fn='default_tag_click_fn'):
+            return render_render_community_tagging_element(context.locals_(__M_locals),tagged_item,elt_context,use_toggle_link,tag_click_fn)
+        elt_context = context.get('elt_context', UNDEFINED)
+        use_toggle_link = context.get('use_toggle_link', UNDEFINED)
+        user = context.get('user', UNDEFINED)
+        def render_individual_tagging_element(user=None,tagged_item=None,elt_context=None,use_toggle_link=True,in_form=False,input_size='15',tag_click_fn='default_tag_click_fn',get_toggle_link_text_fn='default_get_toggle_link_text_fn',editable=True,render_add_tag_button=True):
+            return render_render_individual_tagging_element(context.locals_(__M_locals),user,tagged_item,elt_context,use_toggle_link,in_form,input_size,tag_click_fn,get_toggle_link_text_fn,editable,render_add_tag_button)
+        tag_click_fn = context.get('tag_click_fn', UNDEFINED)
+        input_size = context.get('input_size', UNDEFINED)
+        tagged_item = context.get('tagged_item', UNDEFINED)
+        tag_type = context.get('tag_type', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 8
+        __M_writer(u'\n\n')
+        # SOURCE LINE 11
+        if tagged_item is not None:
+            # SOURCE LINE 12
+            if tag_type == "individual":
+                # SOURCE LINE 13
+                __M_writer(u'        ')
+                __M_writer(unicode(render_individual_tagging_element( user=user, tagged_item=tagged_item, elt_context=elt_context, in_form=in_form, input_size=input_size, tag_click_fn=tag_click_fn, use_toggle_link=use_toggle_link )))
+                __M_writer(u'\n')
+                # SOURCE LINE 14
+            elif tag_type == "community":
+                # SOURCE LINE 15
+                __M_writer(u'        ')
+                __M_writer(unicode(render_community_tagging_element(tagged_item=tagged_item, elt_context=elt_context, tag_click_fn=tag_click_fn)))
+                __M_writer(u'\n')
+        # SOURCE LINE 18
+        __M_writer(u'\n')
+        # SOURCE LINE 85
+        __M_writer(u'\n\n')
+        # SOURCE LINE 103
+        __M_writer(u'\n\n\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_render_tagging_element_html(context,elt_id=None,tags=None,editable=True,use_toggle_link=True,input_size='15',in_form=False,tag_type='individual',render_add_tag_button=True):
+    context.caller_stack._push_frame()
+    try:
+        h = context.get('h', UNDEFINED)
+        unicode = context.get('unicode', UNDEFINED)
+        isinstance = context.get('isinstance', UNDEFINED)
+        len = context.get('len', UNDEFINED)
+        str = context.get('str', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 20
+        __M_writer(u'\n')
+        # SOURCE LINE 22
+        __M_writer(u'    ')
+ 
+        num_tags = len( tags )
+            
+        
+        # SOURCE LINE 24
+        __M_writer(u'\n    <div class="tag-element"\n')
+        # SOURCE LINE 26
+        if elt_id:
+            # SOURCE LINE 27
+            __M_writer(u'            id="')
+            __M_writer(unicode(elt_id))
+            __M_writer(u'"\n')
+        # SOURCE LINE 30
+        if num_tags == 0 and not editable:
+            # SOURCE LINE 31
+            __M_writer(u'            style="display: none"\n')
+        # SOURCE LINE 33
+        __M_writer(u'    >\n')
+        # SOURCE LINE 34
+        if use_toggle_link:
+            # SOURCE LINE 35
+            __M_writer(u'            <a class="toggle-link" href="#">')
+            __M_writer(unicode(num_tags))
+            __M_writer(u' Tag')
+            __M_writer(unicode(iff( num_tags == 1, "", "s")))
+            __M_writer(u'</a>\n')
+        # SOURCE LINE 37
+        __M_writer(u'        <div class="tag-area \n')
+        # SOURCE LINE 38
+        if tag_type == 'individual':
+            # SOURCE LINE 39
+            __M_writer(u'                individual-tag-area\n')
+        # SOURCE LINE 41
+        __M_writer(u'        ">\n\n')
+        # SOURCE LINE 44
+        for tag in tags:
+            # SOURCE LINE 45
+            __M_writer(u'                ')
+
+                    ## Handle both Tag and ItemTagAssociation objects.
+            if isinstance( tag, Tag ):
+                tag_name = tag.name
+                tag_value = None
+            elif isinstance( tag, ItemTagAssociation ):
+                tag_name = tag.user_tname
+                tag_value = tag.user_value
+            ## Convert tag name, value to unicode.
+            if isinstance( tag_name, str ):
+                tag_name = unicode( escape( tag_name ), 'utf-8' )
+                if tag_value:
+                    tag_value = unicode( escape( tag_value ), 'utf-8' )
+            if tag_value:
+                tag_str = tag_name + ":" + tag_value
+            else:
+                tag_str = tag_name
+                            
+            
+            # SOURCE LINE 62
+            __M_writer(u'\n                <span class="tag-button">\n                    <span class="tag-name">')
+            # SOURCE LINE 64
+            __M_writer(unicode(tag_str))
+            __M_writer(u'</span>\n')
+            # SOURCE LINE 65
+            if editable:
+                # SOURCE LINE 66
+                __M_writer(u'                        <img class="delete-tag-img" src="')
+                __M_writer(unicode(h.url_for('/static/images/delete_tag_icon_gray.png')))
+                __M_writer(u'"/>\n')
+            # SOURCE LINE 68
+            __M_writer(u'                </span>\n')
+        # SOURCE LINE 70
+        __M_writer(u'            \n')
+        # SOURCE LINE 72
+        if editable:
+            # SOURCE LINE 73
+            if in_form:
+                # SOURCE LINE 74
+                __M_writer(u'                    <textarea class="tag-input" rows=\'1\' cols=\'')
+                __M_writer(unicode(input_size))
+                __M_writer(u"'></textarea>\n")
+                # SOURCE LINE 75
+            else:
+                # SOURCE LINE 76
+                __M_writer(u'                    <input class="tag-input" type=\'text\' size=\'')
+                __M_writer(unicode(input_size))
+                __M_writer(u"'/>\n")
+            # SOURCE LINE 79
+            if render_add_tag_button:
+                # SOURCE LINE 80
+                __M_writer(u"                    <img src='")
+                __M_writer(unicode(h.url_for('/static/images/fugue/tag--plus.png')))
+                __M_writer(u'\' class="add-tag-button tooltip" title="Add tags"/>\n')
+        # SOURCE LINE 83
+        __M_writer(u'        </div>\n    </div>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_render_individual_tagging_element(context,user=None,tagged_item=None,elt_context=None,use_toggle_link=True,in_form=False,input_size='15',tag_click_fn='default_tag_click_fn',get_toggle_link_text_fn='default_get_toggle_link_text_fn',editable=True,render_add_tag_button=True):
+    context.caller_stack._push_frame()
+    try:
+        isinstance = context.get('isinstance', UNDEFINED)
+        unicode = context.get('unicode', UNDEFINED)
+        int = context.get('int', UNDEFINED)
+        h = context.get('h', UNDEFINED)
+        self = context.get('self', UNDEFINED)
+        dict = context.get('dict', UNDEFINED)
+        str = context.get('str', UNDEFINED)
+        trans = context.get('trans', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 107
+        __M_writer(u'\n')
+        # SOURCE LINE 109
+        __M_writer(u'    ')
+
+        # Useful ids.
+        tagged_item_id = str( trans.security.encode_id ( tagged_item.id ) )
+        elt_id = int ( floor ( random()*maxint ) )
+        
+        # Get list of user's item tags. TODO: this could be moved to a database query for speed purposes.
+        item_tags = [ tag for tag in tagged_item.tags if ( tag.user == user ) ]
+            
+        
+        # SOURCE LINE 116
+        __M_writer(u'\n    \n')
+        # SOURCE LINE 119
+        __M_writer(u'    ')
+        __M_writer(unicode(self.render_tagging_element_html(elt_id=elt_id, tags=item_tags, editable=editable, use_toggle_link=use_toggle_link, input_size=input_size, in_form=in_form, render_add_tag_button=render_add_tag_button)))
+        __M_writer(u'\n    \n')
+        # SOURCE LINE 122
+        __M_writer(u'    <script type="text/javascript">\n        //\n        // Set up autocomplete tagger.\n        //\n\n        //\n        // Default function get text to display on the toggle link.\n        //\n        var default_get_toggle_link_text_fn = function(tags)\n        {\n            var text = "";\n            var num_tags = obj_length(tags);\n            if (num_tags != 0)\n              {\n                text = num_tags + (num_tags != 1 ? " Tags" : " Tag");\n                /*\n                // Show first N tags; hide the rest.\n                var max_to_show = 1;\n    \n                // Build tag string.\n                var tag_strs = new Array();\n                var count = 0;\n                for (tag_name in tags)\n                  {\n                    tag_value = tags[tag_name];\n                    tag_strs[tag_strs.length] = build_tag_str(tag_name, tag_value);\n                    if (++count == max_to_show)\n                      break;\n                  }\n                tag_str = tag_strs.join(", ");\n            \n                // Finalize text.\n                var num_tags_hiding = num_tags - max_to_show;\n                text = "Tags: " + tag_str + \n                  (num_tags_hiding != 0 ? " and " + num_tags_hiding + " more" : "");\n                */\n              }\n            else\n              {\n                // No tags.\n                text = "Add tags";\n              }\n            return text;\n        };\n        \n        // Default function to handle a tag click.\n        var default_tag_click_fn = function(tag_name, tag_value) { };\n        \n        ')
+        # SOURCE LINE 170
+
+            ## Build dict of tag name, values.
+        tag_names_and_values = dict()
+        for tag in item_tags:
+            tag_name = tag.user_tname
+            tag_value = ""
+            if tag.value is not None:
+                tag_value = tag.user_value
+            ## Tag names and values may be string or unicode object.
+            if isinstance( tag_name, str ):
+                tag_names_and_values[unicode(tag_name, 'utf-8')] = unicode(tag_value, 'utf-8')
+            else: ## isInstance( tag_name, unicode ):
+                tag_names_and_values[tag_name] = tag_value
+                
+        
+        # SOURCE LINE 183
+        __M_writer(u'\n        var options =\n        {\n            tags : ')
+        # SOURCE LINE 186
+        __M_writer(unicode(h.to_json_string(tag_names_and_values)))
+        __M_writer(u',\n            editable : ')
+        # SOURCE LINE 187
+        __M_writer(unicode(iff( editable, 'true', 'false' )))
+        __M_writer(u',\n            get_toggle_link_text_fn: ')
+        # SOURCE LINE 188
+        __M_writer(unicode(get_toggle_link_text_fn))
+        __M_writer(u',\n            tag_click_fn: ')
+        # SOURCE LINE 189
+        __M_writer(unicode(tag_click_fn))
+        __M_writer(u',\n')
+        # SOURCE LINE 191
+        __M_writer(u'            ajax_autocomplete_tag_url: "')
+        __M_writer(unicode(h.url_for( controller='/tag', action='tag_autocomplete_data', item_id=tagged_item_id, item_class=tagged_item.__class__.__name__ )))
+        __M_writer(u'",\n            ajax_add_tag_url: "')
+        # SOURCE LINE 192
+        __M_writer(unicode(h.url_for( controller='/tag', action='add_tag_async', item_id=tagged_item_id, item_class=tagged_item.__class__.__name__, context=elt_context )))
+        __M_writer(u'",\n            ajax_delete_tag_url: "')
+        # SOURCE LINE 193
+        __M_writer(unicode(h.url_for( controller='/tag', action='remove_tag_async', item_id=tagged_item_id, item_class=tagged_item.__class__.__name__, context=elt_context )))
+        __M_writer(u'",\n            delete_tag_img: "')
+        # SOURCE LINE 194
+        __M_writer(unicode(h.url_for('/static/images/delete_tag_icon_gray.png')))
+        __M_writer(u'",\n            delete_tag_img_rollover: "')
+        # SOURCE LINE 195
+        __M_writer(unicode(h.url_for('/static/images/delete_tag_icon_white.png')))
+        __M_writer(u'",\n            use_toggle_link: ')
+        # SOURCE LINE 196
+        __M_writer(unicode(iff( use_toggle_link, 'true', 'false' )))
+        __M_writer(u"\n         };\n         \n        $('#")
+        # SOURCE LINE 199
+        __M_writer(unicode(elt_id))
+        __M_writer(u"').autocomplete_tagging(options);\n    </script>\n    \n")
+        # SOURCE LINE 203
+        __M_writer(u'    <style>\n    .tag-area {\n        display: ')
+        # SOURCE LINE 205
+        __M_writer(unicode(iff( use_toggle_link, "none", "block" )))
+        __M_writer(u';\n    }\n    </style>\n\n    <noscript>\n    <style>\n    .tag-area {\n        display: block;\n    }\n    </style>\n    </noscript>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_render_community_tagging_element(context,tagged_item=None,elt_context=None,use_toggle_link=False,tag_click_fn='default_tag_click_fn'):
+    context.caller_stack._push_frame()
+    try:
+        int = context.get('int', UNDEFINED)
+        self = context.get('self', UNDEFINED)
+        trans = context.get('trans', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 88
+        __M_writer(u'\n')
+        # SOURCE LINE 90
+        __M_writer(u'    ')
+ 
+        elt_id = int ( floor ( random()*maxint ) ) 
+        community_tags = trans.app.tag_handler.get_community_tags( trans, item=tagged_item, limit=5 )
+            
+        
+        # SOURCE LINE 93
+        __M_writer(u'\n    ')
+        # SOURCE LINE 94
+        __M_writer(unicode(self.render_tagging_element_html(elt_id=elt_id, \
+                                        tags=community_tags, \
+                                        use_toggle_link=use_toggle_link, \
+                                        editable=False, tag_type="community")))
+        # SOURCE LINE 97
+        __M_writer(u'\n    \n')
+        # SOURCE LINE 100
+        __M_writer(u'    <script type="text/javascript">\n        init_tag_click_function($(\'#')
+        # SOURCE LINE 101
+        __M_writer(unicode(elt_id))
+        __M_writer(u"'), ")
+        __M_writer(unicode(tag_click_fn))
+        __M_writer(u');\n    </script>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
Index: galaxy-central/database/compiled_templates/base.mako.py
===================================================================
--- galaxy-central/database/compiled_templates/base.mako.py (revision 3)
+++ galaxy-central/database/compiled_templates/base.mako.py (revision 3)
@@ -0,0 +1,103 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1287725818.353277
+_template_filename='templates/base.mako'
+_template_uri='/base.mako'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['stylesheets', 'javascripts', 'metas', 'title']
+
+
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        self = context.get('self', UNDEFINED)
+        next = context.get('next', UNDEFINED)
+        n_ = context.get('n_', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 1
+        _=n_ 
+        
+        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['_'] if __M_key in __M_locals_builtin()]))
+        __M_writer(u'\n<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<html>\n\n<head>\n<title>')
+        # SOURCE LINE 6
+        __M_writer(unicode(self.title()))
+        __M_writer(u'</title>\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n')
+        # SOURCE LINE 8
+        __M_writer(unicode(self.metas()))
+        __M_writer(u'\n')
+        # SOURCE LINE 9
+        __M_writer(unicode(self.stylesheets()))
+        __M_writer(u'\n')
+        # SOURCE LINE 10
+        __M_writer(unicode(self.javascripts()))
+        __M_writer(u'\n</head>\n\n    <body>\n        ')
+        # SOURCE LINE 14
+        __M_writer(unicode(next.body()))
+        __M_writer(u'\n    </body>\n</html>\n\n')
+        # SOURCE LINE 19
+        __M_writer(u'\n\n')
+        # SOURCE LINE 24
+        __M_writer(u'\n\n')
+        # SOURCE LINE 32
+        __M_writer(u'\n\n')
+        # SOURCE LINE 35
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_stylesheets(context):
+    context.caller_stack._push_frame()
+    try:
+        h = context.get('h', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 22
+        __M_writer(u'\n    ')
+        # SOURCE LINE 23
+        __M_writer(unicode(h.css('base')))
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_javascripts(context):
+    context.caller_stack._push_frame()
+    try:
+        h = context.get('h', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 27
+        __M_writer(u'\n')
+        # SOURCE LINE 31
+        __M_writer(u'  ')
+        __M_writer(unicode(h.js( "jquery", "galaxy.base" )))
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_metas(context):
+    context.caller_stack._push_frame()
+    try:
+        __M_writer = context.writer()
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_title(context):
+    context.caller_stack._push_frame()
+    try:
+        __M_writer = context.writer()
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
Index: galaxy-central/database/compiled_templates/base_panels.mako.py
===================================================================
--- galaxy-central/database/compiled_templates/base_panels.mako.py (revision 3)
+++ galaxy-central/database/compiled_templates/base_panels.mako.py (revision 3)
@@ -0,0 +1,285 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1287725326.8172879
+_template_filename=u'templates/base_panels.mako'
+_template_uri=u'/base_panels.mako'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['message_box_content', 'overlay', 'late_javascripts', 'stylesheets', 'init', 'masthead', 'javascripts']
+
+
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        self = context.get('self', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 2
+        __M_writer(u'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\n')
+        # SOURCE LINE 4
+
+        self.has_left_panel=True
+        self.has_right_panel=True
+        self.message_box_visible=False
+        self.overlay_visible=False
+        self.message_box_class=""
+        self.active_view=None
+        self.body_class=""
+        
+        
+        # SOURCE LINE 12
+        __M_writer(u'\n    \n')
+        # SOURCE LINE 16
+        __M_writer(u'\n\n')
+        # SOURCE LINE 37
+        __M_writer(u'\n\n')
+        # SOURCE LINE 48
+        __M_writer(u'\n\n')
+        # SOURCE LINE 151
+        __M_writer(u'\n\n')
+        # SOURCE LINE 156
+        __M_writer(u'\n\n')
+        # SOURCE LINE 191
+        __M_writer(u'\n\n')
+        # SOURCE LINE 195
+        __M_writer(u'\n\n')
+        # SOURCE LINE 198
+        __M_writer(u'<html>\n    ')
+        # SOURCE LINE 199
+        __M_writer(unicode(self.init()))
+        __M_writer(u'    \n    <head>\n    <title>')
+        # SOURCE LINE 201
+        __M_writer(unicode(self.title()))
+        __M_writer(u'</title>\n    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n    ')
+        # SOURCE LINE 203
+        __M_writer(unicode(self.stylesheets()))
+        __M_writer(u'\n    ')
+        # SOURCE LINE 204
+        __M_writer(unicode(self.javascripts()))
+        __M_writer(u'\n    </head>\n    \n    <body scroll="no" class="')
+        # SOURCE LINE 207
+        __M_writer(unicode(self.body_class))
+        __M_writer(u'">\n\t<div id="everything" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; min-width: 600px;">\n')
+        # SOURCE LINE 210
+        __M_writer(u'        <div id="background"></div>\n')
+        # SOURCE LINE 212
+        __M_writer(u'        <div id="masthead">\n            ')
+        # SOURCE LINE 213
+        __M_writer(unicode(self.masthead()))
+        __M_writer(u'\n        </div>\n        <div id="messagebox" class="panel-')
+        # SOURCE LINE 215
+        __M_writer(unicode(self.message_box_class))
+        __M_writer(u'-message">\n')
+        # SOURCE LINE 216
+        if self.message_box_visible:
+            # SOURCE LINE 217
+            __M_writer(u'                ')
+            __M_writer(unicode(self.message_box_content()))
+            __M_writer(u'\n')
+        # SOURCE LINE 219
+        __M_writer(u'        </div>\n    ')
+        # SOURCE LINE 220
+        __M_writer(unicode(self.overlay()))
+        __M_writer(u'\n')
+        # SOURCE LINE 221
+        if self.has_left_panel:
+            # SOURCE LINE 222
+            __M_writer(u'            <div id="left">\n                ')
+            # SOURCE LINE 223
+            __M_writer(unicode(self.left_panel()))
+            __M_writer(u'\n            </div>\n            <div id="left-border">\n                <div id="left-border-inner" style="display: none;"></div>\n            </div>\n')
+        # SOURCE LINE 229
+        __M_writer(u'        <div id="center">\n            ')
+        # SOURCE LINE 230
+        __M_writer(unicode(self.center_panel()))
+        __M_writer(u'\n        </div>\n')
+        # SOURCE LINE 232
+        if self.has_right_panel:
+            # SOURCE LINE 233
+            __M_writer(u'            <div id="right-border"><div id="right-border-inner" style="display: none;"></div></div>\n            <div id="right">\n                ')
+            # SOURCE LINE 235
+            __M_writer(unicode(self.right_panel()))
+            __M_writer(u'\n            </div>\n')
+        # SOURCE LINE 238
+        __M_writer(u'\t</div>\n')
+        # SOURCE LINE 240
+        __M_writer(u'    </body>\n')
+        # SOURCE LINE 243
+        __M_writer(u'    ')
+        __M_writer(unicode(self.late_javascripts()))
+        __M_writer(u'\n</html>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_message_box_content(context):
+    context.caller_stack._push_frame()
+    try:
+        __M_writer = context.writer()
+        # SOURCE LINE 194
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_overlay(context,title='',content=''):
+    context.caller_stack._push_frame()
+    try:
+        self = context.get('self', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 158
+        __M_writer(u'\n    ')
+        # SOURCE LINE 159
+        __M_writer(u'\n    ')
+        # SOURCE LINE 160
+        __M_writer(u'\n\n    <div id="overlay"\n')
+        # SOURCE LINE 163
+        if not self.overlay_visible:
+            # SOURCE LINE 164
+            __M_writer(u'    style="display: none;"\n')
+        # SOURCE LINE 166
+        __M_writer(u'    >\n')
+        # SOURCE LINE 168
+        __M_writer(u'    <div id="overlay-background" style="position: absolute; width: 100%; height: 100%;"></div>\n    \n')
+        # SOURCE LINE 171
+        __M_writer(u'    <table class="dialog-box-container" border="0" cellpadding="0" cellspacing="0"\n')
+        # SOURCE LINE 172
+        if not self.overlay_visible:
+            # SOURCE LINE 173
+            __M_writer(u'        style="display: none;"\n')
+        # SOURCE LINE 175
+        __M_writer(u'    ><tr><td>\n    <div class="dialog-box-wrapper">\n        <div class="dialog-box">\n        <div class="unified-panel-header">\n            <div class="unified-panel-header-inner"><span class=\'title\'>')
+        # SOURCE LINE 179
+        __M_writer(unicode(title))
+        __M_writer(u'</span></div>\n        </div>\n        <div class="body">')
+        # SOURCE LINE 181
+        __M_writer(unicode(content))
+        __M_writer(u'</div>\n        <div>\n            <div class="buttons" style="display: none; float: right;"></div>\n            <div class="extra_buttons" style="display: none; padding: 5px;"></div>\n            <div style="clear: both;"></div>\n        </div>\n        </div>\n    </div>\n    </td></tr></table>\n    </div>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_late_javascripts(context):
+    context.caller_stack._push_frame()
+    try:
+        h = context.get('h', UNDEFINED)
+        self = context.get('self', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 51
+        __M_writer(u'\n')
+        # SOURCE LINE 54
+        __M_writer(u'    ')
+        __M_writer(unicode(h.js( 'jquery.event.drag', 'jquery.event.hover', 'jquery.form', 'jquery.rating', 'galaxy.base', 'galaxy.panels' )))
+        __M_writer(u'\n    <script type="text/javascript">\n        \n    ensure_dd_helper();\n        \n')
+        # SOURCE LINE 59
+        if self.has_left_panel:
+            # SOURCE LINE 60
+            __M_writer(u'            var lp = make_left_panel( $("#left"), $("#center"), $("#left-border" ) );\n            force_left_panel = lp.force_panel;\n')
+        # SOURCE LINE 63
+        __M_writer(u'        \n')
+        # SOURCE LINE 64
+        if self.has_right_panel:
+            # SOURCE LINE 65
+            __M_writer(u'            var rp = make_right_panel( $("#right"), $("#center"), $("#right-border" ) );\n            handle_minwidth_hint = rp.handle_minwidth_hint;\n            force_right_panel = rp.force_panel;\n')
+        # SOURCE LINE 69
+        __M_writer(u'    \n    </script>\n')
+        # SOURCE LINE 72
+        __M_writer(u'    <![if !IE]>\n    <script type="text/javascript">\n        var upload_form_error = function( msg ) {\n            if ( ! $("iframe#galaxy_main").contents().find("body").find("div[class=\'errormessage\']").size() ) {\n                $("iframe#galaxy_main").contents().find("body").prepend( \'<div class="errormessage" name="upload_error">\' + msg + \'</div><p/>\' );\n            } else {\n                $("iframe#galaxy_main").contents().find("body").find("div[class=\'errormessage\']").text( msg );\n            }\n        }\n        jQuery( function() {\n            $("iframe#galaxy_main").load( function() {\n                $(this).contents().find("form").each( function() { \n                    if ( $(this).find("input[galaxy-ajax-upload]").length > 0 ){\n                        $(this).submit( function() {\n                            // Only bother using a hidden iframe if there\'s a file (e.g. big data) upload\n                            var file_upload = false;\n                            $(this).find("input[galaxy-ajax-upload]").each( function() {\n                                if ( $(this).val() != \'\' ) {\n                                    file_upload = true;\n                                }\n                            });\n                            if ( ! file_upload ) {\n                                return true;\n                            }\n                            // Make a synchronous request to create the datasets first\n                            var async_datasets;\n                            var upload_error = false;\n                            $.ajax( {\n                                async:      false,\n                                type:       "POST",\n                                url:        "')
+        # SOURCE LINE 102
+        __M_writer(unicode(h.url_for(controller='/tool_runner', action='upload_async_create')))
+        __M_writer(u'",\n                                data:       $(this).formSerialize(),\n                                dataType:   "json",\n                                success:    function(array_obj, status) {\n                                                if (array_obj.length > 0) {\n                                                    if (array_obj[0] == \'error\') {\n                                                        upload_error = true;\n                                                        upload_form_error(array_obj[1]);\n                                                    } else {\n                                                        async_datasets = array_obj.join();\n                                                    }\n                                                } else {\n                                                    // ( gvk 1/22/10 ) FIXME: this block is never entered, so there may be a bug somewhere\n                                                    // I\'ve done some debugging like checking to see if array_obj is undefined, but have not\n                                                    // tracked down the behavior that will result in this block being entered.  I believe the\n                                                    // intent was to have this block entered if the upload button is clicked on the upload\n                                                    // form but no file was selected.\n                                                    upload_error = true;\n                                                    upload_form_error( \'No data was entered in the upload form.  You may choose to upload a file, paste some data directly in the data box, or enter URL(s) to fetch data.\' );\n                                                }\n                                            }\n                            } );\n                            if (upload_error == true) {\n                                return false;\n                            } else {\n                                $(this).find("input[name=async_datasets]").val( async_datasets );\n                                $(this).append("<input type=\'hidden\' name=\'ajax_upload\' value=\'true\'>");\n                            }\n                            // iframe submit is required for nginx (otherwise the encoding is wrong)\n                            $(this).ajaxSubmit( { iframe: true } );\n                            if ( $(this).find("input[name=\'folder_id\']").val() != undefined ) {\n                                var library_id = $(this).find("input[name=\'library_id\']").val();\n                                var show_deleted = $(this).find("input[name=\'show_deleted\']").val();\n                                if ( location.pathname.indexOf( \'admin\' ) != -1 ) {\n                                    $("iframe#galaxy_main").attr("src","')
+        # SOURCE LINE 136
+        __M_writer(unicode(h.url_for( controller='library_common', action='browse_library' )))
+        __M_writer(u'?cntrller=library_admin&id=" + library_id + "&created_ldda_ids=" + async_datasets + "&show_deleted=" + show_deleted);\n                                } else {\n                                    $("iframe#galaxy_main").attr("src","')
+        # SOURCE LINE 138
+        __M_writer(unicode(h.url_for( controller='library_common', action='browse_library' )))
+        __M_writer(u'?cntrller=library&id=" + library_id + "&created_ldda_ids=" + async_datasets + "&show_deleted=" + show_deleted);\n                                }\n                            } else {\n                                $("iframe#galaxy_main").attr("src","')
+        # SOURCE LINE 141
+        __M_writer(unicode(h.url_for(controller='tool_runner', action='upload_async_message')))
+        __M_writer(u'");\n                            }\n                            return false;\n                        });\n                    }\n                });\n            });\n        });\n    </script>\n    <![endif]>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_stylesheets(context):
+    context.caller_stack._push_frame()
+    try:
+        h = context.get('h', UNDEFINED)
+        self = context.get('self', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 19
+        __M_writer(u'\n    ')
+        # SOURCE LINE 20
+        __M_writer(unicode(h.css('base','panel_layout','jquery.rating')))
+        __M_writer(u'\n    <style type="text/css">\n    #center {\n')
+        # SOURCE LINE 23
+        if not self.has_left_panel:
+            # SOURCE LINE 24
+            __M_writer(u'            left: 0;\n')
+        # SOURCE LINE 26
+        if not self.has_right_panel:
+            # SOURCE LINE 27
+            __M_writer(u'            right: 0;\n')
+        # SOURCE LINE 29
+        __M_writer(u'    }\n')
+        # SOURCE LINE 30
+        if self.message_box_visible:
+            # SOURCE LINE 31
+            __M_writer(u'        #left, #left-border, #center, #right-border, #right\n        {\n            top: 64px;\n        }\n')
+        # SOURCE LINE 36
+        __M_writer(u'    </style>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_init(context):
+    context.caller_stack._push_frame()
+    try:
+        __M_writer = context.writer()
+        # SOURCE LINE 14
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_masthead(context):
+    context.caller_stack._push_frame()
+    try:
+        __M_writer = context.writer()
+        # SOURCE LINE 154
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_javascripts(context):
+    context.caller_stack._push_frame()
+    try:
+        h = context.get('h', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 40
+        __M_writer(u'\n    <!--[if lt IE 7]>\n    ')
+        # SOURCE LINE 42
+        __M_writer(unicode(h.js( 'IE7', 'ie7-recalc' )))
+        __M_writer(u'\n    <![endif]-->\n    <script type="text/javascript">\n        var image_path = \'')
+        # SOURCE LINE 45
+        __M_writer(unicode(h.url_for("/static/images")))
+        __M_writer(u"';\n    </script>\n    ")
+        # SOURCE LINE 47
+        __M_writer(unicode(h.js( 'jquery' )))
+        __M_writer(u'\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
Index: galaxy-central/database/compiled_templates/tool_form.mako.py
===================================================================
--- galaxy-central/database/compiled_templates/tool_form.mako.py (revision 3)
+++ galaxy-central/database/compiled_templates/tool_form.mako.py (revision 3)
@@ -0,0 +1,427 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1287725781.101141
+_template_filename='templates/tool_form.mako'
+_template_uri='tool_form.mako'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['do_inputs', 'row_for_param']
+
+
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        add_frame = context.get('add_frame', UNDEFINED)
+        errors = context.get('errors', UNDEFINED)
+        h = context.get('h', UNDEFINED)
+        tool = context.get('tool', UNDEFINED)
+        def do_inputs(inputs,tool_state,errors,prefix,other_values=None):
+            return render_do_inputs(context.locals_(__M_locals),inputs,tool_state,errors,prefix,other_values)
+        len = context.get('len', UNDEFINED)
+        util = context.get('util', UNDEFINED)
+        unicode = context.get('unicode', UNDEFINED)
+        type = context.get('type', UNDEFINED)
+        tool_state = context.get('tool_state', UNDEFINED)
+        trans = context.get('trans', UNDEFINED)
+        AttributeError = context.get('AttributeError', UNDEFINED)
+        app = context.get('app', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 1
+        __M_writer(u'<!-- -->\n<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\n')
+        # SOURCE LINE 4
+
+        from galaxy.util.expressions import ExpressionContext 
+        
+        
+        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['ExpressionContext'] if __M_key in __M_locals_builtin()]))
+        # SOURCE LINE 6
+        __M_writer(u'\n\n<html>\n\n<head>\n<title>Galaxy</title>\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n')
+        # SOURCE LINE 13
+        __M_writer(unicode(h.css( "base", "autocomplete_tagging" )))
+        __M_writer(u'\n')
+        # SOURCE LINE 14
+        __M_writer(unicode(h.js( "jquery", "galaxy.base", "jquery.autocomplete" )))
+        __M_writer(u'\n<script type="text/javascript">\n$(function() {\n    $(window).bind("refresh_on_change", function() {\n        $(\':file\').each( function() {\n            var file = $(this);\n            var file_value = file.val();\n            if (file_value) {\n                // disable file input, since we don\'t want to upload the file on refresh\n                var file_name = $(this).attr("name");\n                file.attr( { name: \'replaced_file_input_\' + file_name, disabled: true } );\n                // create a new hidden field which stores the filename and has the original name of the file input\n                var new_file_input = $(document.createElement(\'input\'));\n                new_file_input.attr( { "type", "hidden", "value": file_value, "name": file_name } );\n                file.after(new_file_input);\n            }\n        });\n    });\n});\n\n')
+        # SOURCE LINE 34
+        if not add_frame.debug:
+            # SOURCE LINE 35
+            __M_writer(u'    if( window.name != "galaxy_main" ) {\n        location.replace( \'')
+            # SOURCE LINE 36
+            __M_writer(unicode(h.url_for( controller='root', action='index', tool_id=tool.id )))
+            __M_writer(u"' );\n    }\n")
+        # SOURCE LINE 39
+        __M_writer(u'function checkUncheckAll( name, check )\n{\n    if ( check == 0 )\n    {\n        $("input[name=" + name + "][type=\'checkbox\']").attr(\'checked\', false);\n    }\n    else\n    {\n        $("input[name=" + name + "][type=\'checkbox\']").attr(\'checked\', true );\n    }\n}\n\n</script>\n</head>\n\n<body>\n    ')
+        # SOURCE LINE 128
+        __M_writer(u'\n    \n    ')
+        # SOURCE LINE 169
+        __M_writer(u'\n    \n')
+        # SOURCE LINE 171
+        if add_frame.from_noframe:
+            # SOURCE LINE 172
+            __M_writer(u'        <div class="warningmessage">\n        <strong>Welcome to Galaxy</strong>\n        <hr/>\n        It appears that you found this tool from a link outside of Galaxy.\n        If you\'re not familiar with Galaxy, please consider visiting the\n        <a href="')
+            # SOURCE LINE 177
+            __M_writer(unicode(h.url_for( controller='root' )))
+            __M_writer(u'" target="_top">welcome page</a>.\n        To learn more about what Galaxy is and what it can do for you, please visit\n        the <a href="$add_frame.wiki_url" target="_top">Galaxy wiki</a>.\n        </div>\n        <br/>\n')
+        # SOURCE LINE 183
+        __M_writer(u'    \n')
+        # SOURCE LINE 186
+        __M_writer(u'    ')
+
+        try:   
+            tool_url = h.url_for(tool.action)
+        except AttributeError:
+            assert len(tool.action) == 2
+            tool_url = tool.action[0] + h.url_for(tool.action[1])
+            
+        
+        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['tool_url'] if __M_key in __M_locals_builtin()]))
+        # SOURCE LINE 192
+        __M_writer(u'<div class="toolForm" id="')
+        __M_writer(unicode(tool.id))
+        __M_writer(u'">\n')
+        # SOURCE LINE 193
+        if tool.has_multiple_pages:
+            # SOURCE LINE 194
+            __M_writer(u'            <div class="toolFormTitle">')
+            __M_writer(unicode(tool.name))
+            __M_writer(u' (step ')
+            __M_writer(unicode(tool_state.page+1))
+            __M_writer(u' of ')
+            __M_writer(unicode(tool.npages))
+            __M_writer(u')</div>\n')
+            # SOURCE LINE 195
+        else:
+            # SOURCE LINE 196
+            __M_writer(u'            <div class="toolFormTitle">')
+            __M_writer(unicode(tool.name))
+            __M_writer(u'</div>\n')
+        # SOURCE LINE 198
+        __M_writer(u'        <div class="toolFormBody">\n            <form id="tool_form" name="tool_form" action="')
+        # SOURCE LINE 199
+        __M_writer(unicode(tool_url))
+        __M_writer(u'" enctype="')
+        __M_writer(unicode(tool.enctype))
+        __M_writer(u'" target="')
+        __M_writer(unicode(tool.target))
+        __M_writer(u'" method="')
+        __M_writer(unicode(tool.method))
+        __M_writer(u'">\n                <input type="hidden" name="tool_id" value="')
+        # SOURCE LINE 200
+        __M_writer(unicode(tool.id))
+        __M_writer(u'">\n                <input type="hidden" name="tool_state" value="')
+        # SOURCE LINE 201
+        __M_writer(unicode(util.object_to_string( tool_state.encode( tool, app ) )))
+        __M_writer(u'">\n')
+        # SOURCE LINE 202
+        if tool.display_by_page[tool_state.page]:
+            # SOURCE LINE 203
+            __M_writer(u'                    ')
+            __M_writer(unicode(trans.fill_template_string( tool.display_by_page[tool_state.page], context=tool.get_param_html_map( trans, tool_state.page, tool_state.inputs ) )))
+            __M_writer(u'\n                    <input type="submit" class="primary-button" name="runtool_btn" value="Execute">\n')
+            # SOURCE LINE 205
+        else:
+            # SOURCE LINE 206
+            __M_writer(u'                    ')
+            __M_writer(unicode(do_inputs( tool.inputs_by_page[ tool_state.page ], tool_state.inputs, errors, "" )))
+            __M_writer(u'\n                    <div class="form-row">\n')
+            # SOURCE LINE 208
+            if tool_state.page == tool.last_page:
+                # SOURCE LINE 209
+                __M_writer(u'                            <input type="submit" class="primary-button" name="runtool_btn" value="Execute">\n')
+                # SOURCE LINE 210
+            else:
+                # SOURCE LINE 211
+                __M_writer(u'                            <input type="submit" class="primary-button" name="runtool_btn" value="Next step">\n')
+            # SOURCE LINE 213
+            __M_writer(u'                    </div>\n')
+        # SOURCE LINE 215
+        __M_writer(u'            </form>\n        </div>\n    </div>\n')
+        # SOURCE LINE 218
+        if tool.help:
+            # SOURCE LINE 219
+            __M_writer(u'        <div class="toolHelp">\n            <div class="toolHelpBody">\n                ')
+            # SOURCE LINE 221
+
+            if tool.has_multiple_pages:
+                tool_help = tool.help_by_page[tool_state.page]
+            else:
+                tool_help = tool.help
+            
+            # Convert to unicode to display non-ascii characters.
+            if type( tool_help ) is not unicode:
+                tool_help = unicode( tool_help, 'utf-8')
+                            
+            
+            __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['tool_help'] if __M_key in __M_locals_builtin()]))
+            # SOURCE LINE 230
+            __M_writer(u'\n                ')
+            # SOURCE LINE 231
+            __M_writer(unicode(tool_help))
+            __M_writer(u'\n            </div>        \n        </div>\n')
+        # SOURCE LINE 235
+        __M_writer(u'</body>\n\n<script type="text/javascript">\n')
+        # SOURCE LINE 239
+        __M_writer(u"   $( function() {\n       $( 'li > ul' ).each( function( i ) {\n           if ( $( this )[0].className == 'toolParameterExpandableCollapsable' )\n           {\n               var parent_li = $( this ).parent( 'li' );\n               var sub_ul = $( this ).remove();\n               parent_li.find( 'span' ).wrapInner( '<a/>' ).find( 'a' ).click( function() {\n                 sub_ul.toggle();\n                 $( this )[0].innerHTML = ( sub_ul[0].style.display=='none' ) ? '[+]' : '[-]';\n               });\n               parent_li.append( sub_ul );\n           }\n       });\n       $( 'ul ul' ).each( function(i) {\n           if ( $( this )[0].className == 'toolParameterExpandableCollapsable' && this.attributes.getNamedItem( 'default_state' ).value == 'collapsed' )\n           {\n               $( this ).hide();\n           }\n       });\n   });\n\n")
+        # SOURCE LINE 261
+        __M_writer(u'$( function() {\n    $("div.checkUncheckAllPlaceholder").each( function( i ) {\n        $( this )[0].innerHTML = \'<a class="action-button" onclick="checkUncheckAll( \\\'\' + this.attributes.getNamedItem( \'checkbox_name\' ).value + \'\\\', 1 );"><span>Select All</span></a> <a class="action-button" onclick="checkUncheckAll( \\\'\' + this.attributes.getNamedItem( \'checkbox_name\' ).value + \'\\\', 0 );"><span>Unselect All</span></a>\';\n    });\n});\n\n</script>\n\n</html>\n')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_do_inputs(context,inputs,tool_state,errors,prefix,other_values=None):
+    context.caller_stack._push_frame()
+    try:
+        def row_for_param(prefix,param,parent_state,parent_errors,other_values):
+            return render_row_for_param(context,prefix,param,parent_state,parent_errors,other_values)
+        h = context.get('h', UNDEFINED)
+        def do_inputs(inputs,tool_state,errors,prefix,other_values=None):
+            return render_do_inputs(context,inputs,tool_state,errors,prefix,other_values)
+        len = context.get('len', UNDEFINED)
+        range = context.get('range', UNDEFINED)
+        dict = context.get('dict', UNDEFINED)
+        str = context.get('str', UNDEFINED)
+        enumerate = context.get('enumerate', UNDEFINED)
+        trans = context.get('trans', UNDEFINED)
+        ExpressionContext = context.get('ExpressionContext', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 55
+        __M_writer(u'\n      ')
+        # SOURCE LINE 56
+        other_values = ExpressionContext( tool_state, other_values ) 
+        
+        __M_writer(u'\n')
+        # SOURCE LINE 57
+        for input_index, input in enumerate( inputs.itervalues() ):
+            # SOURCE LINE 58
+            if input.type == "repeat":
+                # SOURCE LINE 59
+                __M_writer(u'              <div class="repeat-group">\n                  <div class="form-title-row"><b>')
+                # SOURCE LINE 60
+                __M_writer(unicode(input.title_plural))
+                __M_writer(u'</b></div>\n                  ')
+                # SOURCE LINE 61
+                repeat_state = tool_state[input.name] 
+                
+                __M_writer(u'\n')
+                # SOURCE LINE 62
+                for i in range( len( repeat_state ) ):
+                    # SOURCE LINE 63
+                    __M_writer(u'                    <div class="repeat-group-item">\n                    ')
+                    # SOURCE LINE 64
+
+                    if input.name in errors:
+                        rep_errors = errors[input.name][i]
+                    else:
+                        rep_errors = dict()
+                    index = repeat_state[i]['__index__']
+                    
+                    
+                    # SOURCE LINE 70
+                    __M_writer(u'\n                    <div class="form-title-row"><b>')
+                    # SOURCE LINE 71
+                    __M_writer(unicode(input.title))
+                    __M_writer(u' ')
+                    __M_writer(unicode(i + 1))
+                    __M_writer(u'</b></div>\n                    ')
+                    # SOURCE LINE 72
+                    __M_writer(unicode(do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )))
+                    __M_writer(u'\n                    <div class="form-row"><input type="submit" name="')
+                    # SOURCE LINE 73
+                    __M_writer(unicode(prefix))
+                    __M_writer(unicode(input.name))
+                    __M_writer(u'_')
+                    __M_writer(unicode(index))
+                    __M_writer(u'_remove" value="Remove ')
+                    __M_writer(unicode(input.title))
+                    __M_writer(u' ')
+                    __M_writer(unicode(i+1))
+                    __M_writer(u'"></div>\n                    </div>\n')
+                    # SOURCE LINE 75
+                    if rep_errors.has_key( '__index__' ):
+                        # SOURCE LINE 76
+                        __M_writer(u'                        <div><img style="vertical-align: middle;" src="')
+                        __M_writer(unicode(h.url_for('/static/style/error_small.png')))
+                        __M_writer(u'">&nbsp;<span style="vertical-align: middle;">')
+                        __M_writer(unicode(rep_errors['__index__']))
+                        __M_writer(u'</span></div>\n')
+                # SOURCE LINE 79
+                __M_writer(u'                  <div class="form-row"><input type="submit" name="')
+                __M_writer(unicode(prefix))
+                __M_writer(unicode(input.name))
+                __M_writer(u'_add" value="Add new ')
+                __M_writer(unicode(input.title))
+                __M_writer(u'"></div>\n              </div>\n')
+                # SOURCE LINE 81
+            elif input.type == "conditional":
+                # SOURCE LINE 82
+                __M_writer(u'                ')
+
+                group_state = tool_state[input.name]
+                group_errors = errors.get( input.name, {} )
+                current_case = group_state['__current_case__']
+                group_prefix = prefix + input.name + "|"
+                
+                
+                # SOURCE LINE 87
+                __M_writer(u'\n')
+                # SOURCE LINE 88
+                if input.value_ref_in_group:
+                    # SOURCE LINE 89
+                    __M_writer(u'                    ')
+                    __M_writer(unicode(row_for_param( group_prefix, input.test_param, group_state, group_errors, other_values )))
+                    __M_writer(u'\n')
+                # SOURCE LINE 91
+                __M_writer(u'                ')
+                __M_writer(unicode(do_inputs( input.cases[current_case].inputs, group_state, group_errors, group_prefix, other_values )))
+                __M_writer(u'\n')
+                # SOURCE LINE 92
+            elif input.type == "upload_dataset":
+                # SOURCE LINE 93
+                if input.get_datatype( trans, other_values ).composite_type is None: #have non-composite upload appear as before
+                    # SOURCE LINE 94
+                    __M_writer(u'                    ')
+
+                    if input.name in errors:
+                        rep_errors = errors[input.name][0]
+                    else:
+                        rep_errors = dict()
+                    
+                    
+                    # SOURCE LINE 99
+                    __M_writer(u'\n                  ')
+                    # SOURCE LINE 100
+                    __M_writer(unicode(do_inputs( input.inputs, tool_state[input.name][0], rep_errors, prefix + input.name + "_" + str( 0 ) + "|", other_values )))
+                    __M_writer(u'\n')
+                    # SOURCE LINE 101
+                else:
+                    # SOURCE LINE 102
+                    __M_writer(u'                    <div class="repeat-group">\n                        <div class="form-title-row"><b>')
+                    # SOURCE LINE 103
+                    __M_writer(unicode(input.group_title( other_values )))
+                    __M_writer(u'</b></div>\n                        ')
+                    # SOURCE LINE 104
+ 
+                    repeat_state = tool_state[input.name] 
+                    
+                    
+                    # SOURCE LINE 106
+                    __M_writer(u'\n')
+                    # SOURCE LINE 107
+                    for i in range( len( repeat_state ) ):
+                        # SOURCE LINE 108
+                        __M_writer(u'                          <div class="repeat-group-item">\n                          ')
+                        # SOURCE LINE 109
+
+                        if input.name in errors:
+                            rep_errors = errors[input.name][i]
+                        else:
+                            rep_errors = dict()
+                        index = repeat_state[i]['__index__']
+                        
+                        
+                        # SOURCE LINE 115
+                        __M_writer(u'\n                          <div class="form-title-row"><b>File Contents for ')
+                        # SOURCE LINE 116
+                        __M_writer(unicode(input.title_by_index( trans, i, other_values )))
+                        __M_writer(u'</b></div>\n                          ')
+                        # SOURCE LINE 117
+                        __M_writer(unicode(do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )))
+                        __M_writer(u'\n')
+                        # SOURCE LINE 119
+                        __M_writer(u'                          </div>\n')
+                    # SOURCE LINE 122
+                    __M_writer(u'                    </div>\n')
+                # SOURCE LINE 124
+            else:
+                # SOURCE LINE 125
+                __M_writer(u'                ')
+                __M_writer(unicode(row_for_param( prefix, input, tool_state, errors, other_values )))
+                __M_writer(u'\n')
+        # SOURCE LINE 128
+        __M_writer(u'    ')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
+def render_row_for_param(context,prefix,param,parent_state,parent_errors,other_values):
+    context.caller_stack._push_frame()
+    try:
+        h = context.get('h', UNDEFINED)
+        trans = context.get('trans', UNDEFINED)
+        type = context.get('type', UNDEFINED)
+        unicode = context.get('unicode', UNDEFINED)
+        __M_writer = context.writer()
+        # SOURCE LINE 130
+        __M_writer(u'\n        ')
+        # SOURCE LINE 131
+
+        if parent_errors.has_key( param.name ):
+            cls = "form-row form-row-error"
+        else:
+            cls = "form-row"
+        
+        
+        # SOURCE LINE 136
+        __M_writer(u'\n        <div class="')
+        # SOURCE LINE 137
+        __M_writer(unicode(cls))
+        __M_writer(u'">\n            ')
+        # SOURCE LINE 138
+        label = param.get_label() 
+        
+        __M_writer(u'\n')
+        # SOURCE LINE 139
+        if label:
+            # SOURCE LINE 140
+            __M_writer(u'                <label>\n                    ')
+            # SOURCE LINE 141
+            __M_writer(unicode(label))
+            __M_writer(u':\n                </label>\n')
+        # SOURCE LINE 144
+        __M_writer(u'            ')
+
+        field = param.get_html_field( trans, parent_state[ param.name ], other_values )
+        field.refresh_on_change = param.refresh_on_change
+        
+        # Field may contain characters submitted by user and these characters may be unicode; handle non-ascii characters gracefully.
+        field_html = field.get_html( prefix )
+        if type( field_html ) is not unicode:
+            field_html = unicode( field_html, 'utf-8' )
+                    
+        
+        # SOURCE LINE 152
+        __M_writer(u'\n            <div class="form-row-input">')
+        # SOURCE LINE 153
+        __M_writer(unicode(field_html))
+        __M_writer(u'</div>\n')
+        # SOURCE LINE 154
+        if parent_errors.has_key( param.name ):
+            # SOURCE LINE 155
+            __M_writer(u'            <div class="form-row-error-message">\n                <div><img style="vertical-align: middle;" src="')
+            # SOURCE LINE 156
+            __M_writer(unicode(h.url_for('/static/style/error_small.png')))
+            __M_writer(u'">&nbsp;<span style="vertical-align: middle;">')
+            __M_writer(unicode(parent_errors[param.name]))
+            __M_writer(u'</span></div>\n            </div>\n')
+        # SOURCE LINE 159
+        __M_writer(u'            \n')
+        # SOURCE LINE 160
+        if param.help:
+            # SOURCE LINE 161
+            __M_writer(u'            <div class="toolParamHelp" style="clear: both;">\n                ')
+            # SOURCE LINE 162
+            __M_writer(unicode(param.help))
+            __M_writer(u'\n            </div>\n')
+        # SOURCE LINE 165
+        __M_writer(u'    \n            <div style="clear: both"></div>\n                    \n        </div>\n    ')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
