<%def name="user_menu()" filter="trim">

Users

View All Users

Options for My Account

View My Profile

Edit My Basic Details

Change My Password

% if check_perms(current_user, 'edit-roles'):

Edit My Roles and Permissions

% endif % if user and current_user.id != user.id:

Options for ${user.username.title()|h}'s Account

View ${user.username.title()|h}'s Profile

% if check_perms(user, 'edit'):

Edit ${user.username.title()|h}'s Basic Details

% endif % if check_perms(user, 'edit-password'):

Change ${user.username.title()|h}'s Password

% endif % if check_perms(user, 'edit-roles'):

Edit ${user.username.title()|h}'s Roles and Permissions

% endif % endif <%def name="tasks_menu()" filter="trim"> % if check_perms("Case", 'manage'):

Case Management

Add new Case

View Created Cases (${created_cases|h})

View Open Cases (${open_cases|h})

% endif % if check_perms("Case", 'examiner'):

Investigations

View Unassigned Tasks (${unassigned_tasks|h})

View Open Cases (${open_cases|h})

<% inv_flag = 0 %>

Cases I have work to do

To Start

% for case in user_cases: <% tasks = [task for task in case.tasks if current_user in task.investigators and task.status == task_statuses['start']] %> % if len(tasks) > 0: <% inv_flag = inv_flag + 1 %>

${case.case_name|h} (${len(tasks)}) % for task in tasks:
${task.task_name|h} % endfor

% endif % endfor % if inv_flag == 0:

None

% endif <% inv_flag = 0 %>

To Complete Investigation

% for case in user_cases: <% tasks = [task for task in case.tasks if current_user in task.investigators and task.status == task_statuses['progress']] %> % if len(tasks) > 0: <% inv_flag = inv_flag + 1 %>

${case.case_name|h} (${len(tasks)}) % for task in tasks:
${task.task_name|h} % endfor

% endif % endfor % if inv_flag == 0:

None

% endif <% inv_flag = 0 %>

To Deliver

% for case in user_cases: <% tasks = [task for task in case.tasks if current_user in task.investigators and task.status == task_statuses['deliver']] %> % if len(tasks) > 0: <% inv_flag = inv_flag + 1 %>

${case.case_name|h} (${len(tasks)}) % for task in tasks:
${task.task_name|h} % endfor

% endif % endfor % if inv_flag == 0:

None

% endif <% inv_flag = 0 %>

To QA

% for case in user_qa_cases: <% tasks = [task for task in case.tasks if current_user in task.QAs and task.status in qaRoles] %> % if len(tasks) > 0: <% inv_flag = inv_flag + 1 %>

${case.case_name|h} (${len(tasks)}) % for task in tasks:
${task.task_name|h} % endfor

% endif % endfor % if inv_flag == 0:

None

% endif <% inv_flag = 0 %>

Cases I have in QA

% for case in user_cases: <% tasks = [task for task in case.tasks if current_user in task.investigators and task.status in qaRoles] %> % if len(tasks) > 0: <% inv_flag = inv_flag + 1 %>

${case.case_name|h} (${len(tasks)}) % for task in tasks:
${task.task_name|h} % endfor

% endif % endfor % if inv_flag == 0:

None

% endif % endif