Switch to unified view

a/Allura/allura/model/project.py b/Allura/allura/model/project.py
...
...
442
        if not h.re_path_portion.match(name):
442
        if not h.re_path_portion.match(name):
443
            raise exceptions.ToolError, 'Mount point "%s" is invalid' % name
443
            raise exceptions.ToolError, 'Mount point "%s" is invalid' % name
444
        provider = plugin.ProjectRegistrationProvider.get()
444
        provider = plugin.ProjectRegistrationProvider.get()
445
        return provider.register_subproject(self, name, user or c.user, install_apps)
445
        return provider.register_subproject(self, name, user or c.user, install_apps)
446
446
447
    def ordered_mounts(self):
447
    def ordered_mounts(self, include_search=False):
448
        '''Returns an array of a projects mounts (tools and sub-projects) in
448
        '''Returns an array of a projects mounts (tools and sub-projects) in
449
        toolbar order.'''
449
        toolbar order.'''
450
        result = []
450
        result = []
451
        for sub in self.direct_subprojects:
451
        for sub in self.direct_subprojects:
452
            result.append({'ordinal':sub.ordinal, 'sub':sub})
452
            result.append({'ordinal':sub.ordinal, 'sub':sub})
453
        for ac in self.app_configs:
453
        for ac in self.app_configs:
454
            if ac.tool_name != 'search':
454
            if include_search or ac.tool_name != 'search':
455
                ordinal = ac.options.get('ordinal', 0)
455
                ordinal = ac.options.get('ordinal', 0)
456
                result.append({'ordinal':ordinal, 'ac':ac})
456
                result.append({'ordinal':ordinal, 'ac':ac})
457
        return sorted(result, key=lambda e: e['ordinal'])
457
        return sorted(result, key=lambda e: e['ordinal'])
458
458
459
    def first_mount(self, required_access=None):
459
    def first_mount(self, required_access=None):
...
...
546
                for perm in self.permissions ]
546
                for perm in self.permissions ]
547
            for user in users:
547
            for user in users:
548
                pr = user.project_role()
548
                pr = user.project_role()
549
                pr.roles = [ role_admin._id, role_developer._id, role_member._id ]
549
                pr.roles = [ role_admin._id, role_developer._id, role_member._id ]
550
            # Setup apps
550
            # Setup apps
551
            for ep_name, mount_point, label in apps:
551
            for i, (ep_name, mount_point, label) in enumerate(apps):
552
                self.install_app(ep_name, mount_point, label)
552
                self.install_app(ep_name, mount_point, label, ordinal=i)
553
            if ForgeWikiApp is not None:
553
            if ForgeWikiApp is not None:
554
                home_app = self.app_instance('home')
554
                home_app = self.app_instance('home')
555
                if isinstance(home_app, ForgeWikiApp):
555
                if isinstance(home_app, ForgeWikiApp):
556
                    home_app.show_discussion = False
556
                    home_app.show_discussion = False
557
                    home_app.show_left_bar = False
557
                    home_app.show_left_bar = False