48 Params: |
48 Params: |
49 params: a dict with params for this View |
49 params: a dict with params for this View |
50 """ |
50 """ |
51 |
51 |
52 rights = access.Checker(params) |
52 rights = access.Checker(params) |
53 rights['edit'] = ['checkCanEditTimeline'] |
53 rights['edit'] = [('checkCanEditTimeline', [program_logic.logic])] |
54 |
54 |
55 new_params = {} |
55 new_params = {} |
56 new_params['rights'] = rights |
56 new_params['rights'] = rights |
57 # TODO: Change to basic timeline when GSoC has been moved to module system |
57 # TODO: Change to basic timeline when GSoC has been moved to module system |
58 new_params['logic'] = gsoc.logic.models.timeline.logic |
58 new_params['logic'] = gsoc.logic.models.timeline.logic |
59 new_params['edit_template'] = 'soc/timeline/edit.html' |
59 new_params['edit_template'] = 'soc/timeline/edit.html' |
60 new_params['name'] = "Timeline" |
60 new_params['name'] = "Timeline" |
61 |
61 |
62 patterns = [(r'^%(url_name)s/(?P<access_type>edit)/%(key_fields)s$', |
62 patterns = [(r'^%(url_name)s/(?P<access_type>edit)/%(key_fields)s$', |
63 'soc.views.models.%(module_name)s.edit', |
63 '%(module_package)s.%(module_name)s.edit', |
64 "Edit %(name_short)s")] |
64 "Edit %(name_short)s")] |
65 |
65 |
66 new_params['create_extra_dynaproperties'] = { |
66 new_params['create_extra_dynaproperties'] = { |
67 'link_id': forms.CharField(widget=forms.HiddenInput) |
67 'link_id': forms.CharField(widget=forms.HiddenInput) |
68 } |
68 } |