diff options
Diffstat (limited to 'captain/requtils.f90')
-rw-r--r-- | captain/requtils.f90 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/captain/requtils.f90 b/captain/requtils.f90 index 742f8ac..b28500e 100644 --- a/captain/requtils.f90 +++ b/captain/requtils.f90 @@ -283,4 +283,30 @@ contains end function render_jobs_links + subroutine get_job_page_title(req, title) + use captain_db + use server_response + implicit none + + type(request), intent(in)::req + character(*), intent(out)::title + + integer::job_id, i + character(32)::job_text + character(PLAYER_NAME_LENGTH)::instruction_name + + ! All this to get the job id + call req%last_component(job_text) + i = index(job_text, ".") + job_text(i:len(job_text)) = " " + read(job_text, '(I8)') job_id + + ! Request instruction name + i = get_job_instruction(job_id) + call get_instruction_name(i, instruction_name) + + title = "Job "//trim(job_text)//" - "//trim(instruction_name) + + end subroutine get_job_page_title + end module request_utils
\ No newline at end of file |