From bd703af53edfd450a94985b79dd7f76f2278d6f6 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Mon, 18 Jul 2022 13:17:00 +0700 Subject: [PATCH] Add view statment src --- templates/problem/feed.html | 2 ++ templates/problem/list-base.html | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/templates/problem/feed.html b/templates/problem/feed.html index d30f7ac..0fd482c 100644 --- a/templates/problem/feed.html +++ b/templates/problem/feed.html @@ -52,6 +52,8 @@ {{ problem.description|markdown("problem", MATH_ENGINE)|reference|str|safe }} {% endcache %} {% if feed_type=='volunteer' and request.user.has_perm('judge.suggest_problem_changes') %} + {{ _('View source') }} +

{{_('Volunteer form')}}


diff --git a/templates/problem/list-base.html b/templates/problem/list-base.html index b5dce9c..d1b6a53 100644 --- a/templates/problem/list-base.html +++ b/templates/problem/list-base.html @@ -155,6 +155,10 @@ }); } {% if feed_type=='volunteer' and request.user.has_perm('judge.suggest_problem_changes') %} + $(".view-statement-src").on('click', function(e) { + e.preventDefault(); + $(this).siblings('.statement-src').toggle(); + }); $(".edit-btn").on('click', function() { var pid = $(this).attr('pid'); $('#volunteer-types-' + pid).css({'width': '100%'});