Skip to content

Commit

Permalink
renamed checklists and surveys dashboard to
Browse files Browse the repository at this point in the history
response rate dashboard

resolves nditech/apollo-issues#70
  • Loading branch information
takinbo committed Aug 17, 2021
1 parent 671bfa8 commit 22d0baf
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions apollo/frontend/views_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def main_dashboard(form_id=None):
daily_stratified_progress = []

template_name = 'frontend/dashboard.html'
breadcrumbs = [_('Dashboard')]
breadcrumbs = [_('Response Rate Dashboard')]

event = get_event()
if not form_id:
Expand Down Expand Up @@ -233,19 +233,14 @@ def index():

@route(bp, '/dashboard/<form_id>')
@register_menu(
bp, 'main.dashboard.checklists', _('Checklists'),
bp, 'main.dashboard.checklists', _('Response Rate'),
order=0,
visible_when=lambda: len(
get_checklist_form_dashboard_menu(form_type='CHECKLIST')) > 0,
dynamic_list_constructor=partial(
get_checklist_form_dashboard_menu, form_type='CHECKLIST'))
@register_menu(
bp, 'main.dashboard.surveys', _('Surveys'),
order=1,
visible_when=lambda: len(
get_checklist_form_dashboard_menu(form_type='CHECKLIST') + \
get_checklist_form_dashboard_menu(form_type='SURVEY')) > 0,
dynamic_list_constructor=partial(
get_checklist_form_dashboard_menu, form_type='SURVEY'))
dynamic_list_constructor=lambda: \
get_checklist_form_dashboard_menu(form_type='CHECKLIST') + \
get_checklist_form_dashboard_menu(form_type='SURVEY'))
@login_required
def checklists(form_id=None):
return main_dashboard(form_id)
Expand Down

0 comments on commit 22d0baf

Please sign in to comment.