From 23658216114fb400b34b5c29bebf6f5b2f88d615 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 29 2017 13:01:25 +0000 Subject: Adjust the indentation in the comment_update template Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/comment_update.html b/pagure/templates/comment_update.html index 2220c36..6cb83fa 100644 --- a/pagure/templates/comment_update.html +++ b/pagure/templates/comment_update.html @@ -44,28 +44,28 @@ } $("#update_comment").atwho(userConfig); }); - $.when( - {% if config.get('ENABLE_TICKETS', True) %} + $.when( + {% if config.get('ENABLE_TICKETS', True) %} $.get("{{ url_for('api_ns.api_view_issues', namespace=repo.namespace, repo=repo.name, username=username, status='all') }}"), - {% endif %} - $.get("{{ url_for('api_ns.api_pull_request_views', namespace=repo.namespace, repo=repo.name, username=username, status='all') }}") - ).done(function(issuesResp, prResp) { - // 0 is the api response - var issuesAndPrs = issuesResp[0]['issues'].concat(prResp[0]['requests']); - var data = $.map(issuesAndPrs, function(ticket, idx) { - return { - name: ticket.id.toString(), - title: $('
').text(ticket.title).html() - } - }); - var issueAndPrConfig = { - at: '#', - data: data, - insertTpl: '#${name}', - displayTpl: "
  • #${name} ${title}
  • ", - } - $("#update_comment").atwho(issueAndPrConfig); - }) + {% endif %} + $.get("{{ url_for('api_ns.api_pull_request_views', namespace=repo.namespace, repo=repo.name, username=username, status='all') }}") + ).done(function(issuesResp, prResp) { + // 0 is the api response + var issuesAndPrs = issuesResp[0]['issues'].concat(prResp[0]['requests']); + var data = $.map(issuesAndPrs, function(ticket, idx) { + return { + name: ticket.id.toString(), + title: $('
    ').text(ticket.title).html() + } + }); + var issueAndPrConfig = { + at: '#', + data: data, + insertTpl: '#${name}', + displayTpl: "
  • #${name} ${title}
  • ", + } + $("#update_comment").atwho(issueAndPrConfig); + }) {% endblock %}