Switch to unified view

a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py
...
...
519
                        'change neighborhood project list url to %s'
519
                        'change neighborhood project list url to %s'
520
                        % project_list_url)
520
                        % project_list_url)
521
        tracking_id = kw.get('tracking_id', '')
521
        tracking_id = kw.get('tracking_id', '')
522
        h.log_if_changed(nbhd, 'tracking_id', tracking_id,
522
        h.log_if_changed(nbhd, 'tracking_id', tracking_id,
523
                        'update neighborhood tracking_id')
523
                        'update neighborhood tracking_id')
524
        default_tools = kw.get('default_tools', '')
524
        anchored_tools = kw.get('anchored_tools', '')
525
        validate_tools = dict()
525
        validate_tools = dict()
526
        result = True
526
        result = True
527
        if default_tools.strip() != '':
527
        if anchored_tools.strip() != '':
528
            try:
528
            try:
529
                validate_tools = dict((tool.split(':')[0].lower(), tool.split(':')[1]) for tool in default_tools.replace(' ', '').split(','))
529
                validate_tools = dict((tool.split(':')[0].lower(), tool.split(':')[1]) for tool in anchored_tools.replace(' ', '').split(','))
530
            except Exception:
530
            except Exception:
531
                flash('Default tools "%s" is invalid' % default_tools,'error')
531
                flash('Anchored tools "%s" is invalid' % anchored_tools,'error')
532
                result = False
532
                result = False
533
533
534
534
535
        for tool in validate_tools.keys():
535
        for tool in validate_tools.keys():
536
            if not h.re_path_portion.match(tool):
536
            if not h.re_path_portion.match(tool):
537
                flash('Default tools "%s" is invalid' % default_tools,'error')
537
                flash('Anchored tools "%s" is invalid' % anchored_tools,'error')
538
                result = False
538
                result = False
539
        if result:
539
        if result:
540
            h.log_if_changed(nbhd, 'default_tools', default_tools,
540
            h.log_if_changed(nbhd, 'anchored_tools', anchored_tools,
541
                             'update neighborhood default tools')
541
                             'update neighborhood anchored tools')
542
542
543
        if icon is not None and icon != '':
543
        if icon is not None and icon != '':
544
            if self.neighborhood.icon:
544
            if self.neighborhood.icon:
545
                self.neighborhood.icon.delete()
545
                self.neighborhood.icon.delete()
546
            M.AuditLog.log('update neighborhood icon')
546
            M.AuditLog.log('update neighborhood icon')