aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2022-06-29 09:22:05 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2022-06-29 09:22:05 -0400
commit534149f29466e5e7b20097612b44114ba60ce9b5 (patch)
tree6efe45bc424b77c276087f8ed85e61be6717d884
parent84a8b6b29b065a2b85fc992a6221ddbb65be414a (diff)
downloadlevitating-534149f29466e5e7b20097612b44114ba60ce9b5.tar.gz
levitating-534149f29466e5e7b20097612b44114ba60ce9b5.zip
Added releases to job pages in gemini
-rw-r--r--captain/external.f9022
1 files changed, 21 insertions, 1 deletions
diff --git a/captain/external.f90 b/captain/external.f90
index 766bd2e..8008e66 100644
--- a/captain/external.f90
+++ b/captain/external.f90
@@ -78,6 +78,7 @@ contains
function generate_one_job_gemini(req) result(res)
use captain_db
use server_response
+ use config
use special_filenames, only: get_task_result_static_filename
use request_utils, only: get_status_utf8, get_player_link => player_link, &
get_instruction_link => instruction_link, &
@@ -96,7 +97,9 @@ contains
type(task), dimension(:), pointer::tasks
character(32)::task_text, job_text, task_type
character(len=:), pointer::task_results_filename
- character(len=:), pointer::player_link, instruction_link, result_link
+ character(len=:), pointer::player_link, instruction_link, result_link, one_link
+
+ character(len=FILENAME_NAME_LENGTH), dimension(:), pointer::releases
res => null()
@@ -152,6 +155,23 @@ contains
res = trim(res)//nl//nl//"None reported yet"
end if
+ if(get_job_upload_count_by_category_db(job_id, "releases") > 0 .and. &
+ req%auth_level >= global_permissions%get("access-releases")) &
+ then
+
+ res = trim(res)//nl//nl//"### Releases"
+ releases => get_job_uploads_by_category_db(job_id, "releases")
+ do i = 1, size(releases)
+
+ one_link => build_link("../releases/"//trim(releases(i)), &
+ trim(releases(i)), .true., req%token)
+
+ res = trim(res)//nl//trim(one_link)
+
+ end do
+
+ end if
+
else
allocate(character(len=64) :: res)