diff --git a/pagure/static/pagure.css b/pagure/static/pagure.css index b7f57ac..6b2ab93 100644 --- a/pagure/static/pagure.css +++ b/pagure/static/pagure.css @@ -811,3 +811,24 @@ ul.changes { table.sortable th:not(.sorttable_sorted):not(.sorttable_sorted_reverse):not(.sorttable_nosort):after { content: " \25B4\25BE" } + + +span.NO_CHANGE { + padding-left: 20px; + background: url(/static/grey.png) 0 50% no-repeat; +} + +span.FFORWARD { + padding-left: 20px; + background: url(/static/green.png) 0 50% no-repeat; +} + +span.MERGE { + padding-left: 20px; + background: url(/static/orange.png) 0 50% no-repeat; +} + +span.CONFLICTS { + padding-left: 20px; + background: url(/static/red.png) 0 50% no-repeat; +} diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 42fc5c2..a58c480 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -427,6 +427,27 @@ $(obj).html(preview); }); + $(function(){ + $.ajax({ + url: '{{ url_for("internal_ns.mergeable_request_pull") }}' , + type: 'POST', + data: { + requestid: "{{ pull_request.uid }}", + csrf_token: "{{ mergeform.csrf_token.current_token }}", + }, + dataType: 'json', + success: function(res) { + var _obj = $('.header .buttons'); + _obj.prepend($('
  • ')); + }, + error: function() { + alert('Unable to generate preview!'); + } + }); + return false; + }); + {% endif %} });